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]
Message-ID: <202210241508.2e203c3d-yujie.liu@intel.com>
Date:   Tue, 25 Oct 2022 12:54:40 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     <oe-lkp@...ts.linux.dev>, <lkp@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Seth Jenkins <sethjenkins@...gle.com>,
        "Kees Cook" <keescook@...omium.org>,
        <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        "Alexander Potapenko" <glider@...gle.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        <kasan-dev@...glegroups.com>,
        "Yin, Fengwei" <fengwei.yin@...el.com>
Subject: [tip:x86/mm] [x86/mm] 1248fb6a82:
 Kernel_panic-not_syncing:kasan_populate_pmd:Failed_to_allocate_page

Hi Peter,

We noticed that below commit changed the value of
CPU_ENTRY_AREA_MAP_SIZE. Seems KASAN uses this value to allocate memory,
and failed during initialization after this change, so we send this
mail and Cc KASAN folks. Please kindly check below report for more
details. Thanks.


Greeting,

FYI, we noticed Kernel_panic-not_syncing:kasan_populate_pmd:Failed_to_allocate_page due to commit (built with gcc-11):

commit: 1248fb6a8201ddac1c86a202f05a0a1765efbfce ("x86/mm: Randomize per-cpu entry area")
https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git x86/mm

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):


[    7.114808][    T0] Kernel panic - not syncing: kasan_populate_pmd+0x142/0x1d2: Failed to allocate page, nid=0 from=1000000
[    7.119742][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 6.1.0-rc1-00001-g1248fb6a8201 #1
[    7.122122][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[    7.124976][    T0] Call Trace:
[    7.125849][    T0]  <TASK>
[    7.126642][    T0]  ? dump_stack_lvl+0x45/0x5d
[    7.127908][    T0]  ? panic+0x21e/0x46a
[    7.129009][    T0]  ? panic_print_sys_info+0x77/0x77
[    7.130618][    T0]  ? memblock_alloc_try_nid_raw+0x106/0x106
[    7.132224][    T0]  ? memblock_alloc_try_nid+0xd9/0x118
[    7.133717][    T0]  ? memblock_alloc_try_nid_raw+0x106/0x106
[    7.135252][    T0]  ? kasan_populate_pmd+0x142/0x1d2
[    7.136655][    T0]  ? early_alloc+0x95/0x9d
[    7.137738][    T0]  ? kasan_populate_pmd+0x142/0x1d2
[    7.138936][    T0]  ? kasan_populate_pud+0x182/0x19f
[    7.140335][    T0]  ? kasan_populate_shadow+0x1e0/0x233
[    7.141759][    T0]  ? kasan_init+0x3be/0x57f
[    7.142942][    T0]  ? setup_arch+0x101d/0x11f0
[    7.144229][    T0]  ? start_kernel+0x6f/0x3d0
[    7.145449][    T0]  ? secondary_startup_64_no_verify+0xe0/0xeb
[    7.147051][    T0]  </TASK>
[    7.147868][    T0] ---[ end Kernel panic - not syncing: kasan_populate_pmd+0x142/0x1d2: Failed to allocate page, nid=0 from=1000000 ]---


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


To reproduce:

        # build kernel
	cd linux
	cp config-6.1.0-rc1-00001-g1248fb6a8201 .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.1.0-rc1-00001-g1248fb6a8201" of type "text/plain" (169712 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ