5.10.258-rc1 review
Subsystems (5)
Re: [PATCH 5.10 072/589] media: uvcvideo: Use heuristic to find stream entity
In reply to Greg Kroah-HartmanQuoted 7 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
[ Upstream commit
758dbc756aad429da11c569c0d067f7fd032bcf7]
This doesn't properly fix the problem. Commit 3d9f32e02c2e "media:
uvcvideo: Create an ID namespace for streaming output terminals" (which reverts this) needs to be applied on top. I haven't checked whether that would apply cleanly.
Ben.
Quoted 65 lines
Some devices, like the Grandstream GUV3100 webcam, have an invalid UVC descriptor where multiple entities share the same ID, this is invalid and makes it impossible to make a proper entity tree without heuristics.
We have recently introduced a change in the way that we handle invalid entities that has caused a regression on broken devices.
Implement a new heuristic to handle these devices properly.
Reported-by Angel4005 <[email protected]>Closes https://lore.kernel.org/linux-media/CAOzBiVuS7ygUjjhCbyWg-KiNx+HFTYnqH5+GJhd6cYsNLT=DaA@mail.gmail.com/ open hereFixes 0e2ee70291e6 ("media: uvcvideo: Mark invalid entities with id UVC_INVALID_ENTITY_ID")Signed-off-by Ricardo Ribalda <[email protected]>Reviewed-by Hans de Goede <[email protected]>Signed-off-by Hans Verkuil <[email protected]>Tested-by Ron Economos <[email protected]>Tested-by Pavel Machek (CIP) <[email protected]>Tested-by Brett A C Sheffield <[email protected]>Tested-by Mark Brown <[email protected]>Tested-by Barry K. Nathan <[email protected]>Tested-by Peter Schneider <[email protected]>Tested-by Francesco Dolcini <[email protected]>Tested-by Shuah Khan <[email protected]>Tested-by Jon Hunter <[email protected]>Tested-by Florian Fainelli <[email protected]>Tested-by Miguel Ojeda <[email protected]>Tested-by Vijayendra Suman <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- drivers/media/usb/uvc/uvc_driver.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)drivers/media/usb/uvc/uvc_driver.c +14
-1@@ -442,13 +442,26 @@ static struct uvc_entity *uvc_entity_by_reference(struct uvc_device *dev,static struct uvc_streaming *uvc_stream_by_id (struct uvc_device *dev,int id) { -struct uvc_streaming *stream; +struct uvc_streaming *stream, *last_stream; +unsigned int count =0 ;list_for_each_entry (stream, &dev->streams, list) { + count +=1 ; + last_stream = stream;if (stream->header.bTerminalLink == id)return stream; } +/* +* If the streaming entity is referenced by an invalid ID, notify the +* user and use heuristics to guess the correct entity. +*/ +if (count ==1 && id ==UVC_INVALID_ENTITY_ID ) { +dev_warn (&dev->intf->dev, +"UVC non compliance: Invalid USB header. The streaming entity has an invalid ID, guessing the correct one." ); +return last_stream; + } +return NULL ; }
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Quoted 6 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.258 release. There are 589 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Built OK on i386, installed on a 32-bit device, no issues noticed
Re: [PATCH 5.10 095/589] ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
In reply to Greg Kroah-HartmanQuoted 16 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengfeng Ye <[email protected]>
commit
b97053df0f04747c3c1e021ecbe99db675342954upstream.The pointer
cs_descreturn fromsnd_usb_find_clock_sourcecould be null, so there is a potential null pointer dereference issue. Fix this by adding a null check before dereference.Signed-off-by Chengfeng Ye <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Fixes 1dc669fed61a ("ALSA: usb-audio: UAC2: support read-only freq control")
Quoted 5 lines
[ kovalev: bp to fix CVE-2021-47211; added Fixes tag; the null
check was added into both UAC2 and UAC3 branches since the older kernel still has the clock source lookup split betweensnd_usb_find_clock_source()andsnd_usb_find_clock_source_v3()(see upstream commit9ec730052fa2) ]
In the upstream version the return statement was added in snd_usb_set_sample_rate_v2v3(), so set_sample_rate_v2v3() will do:
cur_rate = snd_usb_set_sample_rate_v2v3(chip, fmt, clock, rate); // = 0
if (cur_rate < 0) ... // false
if (!cur_rate) // true
cur_rate = prev_rate;
if (cur_rate != rate) ... validation:
if (!uac_clock_source_is_valid(chip, fmt, clock)) // true because clock soure is missing
return -ENXIO;
so it will ultimately return -ENXIO.
Whereas this backport puts the return statements in set_sample_rate_v2v3(), so it directly returns 0 i.e. silently fails. Shouldn't these be changed to return -ENXIO?
Ben.
Quoted 28 lines
Signed-off-by Vasiliy Kovalev <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- sound/usb/clock.c | 6 ++++++ 1 file changed, 6 insertions(+)sound/usb/clock.c +6
-0@@ -646,11 +646,17 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip, int iface,struct uac3_clock_source_descriptor *cs_desc; cs_desc =snd_usb_find_clock_source_v3 (chip->ctrl_intf, clock); + +if (!cs_desc) +return 0 ; bmControls =le32_to_cpu (cs_desc->bmControls); }else {struct uac_clock_source_descriptor *cs_desc; cs_desc =snd_usb_find_clock_source (chip->ctrl_intf, clock); + +if (!cs_desc) +return 0 ; bmControls = cs_desc->bmControls; }
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Re: [PATCH 5.10 101/589] rxrpc: Fix key quota calculation for multitoken keys
In reply to Greg Kroah-HartmanQuoted 14 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit
bdbfead6d38979475df0c2f4bad2b19394fe9bdc]In the rxrpc key preparsing, every token extracted sets the proposed quota value, but for multitoken keys, this will overwrite the previous proposed quota, losing it.
Fix this by adding to the proposed quota instead.
Quoted 11 lines
Fixes 8a7a3eb4ddbe ("KEYS: RxRPC: Use key preparsing")Signed-off-by David Howells <[email protected]>cc Marc Dionne <[email protected]>cc Jeffrey Altman <[email protected]>cc Simon Horman <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>[ dropped hunk for rxrpc_preparse_xdr_yfs_rxgk() ]
Indeed 5.10 does not have that key type, but it does have rxrpc_preparse_xdr_rxk5() which I think also needs to be updated.
Ben.
Quoted 36 lines
Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- net/rxrpc/key.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/rxrpc/key.c +3
-2@@ -108,7 +108,7 @@ static int rxrpc_preparse_xdr_rxkad(strureturn -EKEYREJECTED ; plen =sizeof (*token) +sizeof (*token->kad) + tktlen; - prep->quotalen = datalen + plen; + prep->quotalen += datalen + plen; plen -=sizeof (*token); token =kzalloc (sizeof (*token),GFP_KERNEL );@@ -718,6 +718,7 @@ static int rxrpc_preparse(struct key_prememcpy (&kver, prep->data,sizeof (kver)); prep->data +=sizeof (kver); prep->datalen -=sizeof (kver); + prep->quotalen =0 ;_debug ("KEY I/F VERSION: %u" , kver);@@ -755,7 +756,7 @@ static int rxrpc_preparse(struct key_pre goto error; plen =sizeof (*token->kad) + v1->ticket_length; - prep->quotalen = plen +sizeof (*token); + prep->quotalen += plen +sizeof (*token); ret = -ENOMEM ; token =kzalloc (sizeof (*token),GFP_KERNEL );
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Re: [PATCH 5.10 114/589] arm64: dts: imx8mq-librem5: Dont mark buck3 as always on
In reply to Greg Kroah-HartmanQuoted 9 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guido Günther <[email protected]>
[ Upstream commit
99e71c029213d3cfcc4f39a534c73d1828ffb341]With the pmic driver fixed we can now shut off the regulator in the gpc.
But not for all hardware revisions. We need commit a362b0cc94d4 "arm64:
dts: imx8mq-librem5-r3: Mark buck3 as always on" on top of this.
Ben.
Quoted 22 lines
Signed-off-by Guido Günther <[email protected]>Signed-off-by Martin Kepplinger <[email protected]>Signed-off-by Shawn Guo <[email protected]>Stable-dep-of:
511f76bf1dce("arm64: dts: imx8mq-librem5: Bump BUCK1 suspend voltage up to 0.85V")Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 - 1 file changed, 1 deletion(-)arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +0
-1@@ -671,7 +671,6 @@ regulator-min-microvolt = <700000>; regulator-max-microvolt = <1300000>; rohm,dvs-run-voltage = <900000>; - regulator-always-on; }; buck4_reg: BUCK4 {
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Re: [PATCH 5.10 096/589] scsi: ufs: core: Improve SCSI abort handling
In reply to Greg Kroah-HartmanQuoted 7 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
commit
3ff1f6b6ba6f97f50862aa50e79959cc8ddc2566upstream.
Since there are no patches to ufshcd in this series besides this and its revert, it seems like you should drop both of them.
Ben.
Quoted 44 lines
The following has been observed on a test setup:
WARNING: CPU: 4 PID: 250 at drivers/scsi/ufs/ufshcd.c:2737 ufshcd_queuecommand+0x468/0x65c Call trace: ufshcd_queuecommand+0x468/0x65c scsi_send_eh_cmnd+0x224/0x6a0 scsi_eh_test_devices+0x248/0x418 scsi_eh_ready_devs+0xc34/0xe58 scsi_error_handler+0x204/0x80c kthread+0x150/0x1b4 ret_from_fork+0x10/0x30That warning is triggered by the following statement:
WARN_ON(lrbp->cmd);Fix this warning by clearing
lrbp->cmdfrom the abort handler.Fixes 7a3e97b0dc4b ("[SCSI] ufshcd: UFS Host controller driver")Reviewed-by Bean Huo <[email protected]>Reviewed-by Stanley Chu <[email protected]>Signed-off-by Bart Van Assche <[email protected]>Signed-off-by Martin K. Petersen <[email protected]>[ kovalev: bp to fix CVE-2021-47188; adapted placement of
lrbp->cmd= NULL for 5.10 function structure ]Signed-off-by Vasiliy Kovalev <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+)drivers/scsi/ufs/ufshcd.c +1
-0@@ -6788,6 +6788,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)__ufshcd_transfer_req_compl (hba, (1UL << tag));spin_unlock_irqrestore (host->host_lock, flags); out: + lrbp->cmd =NULL ; err =SUCCESS ; }else {dev_err (hba->dev,"%s: failed with err %d\n" , __func__, err);
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Re: [PATCH 5.10 095/589] ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
In reply to Ben HutchingsQuoted 35 lines · Ben Hutchings
Quoted 16 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengfeng Ye <[email protected]>
commit
b97053df0f04747c3c1e021ecbe99db675342954upstream.The pointer
cs_descreturn fromsnd_usb_find_clock_sourcecould be null, so there is a potential null pointer dereference issue. Fix this by adding a null check before dereference.Signed-off-by Chengfeng Ye <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Fixes 1dc669fed61a ("ALSA: usb-audio: UAC2: support read-only freq control")Quoted 5 lines
[ kovalev: bp to fix CVE-2021-47211; added Fixes tag; the null
check was added into both UAC2 and UAC3 branches since the older kernel still has the clock source lookup split betweensnd_usb_find_clock_source()andsnd_usb_find_clock_source_v3()(see upstream commit9ec730052fa2) ]In the upstream version the return statement was added in
snd_usb_set_sample_rate_v2v3(), soset_sample_rate_v2v3()will do:cur_rate = snd_usb_set_sample_rate_v2v3(chip, fmt, clock, rate); // = 0 if (cur_rate < 0) ... // false if (!cur_rate) // true cur_rate = prev_rate; if (cur_rate != rate) ...validation:
if (!uac_clock_source_is_valid(chip, fmt, clock)) // true because clock soure is missing
return-ENXIO;
Quoted 7 lines
so it will ultimately return
-ENXIO.Whereas this backport puts the return statements in
set_sample_rate_v2v3(), so it directly returns 0 i.e. silently fails. Shouldn't these be changed to return-ENXIO?Ben.
Hi Ben,
You're right. In 5.10 set_sample_rate_v2v3() is a single function, so return 0 here is consumed as success by snd_usb_pcm_prepare(), diverging from upstream which ends up at -ENXIO via !uac_clock_source_is_valid().
v2 sent: https://lore.kernel.org/all/[email protected]/
Signature · 2 lines
Thanks, Vasiliy
Re: [PATCH 5.10 176/589] KVM: nSVM: Mark all of vmcb02 dirty when restoring nested state
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
Quoted 8 lines
From: Yosry Ahmed <[email protected]>
commit
e63fb1379f4b9300a44739964e69549bebbcdca4upstream.When restoring a vCPU in guest mode, any state restored before
KVM_SET_NESTED_STATE(e.g.KVM_SET_SREGS) will mark the corresponding dirty bits in vmcb01, as it is the active VMCB before switching to vmcb02 insvm_set_nested_state().
Given thow much svm_set_nested_state() has changed since 5.10, I'm having a hard time seeing how this fix can work here, particularly without commit 4995a3685f1b "KVM: SVM: Use a separate vmcb for the nested L2 guest". Has this been tested on 5.10?
Ben.
Quoted 31 lines
Hence, mark all fields in vmcb02 dirty in
svm_set_nested_state()to capture any previously restored fields.Fixes cc440cdad5b7 ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE")Signed-off-by Yosry Ahmed <[email protected]>Signed-off-by Sean Christopherson <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/x86/kvm/svm/nested.c | 6 ++++++ 1 file changed, 6 insertions(+)arch/x86/kvm/svm/nested.c +6
-0@@ -1236,6 +1236,12 @@ static int svm_set_nested_state(struct k goto out_free;/* +* Any previously restored state (e.g. KVM_SET_SREGS) would mark fields +* dirty in vmcb01 instead of vmcb02, so mark all of vmcb02 dirty here. +*/ +vmcb_mark_all_dirty (svm->vmcb); + +/* * All checks done, we can enter guest mode. L1 control fields * come from the nested save state. Guest state is already * in the registers, the save area of the nested state instead
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Re: [PATCH 5.10 177/589] KVM: nSVM: Sync NextRIP to cached vmcb12 after VMRUN of L2
In reply to Greg Kroah-HartmanQuoted 40 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yosry Ahmed <[email protected]>
commit
778d8c1b2a6ffe622ddcd3bb35b620e6e41f4da0upstream.After VMRUN in guest mode,
nested_sync_control_from_vmcb02()syncs fields written by the CPU from vmcb02 to the cached vmcb12. This is because the cached vmcb12 is used as the authoritative copy of some of the controls, and is the payload when saving/restoring nested state.NextRIP is also written by the CPU (in some cases) after VMRUN, but is not sync'd to the cached vmcb12. As a result, it is corrupted after save/restore (replaced by the original value written by L1 on nested VMRUN). This could cause problems for both KVM (e.g. when injecting a soft IRQ) or L1 (e.g. when using NextRIP to advance RIP after emulating an instruction).
Fix this by sync'ing NextRIP to the cache after VMRUN of L2, but only after completing interrupts (not in
nested_sync_control_from_vmcb02()), as KVM may update NextRIP (e.g. when re-injecting a soft IRQ).Fixes cc440cdad5b7 ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE")Co-developed-by Sean Christopherson <[email protected]>Signed-off-by Yosry Ahmed <[email protected]>Signed-off-by Sean Christopherson <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/x86/kvm/svm/svm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/x86/kvm/svm/svm.c +0
-0@@ -3677,6 +3677,16 @@ static __no_kcsan fastpath_t svm_vcpu_ruif (is_guest_mode (vcpu))return EXIT_FASTPATH_NONE ;
arch/x86/kvm/svm/svm.c static __no_kcsan fastpath_t svm_vcpu_ru · line 3688
Quoted 10 lines
arch/x86/kvm/svm/svm.c +9
-0+/* +* Update the cache after completing interrupts to get an accurate +* NextRIP, e.g. when re-injecting a soft interrupt. +* +* FIXME: Rework svm_get_nested_state() to not pull data from the +* cache (except for maybe int_ctl). +*/ +if (is_guest_mode (vcpu)) + svm->nested.ctl.next_rip = svm->vmcb->control.next_rip;
I don't know whether this assignment would be a correct fix for 5.10, but in this version it is unreachable because of the previous if- statement.
Ben.
Quoted 6 lines
arch/x86/kvm/svm/svm.c +1
-0+return svm_exit_handlers_fastpath (vcpu); }
Signature · 3 lines
Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once.
Re: [PATCH 5.10 002/589] ASoC: SOF: topology: reject invalid vendor array size in token parser
In reply to Ben HutchingsHi!
Quoted 11 lines · Ben Hutchings
Review
Quoted 5 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
(quoted diff) +1
-1/* validate asize */ - if (asize < 0) { /* FIXME: A zero-size array makes no sense */ + if (asize < sizeof(*array)) {asize is signed and this comparison coerces it to be unsigned. So non- negative values of asize that are too small will be correctly rejected here, but negative values will now be accepted.
Quoted 1 line
I think this creates a worse security problem than it solves.
Thanks for catching this.
In order to keep the minimum header-size validation but force the comparison to remain signed, I think we can do this:
if (asize < (int)sizeof(*array))
While checking this further, I also noticed a separate parser-hardening issue:sof_parse_token_sets() reads array->size before checking that the remaining private data contains a full struct snd_soc_tplg_vendor_array header.
So, on top of the signed comparison fix, the safer ordering would be:
--->8
sound/soc/sof/topology.c +3 -0
@@ -740,6 +740,9 @@ static int sof_parse_token_sets(struct snd_soc_component *scomp,int ret;while (array_size >0 && total < count * token_instance_num) { +if (array_size < (int )sizeof (*array)) +return -EINVAL ; + asize =le32_to_cpu (array->size);/* validate asize */
8<---
The added check prevents a truncated-header read before dereferencing array->size. The existing signed asize check then validates the declared vendor-array size.
Let me know what you guys think.
Signature · 2 lines
Thanks, Cássio
Sasha Levin
maintainerRe: [PATCH 5.10 027/589] xfrm: Wait for RCU readers during policy netns exit
In reply to Ben HutchingsQuoted 5 lines · Ben Hutchings
This is broken - it needs commit
3e5241731847"xfrm: movepolicy_bydstRCU sync from per-netns .exit to .pre_exit" as a further fix.I haven't checked whether that applies cleanly or needs backporting work.
I've dropped this from the 5.10, 5.15 and 6.1 queues; I'll (try to) re-queue it together with the backported follow-up. Thanks for the catch.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 002/589] ASoC: SOF: topology: reject invalid vendor array size in token parser
In reply to Ben HutchingsQuoted 5 lines · Ben Hutchings
asize is signed and this comparison coerces it to be unsigned. So non- negative values of asize that are too small will be correctly rejected here, but negative values will now be accepted.
I think this creates a worse security problem than it solves.
I've dropped this from the 5.10, 5.15 and 6.1 queues and will pick up the corrected upstream fix once it lands. Thanks both.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 002/589] ASoC: SOF: topology: reject invalid vendor array size in token parser
In reply to Cássio Gabriel Monteiro PiresQuoted 4 lines · Cássio Gabriel Monteiro Pires
In order to keep the minimum header-size validation but force the comparison to remain signed, I think we can do this:
if (asize < (int)sizeof(*array))
Thanks for confirming. I've dropped it from the stable queues (5.10, 5.15 and 6.1).
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 095/589] ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
In reply to Ben HutchingsQuoted 3 lines · Ben Hutchings
Whereas this backport puts the return statements in
set_sample_rate_v2v3(), so it directly returns 0 i.e. silently fails. Shouldn't these be changed to return-ENXIO?
I've dropped this v1 from the 5.10 queue so the v2 can take its place. Thanks for the review.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 101/589] rxrpc: Fix key quota calculation for multitoken keys
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
Indeed 5.10 does not have that key type, but it does have
rxrpc_preparse_xdr_rxk5()which I think also needs to be updated.
I've dropped this from the 5.10 queue and will re-queue once a complete backport that also converts the rxk5 path is prepared. Thanks for the review.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 176/589] KVM: nSVM: Mark all of vmcb02 dirty when restoring nested state
In reply to Ben HutchingsQuoted 4 lines · Ben Hutchings
Given thow much
svm_set_nested_state()has changed since 5.10, I'm having a hard time seeing how this fix can work here, particularly without commit4995a3685f1b"KVM: SVM: Use a separate vmcb for the nested L2 guest". Has this been tested on 5.10?
I've dropped it from the 5.10 queue. 5.15 and 6.1 have the prerequisite and apply the fix correctly, so they're kept. Thanks for the review.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 177/589] KVM: nSVM: Sync NextRIP to cached vmcb12 after VMRUN of L2
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
arch/x86/kvm/svm/svm.c static __no_kcsan fastpath_t svm_vcpu_ru · line 3688
Quoted 2 lines
arch/x86/kvm/svm/svm.c +2
-0+if (is_guest_mode (vcpu)) + svm->nested.ctl.next_rip = svm->vmcb->control.next_rip;
I've dropped it from the 5.10 and 5.15 queues. The 6.1 backport places the assignment after svm_complete_interrupts() with no preceding guest-mode early return, so it's reachable and correct there.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 072/589] media: uvcvideo: Use heuristic to find stream entity
In reply to Ben HutchingsQuoted 3 lines · Ben Hutchings
This doesn't properly fix the problem. Commit
3d9f32e02c2e"media:
uvcvideo: Create an ID namespace for streaming output terminals" (which reverts this) needs to be applied on top.
Rather than carry the heuristic and then layer the namespace rework on top in 5.10 only, I've dropped this together with its regression source 0e2ee70291e6 ("media: uvcvideo: Mark invalid entities with id UVC_INVALID_ENTITY_ID") from the 5.10 queue. That mirrors what 3d9f32e02c2e does upstream (it reverts the heuristic), and avoids exposing the 0e2ee70291e6 regression that would otherwise enter 5.10 in the same batch.
Quoted 3 lines · Barry K. Nathan
Comparing this patch to the corresponding patches that went into 5.15.203/6.1.169/6.6.117/6.12.58/6.17.8, I believe these Tested-by tags may be incorrect.
You're right that the tag set on the 5.10 backport was over-attributed relative to the other branches; since the patch is being dropped this is now moot. Thanks to you both for the review.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 114/589] arm64: dts: imx8mq-librem5: Dont mark buck3 as always on
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
But not for all hardware revisions. We need commit
a362b0cc94d4"arm64:
dts: imx8mq-librem5-r3: Mark buck3 as always on" on top of this.
That commit is already backported to 5.10.y (as e5da8b37ce34d), so this is safe to keep as-is. Thanks!
--
Thanks,
Sasha
Greg Kroah-Hartman wrote on Sat, May 30, 2026 at 05:58:01PM +0200:
Quoted 5 lines
This is the start of the stable review cycle for the 5.10.258 release. There are 589 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Mon, 01 Jun 2026 16:01:34 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.258-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.
Tested 01c1356f563d ("Linux 5.10.258-rc1") on:
- arm i.MX6ULL (Armadillo 640)
- arm64 i.MX8MP (Armadillo G4)
- arm64 i.MX8ULP (Armadillo IoT A9E)
No obvious regression in dmesg or basic tests:
Signature · 1 line
Dominique Martinet
Re: [PATCH 5.10 072/589] media: uvcvideo: Use heuristic to find stream entity
In reply to Sasha LevinHi Sasha
Quoted 6 lines · Sasha Levin
Quoted 3 lines · Ben Hutchings
This doesn't properly fix the problem. Commit
3d9f32e02c2e"media:
uvcvideo: Create an ID namespace for streaming output terminals" (which reverts this) needs to be applied on top.
Quoted 6 lines
Rather than carry the heuristic and then layer the namespace rework on top in 5.10 only, I've dropped this together with its regression source
0e2ee70291e6("media: uvcvideo: Mark invalid entities with idUVC_INVALID_ENTITY_ID") from the 5.10 queue. That mirrors what3d9f32e02c2edoes upstream (it reverts the heuristic), and avoids exposing the0e2ee70291e6regression that would otherwise enter 5.10 in the same batch.
Are you going to apply:
Commit 3d9f32e02c2e "media: uvcvideo: Create an ID namespace for streaming output terminals"
?
We need either that patch or this one: media: uvcvideo: Use heuristic to find stream entity
The namespace solution is cleaner, which is why it is the upstream solution, but both patches solve the issue.
Regards
Quoted 13 lines
Quoted 3 lines · Barry K. Nathan
Comparing this patch to the corresponding patches that went into 5.15.203/6.1.169/6.6.117/6.12.58/6.17.8, I believe these Tested-by tags may be incorrect.
You're right that the tag set on the 5.10 backport was over-attributed relative to the other branches; since the patch is being dropped this is now moot. Thanks to you both for the review.
--
Thanks,
Sasha
Signature · 1 line
Ricardo Ribalda
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.258 release. There are 589 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 01 Jun 2026 16:01:34 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.258-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Tested on 2 amd64 laptops (a Lenovo ThinkPad T14 Gen 1 and a 2017 Apple MacBook Air). Working well, no regressions observed.
Signature · 1 line
-Barry K. Nathan <[email protected]>
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.258 release. There are 589 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
We see boot failures on 5.10-cip:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/2564188475
https://lava.ciplatform.org/scheduler/job/1451830
This may be related to
[PATCH v3] phy: renesas: rcar-gen3-usb2: Avoid long delay in atomic context
but I don't see related patches in the shortlog below. I put Renesas people in the cc list, they should know more.
Best regards,
Pavel
Re: [PATCH 5.10 210/589] spi: rockchip: fix controller deregistration
In reply to Greg Kroah-HartmanQuoted 34 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit
53e7a16070feb7d1d4d81a583eaac5e25048b9c3upstream.Make sure to deregister the controller before freeing underlying resources like DMA channels during driver unbind.
Fixes 64e36824b32b ("spi/rockchip: add driver for Rockchip RK3xxx SoCs integrated SPI")Cc [email protected] # 3.17Cc addy ke <[email protected]>Signed-off-by Johan Hovold <[email protected]>Signed-off-by Mark Brown <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/spi/spi-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/spi/spi-rockchip.c +1
-1@@ -792,7 +792,7 @@ static int rockchip_spi_probe(struct pla ctlr->can_dma = rockchip_spi_can_dma; } - ret =devm_spi_register_controller (&pdev->dev, ctlr); + ret =spi_register_controller (ctlr);if (ret <0 ) {dev_err (&pdev->dev,"Failed to register controller\n" ); goto err_free_dma_rx;
drivers/spi/spi-rockchip.c static int rockchip_spi_remove(struct pl · line 831
Quoted 4 lines
drivers/spi/spi-rockchip.c +1
-0@@ -828,6 +828,8 @@ static int rockchip_spi_remove(struct plclk_disable_unprepare (rs->spiclk);clk_disable_unprepare (rs->apb_pclk); +spi_unregister_controller (ctlr);
This needs to be inserted above the clk_disable_unprepare()s.
Ben.
Quoted 6 lines
drivers/spi/spi-rockchip.c +1
-0+pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev);pm_runtime_set_suspended (&pdev->dev);
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 211/589] net/sched: sch_red: Replace direct dequeue call with peek and qdisc_dequeue_peeked
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
Quoted 8 lines
From: Jamal Hadi Salim <[email protected]>
commit
458d5615272d3de535748342eb68ca492343048cupstream.When red qdisc has children (eg qfq qdisc) whose
peek()callback isqdisc_peek_dequeued(), we could get a kernel panic. When the parent of such qdiscs (eg illustrated in patch #3 as tbf) wants to retrieve an skb from its child (red in this case), it will do the following:
The same bug exists in sch_sfb and was fixed by commit 1b9bc71153b0 "net/sched: sch_sfb: Replace direct dequeue call with peek and qdisc_dequeue_peeked", so please also pick that for stable.
(From a very brief scan it seems like sch_multiq and sch_taprio might also have this bug, but perhaps they have restrictions that make this impossible.)
Ben.
Quoted 65 lines
1a. do a
peek()- and when sensing there's an skb the child can offer, then
- the child in this case(red) calls its child's (qfq) peek. qfq does the right thing and will return thegso_skbqueue packet.
Note: if there wasnt agso_skbentry then qfq will store it there.
1b. invoke adequeue()on the child (red). And herein lies the problem.
- red will call the child'sdequeue()which will essentially just try to grab something of qfq's queue.[ 78.667668][ T363] KASAN: null-ptr-deref in range [0x0000000000000048-0x000000000000004f] [ 78.667927][ T363] CPU: 1 UID: 0 PID: 363 Comm: ping Not tainted 7.1.0-rc1-00033-g46f74a3f7d57-dirty #790 PREEMPT(full) [ 78.668263][ T363] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 78.668486][ T363] RIP: 0010:qfq_dequeue+0x446/0xc90 [sch_qfq] [ 78.668718][ T363] Code: 54 c0 e8 dd 90 00 f1 48 c7 c7 e0 03 54 c0 48 89 de e8 ce 90 00 f1 48 8d 7b 48 b8 ff ff 37 00 48 89 fa 48 c1 e0 2a 48 c1 ea 03 <80> 3c 02 00 74 05 e8 ef a1 e1 f1 48 8b 7b 48 48 8d 54 24 58 48 8d [ 78.669312][ T363] RSP: 0018:ffff88810de573e0 EFLAGS: 00010216 [ 78.669533][ T363] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 78.669790][ T363] RDX: 0000000000000009 RSI: 0000000000000004 RDI: 0000000000000048 [ 78.670044][ T363] RBP: ffff888110dc4000 R08: ffffffffb1b0885a R09: fffffbfff6ba9078 [ 78.670297][ T363] R10: 0000000000000003 R11: ffff888110e31c80 R12: 0000001880000000 [ 78.670560][ T363] R13: ffff888110dc4150 R14: ffff888110dc42b8 R15: 0000000000000200 [ 78.670814][ T363] FS: 00007f66a8f09c40(0000) GS:ffff888163428000(0000) knlGS:0000000000000000 [ 78.671110][ T363] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 78.671324][ T363] CR2: 000055db4c6a30a8 CR3: 000000010da67000 CR4: 0000000000750ef0 [ 78.671585][ T363] PKRU: 55555554 [ 78.671713][ T363] Call Trace: [ 78.671843][ T363] <TASK> [ 78.671936][ T363] ? __pfx_qfq_dequeue+0x10/0x10 [sch_qfq] [ 78.672148][ T363] ? __pfx__printk+0x10/0x10 [ 78.672322][ T363] ? srso_alias_return_thunk+0x5/0xfbef5 [ 78.672496][ T363] ? lockdep_hardirqs_on_prepare+0xa8/0x1a0 [ 78.672706][ T363] ? srso_alias_return_thunk+0x5/0xfbef5 [ 78.672875][ T363] ? trace_hardirqs_on+0x19/0x1a0 [ 78.673047][ T363] red_dequeue+0x65/0x270 [sch_red] [ 78.673217][ T363] ? srso_alias_return_thunk+0x5/0xfbef5 [ 78.673385][ T363] tbf_dequeue.cold+0xb0/0x70c [sch_tbf] [ 78.673566][ T363] __qdisc_run+0x169/0x1900The right thing to do in #1b is to grab the skb off
gso_skbqueue. This patchset fixes that issue by changing #1b to useqdisc_dequeue_peeked()method instead.Fixes 77be155cba4e ("pkt_sched: Add peek emulation for non-work-conserving qdiscs.")Reported-by Manas <[email protected]>Reported-by Rakshit Awasthi <[email protected]>Signed-off-by Jamal Hadi Salim <[email protected]>Reviewed-by Eric Dumazet <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- net/sched/sch_red.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/sched/sch_red.c +1
-1@@ -153,7 +153,7 @@ static struct sk_buff *red_dequeue(strucstruct red_sched_data *q =qdisc_priv (sch);struct Qdisc *child = q->qdisc; - skb = child->dequeue (child); + skb =qdisc_dequeue_peeked (child);if (skb) {qdisc_bstats_update (sch, skb);qdisc_qstats_backlog_dec (sch, skb);
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesSasha Levin
maintainerRe: [PATCH 5.10 096/589] scsi: ufs: core: Improve SCSI abort handling
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
Since there are no patches to ufshcd in this series besides this and its revert, it seems like you should drop both of them.
We could, but keeping this structure makes it easier to track in the future.
--
Thanks,
Sasha
Hi, all,
Quoted 11 lines · Pavel Machek
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.258 release. There are 589 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
We see boot failures on 5.10-cip:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/2564188475
https://lava.ciplatform.org/scheduler/job/1451830
This should be related to the patch:
commit 0f86a559900f
Author: Claudiu Beznea <[email protected]> Date: Tue Apr 7 14:37:41 2026 +0300
phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
commit 55a387ebb9219cbe4edfa8ba9996ccb0e7ad4932 upstream.
The phy-rcar-gen3-usb2 driver exposes four individual PHYs that are requested and configured by PHY users. The struct phy_ops APIs access the same set of registers to configure all PHYs. Additionally, PHY settings can be modified through sysfs or an IRQ handler. While some struct phy_ops APIs are protected by a driver-wide mutex, others rely on individual PHY-specific mutexes.
This approach can lead to various issues, including:
1/ the IRQ handler may interrupt PHY settings in progress, racing with
hardware configuration protected by a mutex lock
2/ due to msleep(20) in rcar_gen3_init_otg(), while a configuration thread
suspends to wait for the delay, another thread may try to configure another PHY (with phy_init() + phy_power_on()); re-running the phy_init() goes to the exact same configuration code, re-running the same hardware configuration on the same set of registers (and bits) which might impact the result of the msleep for the 1st configuring thread
3/ sysfs can configure the hardware (though role_store()) and it can
still race with the phy_init()/phy_power_on() APIs calling into the drivers struct phy_ops
To address these issues, add a spinlock to protect hardware register access and driver private data structures (e.g., calls to rcar_gen3_is_any_rphy_initialized()). Checking driver-specific data remains necessary as all PHY instances share common settings. With this change, the existing mutex protection is removed and the cleanup.h helpers are used.
While at it, to keep the code simpler, do not skip regulator_enable()/regulator_disable() APIs in rcar_gen3_phy_usb2_power_on()/rcar_gen3_phy_usb2_power_off() as the regulators enable/disable operations are reference counted anyway.
[claudiu.beznea:
- in rcar_gen3_init_otg(): fixed conflict by droppping ch->soc_no_adp_ctrl
check
- in rcar_gen3_phy_usb2_irq() use spin_lock()/spin_unlock() as scoped_guard() is not avaialable in v5.10
- in probe(): replace mutex_init() with spin_lock_init()
- rcar_gen3_phy_usb2_power_off() replaced scoped_guard() as it is not available in v5.10
- in rcar_gen3_phy_usb2_power_on() droppped guard to avoid compilation warning "ISO C90 forbids mixed declarations and code"]
Link:
https://lore.kernel.org/r/[email protected]
In this backported version I failed to replaced the msleep() with mdelay() as it was in the original patch.
The following patch should fix this problem and align the v5.10 backport support with the currently upstream one: https://lore.kernel.org/all/[email protected]
Greg, since this fix ^ aligns v5.10 stable with the current upstream support, would there be a way to integrated it in v5.10 stable as well?
I am currently working to remove this long sleep in atomic context from upstream:
https://lore.kernel.org/all/[email protected]
Quoted 4 lines
This may be related to
[PATCH v3] phy: renesas: rcar-gen3-usb2: Avoid long delay in atomic context
This is not yet integrated in upstream.
Thank you,
Claudiu
Quoted 6 lines
but I don't see related patches in the shortlog below. I put Renesas people in the cc list, they should know more.
Best regards,
Pavel
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 210/589] spi: rockchip: fix controller deregistration
In reply to Ben HutchingsQuoted 38 lines · Ben Hutchings
Quoted 37 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit
53e7a16070feb7d1d4d81a583eaac5e25048b9c3upstream.Make sure to deregister the controller before freeing underlying resources like DMA channels during driver unbind.
Fixes 64e36824b32b ("spi/rockchip: add driver for Rockchip RK3xxx SoCs integrated SPI")Cc [email protected] # 3.17Cc addy ke <[email protected]>Signed-off-by Johan Hovold <[email protected]>Signed-off-by Mark Brown <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/spi/spi-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/spi/spi-rockchip.c +1
-1@@ -792,7 +792,7 @@ static int rockchip_spi_probe(struct pla ctlr->can_dma = rockchip_spi_can_dma; } - ret =devm_spi_register_controller (&pdev->dev, ctlr); + ret =spi_register_controller (ctlr);if (ret <0 ) {dev_err (&pdev->dev,"Failed to register controller\n" ); goto err_free_dma_rx;@@ -828,6 +828,8 @@ static int rockchip_spi_remove(struct plclk_disable_unprepare (rs->spiclk);clk_disable_unprepare (rs->apb_pclk);
Quoted 3 lines
drivers/spi/spi-rockchip.c static int rockchip_spi_remove(struct pl · line 831
Quoted 1 line
drivers/spi/spi-rockchip.c +1
-0+spi_unregister_controller (ctlr);This needs to be inserted above the clk_disable_unprepare()s.
Ick, ok, let me drop this for now.
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 072/589] media: uvcvideo: Use heuristic to find stream entity
In reply to Ricardo RibaldaQuoted 16 lines · Ricardo Ribalda
Hi Sasha
Quoted 6 lines · Sasha Levin
Quoted 3 lines · Ben Hutchings
This doesn't properly fix the problem. Commit
3d9f32e02c2e"media:
uvcvideo: Create an ID namespace for streaming output terminals" (which reverts this) needs to be applied on top.Quoted 6 lines
Rather than carry the heuristic and then layer the namespace rework on top in 5.10 only, I've dropped this together with its regression source
0e2ee70291e6("media: uvcvideo: Mark invalid entities with idUVC_INVALID_ENTITY_ID") from the 5.10 queue. That mirrors what3d9f32e02c2edoes upstream (it reverts the heuristic), and avoids exposing the0e2ee70291e6regression that would otherwise enter 5.10 in the same batch.
Quoted 5 lines
Are you going to apply:
Commit
3d9f32e02c2e"media: uvcvideo: Create an ID namespace for streaming output terminals"
?
It wasn't planned on.
Quoted 2 lines
We need either that patch or this one: media: uvcvideo: Use heuristic to find stream entity
What id is that?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 211/589] net/sched: sch_red: Replace direct dequeue call with peek and qdisc_dequeue_peeked
In reply to Ben HutchingsQuoted 9 lines · Ben Hutchings
Quoted 8 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jamal Hadi Salim <[email protected]>
commit
458d5615272d3de535748342eb68ca492343048cupstream.
Quoted 8 lines
Quoted 4 lines
When red qdisc has children (eg qfq qdisc) whose
peek()callback isqdisc_peek_dequeued(), we could get a kernel panic. When the parent of such qdiscs (eg illustrated in patch #3 as tbf) wants to retrieve an skb from its child (red in this case), it will do the following:The same bug exists in
sch_sfband was fixed by commit1b9bc71153b0"net/sched:sch_sfb: Replace direct dequeue call with peek andqdisc_dequeue_peeked", so please also pick that for stable.
We can for the next round of releases.
thanks,
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.258 release. There are 589 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 01 Jun 2026 16:01:34 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.258-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Re: [PATCH 5.10 244/589] spi: topcliff-pch: fix use-after-free on unbind
In reply to Greg Kroah-HartmanQuoted 10 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit
9d72732fe70c11424bc90ed466c7ccfa58b42a9aupstream.Give the driver a chance to flush its queue before releasing the DMA buffers on driver unbind
This doesn't seem like it will fix anything unless commit 5d6f477d6fc0 "spi: topcliff-pch: fix controller deregistration" is applied first. And that definitely needs backporting for older kernel versions due to the API name changes.
Ben.
Quoted 36 lines
Fixes c37f3c2749b5 ("spi/topcliff_pch: DMA support")Cc [email protected] # 3.1Cc Tomoya MORINAGA <[email protected]>Signed-off-by Johan Hovold <[email protected]>Signed-off-by Mark Brown <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/spi/spi-topcliff-pch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/spi/spi-topcliff-pch.c +3
-3@@ -1426,9 +1426,6 @@ static int pch_spi_pd_remove(struct platdev_dbg (&plat_dev->dev,"%s:[ch%d] irq=%d\n" , __func__, plat_dev->id, board_dat->pdev->irq); -if (use_dma) -pch_free_dma_buf (board_dat, data); -/* check for any pending messages; no action is taken if the queue * is still full; but at least we tried. Unload anyway */ count =500 ;@@ -1452,6 +1449,9 @@ static int pch_spi_pd_remove(struct platfree_irq (board_dat->pdev->irq, data); } +if (use_dma) +pch_free_dma_buf (board_dat, data); +pci_iounmap (board_dat->pdev, data->io_remap_addr);spi_unregister_master (data->master);
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 245/589] cpuidle: powerpc: avoid double clear when breaking snooze
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shrikanth Hegde <[email protected]>
commit
64ed1e3e728afb57ba9acb59e69de930ead847d9upstream.
snooze_loopis done often in any system which has fair bit of idle time. So it qualifies for even micro-optimizations.
Quoted 6 lines
When breaking the snooze due to timeout,
TIF_POLLING_NRFLAGis cleared twice. Clearing the bit invokes atomics. Avoid double clear and thereby avoid one atomic write.
dev->poll_time_limitindicates whether the loop was broken due to timeout. Use that instead of defining a new variable.
That is only true after commit 5ddcc03a07ae "powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state". So please drop this for 5.10, 5.15, and 6.1.
Ben.
Quoted 43 lines
Fixes 7ded429152e8 ("cpuidle: powerpc: no memory barrier after break from idle")Signed-off-by Shrikanth Hegde <[email protected]>Signed-off-by Madhavan Srinivasan <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/cpuidle/cpuidle-powernv.c | 5 ++++- drivers/cpuidle/cpuidle-pseries.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)drivers/cpuidle/cpuidle-powernv.c +4
-1@@ -93,7 +93,10 @@ static int snooze_loop(struct cpuidle_deHMT_medium ();ppc64_runlatch_on (); -clear_thread_flag (TIF_POLLING_NRFLAG ); + +/* Avoid double clear when breaking */ +if (!dev->poll_time_limit) +clear_thread_flag (TIF_POLLING_NRFLAG );local_irq_disable ();drivers/cpuidle/cpuidle-pseries.c +4
-1@@ -61,7 +61,10 @@ static int snooze_loop(struct cpuidle_de }HMT_medium (); -clear_thread_flag (TIF_POLLING_NRFLAG ); + +/* Avoid double clear when breaking */ +if (!dev->poll_time_limit) +clear_thread_flag (TIF_POLLING_NRFLAG );local_irq_disable ();
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 257/589] PCI/AER: Stop ruling out unbound devices as error source
In reply to Greg Kroah-HartmanQuoted 20 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <[email protected]>
commit
1ab4a3c805084d752ec571efc78272295a9f2f74upstream.When searching for the error source, the AER driver rules out devices whose
enable_cntis zero. This was introduced in 2009 by commit28eb27cf0839("PCI AER: support invalid error source IDs") without providing a rationale.Drivers typically call
pci_enable_device()on probe, hence theenable_cntcheck essentially filters out unbound devices. At the time of the commit, drivers had to opt in to AER by callingpci_enable_pcie_error_reporting()and so any AER-enabled device could be assumed to be bound to a driver. The check thus made sense because it allowed skipping config space accesses to devices which were known not to be the error source.
Quoted 3 lines
But since 2022, AER is universally enabled on all devices when they are enumerated, cf. commit
f26e58bf6f54("PCI/AER: Enable error reporting when AER is native").
That commit went into 6.0 and didn't get backported, so this doesn't seem to be needed here.
Ben.
Quoted 31 lines
Errors may very well be reported by unbound devices, e.g. due to link instability. By ruling them out as error source, errors reported by them are neither logged nor cleared. When they do get bound and another error occurs, the earlier error is reported together with the new error, which may confuse users. Stop doing so.
Fixes f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")Signed-off-by Lukas Wunner <[email protected]>Signed-off-by Bjorn Helgaas <[email protected]>Reviewed-by Stefan Roese <[email protected]>Cc [email protected] # v6.0+Link https://patch.msgid.link/734338c2e8b669db5a5a3b45d34131b55ffebfca.1774605029.git.lukas@wunner.de open hereSigned-off-by Greg Kroah-Hartman <[email protected]>--- drivers/pci/pcie/aer.c | 2 -- 1 file changed, 2 deletions(-)drivers/pci/pcie/aer.c +0
-2@@ -853,8 +853,6 @@ static bool is_error_source(struct pci_d* 3) There are multiple errors and prior ID comparing fails; * We check AER status registers to find possible reporter. */ -if (atomic_read (&dev->enable_cnt) ==0 ) -return false;/* Check if AER is enabled */ pcie_capability_read_word (dev,PCI_EXP_DEVCTL , ®16);
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 263/589] media: uvcvideo: Enable VB2_DMABUF for metadata stream
In reply to Greg Kroah-HartmanQuoted 12 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit
fbac03467e53d8d72e5099c03df26d9adae11416upstream.The UVC driver has two video streams, one for the frames and another one for the metadata. Both streams share most of the codebase, but only the data stream declares support for DMABUF transfer mode.
Quoted 5 lines
I have tried the DMABUF transfer mode with
CONFIG_DMABUF_HEAPS_SYSTEMand the frames looked correct.This patch announces the support for DMABUF for the metadata stream. This is useful for apps/HALs that only want to support DMABUF.
So this is a feature addition.
And the uvcvideo driver has changed a lot since 5.10 (or even 6.1), so unless someone specifically tested that these older versions will also work with dmabuf I question whether this is worth the risk.
Ben.
Quoted 34 lines
Fixes 088ead2552458 ("media: uvcvideo: Add a metadata device node")Signed-off-by Ricardo Ribalda <[email protected]>Reviewed-by Laurent Pinchart <[email protected]>Reviewed-by Hans de Goede <[email protected]>Signed-off-by Laurent Pinchart <[email protected]>Signed-off-by Hans Verkuil <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/media/usb/uvc/uvc_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/media/usb/uvc/uvc_queue.c +1
-2@@ -222,7 +222,7 @@ int uvc_queue_init(struct uvc_video_queuint ret; queue->queue.type = type; - queue->queue.io_modes =VB2_MMAP |VB2_USERPTR ; + queue->queue.io_modes =VB2_MMAP |VB2_USERPTR |VB2_DMABUF ; queue->queue.drv_priv = queue; queue->queue.buf_struct_size =sizeof (struct uvc_buffer ); queue->queue.mem_ops = &vb2_vmalloc_memops;@@ -235,7 +235,6 @@ int uvc_queue_init(struct uvc_video_queu queue->queue.ops = &uvc_meta_queue_qops;break ;default : - queue->queue.io_modes |=VB2_DMABUF ; queue->queue.ops = &uvc_queue_qops;break ; }
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 267/589] media: rc: streamzap: Error handling in probe
In reply to Greg Kroah-HartmanQuoted 10 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit
42844992664f03ef9f930e64f7370fa481e9c267upstream.If submitting the URB fails, the device will be unusable.
Probe()must fail.
[...]
Quoted 5 lines
drivers/media/rc/streamzap.c +0
-1@@ -398,11 +397,16 @@ static int streamzap_probe(struct usb_inusb_set_intfdata (intf, sz); -if (usb_submit_urb (sz->urb_in,GFP_ATOMIC ))
drivers/media/rc/streamzap.c static int streamzap_probe(struct usb_in · line 408
Quoted 10 lines
drivers/media/rc/streamzap.c +6
-1+ retval =usb_submit_urb (sz->urb_in,GFP_ATOMIC ); +if (retval <0 ) {dev_err (sz->dev,"urb submit failed\n" ); + goto rc_submit_fail; + }return 0 ; - +rc_submit_fail: +rc_free_device (sz->rdev);
Shouldn't this be rc_unregister_device()?
Ben.
Quoted 6 lines
drivers/media/rc/streamzap.c +1
-0+usb_set_intfdata (intf,NULL ); rc_dev_fail:usb_free_urb (sz->urb_in); free_buf_in:
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 274/589] drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs()
In reply to Greg Kroah-HartmanQuoted 27 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ashutosh Desai <[email protected]>
commit
3d4c2268bd7243c3780fe32bf24ff876da272acfupstream.
drm_gem_fb_init_with_funcs()computes sub-sampled plane dimensions using plain integer division:unsigned int width = mode_cmd->width / (i ? info->hsub : 1); unsigned int height = mode_cmd->height / (i ? info->vsub : 1);However, the ioctl-level
framebuffer_check()indrm_framebuffer.cuses drm_format_info_plane_width/height() which round up dimensions viaDIV_ROUND_UP(). This inconsistency corrupts the subsequent GEM object size check for certain pixel format and dimension combinations.For example, with NV12 (vsub=2) and a 1-pixel-tall framebuffer the GEM size validation path sees height=0 instead of height=1. The expression (height - 1) then wraps to
UINT_MAXas an unsigned int, causingmin_sizeto overflow and wrap back to a small value. A tiny GEM object therefore passes the size guard, yet when the GPU accesses the chroma plane it will read or write memory beyond the object's bounds.
Quoted 3 lines
Fix by replacing the open-coded divisions with
drm_format_info_plane_width()anddrm_format_info_plane_height(), which useDIV_ROUND_UP()and match the calculation already used inframebuffer_check().
This depends on commit f2f455981a34 "drm: Remove plane hsub/vsub alignment requirement for core helpers", which went into 6.7 and has not yet been backported to any stable branch.
Ben.
Quoted 26 lines
Fixes 4c3dbb2c312c ("drm: Add GEM backed framebuffer library")Cc [email protected] # v4.14+Reviewed-by Thomas Zimmermann <[email protected]>Signed-off-by Ashutosh Desai <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_gem_framebuffer_helper.c +2
-2@@ -159,8 +159,8 @@ int drm_gem_fb_init_with_funcs(struct drreturn -EINVAL ;for (i =0 ; i < info->num_planes; i++) { -unsigned int width = mode_cmd->width / (i ? info->hsub :1 ); -unsigned int height = mode_cmd->height / (i ? info->vsub :1 ); +unsigned int width =drm_format_info_plane_width (info, mode_cmd->width, i); +unsigned int height =drm_format_info_plane_height (info, mode_cmd->height, i);unsigned int min_size; objs[i] =drm_gem_object_lookup (file, mode_cmd->handles[i]);
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 263/589] media: uvcvideo: Enable VB2_DMABUF for metadata stream
In reply to Ben HutchingsHi Ben
Quoted 17 lines · Ben Hutchings
Quoted 15 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit
fbac03467e53d8d72e5099c03df26d9adae11416upstream.The UVC driver has two video streams, one for the frames and another one for the metadata. Both streams share most of the codebase, but only the data stream declares support for DMABUF transfer mode.
I have tried the DMABUF transfer mode with
CONFIG_DMABUF_HEAPS_SYSTEMand the frames looked correct.
Quoted 8 lines
Quoted 2 lines
This patch announces the support for DMABUF for the metadata stream. This is useful for apps/HALs that only want to support DMABUF.
So this is a feature addition.
And the uvcvideo driver has changed a lot since 5.10 (or even 6.1), so unless someone specifically tested that these older versions will also work with dmabuf I question whether this is worth the risk.
Just one note: The different transfer modes are implemented by vb2, not by the driver, so changes in the driver should not affect this specific change.
I have no specific use case for this change in 5.10. So I am fine if it is not backported that far. But it should be very low risk (famous last words)
Quoted 43 lines
Ben.
Quoted 27 lines
Fixes 088ead2552458 ("media: uvcvideo: Add a metadata device node")Signed-off-by Ricardo Ribalda <[email protected]>Reviewed-by Laurent Pinchart <[email protected]>Reviewed-by Hans de Goede <[email protected]>Signed-off-by Laurent Pinchart <[email protected]>Signed-off-by Hans Verkuil <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/media/usb/uvc/uvc_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/media/usb/uvc/uvc_queue.c +1
-1@@ -222,7 +222,7 @@ int uvc_queue_init(struct uvc_video_queuint ret; queue->queue.type = type; - queue->queue.io_modes =VB2_MMAP |VB2_USERPTR ; + queue->queue.io_modes =VB2_MMAP |VB2_USERPTR |VB2_DMABUF ; queue->queue.drv_priv = queue; queue->queue.buf_struct_size =sizeof (struct uvc_buffer ); queue->queue.mem_ops = &vb2_vmalloc_memops;drivers/media/usb/uvc/uvc_queue.c int uvc_queue_init(struct uvc_video_queu · line 240
Quoted 7 lines
drivers/media/usb/uvc/uvc_queue.c +0
-1@@ -235,7 +235,6 @@ int uvc_queue_init(struct uvc_video_queu queue->queue.ops = &uvc_meta_queue_qops;break ;default : - queue->queue.io_modes |=VB2_DMABUF ; queue->queue.ops = &uvc_queue_qops;break ; }--
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption] would be development of an easy way to factor large prime numbers.
- Bill Gates
Signature · 1 line
Ricardo Ribalda
Sasha Levin
maintainerRe: [PATCH 5.10 027/589] xfrm: Wait for RCU readers during policy netns exit
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
This is broken - it needs commit
3e5241731847"xfrm: movepolicy_bydstRCU sync from per-netns .exit to .pre_exit" as a further fix.
Now queued from mainline (3e52417318473782) together with the original commit for 7.0.y, 6.18.y and 6.12.y.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 211/589] net/sched: sch_red: Replace direct dequeue call with peek and qdisc_dequeue_peeked
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
The same fix is needed for
sch_sfb:1b9bc71153b0"net/sched:sch_sfb:
Replace direct dequeue call with peek andqdisc_dequeue_peeked".
Now queued from mainline (1b9bc71153b0) for all active trees: 7.0.y, 6.18.y, 6.12.y, 6.6.y, 6.1.y, 5.15.y and 5.10.y.
Thanks for the catch.
--
Thanks,
Sasha
Sasha Levin
maintainerRe: [PATCH 5.10 274/589] drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs()
In reply to Ben HutchingsQuoted 2 lines · Ben Hutchings
Without the prerequisite
f2f455981a34"drm: Remove plane hsub/vsub alignment requirement for core helpers" the queued fix is a no-op.
Good catch. I've now queued the prerequisite from mainline (f2f455981a34) to 6.6.y, 6.1.y and 5.15.y, so the queued fix is effective there.
Thanks,
Sasha
Re: [PATCH 5.10 072/589] media: uvcvideo: Use heuristic to find stream entity
In reply to Greg Kroah-HartmanHi Greg
Quoted 24 lines · Greg Kroah-Hartman
Quoted 16 lines · Ricardo Ribalda
Hi Sasha
Quoted 6 lines · Sasha Levin
Quoted 3 lines · Ben Hutchings
This doesn't properly fix the problem. Commit
3d9f32e02c2e"media:
uvcvideo: Create an ID namespace for streaming output terminals" (which reverts this) needs to be applied on top.Quoted 6 lines
Rather than carry the heuristic and then layer the namespace rework on top in 5.10 only, I've dropped this together with its regression source
0e2ee70291e6("media: uvcvideo: Mark invalid entities with idUVC_INVALID_ENTITY_ID") from the 5.10 queue. That mirrors what3d9f32e02c2edoes upstream (it reverts the heuristic), and avoids exposing the0e2ee70291e6regression that would otherwise enter 5.10 in the same batch.Quoted 5 lines
Are you going to apply:
Commit
3d9f32e02c2e"media: uvcvideo: Create an ID namespace for streaming output terminals"
?
Quoted 6 lines
It wasn't planned on.
Quoted 2 lines
We need either that patch or this one: media: uvcvideo: Use heuristic to find stream entity
What id is that?
Sorry, I should have been more specific. I am talking about Upstream commit 758dbc756aad429da11c569c0d067f7fd032bcf7.
(this patch that we are discussing)
Regards
Quoted 4 lines
thanks,
greg k-h
Signature · 1 line
Ricardo Ribalda
Re: [PATCH 5.10 503/589] crypto: af_alg - Cap AEAD AD length to 0x80000000
In reply to Greg Kroah-HartmanQuoted 7 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
commit
e4c06479d7059888adf2f22bc1ebcf053bf691a2upstream.
That is currently only in next, so it's unclear to me how this got a stable backport already.
Ben.
Quoted 24 lines
In order to prevent arithmetic overflows when checking the TX buffer size, cap the associated data length to
0x80000000.Reported-by Yiming Qian <[email protected]>Fixes 400c40cf78da ("crypto: algif - add AEAD support")Signed-off-by Herbert Xu <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- crypto/af_alg.c | 2 ++ 1 file changed, 2 insertions(+)crypto/af_alg.c +2
-0@@ -478,6 +478,8 @@ static int af_alg_cmsg_send(struct msghdif (cmsg->cmsg_len <CMSG_LEN (sizeof (u32)))return -EINVAL ; con->aead_assoclen = *(u32 *)CMSG_DATA (cmsg); +if (con->aead_assoclen >=0x80000000u ) +return -EINVAL ;break ;default :
Signature · 2 lines
Ben Hutchings For every action, there is an equal and opposite criticism. - Harrison