lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 20 Oct 2022 18:05:51 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Yury Norov <yury.norov@...il.com>
CC:     <lkp@...ts.01.org>, <lkp@...el.com>,
        <linux-kernel@...r.kernel.org>, <feng.tang@...el.com>,
        <ying.huang@...el.com>, Geert Uytterhoeven <geert@...ux-m68k.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [lib/cpumask] 6f9c07be9d:
 WARNING:at_include/linux/cpumask.h:#prefill_possible_map

feng.tang@...el.com, ying.huang@...el.com, Geert Uytterhoeven
<geert@...ux-m68k.org>, Linus Torvalds <torvalds@...ux-foundation.org>
BCC: "Du, Julie" <julie.du@...el.com>, "Li, Philip" <philip.li@...el.com>, "Sang, Oliver" <oliver.sang@...el.com>

Hi Yury,

We noticed that below patch adds a FORCE_NR_CPUS config, and it is
expected to show a warning when this config is enabled and
CONFIG_NR_CPUS doesn't match the actual number of CPUs we have. But we
also noticed that it not only shows a warning but could also break boot
test in some cases. We are not sure if the break is actually related to
this patch or not, so we send this report FYI.

We noticed that a fix patch was posted at:

https://lore.kernel.org/all/20221019225939.1646349-1-yury.norov@gmail.com/

FORCE_NR_CPUS won't be enabled by allmodconfig or allyesconfig after
applying the fix, but looks it could still be enabled by randconfig. Not
sure if this is an expected behavior, but since our test robot runs many
randconfig tests, this warning could still be triggered frequently and
go to boot failure at last.

Please kindly help to give some advice on handling this config in our
testing. Thanks.

Please check below report for more details:


Greeting,

FYI, we noticed WARNING:at_include/linux/cpumask.h:#prefill_possible_map due to commit (built with gcc-11):

commit: 6f9c07be9d020489326098801f0661f754c7c865 ("lib/cpumask: add FORCE_NR_CPUS config option")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

in testcase: boot

on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


[    1.202510][    T0] ------------[ cut here ]------------
[    1.203154][    T0] WARNING: CPU: 0 PID: 0 at include/linux/cpumask.h:47 prefill_possible_map+0x658/0x752
[    1.204324][    T0] Modules linked in:
[    1.204784][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 6.0.0-rc4-00007-g6f9c07be9d02 #1 932ff7067730c9c41b5dfbe76b284979ed361812
[    1.206225][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[    1.207440][    T0] RIP: 0010:prefill_possible_map+0x658/0x752
[    1.208132][    T0] Code: 48 b8 c0 0c e9 ac f9 65 f1 d6 48 31 c3 41 81 fc 00 20 00 00 75 0f 48 b8 87 5c 7b 08 b0 8d fa be 48 01 c3 eb 08 48 c1 cb 04 90 <0f> 0b 90 48 b8 4e b5 bb 31 4d 01 2f 87 ba ff ff 37 00 48 31 c3 48
[    1.210403][    T0] RSP: 0000:ffffffff86007ea0 EFLAGS: 00010082 ORIG_RAX: 0000000000000000
[    1.211453][    T0] RAX: d6f165f9ace90cc0 RBX: 12342d6dca2d2c88 RCX: 1ffffffff0cbcb9c
[    1.212441][    T0] RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 0000000000000000
[    1.213417][    T0] RBP: ffffffff86007ec8 R08: 0000000000000000 R09: 0000000000000000
[    1.214394][    T0] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002
[    1.215355][    T0] R13: 0000000000002000 R14: 0000000000000002 R15: 0000000000000002
[    1.216314][    T0] FS:  0000000000000000(0000) GS:ffffffff886ec000(0000) knlGS:0000000000000000
[    1.217368][    T0] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    1.218158][    T0] CR2: ffff88843ffff000 CR3: 0000000006016000 CR4: 00000000000406b0
[    1.219118][    T0] Call Trace:
[    1.219495][    T0]  <TASK>
[    1.219843][    T0]  ? setup_arch+0x12ed/0x14b8
[    1.220390][    T0]  ? start_kernel+0xac/0x53a
[    1.220942][    T0]  ? secondary_startup_64_no_verify+0xdf/0xeb
[    1.221688][    T0]  </TASK>
[    1.222041][    T0] irq event stamp: 0
[    1.222491][    T0] hardirqs last  enabled at (0): [<0000000000000000>] 0x0
[    1.223315][    T0] hardirqs last disabled at (0): [<0000000000000000>] 0x0
[    1.224224][    T0] softirqs last  enabled at (0): [<0000000000000000>] 0x0
[    1.225052][    T0] softirqs last disabled at (0): [<0000000000000000>] 0x0
[    1.225921][    T0] ---[ end trace 0000000000000000 ]---
[    1.226613][    T0] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[    1.227389][    T0] mapped IOAPIC to ffffffffff5fc000 (fec00000)
[    1.228333][    T0] [mem 0xc0000000-0xfeffbfff] available for PCI devices
[    1.229282][    T0] Booting paravirtualized kernel on KVM
[    1.229970][    T0] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    1.317066][    T0] ------------[ cut here ]------------
[    1.317826][    T0] WARNING: CPU: 0 PID: 0 at include/linux/cpumask.h:47 set_nr_cpu_ids+0x9/0x10
[    1.319013][    T0] Modules linked in:
[    1.319521][    T0] CPU: 0 PID: 0 Comm: swapper Tainted: G        W          6.0.0-rc4-00007-g6f9c07be9d02 #1 932ff7067730c9c41b5dfbe76b284979ed361812
[    1.321281][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[    1.322636][    T0] RIP: 0010:set_nr_cpu_ids+0x9/0x10
[    1.323315][    T0] Code: c4 90 00 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f 31 c0 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 c9 c3 cc 81 ff 00 20 00 00 74 04 90 <0f> 0b 90 31 ff c3 cc 41 57 41 56 49 89 fe 41 55 41 54 55 48 63 ee
[    1.325852][    T0] RSP: 0000:ffffffff86007f18 EFLAGS: 00010083 ORIG_RAX: 0000000000000000
[    1.326960][    T0] RAX: 0000000000000001 RBX: 637a31c17f8457e0 RCX: b238ee5e1c5024c3
[    1.327991][    T0] RDX: 194935e2cb673ce9 RSI: 0000000000000000 RDI: 0000000000000002
[    1.329039][    T0] RBP: ffffffff86007f48 R08: 617720303d6e776f R09: 745f676f64686374
[    1.330067][    T0] R10: 7268745f676f6468 R11: 003034323d687365 R12: 0000000000000000
[    1.331141][    T0] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[    1.332169][    T0] FS:  0000000000000000(0000) GS:ffffffff886ec000(0000) knlGS:0000000000000000
[    1.333324][    T0] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    1.334181][    T0] CR2: ffff88843ffff000 CR3: 0000000006016000 CR4: 00000000000406b0
[    1.335222][    T0] Call Trace:
[    1.335652][    T0]  <TASK>
[    1.336038][    T0]  start_kernel+0xbf/0x53a
[    1.336634][    T0]  secondary_startup_64_no_verify+0xdf/0xeb
[    1.337415][    T0]  </TASK>
[    1.337810][    T0] irq event stamp: 0
[    1.338324][    T0] hardirqs last  enabled at (0): [<0000000000000000>] 0x0
[    1.339269][    T0] hardirqs last disabled at (0): [<0000000000000000>] 0x0
[    1.340205][    T0] softirqs last  enabled at (0): [<0000000000000000>] 0x0
[    1.341135][    T0] softirqs last disabled at (0): [<0000000000000000>] 0x0
[    1.342071][    T0] ---[ end trace 0000000000000000 ]---
[    1.342799][    T0] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:8192 nr_cpu_ids:8192 nr_node_ids:1
[    1.345155][    T0] percpu: Embedded 72 pages/cpu s257888 r8192 d28832 u1048576
[    1.346237][    T0] pcpu-alloc: s257888 r8192 d28832 u1048576 alloc=1*2097152
...

[    8.585546][    T1] UDP hash table entries: 8192 (order: 8, 1310720 bytes, linear)
[    8.588299][    T1] ------------[ cut here ]------------
[    8.589520][    T1] WARNING: CPU: 1 PID: 1 at mm/page_alloc.c:5491 __alloc_pages+0xad/0x333
[    8.591101][    T1] Modules linked in:
[    8.591973][    T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W          6.0.0-rc4-00007-g6f9c07be9d02 #1 932ff7067730c9c41b5dfbe76b284979ed361812
[    8.594697][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[    8.596715][    T1] RIP: 0010:__alloc_pages+0xad/0x333
[    8.597876][    T1] Code: 0f ba e2 0d c7 44 24 20 01 00 00 00 f3 ab 72 22 83 fe 0a 76 26 80 3d 61 89 77 06 00 0f 85 3a 02 00 00 c6 05 54 89 77 06 01 90 <0f> 0b 90 e9 2a 02 00 00 83 fe 0a 0f 87 21 02 00 00 23 15 22 86 7d
[    8.601650][    T1] RSP: 0000:ffffc9000001fc50 EFLAGS: 00010246
[    8.602909][    T1] RAX: 0000000000000000 RBX: 1ffff92000003f8a RCX: 0000000000000000
[    8.604579][    T1] RDX: 0000000000040cc0 RSI: 000000000000000b RDI: ffffc9000001fca8
[    8.606320][    T1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[    8.607938][    T1] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000040cc0
[    8.609652][    T1] R13: 000000000000000b R14: 0000000000800000 R15: dffffc0000000000
[    8.611249][    T1] FS:  0000000000000000(0000) GS:ffff88839d100000(0000) knlGS:0000000000000000
[    8.613115][    T1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    8.614422][    T1] CR2: 0000000000000000 CR3: 0000000006016000 CR4: 00000000000406a0
[    8.616073][    T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    8.617764][    T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    8.619379][    T1] Call Trace:
[    8.620124][    T1]  <TASK>
[    8.620782][    T1]  ? __alloc_pages_slowpath+0x82a/0x82a
[    8.622189][    T1]  ? __raw_spin_lock_init+0x39/0x101
[    8.623310][    T1]  kmalloc_order+0x33/0x9f
[    8.624237][    T1]  kmalloc_order_trace+0x13/0x104
[    8.626664][    T1]  udp_init+0x8b/0x1ab
[    8.627574][    T1]  inet_init+0x399/0x572
[    8.628477][    T1]  ? ipv4_mib_init_net+0x6ea/0x6ea
[    8.629671][    T1]  do_one_initcall+0x140/0x30d
[    8.630660][    T1]  ? rcu_lock_acquire+0x33/0x33
[    8.631853][    T1]  ? rcu_read_lock_sched_held+0x70/0xcd
[    8.633086][    T1]  ? lock_is_held+0x8/0x8
[    8.634035][    T1]  ? trace_kmalloc+0x79/0xcf
[    8.634998][    T1]  do_initcalls+0x30d/0x36b
[    8.635953][    T1]  kernel_init_freeable+0x352/0x3b8
[    8.637112][    T1]  ? rest_init+0x1b6/0x1b6
[    8.638085][    T1]  kernel_init+0x14/0x124
[    8.639035][    T1]  ret_from_fork+0x1f/0x30
[    8.639958][    T1]  </TASK>
[    8.640656][    T1] irq event stamp: 261127
[    8.641672][    T1] hardirqs last  enabled at (261139): [<ffffffff81255553>] __up_console_sem+0x40/0x5c
[    8.643581][    T1] hardirqs last disabled at (261148): [<ffffffff81255533>] __up_console_sem+0x20/0x5c
[    8.645520][    T1] softirqs last  enabled at (261042): [<ffffffff8400056d>] __do_softirq+0x56d/0x61e
[    8.647455][    T1] softirqs last disabled at (261037): [<ffffffff81190b9f>] __irq_exit_rcu+0xa0/0xe8
[    8.649404][    T1] ---[ end trace 0000000000000000 ]---
[    8.650547][    T1] Kernel panic - not syncing: UDP: failed to alloc udp_busylocks
[    8.652035][    T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W          6.0.0-rc4-00007-g6f9c07be9d02 #1 932ff7067730c9c41b5dfbe76b284979ed361812
[    8.653378][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[    8.653378][    T1] Call Trace:
[    8.653378][    T1]  <TASK>
[    8.653378][    T1]  dump_stack_lvl+0x57/0x86
[    8.653378][    T1]  panic+0x21e/0x42d
[    8.653378][    T1]  ? panic_print_sys_info+0x85/0x85
[    8.653378][    T1]  ? rcu_read_lock_sched_held+0x70/0xcd
[    8.653378][    T1]  ? lock_is_held+0x8/0x8
[    8.653378][    T1]  udp_init+0x179/0x1ab
[    8.653378][    T1]  inet_init+0x399/0x572
[    8.653378][    T1]  ? ipv4_mib_init_net+0x6ea/0x6ea
[    8.653378][    T1]  do_one_initcall+0x140/0x30d
[    8.653378][    T1]  ? rcu_lock_acquire+0x33/0x33
[    8.653378][    T1]  ? rcu_read_lock_sched_held+0x70/0xcd
[    8.653378][    T1]  ? lock_is_held+0x8/0x8
[    8.653378][    T1]  ? trace_kmalloc+0x79/0xcf
[    8.653378][    T1]  do_initcalls+0x30d/0x36b
[    8.653378][    T1]  kernel_init_freeable+0x352/0x3b8
[    8.653378][    T1]  ? rest_init+0x1b6/0x1b6
[    8.653378][    T1]  kernel_init+0x14/0x124
[    8.653378][    T1]  ret_from_fork+0x1f/0x30
[    8.653378][    T1]  </TASK>


If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <yujie.liu@...el.com>
| Link: https://lore.kernel.org/r/202210201612.9d7547bf-yujie.liu@intel.com


To reproduce:

        # build kernel
	cd linux
	cp config-6.0.0-rc4-00007-g6f9c07be9d02 .config
	make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 INSTALL_MOD_PATH=<mod-install-dir> modules_install
	cd <mod-install-dir>
	find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz


        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email

        # if come across any failure that blocks the test,
        # please remove ~/.lkp and /lkp dir to run from a clean state.


-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config-6.0.0-rc4-00007-g6f9c07be9d02" of type "text/plain" (180185 bytes)

View attachment "job-script" of type "text/plain" (4905 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (17932 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ