6.1.84-rc1 review
Subsystems (7)
Greg Kroah-Hartman
maintainerRe: [PATCH 6.1 251/272] usb: typec: ucsi: Check for notifications after init
In reply to Christian A. EhrhardtQuoted 34 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 26 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit
808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56upstream.The completion notification for the final
SET_NOTIFICATION_ENABLEcommand during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
Fixes 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")Signed-off-by Christian A. Ehrhardt <[email protected]>Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Quoted 3 lines
--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Quoted 2 lines
This change has an out of bounds memory access. Please drop it from the stable trees until a fix is available.
Shouldn't we get a fix for Linus's tree too? Have I missed that somewhere? Or should this just be reverted now?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 6.1 251/272] usb: typec: ucsi: Check for notifications after init
Quoted 35 lines · Greg Kroah-Hartman
Quoted 34 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 29 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit
808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56upstream.The completion notification for the final
SET_NOTIFICATION_ENABLEcommand during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
Fixes 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")Signed-off-by Christian A. Ehrhardt <[email protected]>Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines
This change has an out of bounds memory access. Please drop it from the stable trees until a fix is available.
Shouldn't we get a fix for Linus's tree too? Have I missed that somewhere? Or should this just be reverted now?
Ah, I see the fix now, still catching up on email this morning...
Re: [PATCH 6.1 251/272] usb: typec: ucsi: Check for notifications after init
In reply to Greg Kroah-HartmanHi Greg,
Quoted 35 lines · Greg Kroah-Hartman
Quoted 34 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 29 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit
808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56upstream.The completion notification for the final
SET_NOTIFICATION_ENABLEcommand during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
Fixes 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")Signed-off-by Christian A. Ehrhardt <[email protected]>Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines
This change has an out of bounds memory access. Please drop it from the stable trees until a fix is available.
Shouldn't we get a fix for Linus's tree too? Have I missed that somewhere? Or should this just be reverted now?
I posted the fix a few hours after sending this mail. It is here:
https://lore.kernel.org/all/[email protected]/
Either this should be fast tracked to Linus or the original change reverted, yes.
Best regards
Christian
Greg Kroah-Hartman
maintainerRe: [PATCH 6.1 251/272] usb: typec: ucsi: Check for notifications after init
Quoted 42 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 38 lines · Greg Kroah-Hartman
Quoted 36 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 26 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit
808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56upstream.The completion notification for the final
SET_NOTIFICATION_ENABLEcommand during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
Fixes 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")Signed-off-by Christian A. Ehrhardt <[email protected]>Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Quoted 3 lines
--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)This change has an out of bounds memory access. Please drop it from the stable trees until a fix is available.
Quoted 8 lines
Quoted 2 lines
Shouldn't we get a fix for Linus's tree too? Have I missed that somewhere? Or should this just be reverted now?
I posted the fix a few hours after sending this mail. It is here:
https://lore.kernel.org/all/[email protected]/Either this should be fast tracked to Linus or the original change reverted, yes.
I've dropped the offending commit from the stable queues now. Once this fix gets into Linus's tree, let us know and I will add both in then.
thanks,
greg k-h
Re: [PATCH 6.1 080/272] mm: swap: fix race between free_swap_and_cache() and swapoff()
In reply to Greg Kroah-HartmanQuoted 1 line · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
LGTM!
Quoted 114 lines
------------------
From: Ryan Roberts <[email protected]>
[ Upstream commit
82b1c07a0af603e3c47b906c8e991dc96f01688e]There was previously a theoretical window where
swapoff()could run and teardown aswap_info_structwhile a call tofree_swap_and_cache()was running in another thread. This could cause, amongst other bad possibilities,swap_page_trans_huge_swapped()(called byfree_swap_and_cache()) to access the freed memory forswap_map.This is a theoretical problem and I haven't been able to provoke it from a test case. But there has been agreement based on code review that this is possible (see link below).
Fix it by using get_swap_device()/put_swap_device(), which will stall
swapoff(). There was an extra check in_swap_info_get()to confirm that the swap entry was not free. This isn't present inget_swap_device()because it doesn't make sense in general due to the race between getting the reference and swapoff. So I've added an equivalent check directly infree_swap_and_cache().Details of how to provoke one possible issue (thanks to David Hildenbrand for deriving this):
--8<-----
__swap_entry_free()might be the last user and result in "count ==SWAP_HAS_CACHE".
swapoff->try_to_unuse()will stop as soon as soon as si->inuse_pages==0.So the question is: could someone reclaim the folio and turn si->inuse_pages==0, before we completed
swap_page_trans_huge_swapped().Imagine the following: 2 MiB folio in the swapcache. Only 2 subpages are still references by swap entries.
Process 1 still references subpage 0 via swap entry. Process 2 still references subpage 1 via swap entry.
Process 1 quits. Calls
free_swap_and_cache().
-> count ==SWAP_HAS_CACHE
[then, preempted in the hypervisor etc.]Process 2 quits. Calls
free_swap_and_cache().
-> count ==SWAP_HAS_CACHEProcess 2 goes ahead, passes
swap_page_trans_huge_swapped(), and calls__try_to_reclaim_swap().__try_to_reclaim_swap()->folio_free_swap()->delete_from_swap_cache()-> put_swap_folio()->free_swap_slot()->swapcache_free_entries()-> swap_entry_free()->swap_range_free()->
...WRITE_ONCE(si->inuse_pages, si->inuse_pages - nr_entries);What stops swapoff to succeed after process 2 reclaimed the swap cache but before process1 finished its call to
swap_page_trans_huge_swapped()?--8<-----
Fixes 7c00bafee87c ("mm/swap: free swap slots in batch")Signed-off-by Ryan Roberts <[email protected]>Cc David Hildenbrand <[email protected]>Cc "Huang, Ying" <[email protected]>Cc <[email protected]>Signed-off-by Andrew Morton <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- mm/swapfile.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)mm/swapfile.c +12
-1@@ -1229,6 +1229,11 @@ static unsigned char __swap_entry_free_locked(struct swap_info_struct *p,* with get_swap_device() and put_swap_device(), unless the swap * functions call get/put_swap_device() by themselves. * +* Note that when only holding the PTL, swapoff might succeed immediately +* after freeing a swap entry. Therefore, immediately after +* __swap_entry_free(), the swap info might become stale and should not +* be touched without a prior get_swap_device(). +* * Check whether swap entry is valid in the swap device. If so, * return pointer to swap_info_struct, and keep the swap entry valid * via preventing the swap device from being swapoff, until @@ -1630,13 +1635,19 @@ int free_swap_and_cache(swp_entry_t entry)if (non_swap_entry (entry))return 1 ; - p =_swap_info_get (entry); + p =get_swap_device (entry);if (p) { +if (WARN_ON (data_race (!p->swap_map[swp_offset (entry)]))) { +put_swap_device (p); +return 0 ; + } + count =__swap_entry_free (p, entry);if (count ==SWAP_HAS_CACHE && !swap_page_trans_huge_swapped (p, entry))__try_to_reclaim_swap (p,swp_offset (entry),TTRS_UNMAPPED |TTRS_FULL ); +put_swap_device (p); }return p !=NULL ; }
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.84 release. There are 272 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 Wed, 03 Apr 2024 15:24:46 +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/v6.x/stable-review/patch-6.1.84-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.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: 6.1.84-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit: aa2042702765a33750c326a9e153901b313636ac
* git describe: v6.1.83-273-gaa2042702765
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.83-273-gaa2042702765
## Test Regressions (compared to v6.1.83)
## Metric Regressions (compared to v6.1.83)
## Test Fixes (compared to v6.1.83)
## Metric Fixes (compared to v6.1.83)
## Test result summary
total: 146089, pass: 124663, fail: 2421, skip: 18867, xfail: 138
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 138 total, 138 passed, 0 failed
* arm64: 41 total, 40 passed, 1 failed
* i386: 30 total, 30 passed, 0 failed
* mips: 25 total, 25 passed, 0 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 34 total, 34 passed, 0 failed
* riscv: 11 total, 11 passed, 0 failed
* s390: 16 total, 15 passed, 1 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 35 total, 34 passed, 1 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-drivers-dma-buf
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-lib
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mm
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* 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-x86
* kselftest-zram
* kunit
* 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
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.84 release. There are 272 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.
W dniu 1.04.2024 o 17:43, Greg Kroah-Hartman pisze:
Quoted 9 lines
This is the start of the stable review cycle for the 6.1.84 release. There are 272 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 Wed, 03 Apr 2024 15:24:46 +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/v6.x/stable-review/patch-6.1.84-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Hello,
Tested on a HP 17-by0001nw laptop with an Intel Kaby Lake CPU and Ubuntu 20.04.
Stack:
- amd64,
- ext4 on top of LVM on top of LUKS on top of mdraid on top of NVMe and SATA drives (the SATA drive in the write-mostly mode).
Tested (lightly):
- suspend to RAM,
- suspend to disk,
- GPU (Intel HD Graphics 620, with an old game on Wine and ~3 Unigine benchmarks)
- WiFi (Realtek RTL8822BE),
- Bluetooth (Realtek RTL8822BE),
- PCI soundcard (Intel HD Audio),
- USB soundcard (Logitech Pro X),
- webcam,
Filesystems tested very lightly (mounting, listing and opening files):
- NFS,
- exFAT
- vfat,
- NTFS via FUSE
Nitpicks:
- I got the following error in dmesg from Bluetooth after resume from suspend:
[ 4058.056834] usb 1-3: 1:1: cannot get freq at ep 0x81
Greetings,
Mateusz
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.84 release. There are 272 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 Wed, 03 Apr 2024 15:24:46 +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/v6.x/stable-review/patch-6.1.84-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.1:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 116 pass, 0 failLinux version: 6.1.84-rc1-gaa2042702765
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
Hi Greg,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.84 release. There are 272 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
Quoted 7 lines
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.84-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
I tested 6.1.84-rc1 (aa2042702765) on Kalray kvx arch (not upstream yet) and everything looks good!
It ran on real hw (k200, k200lp and k300 boards), on qemu as well as on our internal instruction set simulator (ISS).
Tests were run on several interfaces/drivers (usb, qsfp ethernet, eMMC, PCIe endpoint+RC, SPI, remoteproc, uart, iommu). LTP and uClibc-ng testsuites are also run without any regression.
Everything looks fine to us.
Signature · 1 line
Yann
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.84 release. There are 272 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.
Re: [PATCH 6.1 251/272] usb: typec: ucsi: Check for notifications after init
In reply to Greg Kroah-HartmanHi Greg,
Quoted 46 lines · Greg Kroah-Hartman
Quoted 45 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 40 lines · Greg Kroah-Hartman
Quoted 34 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 26 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit
808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56upstream.The completion notification for the final
SET_NOTIFICATION_ENABLEcommand during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
Fixes 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")Signed-off-by Christian A. Ehrhardt <[email protected]>Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Quoted 3 lines
--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)Quoted 2 lines
This change has an out of bounds memory access. Please drop it from the stable trees until a fix is available.
Shouldn't we get a fix for Linus's tree too? Have I missed that somewhere? Or should this just be reverted now?
Quoted 8 lines
Quoted 5 lines
I posted the fix a few hours after sending this mail. It is here:
https://lore.kernel.org/all/[email protected]/Either this should be fast tracked to Linus or the original change reverted, yes.
I've dropped the offending commit from the stable queues now. Once this fix gets into Linus's tree, let us know and I will add both in then.
The fix for
808a8b9e0b87 ("usb: typec: ucsi: Check for notifications after init")
has hit Linus's tree as
ce4c8d21054a ("usb: typec: ucsi: Fix connector check on init")
There is no urgency but this is to let you know that the original commit is eligible for -stable again, provided that the follow up commit is backported, too.
Best regards,
Christian
Greg Kroah-Hartman
maintainerRe: [PATCH 6.1 251/272] usb: typec: ucsi: Check for notifications after init
Quoted 59 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 46 lines · Greg Kroah-Hartman
Quoted 45 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 40 lines · Greg Kroah-Hartman
Quoted 34 lines · Christian A. Ehrhardt
Hi Greg,
Quoted 26 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit
808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56upstream.The completion notification for the final
SET_NOTIFICATION_ENABLEcommand during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
Fixes 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")Signed-off-by Christian A. Ehrhardt <[email protected]>Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Quoted 3 lines
--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)Quoted 2 lines
This change has an out of bounds memory access. Please drop it from the stable trees until a fix is available.
Shouldn't we get a fix for Linus's tree too? Have I missed that somewhere? Or should this just be reverted now?
Quoted 8 lines
Quoted 5 lines
I posted the fix a few hours after sending this mail. It is here:
https://lore.kernel.org/all/[email protected]/Either this should be fast tracked to Linus or the original change reverted, yes.
I've dropped the offending commit from the stable queues now. Once this fix gets into Linus's tree, let us know and I will add both in then.
Quoted 8 lines
The fix for
808a8b9e0b87("usb: typec: ucsi: Check for notifications after init")
has hit Linus's tree as
ce4c8d21054a("usb: typec: ucsi: Fix connector check on init")There is no urgency but this is to let you know that the original commit is eligible for -stable again, provided that the follow up commit is backported, too.
Thanks, all now queued up.
greg k-h