This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +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/v4.x/stable-review/patch-4.19.282-rc... or in the git tree and branch at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y and the diffstat can be found below.
thanks,
greg k-h
------------- Pseudo-Shortlog of commits:
Greg Kroah-Hartman gregkh@linuxfoundation.org Linux 4.19.282-rc1
Ekaterina Orlova vorobushek.ok@gmail.com ASN.1: Fix check for strdup() success
Dan Carpenter error27@gmail.com iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
William Breathitt Gray william.gray@linaro.org counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
Kuniyuki Iwashima kuniyu@amazon.com sctp: Call inet6_destroy_sock() via sk->sk_destruct().
Kuniyuki Iwashima kuniyu@amazon.com dccp: Call inet6_destroy_sock() via sk->sk_destruct().
Kuniyuki Iwashima kuniyu@amazon.com inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
Kuniyuki Iwashima kuniyu@amazon.com tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct().
Kuniyuki Iwashima kuniyu@amazon.com udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM).
Baokun Li libaokun1@huawei.com ext4: fix use-after-free in ext4_xattr_set_entry
Ritesh Harjani riteshh@linux.ibm.com ext4: remove duplicate definition of ext4_xattr_ibody_inline_set()
Tudor Ambarus tudor.ambarus@linaro.org Revert "ext4: fix use-after-free in ext4_xattr_set_entry"
Pingfan Liu kernelfans@gmail.com x86/purgatory: Don't generate debug info for purgatory.ro
Greg Kroah-Hartman gregkh@linuxfoundation.org memstick: fix memory leak if card device is never registered
Ryusuke Konishi konishi.ryusuke@gmail.com nilfs2: initialize unused bytes in segment summary blocks
Juergen Gross jgross@suse.com xen/netback: use same error messages for same errors
Heiko Carstens hca@linux.ibm.com s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
Álvaro Fernández Rojas noltari@gmail.com net: dsa: b53: mmap: add phy ops
Damien Le Moal damien.lemoal@opensource.wdc.com scsi: core: Improve scsi_vpd_inquiry() checks
Tomas Henzl thenzl@redhat.com scsi: megaraid_sas: Fix fw_crash_buffer_show()
Nick Desaulniers ndesaulniers@google.com selftests: sigaltstack: fix -Wuninitialized
Jonathan Denose jdenose@chromium.org Input: i8042 - add quirk for Fujitsu Lifebook A574/H
Douglas Raillard douglas.raillard@arm.com f2fs: Fix f2fs_truncate_partial_nodes ftrace event
Sebastian Basierski sebastianx.basierski@intel.com e1000e: Disable TSO on i219-LM card to increase speed
Nikita Zhandarovich n.zhandarovich@fintech.ru mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
Aleksandr Loktionov aleksandr.loktionov@intel.com i40e: fix i40e_setup_misc_vector() error handling
Aleksandr Loktionov aleksandr.loktionov@intel.com i40e: fix accessing vsi->active_filters without holding lock
Xuan Zhuo xuanzhuo@linux.alibaba.com virtio_net: bugfix overflow inside xdp_linearize_page()
Gwangun Jung exsociety@gmail.com net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
Jianqun Xu jay.xu@rock-chips.com ARM: dts: rockchip: fix a typo error for rk3288 spdif node
-------------
Diffstat:
Makefile | 4 +- arch/arm/boot/dts/rk3288.dtsi | 2 +- arch/s390/kernel/ptrace.c | 8 +--- arch/x86/purgatory/Makefile | 5 ++- drivers/iio/adc/at91-sama5d2_adc.c | 2 +- drivers/iio/counter/104-quad-8.c | 14 +----- drivers/input/serio/i8042-x86ia64io.h | 8 ++++ drivers/memstick/core/memstick.c | 5 ++- drivers/net/dsa/b53/b53_mmap.c | 14 ++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 51 +++++++++++----------- drivers/net/ethernet/intel/i40e/i40e_main.c | 9 ++-- .../ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c | 2 + drivers/net/virtio_net.c | 8 +++- drivers/net/xen-netback/netback.c | 6 +-- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/scsi.c | 11 ++++- fs/ext4/inline.c | 11 +++-- fs/ext4/xattr.c | 26 +---------- fs/ext4/xattr.h | 6 +-- fs/nilfs2/segment.c | 20 +++++++++ include/net/ipv6.h | 2 + include/net/udp.h | 2 +- include/net/udplite.h | 8 ---- include/trace/events/f2fs.h | 2 +- net/dccp/dccp.h | 1 + net/dccp/ipv6.c | 15 ++++--- net/dccp/proto.c | 8 +++- net/ipv4/udp.c | 9 ++-- net/ipv4/udplite.c | 8 ++++ net/ipv6/af_inet6.c | 15 ++++++- net/ipv6/ipv6_sockglue.c | 20 ++++----- net/ipv6/ping.c | 6 --- net/ipv6/raw.c | 2 - net/ipv6/tcp_ipv6.c | 8 +--- net/ipv6/udp.c | 17 ++++++-- net/ipv6/udp_impl.h | 1 + net/ipv6/udplite.c | 9 +++- net/l2tp/l2tp_ip6.c | 2 - net/sched/sch_qfq.c | 13 +++--- net/sctp/socket.c | 29 ++++++++---- scripts/asn1_compiler.c | 2 +- .../selftests/sigaltstack/current_stack_pointer.h | 23 ++++++++++ tools/testing/selftests/sigaltstack/sas.c | 7 +-- 43 files changed, 251 insertions(+), 172 deletions(-)
On Mon, Apr 24, 2023 at 03:18:27PM +0200, Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +0000. Anything received after that time might be too late.
Build results: total: 155 pass: 155 fail: 0 Qemu test results: total: 431 pass: 431 fail: 0
Tested-by: Guenter Roeck linux@roeck-us.net
Guenter
On Mon, 24 Apr 2023 at 14:39, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +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/v4.x/stable-review/patch-4.19.282-rc... or in the git tree and branch at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.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.
Tested-by: Linux Kernel Functional Testing lkft@linaro.org
FYI, This is not a show stopper but worth reporting.
NOTE: Following kernel warning notices on stable rc 4.19.282-rc1 from the previous releases 4.19.279-rc1 noticed on arm64, i386 and x86_64. After this kernel warning the system is still stable and up and running.
This kernel is built with kselftest ftrace merge configs with all required Kconfigs.
[ 0.000000] Linux version 4.19.279-rc1 (tuxmake@tuxmake) (gcc version 11.3.0 (Debian 11.3.0-11)) #1 SMP @1679324856 ... [ 0.145911] ftrace: allocating 48590 entries in 190 pages ...
[ 2.880223] WARNING: CPU: 0 PID: 0 at include/trace/events/lock.h:13 lock_acquire+0x142/0x150 [ 2.881454] WARNING: CPU: 1 PID: 0 at include/trace/events/lock.h:58 lock_release+0x1af/0x280 [ 2.881190] Modules linked in: [ 2.882221] Modules linked in: [ 2.881190] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.279-rc1 #1 [ 2.882221] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.279-rc1 #1 [ 2.881190] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.5 11/26/2020 [ 2.881190] RIP: 0010:lock_acquire+0x142/0x150 [ 2.882221] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.5 11/26/2020 [ 2.882221] RIP: 0010:lock_release+0x1af/0x280 [ 2.881190] Code: 59 48 85 c0 75 cf 45 89 cb 65 ff 0d 78 bd 23 6c e9 24 ff ff ff 44 89 5d cc e8 9a 13 02 00 44 8b 5d cc 84 c0 0f 85 26 ff ff ff <0f> 0b e9 1f ff ff ff 0f 1f 80 00 00 00 00 8b 05 8a dc 90 01 85 c0 [ 2.881190] RSP: 0000:ffffffff95603d50 EFLAGS: 00010046 [ 2.882221] Code: ea 4c 89 e6 e8 42 80 02 01 48 8b 03 48 85 c0 75 e5 65 ff 0d 83 bf 23 6c e9 b1 fe ff ff e8 a9 15 02 00 84 c0 0f 85 bb fe ff ff <0f> 0b e9 b4 fe ff ff e8 95 5e 41 00 85 c0 0f 84 52 ff ff ff 8b 35 [ 2.882221] RSP: 0000:ffffbacc8193bda0 EFLAGS: 00010046 [ 2.881190] RAX: 0000000000000000 RBX: 0000000000000046 RCX: 0000000000000002 [ 2.881190] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff9567fe08 [ 2.882221] RAX: 0000000000000000 RBX: 0000000000000046 RCX: 0000000000000100 [ 2.882221] RDX: ffffffff93db7bab RSI: 0000000000000001 RDI: ffffffff9567fe08 [ 2.881190] RBP: ffffffff95603d90 R08: 0000000000000001 R09: 0000000000000000 [ 2.881190] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff9567fe08 [ 2.882221] RBP: ffffbacc8193bde8 R08: 00000000483c81c9 R09: 0000000000080000 [ 2.882221] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff9567fe08 [ 2.881190] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000002 [ 2.881190] FS: 0000000000000000(0000) GS:ffff8f2da7800000(0000) knlGS:0000000000000000 [ 2.882221] R13: ffffffff93db7bab R14: ffffffff956f3f20 R15: 0000000000000001 [ 2.882221] FS: 0000000000000000(0000) GS:ffff8f2da7880000(0000) knlGS:0000000000000000 [ 2.881190] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.881190] CR2: 0000000000000000 CR3: 00000002f621e001 CR4: 00000000003606f0 [ 2.882221] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.882221] CR2: 0000000000000000 CR3: 00000002f621e001 CR4: 00000000003606e0 [ 2.881190] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.881190] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.882221] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.882221] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.881190] Call Trace: [ 2.882221] Call Trace: [ 2.882221] ktime_get+0x58/0x110 [ 2.881190] ktime_get+0x43/0x110 [ 2.882221] ? sched_clock_tick+0x6b/0x90 [ 2.881190] ? sched_clock_tick+0x6b/0x90 [ 2.882221] sched_clock_tick+0x6b/0x90 [ 2.881190] sched_clock_tick+0x6b/0x90 [ 2.882221] sched_clock_idle_wakeup_event+0x22/0x50 [ 2.881190] sched_clock_idle_wakeup_event+0x22/0x50 [ 2.882221] cpuidle_enter_state+0xd6/0x2e0 [ 2.881190] cpuidle_enter_state+0xd6/0x2e0 [ 2.882221] cpuidle_enter+0x17/0x20 [ 2.881190] cpuidle_enter+0x17/0x20 [ 2.882221] call_cpuidle+0x23/0x40 [ 2.881190] call_cpuidle+0x23/0x40 [ 2.882221] do_idle+0x1b9/0x240 [ 2.881190] do_idle+0x1b9/0x240 [ 2.882221] cpu_startup_entry+0x73/0x80 [ 2.881190] cpu_startup_entry+0x73/0x80 [ 2.882221] start_secondary+0x19e/0x1f0 [ 2.881190] rest_init+0x143/0x147 [ 2.882221] secondary_startup_64+0xa4/0xb0 [ 2.881190] start_kernel+0x487/0x4a9 [ 2.882221] irq event stamp: 33604 [ 2.881190] x86_64_start_reservations+0x24/0x26 [ 2.882221] hardirqs last enabled at (33603): [<ffffffff93e23771>] tick_nohz_idle_enter+0x61/0xa0 [ 2.882221] hardirqs last disabled at (33604): [<ffffffff93db8d22>] do_idle+0x72/0x240 [ 2.881190] x86_64_start_kernel+0x87/0x8b [ 2.882221] softirqs last enabled at (33594): [<ffffffff94e002b6>] __do_softirq+0x2b6/0x356 [ 2.882221] softirqs last disabled at (33579): [<ffffffff93d83a1b>] irq_exit+0xab/0xe0 [ 2.881190] secondary_startup_64+0xa4/0xb0 [ 2.882221] ---[ end trace 257e6b641850f405 ]--- [ 2.881190] irq event stamp: 51806 [ 3.190254] thermal LNXTHERM:00: registered as thermal_zone0 [ 2.881190] hardirqs last enabled at (51805): [<ffffffff94b356ad>] poll_idle+0x2d/0xa6 [ 2.881190] hardirqs last disabled at (51806): [<ffffffff93db7bed>] sched_clock_idle_wakeup_event+0x1d/0x50 [ 2.881190] softirqs last enabled at (51790): [<ffffffff93d82d21>] _local_bh_enable+0x21/0x40 [ 2.881190] softirqs last disabled at (51789): [<ffffffff93d83948>] irq_enter+0x48/0x70 [ 3.195448] ACPI: Thermal Zone [TZ00] (28 C) [ 2.881190] ---[ end trace 257e6b641850f406 ]---
Logs: - https://lkft.validation.linaro.org/scheduler/job/6373184#L889
History: ------- - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2OsIodn7l10ciOlEtqVm8...
## Build * kernel: 4.19.282-rc1 * git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc * git branch: linux-4.19.y * git commit: 8ca3c8d286160dca3bb13ae97a4a7a2d2fd4ad01 * git describe: v4.19.279-173-g8ca3c8d28616 * test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
## Test Regressions (compared to v4.19.279-143-gcc0a9b81697f)
## Metric Regressions (compared to v4.19.279-143-gcc0a9b81697f)
## Test Fixes (compared to v4.19.279-143-gcc0a9b81697f)
## Metric Fixes (compared to v4.19.279-143-gcc0a9b81697f)
## Test result summary total: 96887, pass: 72120, fail: 3496, skip: 21094, xfail: 177
## Build Summary * arc: 10 total, 10 passed, 0 failed * arm: 108 total, 107 passed, 1 failed * arm64: 34 total, 33 passed, 1 failed * i386: 20 total, 19 passed, 1 failed * mips: 22 total, 22 passed, 0 failed * parisc: 6 total, 6 passed, 0 failed * powerpc: 24 total, 24 passed, 0 failed * s390: 6 total, 6 passed, 0 failed * sh: 12 total, 12 passed, 0 failed * sparc: 6 total, 6 passed, 0 failed * x86_64: 28 total, 27 passed, 1 failed
## Test suites summary * boot * fwts * igt-gpu-tools * 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-filesystems * kselftest-filesystems-binderfs * kselftest-firmware * kselftest-fpu * kselftest-ftrace * kselftest-futex * kselftest-gpio * kselftest-intel_pstate * kselftest-ipc * kselftest-ir * kselftest-kcmp * kselftest-kexec * kselftest-kvm * kselftest-lib * kselftest-livepatch * kselftest-membarrier * kselftest-memfd * kselftest-memory-hotplug * kselftest-mincore * kselftest-mount * kselftest-mqueue * kselftest-net * kselftest-net-forwarding * kselftest-netfilter * kselftest-nsfs * kselftest-openat2 * kselftest-pid_namespace * kselftest-pidfd * kselftest-proc * kselftest-pstore * 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-vm * kselftest-x86 * kselftest-zram * kunit * kvm-unit-tests * libhugetlbfs * 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-fsx * ltp-hugetlb * ltp-io * ltp-ipc * ltp-math * ltp-mm * ltp-nptl * ltp-pty * ltp-sched * ltp-securebits * ltp-smoke * ltp-syscalls * ltp-tracing * network-basic-tests * rcutorture * v4l2-compliance * vdso
-- Linaro LKFT https://lkft.linaro.org
On Mon, 24 Apr 2023 15:18:27 +0200, Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +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/v4.x/stable-review/patch-4.19.282-rc... or in the git tree and branch at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y and the diffstat can be found below.
thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v4.19: 10 builds: 10 pass, 0 fail 22 boots: 22 pass, 0 fail 40 tests: 40 pass, 0 fail
Linux version: 4.19.282-rc1-g8ca3c8d28616 Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000, tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra30-cardhu-a04
Tested-by: Jon Hunter jonathanh@nvidia.com
Jon
Hello Greg,
From: Greg Kroah-Hartman gregkh@linuxfoundation.org Sent: Monday, April 24, 2023 2:18 PM
This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +0000. Anything received after that time might be too late.
CIP configurations built and booted with Linux 4.19.282-rc1 (8ca3c8d28616): https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/84... https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/commits/linu...
Tested-by: Chris Paterson (CIP) chris.paterson2@renesas.com
Kind regards, Chris
On 4/24/23 07:18, Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +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/v4.x/stable-review/patch-4.19.282-rc... or in the git tree and branch at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y and the diffstat can be found below.
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Tested-by: Shuah Khan skhan@linuxfoundation.org
thanks, -- Shuah
Hi!
This should be show stopper, actually:
FYI, This is not a show stopper but worth reporting.
NOTE: Following kernel warning notices on stable rc 4.19.282-rc1 from the previous releases 4.19.279-rc1 noticed on arm64, i386 and x86_64. After this kernel warning the system is still stable and up and running.
This kernel is built with kselftest ftrace merge configs with all required Kconfigs.
[ 0.000000] Linux version 4.19.279-rc1 (tuxmake@tuxmake) (gcc version 11.3.0 (Debian 11.3.0-11)) #1 SMP @1679324856 ... [ 0.145911] ftrace: allocating 48590 entries in 190 pages ...
[ 2.880223] WARNING: CPU: 0 PID: 0 at include/trace/events/lock.h:13 lock_acquire+0x142/0x150 [ 2.881454] WARNING: CPU: 1 PID: 0 at include/trace/events/lock.h:58 lock_release+0x1af/0x280
This indicates locking problem somewhere in cpuidle / ftrace.
I skimmed the patches, and I do not see anything obvious there. Is there chance to do a bisection?
Best regards, Pavel
On Tue, 25 Apr 2023 11:02:23 +0100 Naresh Kamboju naresh.kamboju@linaro.org wrote:
On Mon, 24 Apr 2023 at 14:39, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
This is the start of the stable review cycle for the 4.19.282 release. There are 29 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, 26 Apr 2023 13:11:11 +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/v4.x/stable-review/patch-4.19.282-rc... or in the git tree and branch at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.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.
Tested-by: Linux Kernel Functional Testing lkft@linaro.org
FYI, This is not a show stopper but worth reporting.
NOTE: Following kernel warning notices on stable rc 4.19.282-rc1 from the previous releases 4.19.279-rc1 noticed on arm64, i386 and x86_64. After this kernel warning the system is still stable and up and running.
This kernel is built with kselftest ftrace merge configs with all required Kconfigs.
[ 0.000000] Linux version 4.19.279-rc1 (tuxmake@tuxmake) (gcc version 11.3.0 (Debian 11.3.0-11)) #1 SMP @1679324856 ... [ 0.145911] ftrace: allocating 48590 entries in 190 pages
Note, this has nothing to do with the ftrace allocating of pages.
...
[ 2.880223] WARNING: CPU: 0 PID: 0 at include/trace/events/lock.h:13 lock_acquire+0x142/0x150
The above file is a trace event that should not be enabled at boot up.
But... I believe there was a check that wasn't working anymore, but I fixed it, and that was backported. So this is probably detecting a bug, or needs another fix.
Hmm, commit c2679254b9c9980d9045f0f722cf093a2b1f7590 was added in 279-rc1 which is probably what is triggering this.
That is in include/linux/tracepoint.h:
static inline void trace_##name(proto) \ { \ if (static_key_false(&__tracepoint_##name.key)) \ __DO_TRACE(name, \ TP_ARGS(args), \ TP_CONDITION(cond), 0); \ if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \ WARN_ON_ONCE(!rcu_is_watching()); \ } \ }
Where the trace event is being called when RCU is not watching (and trace events require RCU to *be* watching!).
Now the question is, why is this triggering on 4.19 but not in latest mainline?
-- Steve
[ 2.881454] WARNING: CPU: 1 PID: 0 at include/trace/events/lock.h:58 lock_release+0x1af/0x280 [ 2.881190] Modules linked in: [ 2.882221] Modules linked in: [ 2.881190] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.279-rc1 #1 [ 2.882221] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.279-rc1 #1 [ 2.881190] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.5 11/26/2020 [ 2.881190] RIP: 0010:lock_acquire+0x142/0x150 [ 2.882221] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.5 11/26/2020 [ 2.882221] RIP: 0010:lock_release+0x1af/0x280 [ 2.881190] Code: 59 48 85 c0 75 cf 45 89 cb 65 ff 0d 78 bd 23 6c e9 24 ff ff ff 44 89 5d cc e8 9a 13 02 00 44 8b 5d cc 84 c0 0f 85 26 ff ff ff <0f> 0b e9 1f ff ff ff 0f 1f 80 00 00 00 00 8b 05 8a dc 90 01 85 c0 [ 2.881190] RSP: 0000:ffffffff95603d50 EFLAGS: 00010046 [ 2.882221] Code: ea 4c 89 e6 e8 42 80 02 01 48 8b 03 48 85 c0 75 e5 65 ff 0d 83 bf 23 6c e9 b1 fe ff ff e8 a9 15 02 00 84 c0 0f 85 bb fe ff ff <0f> 0b e9 b4 fe ff ff e8 95 5e 41 00 85 c0 0f 84 52 ff ff ff 8b 35 [ 2.882221] RSP: 0000:ffffbacc8193bda0 EFLAGS: 00010046 [ 2.881190] RAX: 0000000000000000 RBX: 0000000000000046 RCX: 0000000000000002 [ 2.881190] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff9567fe08 [ 2.882221] RAX: 0000000000000000 RBX: 0000000000000046 RCX: 0000000000000100 [ 2.882221] RDX: ffffffff93db7bab RSI: 0000000000000001 RDI: ffffffff9567fe08 [ 2.881190] RBP: ffffffff95603d90 R08: 0000000000000001 R09: 0000000000000000 [ 2.881190] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff9567fe08 [ 2.882221] RBP: ffffbacc8193bde8 R08: 00000000483c81c9 R09: 0000000000080000 [ 2.882221] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff9567fe08 [ 2.881190] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000002 [ 2.881190] FS: 0000000000000000(0000) GS:ffff8f2da7800000(0000) knlGS:0000000000000000 [ 2.882221] R13: ffffffff93db7bab R14: ffffffff956f3f20 R15: 0000000000000001 [ 2.882221] FS: 0000000000000000(0000) GS:ffff8f2da7880000(0000) knlGS:0000000000000000 [ 2.881190] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.881190] CR2: 0000000000000000 CR3: 00000002f621e001 CR4: 00000000003606f0 [ 2.882221] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.882221] CR2: 0000000000000000 CR3: 00000002f621e001 CR4: 00000000003606e0 [ 2.881190] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.881190] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.882221] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.882221] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.881190] Call Trace: [ 2.882221] Call Trace: [ 2.882221] ktime_get+0x58/0x110 [ 2.881190] ktime_get+0x43/0x110 [ 2.882221] ? sched_clock_tick+0x6b/0x90 [ 2.881190] ? sched_clock_tick+0x6b/0x90 [ 2.882221] sched_clock_tick+0x6b/0x90 [ 2.881190] sched_clock_tick+0x6b/0x90 [ 2.882221] sched_clock_idle_wakeup_event+0x22/0x50 [ 2.881190] sched_clock_idle_wakeup_event+0x22/0x50 [ 2.882221] cpuidle_enter_state+0xd6/0x2e0 [ 2.881190] cpuidle_enter_state+0xd6/0x2e0 [ 2.882221] cpuidle_enter+0x17/0x20 [ 2.881190] cpuidle_enter+0x17/0x20 [ 2.882221] call_cpuidle+0x23/0x40 [ 2.881190] call_cpuidle+0x23/0x40 [ 2.882221] do_idle+0x1b9/0x240 [ 2.881190] do_idle+0x1b9/0x240 [ 2.882221] cpu_startup_entry+0x73/0x80 [ 2.881190] cpu_startup_entry+0x73/0x80 [ 2.882221] start_secondary+0x19e/0x1f0 [ 2.881190] rest_init+0x143/0x147 [ 2.882221] secondary_startup_64+0xa4/0xb0 [ 2.881190] start_kernel+0x487/0x4a9 [ 2.882221] irq event stamp: 33604 [ 2.881190] x86_64_start_reservations+0x24/0x26 [ 2.882221] hardirqs last enabled at (33603): [<ffffffff93e23771>] tick_nohz_idle_enter+0x61/0xa0 [ 2.882221] hardirqs last disabled at (33604): [<ffffffff93db8d22>] do_idle+0x72/0x240 [ 2.881190] x86_64_start_kernel+0x87/0x8b [ 2.882221] softirqs last enabled at (33594): [<ffffffff94e002b6>] __do_softirq+0x2b6/0x356 [ 2.882221] softirqs last disabled at (33579): [<ffffffff93d83a1b>] irq_exit+0xab/0xe0 [ 2.881190] secondary_startup_64+0xa4/0xb0 [ 2.882221] ---[ end trace 257e6b641850f405 ]--- [ 2.881190] irq event stamp: 51806 [ 3.190254] thermal LNXTHERM:00: registered as thermal_zone0 [ 2.881190] hardirqs last enabled at (51805): [<ffffffff94b356ad>] poll_idle+0x2d/0xa6 [ 2.881190] hardirqs last disabled at (51806): [<ffffffff93db7bed>] sched_clock_idle_wakeup_event+0x1d/0x50 [ 2.881190] softirqs last enabled at (51790): [<ffffffff93d82d21>] _local_bh_enable+0x21/0x40 [ 2.881190] softirqs last disabled at (51789): [<ffffffff93d83948>] irq_enter+0x48/0x70 [ 3.195448] ACPI: Thermal Zone [TZ00] (28 C) [ 2.881190] ---[ end trace 257e6b641850f406 ]---
Logs:
History:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
https://storage.tuxsuite.com/public/linaro/lkft/builds/2OsIodn7l10ciOlEtqVm8...
## Build
- kernel: 4.19.282-rc1
- git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
- git branch: linux-4.19.y
- git commit: 8ca3c8d286160dca3bb13ae97a4a7a2d2fd4ad01
- git describe: v4.19.279-173-g8ca3c8d28616
- test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19....
## Test Regressions (compared to v4.19.279-143-gcc0a9b81697f)
## Metric Regressions (compared to v4.19.279-143-gcc0a9b81697f)
## Test Fixes (compared to v4.19.279-143-gcc0a9b81697f)
## Metric Fixes (compared to v4.19.279-143-gcc0a9b81697f)
## Test result summary total: 96887, pass: 72120, fail: 3496, skip: 21094, xfail: 177
## Build Summary
- arc: 10 total, 10 passed, 0 failed
- arm: 108 total, 107 passed, 1 failed
- arm64: 34 total, 33 passed, 1 failed
- i386: 20 total, 19 passed, 1 failed
- mips: 22 total, 22 passed, 0 failed
- parisc: 6 total, 6 passed, 0 failed
- powerpc: 24 total, 24 passed, 0 failed
- s390: 6 total, 6 passed, 0 failed
- sh: 12 total, 12 passed, 0 failed
- sparc: 6 total, 6 passed, 0 failed
- x86_64: 28 total, 27 passed, 1 failed
## Test suites summary
- boot
- fwts
- igt-gpu-tools
- 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-filesystems
- kselftest-filesystems-binderfs
- kselftest-firmware
- kselftest-fpu
- kselftest-ftrace
- kselftest-futex
- kselftest-gpio
- kselftest-intel_pstate
- kselftest-ipc
- kselftest-ir
- kselftest-kcmp
- kselftest-kexec
- kselftest-kvm
- kselftest-lib
- kselftest-livepatch
- kselftest-membarrier
- kselftest-memfd
- kselftest-memory-hotplug
- kselftest-mincore
- kselftest-mount
- kselftest-mqueue
- kselftest-net
- kselftest-net-forwarding
- kselftest-netfilter
- kselftest-nsfs
- kselftest-openat2
- kselftest-pid_namespace
- kselftest-pidfd
- kselftest-proc
- kselftest-pstore
- 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-vm
- kselftest-x86
- kselftest-zram
- kunit
- kvm-unit-tests
- libhugetlbfs
- 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-fsx
- ltp-hugetlb
- ltp-io
- ltp-ipc
- ltp-math
- ltp-mm
- ltp-nptl
- ltp-pty
- ltp-sched
- ltp-securebits
- ltp-smoke
- ltp-syscalls
- ltp-tracing
- network-basic-tests
- rcutorture
- v4l2-compliance
- vdso
-- Linaro LKFT https://lkft.linaro.org
On Wed, 26 Apr 2023 17:09:45 -0400 Steven Rostedt rostedt@goodmis.org wrote:
Now the question is, why is this triggering on 4.19 but not in latest mainline?
I found it, I backported this patch and the warning goes away (at least for me). Can you add this and see if it makes the warning go away for you too?
-- Steve
From: Peter Zijlstra peterz@infradead.org Date: Fri, 7 Aug 2020 20:50:19 +0200 Subject: [PATCH] sched,idle,rcu: Push rcu_idle deeper into the idle path
commit 1098582a0f6c4e8fd28da0a6305f9233d02c9c1d upstream.
Lots of things take locks, due to a wee bug, rcu_lockdep didn't notice that the locking tracepoints were using RCU.
Push rcu_idle_{enter,exit}() as deep as possible into the idle paths, this also resolves a lot of _rcuidle()/RCU_NONIDLE() usage.
Specifically, sched_clock_idle_wakeup_event() will use ktime which will use seqlocks which will tickle lockdep, and stop_critical_timings() uses lock.
Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Reviewed-by: Steven Rostedt (VMware) rostedt@goodmis.org Reviewed-by: Thomas Gleixner tglx@linutronix.de Acked-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Tested-by: Marco Elver elver@google.com Link: https://lkml.kernel.org/r/20200821085348.310943801@infradead.org --- drivers/cpuidle/cpuidle.c | 12 ++++++++---- kernel/sched/idle.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 2d182dc1b49e..01bde6dec13a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * executing it contains RCU usage regarded as invalid in the idle * context, so tell RCU about that. */ - RCU_NONIDLE(tick_freeze()); + tick_freeze(); /* * The state used here cannot be a "coupled" one, because the "coupled" * cpuidle mechanism enables interrupts and doing that with timekeeping * suspended is generally unsafe. */ stop_critical_timings(); + rcu_idle_enter(); drv->states[index].enter_s2idle(dev, drv, index); if (WARN_ON_ONCE(!irqs_disabled())) local_irq_disable(); @@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * first CPU executing it calls functions containing RCU read-side * critical sections, so tell RCU about that. */ - RCU_NONIDLE(tick_unfreeze()); + rcu_idle_exit(); + tick_unfreeze(); start_critical_timings();
time_end = ns_to_ktime(local_clock()); @@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, /* Take note of the planned idle state. */ sched_idle_set_state(target_state);
- trace_cpu_idle_rcuidle(index, dev->cpu); + trace_cpu_idle(index, dev->cpu); time_start = ns_to_ktime(local_clock());
stop_critical_timings(); + rcu_idle_enter(); entered_state = target_state->enter(dev, drv, index); + rcu_idle_exit(); start_critical_timings();
sched_clock_idle_wakeup_event(); time_end = ns_to_ktime(local_clock()); - trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); + trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
/* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state(NULL); diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 44a17366c8ec..4e3d149d64ad 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -53,17 +53,18 @@ __setup("hlt", cpu_idle_nopoll_setup);
static noinline int __cpuidle cpu_idle_poll(void) { + trace_cpu_idle(0, smp_processor_id()); + stop_critical_timings(); rcu_idle_enter(); - trace_cpu_idle_rcuidle(0, smp_processor_id()); local_irq_enable(); - stop_critical_timings();
while (!tif_need_resched() && - (cpu_idle_force_poll || tick_check_broadcast_expired())) + (cpu_idle_force_poll || tick_check_broadcast_expired())) cpu_relax(); - start_critical_timings(); - trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); + rcu_idle_exit(); + start_critical_timings(); + trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
return 1; } @@ -90,7 +91,9 @@ void __cpuidle default_idle_call(void) local_irq_enable(); } else { stop_critical_timings(); + rcu_idle_enter(); arch_cpu_idle(); + rcu_idle_exit(); start_critical_timings(); } } @@ -148,7 +151,6 @@ static void cpuidle_idle_call(void)
if (cpuidle_not_available(drv, dev)) { tick_nohz_idle_stop_tick(); - rcu_idle_enter();
default_idle_call(); goto exit_idle; @@ -166,19 +168,15 @@ static void cpuidle_idle_call(void)
if (idle_should_enter_s2idle() || dev->use_deepest_state) { if (idle_should_enter_s2idle()) { - rcu_idle_enter();
entered_state = cpuidle_enter_s2idle(drv, dev); if (entered_state > 0) { local_irq_enable(); goto exit_idle; } - - rcu_idle_exit(); }
tick_nohz_idle_stop_tick(); - rcu_idle_enter();
next_state = cpuidle_find_deepest_state(drv, dev); call_cpuidle(drv, dev, next_state); @@ -195,8 +193,6 @@ static void cpuidle_idle_call(void) else tick_nohz_idle_retain_tick();
- rcu_idle_enter(); - entered_state = call_cpuidle(drv, dev, next_state); /* * Give the governor an opportunity to reflect on the outcome @@ -212,8 +208,6 @@ static void cpuidle_idle_call(void) */ if (WARN_ON_ONCE(irqs_disabled())) local_irq_enable(); - - rcu_idle_exit(); }
/*
Hi Steven,
On Wed, 26 Apr 2023 at 23:14, Steven Rostedt rostedt@goodmis.org wrote:
On Wed, 26 Apr 2023 17:09:45 -0400 Steven Rostedt rostedt@goodmis.org wrote:
Now the question is, why is this triggering on 4.19 but not in latest mainline?
I found it, I backported this patch and the warning goes away (at least for me). Can you add this and see if it makes the warning go away for you too?
I have applied this patch on stable-rc 4.19 branch and tested on - arm64: Juno-r2 - x86_64 device
and the reported problem has been resolved.
Thanks for finding a quick fix patch.
-- Steve
From: Peter Zijlstra peterz@infradead.org Date: Fri, 7 Aug 2020 20:50:19 +0200 Subject: [PATCH] sched,idle,rcu: Push rcu_idle deeper into the idle path
commit 1098582a0f6c4e8fd28da0a6305f9233d02c9c1d upstream.
Lots of things take locks, due to a wee bug, rcu_lockdep didn't notice that the locking tracepoints were using RCU.
Push rcu_idle_{enter,exit}() as deep as possible into the idle paths, this also resolves a lot of _rcuidle()/RCU_NONIDLE() usage.
Specifically, sched_clock_idle_wakeup_event() will use ktime which will use seqlocks which will tickle lockdep, and stop_critical_timings() uses lock.
Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Reviewed-by: Steven Rostedt (VMware) rostedt@goodmis.org Reviewed-by: Thomas Gleixner tglx@linutronix.de Acked-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Tested-by: Marco Elver elver@google.com Link: https://lkml.kernel.org/r/20200821085348.310943801@infradead.org
Tested-by: Linux Kernel Functional Testing lkft@linaro.org Tested-by: Naresh Kamboju naresh.kamboju@linaro.org
test log: - https://lkft.validation.linaro.org/scheduler/job/6380295#L1418 - https://lkft.validation.linaro.org/scheduler/job/6380303#L1443
drivers/cpuidle/cpuidle.c | 12 ++++++++---- kernel/sched/idle.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 2d182dc1b49e..01bde6dec13a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * executing it contains RCU usage regarded as invalid in the idle * context, so tell RCU about that. */
RCU_NONIDLE(tick_freeze());
tick_freeze(); /* * The state used here cannot be a "coupled" one, because the "coupled" * cpuidle mechanism enables interrupts and doing that with timekeeping * suspended is generally unsafe. */ stop_critical_timings();
rcu_idle_enter(); drv->states[index].enter_s2idle(dev, drv, index); if (WARN_ON_ONCE(!irqs_disabled())) local_irq_disable();
@@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * first CPU executing it calls functions containing RCU read-side * critical sections, so tell RCU about that. */
RCU_NONIDLE(tick_unfreeze());
rcu_idle_exit();
tick_unfreeze(); start_critical_timings(); time_end = ns_to_ktime(local_clock());
@@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, /* Take note of the planned idle state. */ sched_idle_set_state(target_state);
trace_cpu_idle_rcuidle(index, dev->cpu);
trace_cpu_idle(index, dev->cpu); time_start = ns_to_ktime(local_clock()); stop_critical_timings();
rcu_idle_enter(); entered_state = target_state->enter(dev, drv, index);
rcu_idle_exit(); start_critical_timings(); sched_clock_idle_wakeup_event(); time_end = ns_to_ktime(local_clock());
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); /* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state(NULL);
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 44a17366c8ec..4e3d149d64ad 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -53,17 +53,18 @@ __setup("hlt", cpu_idle_nopoll_setup);
static noinline int __cpuidle cpu_idle_poll(void) {
trace_cpu_idle(0, smp_processor_id());
stop_critical_timings(); rcu_idle_enter();
trace_cpu_idle_rcuidle(0, smp_processor_id()); local_irq_enable();
stop_critical_timings(); while (!tif_need_resched() &&
(cpu_idle_force_poll || tick_check_broadcast_expired()))
(cpu_idle_force_poll || tick_check_broadcast_expired())) cpu_relax();
start_critical_timings();
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
rcu_idle_exit();
start_critical_timings();
trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); return 1;
} @@ -90,7 +91,9 @@ void __cpuidle default_idle_call(void) local_irq_enable(); } else { stop_critical_timings();
rcu_idle_enter(); arch_cpu_idle();
rcu_idle_exit(); start_critical_timings(); }
} @@ -148,7 +151,6 @@ static void cpuidle_idle_call(void)
if (cpuidle_not_available(drv, dev)) { tick_nohz_idle_stop_tick();
rcu_idle_enter(); default_idle_call(); goto exit_idle;
@@ -166,19 +168,15 @@ static void cpuidle_idle_call(void)
if (idle_should_enter_s2idle() || dev->use_deepest_state) { if (idle_should_enter_s2idle()) {
rcu_idle_enter(); entered_state = cpuidle_enter_s2idle(drv, dev); if (entered_state > 0) { local_irq_enable(); goto exit_idle; }
rcu_idle_exit(); } tick_nohz_idle_stop_tick();
rcu_idle_enter(); next_state = cpuidle_find_deepest_state(drv, dev); call_cpuidle(drv, dev, next_state);
@@ -195,8 +193,6 @@ static void cpuidle_idle_call(void) else tick_nohz_idle_retain_tick();
rcu_idle_enter();
entered_state = call_cpuidle(drv, dev, next_state); /* * Give the governor an opportunity to reflect on the outcome
@@ -212,8 +208,6 @@ static void cpuidle_idle_call(void) */ if (WARN_ON_ONCE(irqs_disabled())) local_irq_enable();
rcu_idle_exit();
}
/*
2.39.2
- Naresh
-- Linaro LKFT https://lkft.linaro.org
Hi Steven and Greg,
On Thu, 27 Apr 2023 at 15:19, Naresh Kamboju naresh.kamboju@linaro.org wrote:
Hi Steven,
On Wed, 26 Apr 2023 at 23:14, Steven Rostedt rostedt@goodmis.org wrote:
On Wed, 26 Apr 2023 17:09:45 -0400 Steven Rostedt rostedt@goodmis.org wrote:
Now the question is, why is this triggering on 4.19 but not in latest mainline?
I found it, I backported this patch and the warning goes away (at least for me). Can you add this and see if it makes the warning go away for you too?
I have applied this patch on stable-rc 4.19 branch and tested on
- arm64: Juno-r2
- x86_64 device
and the reported problem has been resolved.
Thanks for finding a quick fix patch.
-- Steve
From: Peter Zijlstra peterz@infradead.org Date: Fri, 7 Aug 2020 20:50:19 +0200 Subject: [PATCH] sched,idle,rcu: Push rcu_idle deeper into the idle path
commit 1098582a0f6c4e8fd28da0a6305f9233d02c9c1d upstream.
Can we expect this patch to be merged into 4.19 ? The reason for the question is, the reported problem is still seen on stable-rc 4.19.
Lots of things take locks, due to a wee bug, rcu_lockdep didn't notice that the locking tracepoints were using RCU.
Push rcu_idle_{enter,exit}() as deep as possible into the idle paths, this also resolves a lot of _rcuidle()/RCU_NONIDLE() usage.
Specifically, sched_clock_idle_wakeup_event() will use ktime which will use seqlocks which will tickle lockdep, and stop_critical_timings() uses lock.
Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Reviewed-by: Steven Rostedt (VMware) rostedt@goodmis.org Reviewed-by: Thomas Gleixner tglx@linutronix.de Acked-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Tested-by: Marco Elver elver@google.com Link: https://lkml.kernel.org/r/20200821085348.310943801@infradead.org
Tested-by: Linux Kernel Functional Testing lkft@linaro.org Tested-by: Naresh Kamboju naresh.kamboju@linaro.org
test log:
- https://lkft.validation.linaro.org/scheduler/job/6380295#L1418
- https://lkft.validation.linaro.org/scheduler/job/6380303#L1443
drivers/cpuidle/cpuidle.c | 12 ++++++++---- kernel/sched/idle.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 2d182dc1b49e..01bde6dec13a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * executing it contains RCU usage regarded as invalid in the idle * context, so tell RCU about that. */
RCU_NONIDLE(tick_freeze());
tick_freeze(); /* * The state used here cannot be a "coupled" one, because the "coupled" * cpuidle mechanism enables interrupts and doing that with timekeeping * suspended is generally unsafe. */ stop_critical_timings();
rcu_idle_enter(); drv->states[index].enter_s2idle(dev, drv, index); if (WARN_ON_ONCE(!irqs_disabled())) local_irq_disable();
@@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * first CPU executing it calls functions containing RCU read-side * critical sections, so tell RCU about that. */
RCU_NONIDLE(tick_unfreeze());
rcu_idle_exit();
tick_unfreeze(); start_critical_timings(); time_end = ns_to_ktime(local_clock());
@@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, /* Take note of the planned idle state. */ sched_idle_set_state(target_state);
trace_cpu_idle_rcuidle(index, dev->cpu);
trace_cpu_idle(index, dev->cpu); time_start = ns_to_ktime(local_clock()); stop_critical_timings();
rcu_idle_enter(); entered_state = target_state->enter(dev, drv, index);
rcu_idle_exit(); start_critical_timings(); sched_clock_idle_wakeup_event(); time_end = ns_to_ktime(local_clock());
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); /* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state(NULL);
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 44a17366c8ec..4e3d149d64ad 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -53,17 +53,18 @@ __setup("hlt", cpu_idle_nopoll_setup);
static noinline int __cpuidle cpu_idle_poll(void) {
trace_cpu_idle(0, smp_processor_id());
stop_critical_timings(); rcu_idle_enter();
trace_cpu_idle_rcuidle(0, smp_processor_id()); local_irq_enable();
stop_critical_timings(); while (!tif_need_resched() &&
(cpu_idle_force_poll || tick_check_broadcast_expired()))
(cpu_idle_force_poll || tick_check_broadcast_expired())) cpu_relax();
start_critical_timings();
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
rcu_idle_exit();
start_critical_timings();
trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); return 1;
} @@ -90,7 +91,9 @@ void __cpuidle default_idle_call(void) local_irq_enable(); } else { stop_critical_timings();
rcu_idle_enter(); arch_cpu_idle();
rcu_idle_exit(); start_critical_timings(); }
} @@ -148,7 +151,6 @@ static void cpuidle_idle_call(void)
if (cpuidle_not_available(drv, dev)) { tick_nohz_idle_stop_tick();
rcu_idle_enter(); default_idle_call(); goto exit_idle;
@@ -166,19 +168,15 @@ static void cpuidle_idle_call(void)
if (idle_should_enter_s2idle() || dev->use_deepest_state) { if (idle_should_enter_s2idle()) {
rcu_idle_enter(); entered_state = cpuidle_enter_s2idle(drv, dev); if (entered_state > 0) { local_irq_enable(); goto exit_idle; }
rcu_idle_exit(); } tick_nohz_idle_stop_tick();
rcu_idle_enter(); next_state = cpuidle_find_deepest_state(drv, dev); call_cpuidle(drv, dev, next_state);
@@ -195,8 +193,6 @@ static void cpuidle_idle_call(void) else tick_nohz_idle_retain_tick();
rcu_idle_enter();
entered_state = call_cpuidle(drv, dev, next_state); /* * Give the governor an opportunity to reflect on the outcome
@@ -212,8 +208,6 @@ static void cpuidle_idle_call(void) */ if (WARN_ON_ONCE(irqs_disabled())) local_irq_enable();
rcu_idle_exit();
}
/*
2.39.2
- Naresh
-- Linaro LKFT https://lkft.linaro.org
On Wed, Oct 11, 2023 at 06:59:46AM +0530, Naresh Kamboju wrote:
Hi Steven and Greg,
On Thu, 27 Apr 2023 at 15:19, Naresh Kamboju naresh.kamboju@linaro.org wrote:
Hi Steven,
On Wed, 26 Apr 2023 at 23:14, Steven Rostedt rostedt@goodmis.org wrote:
On Wed, 26 Apr 2023 17:09:45 -0400 Steven Rostedt rostedt@goodmis.org wrote:
Now the question is, why is this triggering on 4.19 but not in latest mainline?
I found it, I backported this patch and the warning goes away (at least for me). Can you add this and see if it makes the warning go away for you too?
I have applied this patch on stable-rc 4.19 branch and tested on
- arm64: Juno-r2
- x86_64 device
and the reported problem has been resolved.
Thanks for finding a quick fix patch.
-- Steve
From: Peter Zijlstra peterz@infradead.org Date: Fri, 7 Aug 2020 20:50:19 +0200 Subject: [PATCH] sched,idle,rcu: Push rcu_idle deeper into the idle path
commit 1098582a0f6c4e8fd28da0a6305f9233d02c9c1d upstream.
Can we expect this patch to be merged into 4.19 ? The reason for the question is, the reported problem is still seen on stable-rc 4.19.
Ok, I'll queue it up now, I didn't realize it needed to be there, sorry.
greg k-h
On Wed, Oct 11, 2023 at 11:04:54AM +0200, Greg Kroah-Hartman wrote:
On Wed, Oct 11, 2023 at 06:59:46AM +0530, Naresh Kamboju wrote:
Hi Steven and Greg,
On Thu, 27 Apr 2023 at 15:19, Naresh Kamboju naresh.kamboju@linaro.org wrote:
Hi Steven,
On Wed, 26 Apr 2023 at 23:14, Steven Rostedt rostedt@goodmis.org wrote:
On Wed, 26 Apr 2023 17:09:45 -0400 Steven Rostedt rostedt@goodmis.org wrote:
Now the question is, why is this triggering on 4.19 but not in latest mainline?
I found it, I backported this patch and the warning goes away (at least for me). Can you add this and see if it makes the warning go away for you too?
I have applied this patch on stable-rc 4.19 branch and tested on
- arm64: Juno-r2
- x86_64 device
and the reported problem has been resolved.
Thanks for finding a quick fix patch.
-- Steve
From: Peter Zijlstra peterz@infradead.org Date: Fri, 7 Aug 2020 20:50:19 +0200 Subject: [PATCH] sched,idle,rcu: Push rcu_idle deeper into the idle path
commit 1098582a0f6c4e8fd28da0a6305f9233d02c9c1d upstream.
Can we expect this patch to be merged into 4.19 ? The reason for the question is, the reported problem is still seen on stable-rc 4.19.
Ok, I'll queue it up now, I didn't realize it needed to be there, sorry.
Nope, I can't, it doesn't apply there, so I need a backported, and TESTED version, for 5.4.y and 4.19.y if anyone wants to see it there.
thanks,
greg k-h
On Wed, 11 Oct 2023 11:05:48 +0200 Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
Ok, I'll queue it up now, I didn't realize it needed to be there, sorry.
Nope, I can't, it doesn't apply there, so I need a backported, and TESTED version, for 5.4.y and 4.19.y if anyone wants to see it there.
This is a quick backport for 4.19 as the conflict seemed to be due to added code that is unrelated to this change. I built and booted it, but it should have more testing.
Naresh, if you want this in 4.19, please run it through your tests and give your tested by.
Greg, please do not take it until Naresh has tested it.
Thanks,
-- Steve
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 2d182dc1b49e..01bde6dec13a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * executing it contains RCU usage regarded as invalid in the idle * context, so tell RCU about that. */ - RCU_NONIDLE(tick_freeze()); + tick_freeze(); /* * The state used here cannot be a "coupled" one, because the "coupled" * cpuidle mechanism enables interrupts and doing that with timekeeping * suspended is generally unsafe. */ stop_critical_timings(); + rcu_idle_enter(); drv->states[index].enter_s2idle(dev, drv, index); if (WARN_ON_ONCE(!irqs_disabled())) local_irq_disable(); @@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * first CPU executing it calls functions containing RCU read-side * critical sections, so tell RCU about that. */ - RCU_NONIDLE(tick_unfreeze()); + rcu_idle_exit(); + tick_unfreeze(); start_critical_timings();
time_end = ns_to_ktime(local_clock()); @@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, /* Take note of the planned idle state. */ sched_idle_set_state(target_state);
- trace_cpu_idle_rcuidle(index, dev->cpu); + trace_cpu_idle(index, dev->cpu); time_start = ns_to_ktime(local_clock());
stop_critical_timings(); + rcu_idle_enter(); entered_state = target_state->enter(dev, drv, index); + rcu_idle_exit(); start_critical_timings();
sched_clock_idle_wakeup_event(); time_end = ns_to_ktime(local_clock()); - trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); + trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
/* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state(NULL); diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 44a17366c8ec..4e3d149d64ad 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -53,17 +53,18 @@ __setup("hlt", cpu_idle_nopoll_setup);
static noinline int __cpuidle cpu_idle_poll(void) { + trace_cpu_idle(0, smp_processor_id()); + stop_critical_timings(); rcu_idle_enter(); - trace_cpu_idle_rcuidle(0, smp_processor_id()); local_irq_enable(); - stop_critical_timings();
while (!tif_need_resched() && - (cpu_idle_force_poll || tick_check_broadcast_expired())) + (cpu_idle_force_poll || tick_check_broadcast_expired())) cpu_relax(); - start_critical_timings(); - trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); + rcu_idle_exit(); + start_critical_timings(); + trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
return 1; } @@ -90,7 +91,9 @@ void __cpuidle default_idle_call(void) local_irq_enable(); } else { stop_critical_timings(); + rcu_idle_enter(); arch_cpu_idle(); + rcu_idle_exit(); start_critical_timings(); } } @@ -148,7 +151,6 @@ static void cpuidle_idle_call(void)
if (cpuidle_not_available(drv, dev)) { tick_nohz_idle_stop_tick(); - rcu_idle_enter();
default_idle_call(); goto exit_idle; @@ -166,19 +168,15 @@ static void cpuidle_idle_call(void)
if (idle_should_enter_s2idle() || dev->use_deepest_state) { if (idle_should_enter_s2idle()) { - rcu_idle_enter();
entered_state = cpuidle_enter_s2idle(drv, dev); if (entered_state > 0) { local_irq_enable(); goto exit_idle; } - - rcu_idle_exit(); }
tick_nohz_idle_stop_tick(); - rcu_idle_enter();
next_state = cpuidle_find_deepest_state(drv, dev); call_cpuidle(drv, dev, next_state); @@ -195,8 +193,6 @@ static void cpuidle_idle_call(void) else tick_nohz_idle_retain_tick();
- rcu_idle_enter(); - entered_state = call_cpuidle(drv, dev, next_state); /* * Give the governor an opportunity to reflect on the outcome @@ -212,8 +208,6 @@ static void cpuidle_idle_call(void) */ if (WARN_ON_ONCE(irqs_disabled())) local_irq_enable(); - - rcu_idle_exit(); }
/*
On Wed, 11 Oct 2023 at 20:14, Steven Rostedt rostedt@goodmis.org wrote:
On Wed, 11 Oct 2023 11:05:48 +0200 Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
Ok, I'll queue it up now, I didn't realize it needed to be there, sorry.
Nope, I can't, it doesn't apply there, so I need a backported, and TESTED version, for 5.4.y and 4.19.y if anyone wants to see it there.
This is a quick backport for 4.19 as the conflict seemed to be due to added code that is unrelated to this change. I built and booted it, but it should have more testing.
Naresh, if you want this in 4.19, please run it through your tests and give your tested by.
Greg, please do not take it until Naresh has tested it.
Below patch applied and tested on top of stable rc branches - v4.19.296 - v5.4.258
Tested-by: Linux Kernel Functional Testing lkft@linaro.org Tested-by: Naresh Kamboju naresh.kamboju@linaro.org
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 2d182dc1b49e..01bde6dec13a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * executing it contains RCU usage regarded as invalid in the idle * context, so tell RCU about that. */
RCU_NONIDLE(tick_freeze());
tick_freeze(); /* * The state used here cannot be a "coupled" one, because the "coupled" * cpuidle mechanism enables interrupts and doing that with timekeeping * suspended is generally unsafe. */ stop_critical_timings();
rcu_idle_enter(); drv->states[index].enter_s2idle(dev, drv, index); if (WARN_ON_ONCE(!irqs_disabled())) local_irq_disable();
@@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, * first CPU executing it calls functions containing RCU read-side * critical sections, so tell RCU about that. */
RCU_NONIDLE(tick_unfreeze());
rcu_idle_exit();
tick_unfreeze(); start_critical_timings(); time_end = ns_to_ktime(local_clock());
@@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, /* Take note of the planned idle state. */ sched_idle_set_state(target_state);
trace_cpu_idle_rcuidle(index, dev->cpu);
trace_cpu_idle(index, dev->cpu); time_start = ns_to_ktime(local_clock()); stop_critical_timings();
rcu_idle_enter(); entered_state = target_state->enter(dev, drv, index);
rcu_idle_exit(); start_critical_timings(); sched_clock_idle_wakeup_event(); time_end = ns_to_ktime(local_clock());
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); /* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state(NULL);
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 44a17366c8ec..4e3d149d64ad 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -53,17 +53,18 @@ __setup("hlt", cpu_idle_nopoll_setup);
static noinline int __cpuidle cpu_idle_poll(void) {
trace_cpu_idle(0, smp_processor_id());
stop_critical_timings(); rcu_idle_enter();
trace_cpu_idle_rcuidle(0, smp_processor_id()); local_irq_enable();
stop_critical_timings(); while (!tif_need_resched() &&
(cpu_idle_force_poll || tick_check_broadcast_expired()))
(cpu_idle_force_poll || tick_check_broadcast_expired())) cpu_relax();
start_critical_timings();
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
rcu_idle_exit();
start_critical_timings();
trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); return 1;
} @@ -90,7 +91,9 @@ void __cpuidle default_idle_call(void) local_irq_enable(); } else { stop_critical_timings();
rcu_idle_enter(); arch_cpu_idle();
rcu_idle_exit(); start_critical_timings(); }
} @@ -148,7 +151,6 @@ static void cpuidle_idle_call(void)
if (cpuidle_not_available(drv, dev)) { tick_nohz_idle_stop_tick();
rcu_idle_enter(); default_idle_call(); goto exit_idle;
@@ -166,19 +168,15 @@ static void cpuidle_idle_call(void)
if (idle_should_enter_s2idle() || dev->use_deepest_state) { if (idle_should_enter_s2idle()) {
rcu_idle_enter(); entered_state = cpuidle_enter_s2idle(drv, dev); if (entered_state > 0) { local_irq_enable(); goto exit_idle; }
rcu_idle_exit(); } tick_nohz_idle_stop_tick();
rcu_idle_enter(); next_state = cpuidle_find_deepest_state(drv, dev); call_cpuidle(drv, dev, next_state);
@@ -195,8 +193,6 @@ static void cpuidle_idle_call(void) else tick_nohz_idle_retain_tick();
rcu_idle_enter();
entered_state = call_cpuidle(drv, dev, next_state); /* * Give the governor an opportunity to reflect on the outcome
@@ -212,8 +208,6 @@ static void cpuidle_idle_call(void) */ if (WARN_ON_ONCE(irqs_disabled())) local_irq_enable();
rcu_idle_exit();
}
/*
On Thu, Oct 12, 2023 at 05:23:23PM +0530, Naresh Kamboju wrote:
On Wed, 11 Oct 2023 at 20:14, Steven Rostedt rostedt@goodmis.org wrote:
On Wed, 11 Oct 2023 11:05:48 +0200 Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
Ok, I'll queue it up now, I didn't realize it needed to be there, sorry.
Nope, I can't, it doesn't apply there, so I need a backported, and TESTED version, for 5.4.y and 4.19.y if anyone wants to see it there.
This is a quick backport for 4.19 as the conflict seemed to be due to added code that is unrelated to this change. I built and booted it, but it should have more testing.
Naresh, if you want this in 4.19, please run it through your tests and give your tested by.
Greg, please do not take it until Naresh has tested it.
Below patch applied and tested on top of stable rc branches
- v4.19.296
- v5.4.258
Tested-by: Linux Kernel Functional Testing lkft@linaro.org Tested-by: Naresh Kamboju naresh.kamboju@linaro.org
Thanks, now queued up.
greg k-h