5.10.215-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 287/294 x86/mm/pat: fix VM_PAT handling in COW mappings
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand <[email protected]>
commit 04c35ab3bdae7fefbd7c7a7355f29fa03a035221 upstream.
PAT handling won't do the right thing in COW mappings: the first PTE (or, in fact, all PTEs) can be replaced during write faults to point at anon folios. Reliably recovering the correct PFN and cachemode using follow_phys() from PTEs will not work in COW mappings.
Using follow_phys(), we might just get the address+protection of the anon folio (which is very wrong), or fail on swap/nonswap entries, failing follow_phys() and triggering a WARN_ON_ONCE() in untrack_pfn() and track_pfn_copy(), not properly calling free_pfn_range().
In free_pfn_range(), we either wouldn't call memtype_free() or would call it with the wrong range, possibly leaking memory.
To fix that, let's update follow_phys() to refuse returning anon folios, and fallback to using the stored PFN inside vma->vm_pgoff for COW mappings if we run into that.
We will now properly handle untrack_pfn() with COW mappings, where we don't need the cachemode. We'll have to fail fork()->track_pfn_copy() if the first page was replaced by an anon folio, though: we'd have to store the cachemode in the VMA to make this work, likely growing the VMA size.
For now, lets keep it simple and let track_pfn_copy() just fail in that
case: it would have failed in the past with swap/nonswap entries already, and it would have done the wrong thing with anon folios.
Simple reproducer to trigger the WARN_ON_ONCE() in untrack_pfn():
<--- C reproducer --->
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>
#include <liburing.h>
int main(void)
{
struct io_uring_params p = {};
int ring_fd;
size_t size;
char *map;
ring_fd = io_uring_setup(1, &p);
if (ring_fd < 0) {
perror("io_uring_setup");
return 1;
}
size = p.sq_off.array + p.sq_entries * sizeof(unsigned);
/* Map the submission queue ring MAP_PRIVATE */
map = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
ring_fd, IORING_OFF_SQ_RING);
if (map == MAP_FAILED) {
perror("mmap");
return 1;
}
/* We have at least one page. Let's COW it. */
*map = 0;
pause();
return 0; }
<--- C reproducer --->
On a system with 16 GiB RAM and swap configured:
# ./iouring & # memhog 16G # killall iouring [ 301.552930] ------------[ cut here ]------------ [ 301.553285] WARNING: CPU: 7 PID: 1402 at arch/x86/mm/pat/memtype.c:1060 untrack_pfn+0xf4/0x100 [ 301.553989] Modules linked in: binfmt_misc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_g [ 301.558232] CPU: 7 PID: 1402 Comm: iouring Not tainted 6.7.5-100.fc38.x86_64 #1 [ 301.558772] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebu4 [ 301.559569] RIP: 0010:untrack_pfn+0xf4/0x100 [ 301.559893] Code: 75 c4 eb cf 48 8b 43 10 8b a8 e8 00 00 00 3b 6b 28 74 b8 48 8b 7b 30 e8 ea 1a f7 000 [ 301.561189] RSP: 0018:ffffba2c0377fab8 EFLAGS: 00010282 [ 301.561590] RAX: 00000000ffffffea RBX: ffff9208c8ce9cc0 RCX: 000000010455e047 [ 301.562105] RDX: 07fffffff0eb1e0a RSI: 0000000000000000 RDI: ffff9208c391d200 [ 301.562628] RBP: 0000000000000000 R08: ffffba2c0377fab8 R09: 0000000000000000 [ 301.563145] R10: ffff9208d2292d50 R11: 0000000000000002 R12: 00007fea890e0000 [ 301.563669] R13: 0000000000000000 R14: ffffba2c0377fc08 R15: 0000000000000000 [ 301.564186] FS: 0000000000000000(0000) GS:ffff920c2fbc0000(0000) knlGS:0000000000000000 [ 301.564773] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 301.565197] CR2: 00007fea88ee8a20 CR3: 00000001033a8000 CR4: 0000000000750ef0 [ 301.565725] PKRU: 55555554 [ 301.565944] Call Trace: [ 301.566148] <TASK> [ 301.566325] ? untrack_pfn+0xf4/0x100 [ 301.566618] ? __warn+0x81/0x130 [ 301.566876] ? untrack_pfn+0xf4/0x100 [ 301.567163] ? report_bug+0x171/0x1a0 [ 301.567466] ? handle_bug+0x3c/0x80 [ 301.567743] ? exc_invalid_op+0x17/0x70 [ 301.568038] ? asm_exc_invalid_op+0x1a/0x20 [ 301.568363] ? untrack_pfn+0xf4/0x100 [ 301.568660] ? untrack_pfn+0x65/0x100 [ 301.568947] unmap_single_vma+0xa6/0xe0 [ 301.569247] unmap_vmas+0xb5/0x190 [ 301.569532] exit_mmap+0xec/0x340 [ 301.569801] __mmput+0x3e/0x130 [ 301.570051] do_exit+0x305/0xaf0 ...
--- arch/x86/mm/pat/memtype.c | 50 +++++++++++++++++++++++++++++++++------------- mm/memory.c | 4 +++ 2 files changed, 40 insertions(+), 14 deletions(-)
arch/x86/mm/pat/memtype.c +36 -14
@@ -56,6 +56,7 @@#include "memtype.h" #include "../mm_internal.h" +#include "../../../mm/internal.h" /* is_cow_mapping() */ #undef pr_fmt#define pr_fmt (fmt) "" fmt
@@ -987,6 +988,38 @@ static void free_pfn_range(u64 paddr, unmemtype_free (paddr, paddr + size); } +static int get_pat_info (struct vm_area_struct *vma,resource_size_t *paddr, +pgprot_t *pgprot) +{ +unsigned long prot; + +VM_WARN_ON_ONCE (!(vma->vm_flags &VM_PAT )); + +/* +* We need the starting PFN and cachemode used for track_pfn_remap() +* that covered the whole VMA. For most mappings, we can obtain that +* information from the page tables. For COW mappings, we might now +* suddenly have anon folios mapped and follow_phys() will fail. +* +* Fallback to using vma->vm_pgoff, see remap_pfn_range_notrack(), to +* detect the PFN. If we need the cachemode as well, we're out of luck +* for now and have to fail fork(). +*/ +if (!follow_phys (vma, vma->vm_start,0 , &prot, paddr)) { +if (pgprot) + *pgprot =__pgprot (prot); +return 0 ; + } +if (is_cow_mapping (vma->vm_flags)) { +if (pgprot) +return -EINVAL ; + *paddr = (resource_size_t )vma->vm_pgoff <<PAGE_SHIFT ; +return 0 ; + } +WARN_ON_ONCE (1 ); +return -EINVAL ; +} +/* * track_pfn_copy is called when vma that is covering the pfnmap gets * copied through copy_page_range().
@@ -997,20 +1030,13 @@ static void free_pfn_range(u64 paddr, unint track_pfn_copy (struct vm_area_struct *vma) {resource_size_t paddr; -unsigned long prot;unsigned long vma_size = vma->vm_end - vma->vm_start;pgprot_t pgprot;if (vma->vm_flags &VM_PAT ) { -/* -* reserve the whole chunk covered by vma. We need the -* starting address and protection from pte. -*/ -if (follow_phys (vma, vma->vm_start,0 , &prot, &paddr)) { -WARN_ON_ONCE (1 ); +if (get_pat_info (vma, &paddr, &pgprot))return -EINVAL ; - } - pgprot =__pgprot (prot); +/* reserve the whole chunk covered by vma. */ return reserve_pfn_range (paddr, vma_size, &pgprot,1 ); }
@@ -1085,7 +1111,6 @@ void untrack_pfn(struct vm_area_struct * unsigned long size) {resource_size_t paddr; -unsigned long prot;if (vma && !(vma->vm_flags &VM_PAT ))return ;
@@ -1093,11 +1118,8 @@ void untrack_pfn(struct vm_area_struct */* free the chunk starting from pfn or the whole chunk */ paddr = (resource_size_t )pfn <<PAGE_SHIFT ;if (!paddr && !size) { -if (follow_phys (vma, vma->vm_start,0 , &prot, &paddr)) { -WARN_ON_ONCE (1 ); +if (get_pat_info (vma, &paddr,NULL ))return ; - } - size = vma->vm_end - vma->vm_start; }free_pfn_range (paddr, size);
mm/memory.c +4 -0
@@ -4934,6 +4934,10 @@ int follow_phys(struct vm_area_struct *v goto out; pte = *ptep; +/* Never return PFNs of anon folios in COW mappings. */ +if (vm_normal_page (vma, address, pte)) + goto unlock; +if ((flags &FOLL_WRITE ) && !pte_write (pte)) goto unlock;
Greg Kroah-Hartman
maintainerPATCH 288/294 drm/i915/gt: Reset queue_priority_hint on parking
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit 4a3859ea5240365d21f6053ee219bb240d520895 upstream.
Originally, with strict in order execution, we could complete execution only when the queue was empty. Preempt-to-busy allows replacement of an active request that may complete before the preemption is processed by HW. If that happens, the request is retired from the queue, but the queue_priority_hint remains set, preventing direct submission until after the next CS interrupt is processed.
This preempt-to-busy race can be triggered by the heartbeat, which will also act as the power-management barrier and upon completion allow us to idle the HW. We may process the completion of the heartbeat, and begin parking the engine before the CS event that restores the queue_priority_hint, causing us to fail the assertion that it is MIN.
<3>[ 166.210729] __engine_park:283 GEM_BUG_ON(engine->sched_engine->queue_priority_hint != (-((int)(~0U >> 1)) - 1))
<0>[ 166.210781] Dumping ftrace buffer:
<0>[ 166.210795] ---------------------------------
...
<0>[ 167.302811] drm_fdin-1097 2..s1. 165741070us : trace_ports: 0000:00:02.0 rcs0: promote { ccid:20 1217:2 prio 0 }
<0>[ 167.302861] drm_fdin-1097 2d.s2. 165741072us : execlists_submission_tasklet: 0000:00:02.0 rcs0: preempting last=1217:2, prio=0, hint=2147483646
<0>[ 167.302928] drm_fdin-1097 2d.s2. 165741072us : __i915_request_unsubmit: 0000:00:02.0 rcs0: fence 1217:2, current 0
<0>[ 167.302992] drm_fdin-1097 2d.s2. 165741073us : __i915_request_submit: 0000:00:02.0 rcs0: fence 3:4660, current 4659
<0>[ 167.303044] drm_fdin-1097 2d.s1. 165741076us : execlists_submission_tasklet: 0000:00:02.0 rcs0: context:3 schedule-in, ccid:40
<0>[ 167.303095] drm_fdin-1097 2d.s1. 165741077us : trace_ports: 0000:00:02.0 rcs0: submit { ccid:40 3:4660* prio 2147483646 }
<0>[ 167.303159] kworker/-89 11..... 165741139us : i915_request_retire.part.0: 0000:00:02.0 rcs0: fence c90:2, current 2
<0>[ 167.303208] kworker/-89 11..... 165741148us : __intel_context_do_unpin: 0000:00:02.0 rcs0: context:c90 unpin
<0>[ 167.303272] kworker/-89 11..... 165741159us : i915_request_retire.part.0: 0000:00:02.0 rcs0: fence 1217:2, current 2
<0>[ 167.303321] kworker/-89 11..... 165741166us : __intel_context_do_unpin: 0000:00:02.0 rcs0: context:1217 unpin
<0>[ 167.303384] kworker/-89 11..... 165741170us : i915_request_retire.part.0: 0000:00:02.0 rcs0: fence 3:4660, current 4660
<0>[ 167.303434] kworker/-89 11d..1. 165741172us : __intel_context_retire: 0000:00:02.0 rcs0: context:1216 retire runtime: { total:56028ns, avg:56028ns }
<0>[ 167.303484] kworker/-89 11..... 165741198us : __engine_park: 0000:00:02.0 rcs0: parked
<0>[ 167.303534] <idle>-0 5d.H3. 165741207us : execlists_irq_handler: 0000:00:02.0 rcs0: semaphore yield: 00000040
<0>[ 167.303583] kworker/-89 11..... 165741397us : __intel_context_retire: 0000:00:02.0 rcs0: context:1217 retire runtime: { total:325575ns, avg:0ns }
<0>[ 167.303756] kworker/-89 11..... 165741777us : __intel_context_retire: 0000:00:02.0 rcs0: context:c90 retire runtime: { total:0ns, avg:0ns }
<0>[ 167.303806] kworker/-89 11..... 165742017us : __engine_park: __engine_park:283 GEM_BUG_ON(engine->sched_engine->queue_priority_hint != (-((int)(~0U >> 1)) - 1))
<0>[ 167.303811] ---------------------------------
<4>[ 167.304722] ------------[ cut here ]------------
<2>[ 167.304725] kernel BUG at drivers/gpu/drm/i915/gt/intel_engine_pm.c:283!
<4>[ 167.304731] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
<4>[ 167.304734] CPU: 11 PID: 89 Comm: kworker/11:1 Tainted: G W 6.8.0-rc2-CI_DRM_14193-gc655e0fd2804+ #1
<4>[ 167.304736] Hardware name: Intel Corporation Rocket Lake Client Platform/RocketLake S UDIMM 6L RVP, BIOS RKLSFWI1.R00.3173.A03.2204210138 04/21/2022
<4>[ 167.304738] Workqueue: i915-unordered retire_work_handler [i915]
<4>[ 167.304839] RIP: 0010:__engine_park+0x3fd/0x680 [i915]
<4>[ 167.304937] Code: 00 48 c7 c2 b0 e5 86 a0 48 8d 3d 00 00 00 00 e8 79 48 d4 e0 bf 01 00 00 00 e8 ef 0a d4 e0 31 f6 bf 09 00 00 00 e8 03 49 c0 e0 <0f> 0b 0f 0b be 01 00 00 00 e8 f5 61 fd ff 31 c0 e9 34 fd ff ff 48
<4>[ 167.304940] RSP: 0018:ffffc9000059fce0 EFLAGS: 00010246
<4>[ 167.304942] RAX: 0000000000000200 RBX: 0000000000000000 RCX: 0000000000000006
<4>[ 167.304944] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009
<4>[ 167.304946] RBP: ffff8881330ca1b0 R08: 0000000000000001 R09: 0000000000000001
<4>[ 167.304947] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8881330ca000
<4>[ 167.304948] R13: ffff888110f02aa0 R14: ffff88812d1d0205 R15: ffff88811277d4f0
<4>[ 167.304950] FS: 0000000000000000(0000) GS:ffff88844f780000(0000) knlGS:0000000000000000
<4>[ 167.304952] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[ 167.304953] CR2: 00007fc362200c40 CR3: 000000013306e003 CR4: 0000000000770ef0
<4>[ 167.304955] PKRU: 55555554
<4>[ 167.304957] Call Trace:
<4>[ 167.304958] <TASK>
<4>[ 167.305573] ____intel_wakeref_put_last+0x1d/0x80 [i915]
<4>[ 167.305685] i915_request_retire.part.0+0x34f/0x600 [i915]
<4>[ 167.305800] retire_requests+0x51/0x80 [i915]
<4>[ 167.305892] intel_gt_retire_requests_timeout+0x27f/0x700 [i915]
<4>[ 167.305985] process_scheduled_works+0x2db/0x530
<4>[ 167.305990] worker_thread+0x18c/0x350
<4>[ 167.305993] kthread+0xfe/0x130
<4>[ 167.305997] ret_from_fork+0x2c/0x50
<4>[ 167.306001] ret_from_fork_asm+0x1b/0x30
<4>[ 167.306004] </TASK>It is necessary for the queue_priority_hint to be lower than the next request submission upon waking up, as we rely on the hint to decide when to kick the tasklet to submit that first request.
--- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 3 --- drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_engine_pm.c +0 -3
@@ -250,9 +250,6 @@ static int __engine_park(struct intel_waintel_engine_park_heartbeat (engine);intel_breadcrumbs_park (engine->breadcrumbs); -/* Must be reset upon idling, or we may miss the busy wakeup. */ -GEM_BUG_ON (engine->execlists.queue_priority_hint !=INT_MIN ); -if (engine->park) engine->park (engine);
drivers/gpu/drm/i915/gt/intel_lrc.c +3 -0
@@ -5032,6 +5032,9 @@ static void execlists_park(struct intel_ {cancel_timer (&engine->execlists.timer);cancel_timer (&engine->execlists.preempt); + +/* Reset upon idling, or we may delay the busy wakeup. */ +WRITE_ONCE (engine->execlists.queue_priority_hint,INT_MIN ); }void intel_execlists_set_default_submission (struct intel_engine_cs *engine)
Greg Kroah-Hartman
maintainerPATCH 289/294 Bluetooth: btintel: Fixe build regression
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luiz Augusto von Dentz <[email protected]>
commit 6e62ebfb49eb65bdcbfc5797db55e0ce7f79c3dd upstream.
This fixes the following build regression:
drivers-bluetooth-btintel.c-btintel_read_version()-warn:
passing-zero-to-PTR_ERR
--- drivers/bluetooth/btintel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btintel.c +2 -2
@@ -344,13 +344,13 @@ int btintel_read_version(struct hci_devstruct sk_buff *skb; skb =__hci_cmd_sync (hdev,0xfc05 ,0 ,NULL ,HCI_CMD_TIMEOUT ); -if (IS_ERR_OR_NULL (skb)) { +if (IS_ERR (skb)) {bt_dev_err (hdev,"Reading Intel version information failed (%ld)" ,PTR_ERR (skb));return PTR_ERR (skb); } -if (skb->len !=sizeof (*ver)) { +if (!skb || skb->len !=sizeof (*ver)) {bt_dev_err (hdev,"Intel version event size mismatch" );kfree_skb (skb);return -EILSEQ ;
Greg Kroah-Hartman
maintainerPATCH 290/294 VMCI: Fix possible memcpy() run-time warning in vmci_datagram_invoke_guest_handler()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasiliy Kovalev <[email protected]>
commit e606e4b71798cc1df20e987dde2468e9527bd376 upstream.
The changes are similar to those given in the commit 19b070fefd0d ("VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()").
Fix filling of the msg and msg_payload in dg_info struct, which prevents a possible "detected field-spanning write" of memcpy warning that is issued by the tracking mechanism __fortify_memcpy_chk.
--- drivers/misc/vmw_vmci/vmci_datagram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/misc/vmw_vmci/vmci_datagram.c +2 -1
@@ -378,7 +378,8 @@ int vmci_datagram_invoke_guest_handler(s dg_info->in_dg_host_queue = false; dg_info->entry = dst_entry; -memcpy (&dg_info->msg, dg,VMCI_DG_SIZE (dg)); + dg_info->msg = *dg; +memcpy (&dg_info->msg_payload, dg +1 , dg->payload_size);INIT_WORK (&dg_info->work, dg_delayed_dispatch);schedule_work (&dg_info->work);
Greg Kroah-Hartman
maintainerPATCH 291/294 kbuild: dummy-tools: adjust to stricter stackprotector check
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Kubecek <[email protected]>
commit c93db682cfb213501881072a9200a48ce1dc3c3f upstream.
Commit 3fb0fdb3bbe7 ("x86/stackprotector/32: Make the canary into a regular percpu variable") modified the stackprotector check on 32-bit x86 to check if gcc supports using %fs as canary. Adjust dummy-tools gcc script to pass this new test by returning "%fs" rather than "%gs" if it detects -mstack-protector-guard-reg=fs on command line.
--- scripts/dummy-tools/gcc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/dummy-tools/gcc +5 -1
@@ -76,7 +76,11 @@ fi if arg_contain -S "$@"; then # For scripts/gcc-x86-*-has-stack-protector.sh if arg_contain -fstack-protector "$@"; then - echo "%gs" + if arg_contain -mstack-protector-guard-reg=fs "$@"; then + echo "%fs" + else + echo "%gs" + fi exit 0 fi fi
Greg Kroah-Hartman
maintainerPATCH 292/294 scsi: sd: Fix wrong zone_write_granularity value during revalidate
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shin'ichiro Kawasaki <[email protected]>
commit 288b3271d920c9ba949c3bab0f749f4cecc70e09 upstream.
When the sd driver revalidates host-managed SMR disks, it calls disk_set_zoned() which changes the zone_write_granularity attribute value to the logical block size regardless of the device type. After that, the sd driver overwrites the value in sd_zbc_read_zone() with the physical block size, since ZBC/ZAC requires this for host-managed disks. Between the calls to disk_set_zoned() and sd_zbc_read_zone(), there exists a window where the attribute shows the logical block size as the zone_write_granularity value, which is wrong for host-managed disks. The duration of the window is from 20ms to 200ms, depending on report zone command execution time.
To avoid the wrong zone_write_granularity value between disk_set_zoned() and sd_zbc_read_zone(), modify the value not in sd_zbc_read_zone() but just after disk_set_zoned() call.
--- drivers/scsi/sd.c | 7 ++++++- drivers/scsi/sd_zbc.c | 8 -------- 2 files changed, 6 insertions(+), 9 deletions(-)
drivers/scsi/sd.c +6 -1
@@ -3026,8 +3026,13 @@ static void sd_read_block_characteristic }if (sdkp->device->type ==TYPE_ZBC ) { -/* Host-managed */ +/* +* Host-managed: Per ZBC and ZAC specifications, writes in +* sequential write required zones of host-managed devices must +* be aligned to the device physical block size. +*/ blk_queue_set_zoned (sdkp->disk,BLK_ZONED_HM ); +blk_queue_zone_write_granularity (q, sdkp->physical_block_size); }else { sdkp->zoned = (buffer[8 ] >>4 ) &3 ;if (sdkp->zoned ==1 ) {
drivers/scsi/sd_zbc.c +0 -8
@@ -793,14 +793,6 @@ int sd_zbc_read_zones(struct scsi_disk *blk_queue_max_active_zones (q,0 ); nr_zones =round_up (sdkp->capacity, zone_blocks) >>ilog2 (zone_blocks); -/* -* Per ZBC and ZAC specifications, writes in sequential write required -* zones of host-managed devices must be aligned to the device physical -* block size. -*/ -if (blk_queue_zoned_model (q) ==BLK_ZONED_HM ) -blk_queue_zone_write_granularity (q, sdkp->physical_block_size); -/* READ16/WRITE16 is mandatory for ZBC disks */ sdkp->device->use_16_for_rw =1 ; sdkp->device->use_10_for_rw =0 ;
Greg Kroah-Hartman
maintainerPATCH 293/294 x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov (AMD) <[email protected]>
commit b377c66ae3509ccea596512d6afb4777711c4870 upstream.
srso_alias_untrain_ret() is special code, even if it is a dummy which is called in the !SRSO case, so annotate it like its real counterpart, to address the following objtool splat:
vmlinux.o: warning: objtool: .export_symbol+0x2b290: data relocation to !ENDBR: srso_alias_untrain_ret+0x0
--- arch/x86/lib/retpoline.S | 1 + 1 file changed, 1 insertion(+)
arch/x86/lib/retpoline.S +1 -0
@@ -258,6 +258,7 @@ SYM_CODE_START(__x86_return_thunk) UNWIND_HINT_FUNC ANNOTATE_NOENDBR ANNOTATE_UNRET_SAFE + ANNOTATE_NOENDBR ret int3 SYM_CODE_END(__x86_return_thunk)
Greg Kroah-Hartman
maintainerPATCH 294/294 x86/head/64: Re-enable stack protection
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Roth <[email protected]>
commit 469693d8f62299709e8ba56d8fb3da9ea990213c upstream.
Due to
103a4908ad4d ("x86/head/64: Disable stack protection for head$(BITS).o")kernel/head{32,64}.c are compiled with -fno-stack-protector to allow a call to set_bringup_idt_handler(), which would otherwise have stack protection enabled with CONFIG_STACKPROTECTOR_STRONG.
While sufficient for that case, there may still be issues with calls to any external functions that were compiled with stack protection enabled that in-turn make stack-protected calls, or if the exception handlers set up by set_bringup_idt_handler() make calls to stack-protected functions.
Subsequent patches for SEV-SNP CPUID validation support will introduce both such cases. Attempting to disable stack protection for everything in scope to address that is prohibitive since much of the code, like the SEV-ES #VC handler, is shared code that remains in use after boot and could benefit from having stack protection enabled. Attempting to inline calls is brittle and can quickly balloon out to library/helper code where that's not really an option.
Instead, re-enable stack protection for head32.c/head64.c, and make the appropriate changes to ensure the segment used for the stack canary is initialized in advance of any stack-protected C calls.
For head64.c:
- The BSP will enter from startup_64() and call into C code (startup_64_setup_env()) shortly after setting up the stack, which may result in calls to stack-protected code. Set up %gs early to allow for this safely.
- APs will enter from secondary_startup_64*(), and %gs will be set up soon after. There is one call to C code prior to %gs being setup (__startup_secondary_64()), but it is only to fetch 'sme_me_mask' global, so just load 'sme_me_mask' directly instead, and remove the now-unused __startup_secondary_64() function.
For head32.c:
- BSPs/APs will set %fs to __BOOT_DS prior to any C calls. In recent kernels, the compiler is configured to access the stack canary at %fs:__stack_chk_guard [1], which overlaps with the initial per-cpu '__stack_chk_guard' variable in the initial/"master" .data..percpu area. This is sufficient to allow access to the canary for use during initial startup, so no changes are needed there.
[1] 3fb0fdb3bbe7 ("x86/stackprotector/32: Make the canary into a regular percpu variable")
[ bp: Massage commit message. ]
--- arch/x86/include/asm/setup.h | 1 - arch/x86/kernel/Makefile | 1 - arch/x86/kernel/head64.c | 9 --------- arch/x86/kernel/head_64.S | 24 +++++++++++++++++++++--- 4 files changed, 21 insertions(+), 14 deletions(-)
arch/x86/include/asm/setup.h +0 -1
@@ -49,7 +49,6 @@ extern unsigned long saved_video_mode;extern void reserve_standard_io_resources (void );extern void i386_reserve_resources (void );extern unsigned long __startup_64 (unsigned long physaddr,struct boot_params *bp); -extern unsigned long __startup_secondary_64 (void );extern void startup_64_setup_env (unsigned long physbase);extern void early_setup_idt (void );extern void __init do_early_exception (struct pt_regs *regs,int trapnr);
arch/x86/kernel/Makefile +0 -1
@@ -49,7 +49,6 @@ endif # non-deterministic coverage. KCOV_INSTRUMENT := n -CFLAGS_head$(BITS).o += -fno-stack-protector CFLAGS_cc_platform.o += -fno-stack-protector CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace
arch/x86/kernel/head64.c +0 -9
@@ -302,15 +302,6 @@ unsigned long __head __startup_64(unsignreturn sme_get_me_mask (); } -unsigned long __startup_secondary_64 (void ) -{ -/* -* Return the SME encryption mask (if SME is active) to be used as a -* modifier for the initial pgdir entry programmed into CR3. -*/ -return sme_get_me_mask (); -} -/* Wipe all early page tables except for the kernel symbol map */ static void __init reset_early_page_tables (void ) {
arch/x86/kernel/head_64.S +21 -3
@@ -74,6 +74,22 @@ SYM_CODE_START_NOALIGN(startup_64) leaq (__end_init_task - SIZEOF_PTREGS)(%rip), %rsp leaq _text(%rip), %rdi + + /* + * initial_gs points to initial fixed_percpu_data struct with storage for + * the stack protector canary. Global pointer fixups are needed at this + * stage, so apply them as is done in fixup_pointer(), and initialize %gs + * such that the canary can be accessed at %gs:40 for subsequent C calls. + */ + movl $MSR_GS_BASE, %ecx + movq initial_gs(%rip), %rax + movq $_text, %rdx + subq %rdx, %rax + addq %rdi, %rax + movq %rax, %rdx + shrq $32, %rdx + wrmsr + pushq %rsi call startup_64_setup_env popq %rsi
@@ -141,9 +157,11 @@ SYM_INNER_LABEL(secondary_startup_64_no_ * Retrieve the modifier (SME encryption mask if SME is active) to be * added to the initial pgdir entry that will be programmed into CR3. */ - pushq %rsi - call __startup_secondary_64 - popq %rsi +#ifdef CONFIG_AMD_MEM_ENCRYPT + movq sme_me_mask, %rax +#else + xorq %rax, %rax +#endif /* Form the CR3 value being sure to include the CR3 modifier */ addq $(init_top_pgt - __START_KERNEL_map), %rax
Greg Kroah-Hartman
maintainerPATCH 270/294 block: prevent division by zero in blk_rq_stat_sum()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roman Smirnov <[email protected]>
[ Upstream commit 93f52fbeaf4b676b21acfe42a5152620e6770d02 ]
The expression dst->nr_samples + src->nr_samples may have zero value on overflow. It is necessary to add a check to avoid division by zero.
Found by Linux Verification Center (linuxtesting.org) with Svace.
--- block/blk-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-stat.c +1 -1
@@ -28,7 +28,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)/* src is a per-cpu stat, mean isn't initialized */ void blk_rq_stat_sum (struct blk_rq_stat *dst,struct blk_rq_stat *src) { -if (!src->nr_samples) +if (dst->nr_samples + src->nr_samples <= dst->nr_samples)return ; dst->min =min (dst->min, src->min);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 271/294 RDMA/cm: add timeout to cm_destroy_id wait
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manjunath Patil <[email protected]>
[ Upstream commit 96d9cbe2f2ff7abde021bac75eafaceabe9a51fa ]
Add timeout to cm_destroy_id, so that userspace can trigger any data collection that would help in analyzing the cause of delay in destroying the cm_id.
New noinline function helps dtrace/ebpf programs to hook on to it. Existing functionality isn't changed except triggering a probe-able new function at every timeout interval.
We have seen cases where CM messages stuck with MAD layer (either due to software bug or faulty HCA), leading to cm_id getting stuck in the following call stack. This patch helps in resolving such issues faster.
kernel: ... INFO: task XXXX:56778 blocked for more than 120 seconds.
...
Call Trace: __schedule+0x2bc/0x895 schedule+0x36/0x7c schedule_timeout+0x1f6/0x31f ? __slab_free+0x19c/0x2ba wait_for_completion+0x12b/0x18a ? wake_up_q+0x80/0x73 cm_destroy_id+0x345/0x610 [ib_cm] ib_destroy_cm_id+0x10/0x20 [ib_cm] rdma_destroy_id+0xa8/0x300 [rdma_cm] ucma_destroy_id+0x13e/0x190 [rdma_ucm] ucma_write+0xe0/0x160 [rdma_ucm] __vfs_write+0x3a/0x16d vfs_write+0xb2/0x1a1 ? syscall_trace_enter+0x1ce/0x2b8 SyS_write+0x5c/0xd3 do_syscall_64+0x79/0x1b9 entry_SYSCALL_64_after_hwframe+0x16d/0x0
--- drivers/infiniband/core/cm.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/infiniband/core/cm.c +19 -1
@@ -33,6 +33,7 @@ MODULE_AUTHOR("Sean Hefty");MODULE_DESCRIPTION ("InfiniBand CM" );MODULE_LICENSE ("Dual BSD/GPL" ); +#define CM_DESTROY_ID_WAIT_TIMEOUT 10000/* msecs */ static const char *const ibcm_rej_reason_strs[] = { [IB_CM_REJ_NO_QP ] ="no QP" , [IB_CM_REJ_NO_EEC ] ="no EEC" ,
@@ -1056,10 +1057,20 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv) } } +static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id) +{ +struct cm_id_private *cm_id_priv; + + cm_id_priv = container_of(cm_id, struct cm_id_private, id); +pr_err ("%s: cm_id=%p timed out. state=%d refcnt=%d\n" , __func__, + cm_id, cm_id->state,refcount_read (&cm_id_priv->refcount)); +} +static void cm_destroy_id (struct ib_cm_id *cm_id,int err) {struct cm_id_private *cm_id_priv;struct cm_work *work; +int ret; cm_id_priv = container_of(cm_id, struct cm_id_private, id);spin_lock_irq (&cm_id_priv->lock);
@@ -1171,7 +1182,14 @@ static void cm_destroy_id(struct ib_cm_id *cm_id, int err)xa_erase (&cm.local_id_table,cm_local_id (cm_id->local_id));cm_deref_id (cm_id_priv); -wait_for_completion (&cm_id_priv->comp); +do { + ret =wait_for_completion_timeout (&cm_id_priv->comp, +msecs_to_jiffies ( +CM_DESTROY_ID_WAIT_TIMEOUT )); +if (!ret)/* timeout happened */ +cm_destroy_id_wait_timeout (cm_id); + }while (!ret); +while ((work =cm_dequeue_work (cm_id_priv)) !=NULL )cm_free_work (work);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 272/294 Input: allocate keycode for Display refresh rate toggle
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gergo Koteles <[email protected]>
[ Upstream commit cfeb98b95fff25c442f78a6f616c627bc48a26b7 ]
Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event when Fn + R is pressed. This is intended for use to switch between the two refresh rates.
Allocate a new KEY_REFRESH_RATE_TOGGLE keycode for it.
--- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+)
include/uapi/linux/input-event-codes.h +1 -0
@@ -602,6 +602,7 @@#define KEY_ALS_TOGGLE 0x230/* Ambient light sensor */ #define KEY_ROTATE_LOCK_TOGGLE 0x231/* Display rotation lock */ +#define KEY_REFRESH_RATE_TOGGLE 0x232/* Display refresh rate toggle */ #define KEY_BUTTONCONFIG 0x240/* AL Button Configuration */ #define KEY_TASKMANAGER 0x241/* AL Task/Project Manager */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 273/294 platform/x86: touchscreen_dmi: Add an extra entry for a variant of the Chuwi Vi8 tablet
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alban Boyé <[email protected]>
[ Upstream commit 1266e2efb7512dbf20eac820ca2ed34de6b1c3e7 ]
--- drivers/platform/x86/touchscreen_dmi.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +9 -0
@@ -1084,6 +1084,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"), }, }, + { +/* Chuwi Vi8 dual-boot (CWI506) */ + .driver_data = (void *)&chuwi_vi8_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Insyde" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"i86" ), + DMI_MATCH(DMI_BIOS_VERSION, "CHUWI2.D86JHBNR02"), + }, + }, {/* Chuwi Vi8 Plus (CWI519) */ .driver_data = (void *)&chuwi_vi8_plus_data,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 274/294 ktest: force $buildonly = 1 for make_warnings_file test type
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo B. Marliere <[email protected]>
[ Upstream commit 07283c1873a4d0eaa0e822536881bfdaea853910 ]
The test type "make_warnings_file" should have no mandatory configuration parameters other than the ones required by the "build" test type, because its purpose is to create a file with build warnings that may or may not be used by other subsequent tests. Currently, the only way to use it as a stand-alone test is by setting POWER_CYCLE, CONSOLE, SSH_USER, BUILD_TARGET, TARGET_IMAGE, REBOOT_TYPE and GRUB_MENU.
--- tools/testing/ktest/ktest.pl | 1 + 1 file changed, 1 insertion(+)
tools/testing/ktest/ktest.pl +1 -0
@@ -773,6 +773,7 @@ sub set_value { if ($lvalue =~ /^(TEST|BISECT|CONFIG_BISECT)_TYPE(\[.*\])?$/ && $prvalue !~ /^(config_|)bisect$/ && $prvalue !~ /^build$/ && + $prvalue !~ /^make_warnings_file$/ && $buildonly) { # Note if a test is something other than build, then we
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 275/294 ring-buffer: use READ_ONCE() to read cpu_buffer->commit_page in concurrent environment
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: linke li <[email protected]>
[ Upstream commit f1e30cb6369251c03f63c564006f96a54197dcc4 ]
In function ring_buffer_iter_empty(), cpu_buffer->commit_page is read while other threads may change it. It may cause the time_stamp that read in the next line come from a different page. Use READ_ONCE() to avoid having to reason about compiler optimizations now and in future.
--- kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer.c +1 -1
@@ -4211,7 +4211,7 @@ int ring_buffer_iter_empty(struct ring_buffer_iter *iter) cpu_buffer = iter->cpu_buffer; reader = cpu_buffer->reader_page; head_page = cpu_buffer->head_page; - commit_page = cpu_buffer->commit_page; + commit_page =READ_ONCE (cpu_buffer->commit_page); commit_ts = commit_page->page->time_stamp;/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 276/294 tools: iio: replace seekdir() in iio_generic_buffer
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petre Rodan <[email protected]>
[ Upstream commit 4e6500bfa053dc133021f9c144261b77b0ba7dc8 ]
Replace seekdir() with rewinddir() in order to fix a localized glibc bug.
One of the glibc patches that stable Gentoo is using causes an improper directory stream positioning bug on 32bit arm. That in turn ends up as a floating point exception in iio_generic_buffer.
The attached patch provides a fix by using an equivalent function which should not cause trouble for other distros and is easier to reason about in general as it obviously always goes back to to the start.
https://sourceware.org/bugzilla/show_bug.cgi?id=31212
--- tools/iio/iio_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iio/iio_utils.c +1 -1
@@ -373,7 +373,7 @@ int build_channel_array(const char *device_dir, goto error_close_dir; } -seekdir (dp,0 ); +rewinddir (dp);while (ent =readdir (dp), ent) {if (strcmp (ent->d_name +strlen (ent->d_name) -strlen ("_en" ),"_en" ) ==0 ) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 267/294 SUNRPC: increase size of rpc_wait_queue.qlen from unsigned short to unsigned int
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dai Ngo <[email protected]>
[ Upstream commit 2c35f43b5a4b9cdfaa6fdd946f5a212615dac8eb ]
When the NFS client is under extreme load the rpc_wait_queue.qlen counter can be overflowed. Here is an instant of the backlog queue overflow in a real world environment shown by drgn helper:
rpc_task_stats(rpc_clnt):
-------------------------rpc_clnt: 0xffff92b65d2bae00rpc_xprt: 0xffff9275db64f000
Queue: sending[64887] pending[524] backlog[30441] binding[0]
XMIT task: 0xffff925c6b1d8e98
WRITE: 750654
__dta_call_status_580: 65463
__dta_call_transmit_status_579: 1
call_reserveresult: 685189
nfs_client_init_is_complete: 1
COMMIT: 584
call_reserveresult: 573
__dta_call_status_580: 11
ACCESS: 1
__dta_call_status_580: 1
GETATTR: 10
__dta_call_status_580: 4
call_reserveresult: 6751249 tasks for server 111.222.333.444
Total tasks: 751249
count_rpc_wait_queues(xprt):
----------------------------
**** rpc_xprt: 0xffff9275db64f000 num_reqs: 65511wait_queue: xprt_binding[0] cnt: 0wait_queue: xprt_binding[1] cnt: 0wait_queue: xprt_binding[2] cnt: 0wait_queue: xprt_binding[3] cnt: 0 rpc_wait_queue[xprt_binding].qlen: 0 maxpriority: 0wait_queue: xprt_sending[0] cnt: 0wait_queue: xprt_sending[1] cnt: 64887wait_queue: xprt_sending[2] cnt: 0wait_queue: xprt_sending[3] cnt: 0 rpc_wait_queue[xprt_sending].qlen: 64887 maxpriority: 3wait_queue: xprt_pending[0] cnt: 524wait_queue: xprt_pending[1] cnt: 0wait_queue: xprt_pending[2] cnt: 0wait_queue: xprt_pending[3] cnt: 0 rpc_wait_queue[xprt_pending].qlen: 524 maxpriority: 0wait_queue: xprt_backlog[0] cnt: 0wait_queue: xprt_backlog[1] cnt: 685801wait_queue: xprt_backlog[2] cnt: 0wait_queue: xprt_backlog[3] cnt: 0 rpc_wait_queue[xprt_backlog].qlen: 30441 maxpriority: 3 [task cnt mismatch]
There is no effect on operations when this overflow occurs. However it causes confusion when trying to diagnose the performance problem.
--- include/linux/sunrpc/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/sunrpc/sched.h +1 -1
@@ -197,7 +197,7 @@ struct rpc_wait_queue {unsigned char maxpriority;/* maximum priority (0 if queue is not a priority queue) */ unsigned char priority;/* current priority */ unsigned char nr;/* # tasks remaining for cookie */ -unsigned short qlen;/* total # tasks waiting in queue */ +unsigned int qlen;/* total # tasks waiting in queue */ struct rpc_timer timer_list;#if IS_ENABLED (CONFIG_SUNRPC_DEBUG ) ||IS_ENABLED (CONFIG_TRACEPOINTS )const char * name;
Signature · 1 line
2.43.0
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
Greg Kroah-Hartman wrote on Thu, Apr 11, 2024 at 11:52:43AM +0200:
Quoted 5 lines
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.215-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 244ca117cb3c ("Linux 5.10.215-rc1") on:
- arm i.MX6ULL (Armadillo 640)
- arm64 i.MX8MP (Armadillo G4)
No obvious regression in dmesg or basic tests:
Signature · 1 line
Dominique Martinet | Asmadeus
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
All tests passing for Tegra ...
Test results for stable-v5.10:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
68 tests: 68 pass, 0 failLinux version: 5.10.215-rc1-g244ca117cb3c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 5.10.215-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.10.y
* git commit: 244ca117cb3cec4bb8f936b136312bb8482eeae3
* git describe: v5.10.214-295-g244ca117cb3c
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.214-295-g244ca117cb3c
## Test Regressions (compared to v5.10.214)
## Metric Regressions (compared to v5.10.214)
## Test Fixes (compared to v5.10.214)
## Metric Fixes (compared to v5.10.214)
## Test result summary
total: 94495, pass: 74097, fail: 3307, skip: 17023, xfail: 68
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 104 total, 104 passed, 0 failed
* arm64: 31 total, 31 passed, 0 failed
* i386: 25 total, 25 passed, 0 failed
* mips: 22 total, 22 passed, 0 failed
* parisc: 3 total, 0 passed, 3 failed
* powerpc: 23 total, 23 passed, 0 failed
* riscv: 9 total, 9 passed, 0 failed
* s390: 9 total, 9 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 27 total, 27 passed, 0 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mm
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-smoketest
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Hi,
Quoted 19 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
-------------
[ ... ]
Quoted 4 lines
Oliver Neukum <[email protected]>
usb: cdc-wdm: close race between read and workqueue
Just in case it has not been reported yet:
This patch is causing connection failures (timeouts) on all Chromebooks using the cdc-wdm driver for cellular modems, with all kernel branches where this patch has been applied. Reverting it fixes the problem.
I am copying some of the Google employees involved in identifying the regression in case additional feedback is needed.
Guenter
Greg Kroah-Hartman
maintainerQuoted 30 lines · Guenter Roeck
Hi,
Quoted 19 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
-------------
[ ... ]
Quoted 4 lines
Oliver Neukum <[email protected]>
usb: cdc-wdm: close race between read and workqueueJust in case it has not been reported yet:
Quoted 7 lines
This patch is causing connection failures (timeouts) on all Chromebooks using the cdc-wdm driver for cellular modems, with all kernel branches where this patch has been applied. Reverting it fixes the problem.
I am copying some of the Google employees involved in identifying the regression in case additional feedback is needed.
Can you all respond to Oliver on the linux-usb list where this was originally submitted to work it out? This commit has been in the tree for almost a month now with no reported problems that I can see.
thanks,
greg k-h
Hi Greg,
Quoted 36 lines · Greg Kroah-Hartman
Quoted 35 lines · Guenter Roeck
Hi,
Quoted 19 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
-------------
[ ... ]
Quoted 4 lines
Oliver Neukum <[email protected]>
usb: cdc-wdm: close race between read and workqueueJust in case it has not been reported yet:
This patch is causing connection failures (timeouts) on all Chromebooks using the cdc-wdm driver for cellular modems, with all kernel branches where this patch has been applied. Reverting it fixes the problem.
Quoted 7 lines
Quoted 2 lines
I am copying some of the Google employees involved in identifying the regression in case additional feedback is needed.
Can you all respond to Oliver on the linux-usb list where this was originally submitted to work it out? This commit has been in the tree for almost a month now with no reported problems that I can see.
Who knows, maybe only a certain type of usb cellular modems using cdc-wdm is affected. Either case, the problem was found less than two days after the stable tree merges into ChromeOS, and it took only about a week from there to identify the offending patch. I think that was actually an amazing job, given the size of those merges and because the failure is not absolute but results in unreliable tests due to timeouts.
Anyway, sure, we'll get in touch with Oliver. Other than that, please take this report as a heads-up in case anyone else reports similar problems.
Thanks,
Guenter
Greg Kroah-Hartman
maintainerQuoted 47 lines · Guenter Roeck
Hi Greg,
Quoted 36 lines · Greg Kroah-Hartman
Quoted 35 lines · Guenter Roeck
Hi,
Quoted 19 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 Sat, 13 Apr 2024 09:53:55 +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.215-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
-------------
[ ... ]
Quoted 4 lines
Oliver Neukum <[email protected]>
usb: cdc-wdm: close race between read and workqueueJust in case it has not been reported yet:
This patch is causing connection failures (timeouts) on all Chromebooks using the cdc-wdm driver for cellular modems, with all kernel branches where this patch has been applied. Reverting it fixes the problem.
Quoted 7 lines
Quoted 2 lines
I am copying some of the Google employees involved in identifying the regression in case additional feedback is needed.
Can you all respond to Oliver on the linux-usb list where this was originally submitted to work it out? This commit has been in the tree for almost a month now with no reported problems that I can see.
Quoted 6 lines
Who knows, maybe only a certain type of usb cellular modems using cdc-wdm is affected. Either case, the problem was found less than two days after the stable tree merges into ChromeOS, and it took only about a week from there to identify the offending patch. I think that was actually an amazing job, given the size of those merges and because the failure is not absolute but results in unreliable tests due to timeouts.
It is an amazing job, and I wasn't trying to be snarky, I was trying to say that "that's odd, normally usb problems are found very quickly by lots of people and you should let the author know about this as there's nothing I can do about it through this stable report".
I see the post on linux-usb now, thanks.
greg k-h
Hi!
Quoted 7 lines
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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.
Alex Williamson <[email protected]>
vfio/pci: Create persistent INTx handler
This introduces memory leak in vfio_intx_enable() -- name is not freed in case vdev->ctx = kzalloc() fails, for example.
Quoted 2 lines
Sean Christopherson <[email protected]>
x86/cpufeatures: AddCPUID_LNX_5to track recently added Linux-defined word
AFAICT this is not needed in 5.10.
Quoted 2 lines
Josh Poimboeuf <[email protected]>
objtool: Add asm version ofSTACK_FRAME_NON_STANDARD
Asm version of this macro is not used in 5.10.
Quoted 2 lines
Michael Roth <[email protected]>
x86/head/64: Re-enable stack protection
This is preparation for preparation for SEV-SNP CPUID patches, I don't believe we plan that for 6.1.
Quoted 2 lines
David Sterba <[email protected]>
btrfs: handle chunk tree lookup error inbtrfs_relocate_sys_chunks()
(This applies to 4.19, too). mutex_unlock() is needed before "goto error" here.
Quoted 2 lines
Aric Cyr <[email protected]>
drm/amd/display: Fix nanosec stat overflow
(This applies to 4.19, too). This is wrong. It updates prototypes but not actual functions.
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Greg Kroah-Hartman
maintainerQuoted 7 lines · Pavel Machek
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.215 release. There are 294 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 5 lines
Quoted 2 lines
Alex Williamson <[email protected]>
vfio/pci: Create persistent INTx handlerThis introduces memory leak in
vfio_intx_enable()-- name is not freed in casevdev->ctx=kzalloc()fails, for example.
So is the upstream commit wrong, or the backport wrong?
Quoted 4 lines
Quoted 2 lines
Sean Christopherson <[email protected]>
x86/cpufeatures: AddCPUID_LNX_5to track recently added Linux-defined wordAFAICT this is not needed in 5.10.
Why not?
Quoted 4 lines
Quoted 2 lines
Josh Poimboeuf <[email protected]>
objtool: Add asm version ofSTACK_FRAME_NON_STANDARDAsm version of this macro is not used in 5.10.
It fixed an issue.
Quoted 5 lines
Quoted 2 lines
Michael Roth <[email protected]>
x86/head/64: Re-enable stack protectionThis is preparation for preparation for SEV-SNP CPUID patches, I don't believe we plan that for 6.1.
This is 5.10, not 6.1.
And are you sure that this is not needed? Remember the x86 speculation mess that is happening here.
Quoted 5 lines
Quoted 2 lines
David Sterba <[email protected]>
btrfs: handle chunk tree lookup error inbtrfs_relocate_sys_chunks()(This applies to 4.19, too).
mutex_unlock()is needed before "goto error" here.
So can you provide that fix please?
Quoted 5 lines
Quoted 2 lines
Aric Cyr <[email protected]>
drm/amd/display: Fix nanosec stat overflow(This applies to 4.19, too). This is wrong. It updates prototypes but not actual functions.
So should it be dropped or added to 4.19?
confused,
greg k-h
Greg Kroah-Hartman wrote on Wed, Apr 17, 2024 at 03:28:04PM +0200:
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
David Sterba <[email protected]>
btrfs: handle chunk tree lookup error inbtrfs_relocate_sys_chunks()(This applies to 4.19, too).
mutex_unlock()is needed before "goto error" here.
ugh, I need to look more at the context when reviewing these, btrfs is part of what I'm more or less looking at when updating...
Quoted 1 line
So can you provide that fix please?
This bug affects upstream as well and I don't see any upstream fix for it yet on linux-btrfs@vger, I'll send a patch with Pavel's reported at.
Signature · 1 line
Dominique Martinet