Skip to content

Commit a477e3a

Browse files
committed
Merge tag 'char-misc-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here is a small set of char/misc and other smaller driver subsystem fixes for 6.6-rc6. Included in here are: - lots of iio driver fixes - binder memory leak fix - mcb driver fixes - counter driver fixes - firmware loader documentation fix - documentation update for embargoed hardware issues All of these have been in linux-next for over a week with no reported issues" * tag 'char-misc-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (22 commits) iio: pressure: ms5611: ms5611_prom_is_valid false negative bug dt-bindings: iio: adc: adi,ad7292: Fix additionalProperties on channel nodes iio: adc: ad7192: Correct reference voltage iio: light: vcnl4000: Don't power on/off chip in config iio: addac: Kconfig: update ad74413r selections iio: pressure: dps310: Adjust Timeout Settings iio: imu: bno055: Fix missing Kconfig dependencies iio: adc: imx8qxp: Fix address for command buffer registers iio: cros_ec: fix an use-after-free in cros_ec_sensors_push_data() iio: irsd200: fix -Warray-bounds bug in irsd200_trigger_handler dt-bindings: iio: rohm,bu27010: add missing vdd-supply to example binder: fix memory leaks of spam and pending work firmware_loader: Update contact emails for ABI docs Documentation: embargoed-hardware-issues.rst: Clarify prenotifaction mcb: remove is_added flag from mcb_device struct coresight: tmc-etr: Disable warnings for allocation failures coresight: Fix run time warnings while reusing ETR buffer iio: admv1013: add mixer_vgate corner cases iio: pressure: bmp280: Fix NULL pointer exception iio: dac: ad3552r: Correct device IDs ...
2 parents 19fd4a9 + ffd1f15 commit a477e3a

File tree

24 files changed

+94
-62
lines changed

24 files changed

+94
-62
lines changed

Documentation/ABI/testing/sysfs-class-firmware

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
What: /sys/class/firmware/.../data
22
Date: July 2022
33
KernelVersion: 5.19
4-
Contact: Russ Weight <russell.h.weight@intel.com>
4+
Contact: Russ Weight <russ.weight@linux.dev>
55
Description: The data sysfs file is used for firmware-fallback and for
66
firmware uploads. Cat a firmware image to this sysfs file
77
after you echo 1 to the loading sysfs file. When the firmware
@@ -13,7 +13,7 @@ Description: The data sysfs file is used for firmware-fallback and for
1313
What: /sys/class/firmware/.../cancel
1414
Date: July 2022
1515
KernelVersion: 5.19
16-
Contact: Russ Weight <russell.h.weight@intel.com>
16+
Contact: Russ Weight <russ.weight@linux.dev>
1717
Description: Write-only. For firmware uploads, write a "1" to this file to
1818
request that the transfer of firmware data to the lower-level
1919
device be canceled. This request will be rejected (EBUSY) if
@@ -23,7 +23,7 @@ Description: Write-only. For firmware uploads, write a "1" to this file to
2323
What: /sys/class/firmware/.../error
2424
Date: July 2022
2525
KernelVersion: 5.19
26-
Contact: Russ Weight <russell.h.weight@intel.com>
26+
Contact: Russ Weight <russ.weight@linux.dev>
2727
Description: Read-only. Returns a string describing a failed firmware
2828
upload. This string will be in the form of <STATUS>:<ERROR>,
2929
where <STATUS> will be one of the status strings described
@@ -37,7 +37,7 @@ Description: Read-only. Returns a string describing a failed firmware
3737
What: /sys/class/firmware/.../loading
3838
Date: July 2022
3939
KernelVersion: 5.19
40-
Contact: Russ Weight <russell.h.weight@intel.com>
40+
Contact: Russ Weight <russ.weight@linux.dev>
4141
Description: The loading sysfs file is used for both firmware-fallback and
4242
for firmware uploads. Echo 1 onto the loading file to indicate
4343
you are writing a firmware file to the data sysfs node. Echo
@@ -49,7 +49,7 @@ Description: The loading sysfs file is used for both firmware-fallback and
4949
What: /sys/class/firmware/.../remaining_size
5050
Date: July 2022
5151
KernelVersion: 5.19
52-
Contact: Russ Weight <russell.h.weight@intel.com>
52+
Contact: Russ Weight <russ.weight@linux.dev>
5353
Description: Read-only. For firmware upload, this file contains the size
5454
of the firmware data that remains to be transferred to the
5555
lower-level device driver. The size value is initialized to
@@ -62,15 +62,15 @@ Description: Read-only. For firmware upload, this file contains the size
6262
What: /sys/class/firmware/.../status
6363
Date: July 2022
6464
KernelVersion: 5.19
65-
Contact: Russ Weight <russell.h.weight@intel.com>
65+
Contact: Russ Weight <russ.weight@linux.dev>
6666
Description: Read-only. Returns a string describing the current status of
6767
a firmware upload. The string will be one of the following:
6868
idle, "receiving", "preparing", "transferring", "programming".
6969

7070
What: /sys/class/firmware/.../timeout
7171
Date: July 2022
7272
KernelVersion: 5.19
73-
Contact: Russ Weight <russell.h.weight@intel.com>
73+
Contact: Russ Weight <russ.weight@linux.dev>
7474
Description: This file supports the timeout mechanism for firmware
7575
fallback. This file has no affect on firmware uploads. For
7676
more information on timeouts please see the documentation

Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ patternProperties:
6161
required:
6262
- reg
6363

64-
additionalProperties: true
64+
additionalProperties: false
6565

6666
allOf:
6767
- $ref: /schemas/spi/spi-peripheral-props.yaml#

Documentation/devicetree/bindings/iio/light/rohm,bu27010.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ examples:
4545
light-sensor@38 {
4646
compatible = "rohm,bu27010";
4747
reg = <0x38>;
48+
vdd-supply = <&vdd>;
4849
};
4950
};

Documentation/process/embargoed-hardware-issues.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ Contact
2525
The Linux kernel hardware security team is separate from the regular Linux
2626
kernel security team.
2727

28-
The team only handles the coordination of embargoed hardware security
29-
issues. Reports of pure software security bugs in the Linux kernel are not
28+
The team only handles developing fixes for embargoed hardware security
29+
issues. Reports of pure software security bugs in the Linux kernel are not
3030
handled by this team and the reporter will be guided to contact the regular
3131
Linux kernel security team (:ref:`Documentation/admin-guide/
3232
<securitybugs>`) instead.
3333

3434
The team can be contacted by email at <hardware-security@kernel.org>. This
35-
is a private list of security officers who will help you to coordinate an
36-
issue according to our documented process.
35+
is a private list of security officers who will help you to coordinate a
36+
fix according to our documented process.
3737

3838
The list is encrypted and email to the list can be sent by either PGP or
3939
S/MIME encrypted and must be signed with the reporter's PGP key or S/MIME
@@ -132,11 +132,11 @@ other hardware could be affected.
132132

133133
The hardware security team will provide an incident-specific encrypted
134134
mailing-list which will be used for initial discussion with the reporter,
135-
further disclosure and coordination.
135+
further disclosure, and coordination of fixes.
136136

137137
The hardware security team will provide the disclosing party a list of
138138
developers (domain experts) who should be informed initially about the
139-
issue after confirming with the developers that they will adhere to this
139+
issue after confirming with the developers that they will adhere to this
140140
Memorandum of Understanding and the documented process. These developers
141141
form the initial response team and will be responsible for handling the
142142
issue after initial contact. The hardware security team is supporting the
@@ -209,13 +209,18 @@ five work days this is taken as silent acknowledgement.
209209
After acknowledgement or resolution of an objection the expert is disclosed
210210
by the incident team and brought into the development process.
211211

212+
List participants may not communicate about the issue outside of the
213+
private mailing list. List participants may not use any shared resources
214+
(e.g. employer build farms, CI systems, etc) when working on patches.
215+
212216

213217
Coordinated release
214218
"""""""""""""""""""
215219

216220
The involved parties will negotiate the date and time where the embargo
217221
ends. At that point the prepared mitigations are integrated into the
218-
relevant kernel trees and published.
222+
relevant kernel trees and published. There is no pre-notification process:
223+
fixes are published in public and available to everyone at the same time.
219224

220225
While we understand that hardware security issues need coordinated embargo
221226
time, the embargo time should be constrained to the minimum time which is

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8110,7 +8110,7 @@ F: include/linux/arm_ffa.h
81108110

81118111
FIRMWARE LOADER (request_firmware)
81128112
M: Luis Chamberlain <mcgrof@kernel.org>
8113-
M: Russ Weight <russell.h.weight@intel.com>
8113+
M: Russ Weight <russ.weight@linux.dev>
81148114
L: linux-kernel@vger.kernel.org
81158115
S: Maintained
81168116
F: Documentation/firmware_class/

drivers/android/binder.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4812,6 +4812,8 @@ static void binder_release_work(struct binder_proc *proc,
48124812
"undelivered TRANSACTION_ERROR: %u\n",
48134813
e->cmd);
48144814
} break;
4815+
case BINDER_WORK_TRANSACTION_PENDING:
4816+
case BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT:
48154817
case BINDER_WORK_TRANSACTION_COMPLETE: {
48164818
binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
48174819
"undelivered TRANSACTION_COMPLETE\n");

drivers/counter/counter-chrdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ static int counter_get_ext(const struct counter_comp *const ext,
247247
if (*id == component_id)
248248
return 0;
249249

250-
if (ext->type == COUNTER_COMP_ARRAY) {
251-
element = ext->priv;
250+
if (ext[*ext_idx].type == COUNTER_COMP_ARRAY) {
251+
element = ext[*ext_idx].priv;
252252

253253
if (component_id - *id < element->length)
254254
return 0;

drivers/counter/microchip-tcb-capture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int mchp_tc_count_function_write(struct counter_device *counter,
9797
priv->qdec_mode = 0;
9898
/* Set highest rate based on whether soc has gclk or not */
9999
bmr &= ~(ATMEL_TC_QDEN | ATMEL_TC_POSEN);
100-
if (priv->tc_cfg->has_gclk)
100+
if (!priv->tc_cfg->has_gclk)
101101
cmr |= ATMEL_TC_TIMER_CLOCK2;
102102
else
103103
cmr |= ATMEL_TC_TIMER_CLOCK1;

drivers/hwtracing/coresight/coresight-tmc-etr.c

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ static int tmc_etr_alloc_flat_buf(struct tmc_drvdata *drvdata,
610610

611611
flat_buf->vaddr = dma_alloc_noncoherent(real_dev, etr_buf->size,
612612
&flat_buf->daddr,
613-
DMA_FROM_DEVICE, GFP_KERNEL);
613+
DMA_FROM_DEVICE,
614+
GFP_KERNEL | __GFP_NOWARN);
614615
if (!flat_buf->vaddr) {
615616
kfree(flat_buf);
616617
return -ENOMEM;
@@ -1173,16 +1174,6 @@ static struct etr_buf *tmc_etr_get_sysfs_buffer(struct coresight_device *csdev)
11731174
goto out;
11741175
}
11751176

1176-
/*
1177-
* In sysFS mode we can have multiple writers per sink. Since this
1178-
* sink is already enabled no memory is needed and the HW need not be
1179-
* touched, even if the buffer size has changed.
1180-
*/
1181-
if (drvdata->mode == CS_MODE_SYSFS) {
1182-
atomic_inc(&csdev->refcnt);
1183-
goto out;
1184-
}
1185-
11861177
/*
11871178
* If we don't have a buffer or it doesn't match the requested size,
11881179
* use the buffer allocated above. Otherwise reuse the existing buffer.
@@ -1204,7 +1195,7 @@ static struct etr_buf *tmc_etr_get_sysfs_buffer(struct coresight_device *csdev)
12041195

12051196
static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
12061197
{
1207-
int ret;
1198+
int ret = 0;
12081199
unsigned long flags;
12091200
struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
12101201
struct etr_buf *sysfs_buf = tmc_etr_get_sysfs_buffer(csdev);
@@ -1213,12 +1204,24 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
12131204
return PTR_ERR(sysfs_buf);
12141205

12151206
spin_lock_irqsave(&drvdata->spinlock, flags);
1207+
1208+
/*
1209+
* In sysFS mode we can have multiple writers per sink. Since this
1210+
* sink is already enabled no memory is needed and the HW need not be
1211+
* touched, even if the buffer size has changed.
1212+
*/
1213+
if (drvdata->mode == CS_MODE_SYSFS) {
1214+
atomic_inc(&csdev->refcnt);
1215+
goto out;
1216+
}
1217+
12161218
ret = tmc_etr_enable_hw(drvdata, sysfs_buf);
12171219
if (!ret) {
12181220
drvdata->mode = CS_MODE_SYSFS;
12191221
atomic_inc(&csdev->refcnt);
12201222
}
12211223

1224+
out:
12221225
spin_unlock_irqrestore(&drvdata->spinlock, flags);
12231226

12241227
if (!ret)

drivers/iio/adc/ad7192.c

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ struct ad7192_chip_info {
177177
struct ad7192_state {
178178
const struct ad7192_chip_info *chip_info;
179179
struct regulator *avdd;
180+
struct regulator *vref;
180181
struct clk *mclk;
181182
u16 int_vref_mv;
182183
u32 fclk;
@@ -1008,10 +1009,30 @@ static int ad7192_probe(struct spi_device *spi)
10081009
if (ret)
10091010
return dev_err_probe(&spi->dev, ret, "Failed to enable specified DVdd supply\n");
10101011

1011-
ret = regulator_get_voltage(st->avdd);
1012-
if (ret < 0) {
1013-
dev_err(&spi->dev, "Device tree error, reference voltage undefined\n");
1014-
return ret;
1012+
st->vref = devm_regulator_get_optional(&spi->dev, "vref");
1013+
if (IS_ERR(st->vref)) {
1014+
if (PTR_ERR(st->vref) != -ENODEV)
1015+
return PTR_ERR(st->vref);
1016+
1017+
ret = regulator_get_voltage(st->avdd);
1018+
if (ret < 0)
1019+
return dev_err_probe(&spi->dev, ret,
1020+
"Device tree error, AVdd voltage undefined\n");
1021+
} else {
1022+
ret = regulator_enable(st->vref);
1023+
if (ret) {
1024+
dev_err(&spi->dev, "Failed to enable specified Vref supply\n");
1025+
return ret;
1026+
}
1027+
1028+
ret = devm_add_action_or_reset(&spi->dev, ad7192_reg_disable, st->vref);
1029+
if (ret)
1030+
return ret;
1031+
1032+
ret = regulator_get_voltage(st->vref);
1033+
if (ret < 0)
1034+
return dev_err_probe(&spi->dev, ret,
1035+
"Device tree error, Vref voltage undefined\n");
10151036
}
10161037
st->int_vref_mv = ret / 1000;
10171038

0 commit comments

Comments
 (0)