hi, PeterZ,
we noticed this is a fix for
"[tip:x86/mm] [x86/mm] b389949485: WARNING:at_arch/x86/mm/pat/set_memory.c:#__change_page_attr"
we reported before on
https://lore.kernel.org/all/[email protected]/
we noticed it brought below issue which is persistent in our tests. FYI
Greeting,
FYI, we noticed WARNING:at_arch/x86/include/asm/kfence.h:#kfence_protect due to commit (built with gcc-11):
commit: 127960a05548ea699a95791669e8112552eb2452 ("x86/mm: Inhibit _PAGE_NX changes from cpa_process_alias()")
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):
+----------------------------------------------------------+------------+------------+
| | 5ab815e377 | 127960a055 |
+----------------------------------------------------------+------------+------------+
| WARNING:at_arch/x86/include/asm/kfence.h:#kfence_protect | 0 | 15 |
| RIP:kfence_protect | 0 | 15 |
| WARNING:at_mm/kfence/core.c:#kfence_protect | 0 | 15 |
+----------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-lkp/[email protected]
[ 1.269844][ T0] ------------[ cut here ]------------
[ 1.270843][ T0] WARNING: CPU: 0 PID: 0 at arch/x86/include/asm/kfence.h:46 kfence_protect (arch/x86/include/asm/kfence.h:46 mm/kfence/core.c:235)
[ 1.272664][ T0] Modules linked in:
[ 1.273373][ T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.0-rc3-00044-g127960a05548 #1
[ 1.274992][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[ 1.276862][ T0] RIP: 0010:kfence_protect (arch/x86/include/asm/kfence.h:46 mm/kfence/core.c:235)
[ 1.277849][ T0] Code: f1 f1 c7 40 04 04 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 44 24 60 31 c0 e8 70 18 86 ff 48 85 c0 74 07 83 7c 24 28 01 74 17 <0f> 0b 0f 0b c6 05 0a 15 f0 03 00 45 31 c0 c6 05 ff 14 f0 03 01 eb
All code
========
0: f1 icebp
1: f1 icebp
2: c7 40 04 04 f3 f3 f3 movl $0xf3f3f304,0x4(%rax)
9: 65 48 8b 04 25 28 00 mov %gs:0x28,%rax
10: 00 00
12: 48 89 44 24 60 mov %rax,0x60(%rsp)
17: 31 c0 xor %eax,%eax
19: e8 70 18 86 ff callq 0xffffffffff86188e
1e: 48 85 c0 test %rax,%rax
21: 74 07 je 0x2a
23: 83 7c 24 28 01 cmpl $0x1,0x28(%rsp)
28: 74 17 je 0x41
2a:* 0f 0b ud2 <-- trapping instruction
2c: 0f 0b ud2
2e: c6 05 0a 15 f0 03 00 movb $0x0,0x3f0150a(%rip) # 0x3f0153f
35: 45 31 c0 xor %r8d,%r8d
38: c6 05 ff 14 f0 03 01 movb $0x1,0x3f014ff(%rip) # 0x3f0153e
3f: eb .byte 0xeb
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 0f 0b ud2
4: c6 05 0a 15 f0 03 00 movb $0x0,0x3f0150a(%rip) # 0x3f01515
b: 45 31 c0 xor %r8d,%r8d
e: c6 05 ff 14 f0 03 01 movb $0x1,0x3f014ff(%rip) # 0x3f01514
15: eb .byte 0xeb
[ 1.281199][ T0] RSP: 0000:ffffffff84a07dc8 EFLAGS: 00010002
[ 1.282299][ T0] RAX: ffff88843fff6b60 RBX: 1ffffffff0940fba RCX: 00000000000000e3
[ 1.283723][ T0] RDX: 0000000000000080 RSI: ffff8883ad800000 RDI: ffffffff84a14888
[ 1.285161][ T0] RBP: ffff8883ad800000 R08: 0000000000000001 R09: ffffea000eb67f87
[ 1.286606][ T0] R10: fffff94001d6cff0 R11: 0000000000000001 R12: dffffc0000000000
[ 1.288064][ T0] R13: ffffea000eb67fc0 R14: 0000000000000200 R15: dffffc0000000000
[ 1.289400][ T0] FS: 0000000000000000(0000) GS:ffff8883af200000(0000) knlGS:0000000000000000
[ 1.291045][ T0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.292214][ T0] CR2: ffff88843ffff000 CR3: 0000000004a14000 CR4: 00000000000406b0
[ 1.293543][ T0] Call Trace:
[ 1.294097][ T0] <TASK>
[ 1.294604][ T0] ? objects_open (mm/kfence/core.c:234)
[ 1.295374][ T0] ? __raw_callee_save___native_queued_spin_unlock (??:?)
[ 1.296658][ T0] kfence_init_pool (mm/kfence/core.c:583)
[ 1.297561][ T0] ? kfence_check_canary_callback (mm/kfence/core.c:541)
[ 1.298651][ T0] ? get_random_u32 (drivers/char/random.c:510)
[ 1.299527][ T0] ? get_random_u16 (drivers/char/random.c:510)
[ 1.300417][ T0] kfence_init_pool_early (mm/kfence/core.c:616)
[ 1.301403][ T0] kfence_init (mm/kfence/core.c:862)
[ 1.302164][ T0] start_kernel (arch/x86/include/asm/stackprotector.h:65 init/main.c:1057)
[ 1.302959][ T0] secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:358)
[ 1.304014][ T0] </TASK>
[ 1.304538][ T0] ---[ end trace 0000000000000000 ]---
To reproduce:
# build kernel
cd linux
cp config-6.1.0-rc3-00044-g127960a05548 .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
On Sun, Nov 20, 2022 at 04:40:51PM +0800, kernel test robot wrote:
>
> hi, PeterZ,
>
> we noticed this is a fix for
> "[tip:x86/mm] [x86/mm] b389949485: WARNING:at_arch/x86/mm/pat/set_memory.c:#__change_page_attr"
> we reported before on
> https://lore.kernel.org/all/[email protected]/
> we noticed it brought below issue which is persistent in our tests. FYI
>
>
> Greeting,
>
> FYI, we noticed WARNING:at_arch/x86/include/asm/kfence.h:#kfence_protect due to commit (built with gcc-11):
>
> commit: 127960a05548ea699a95791669e8112552eb2452 ("x86/mm: Inhibit _PAGE_NX changes from cpa_process_alias()")
> 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):
>
>
> +----------------------------------------------------------+------------+------------+
> | | 5ab815e377 | 127960a055 |
> +----------------------------------------------------------+------------+------------+
> | WARNING:at_arch/x86/include/asm/kfence.h:#kfence_protect | 0 | 15 |
> | RIP:kfence_protect | 0 | 15 |
> | WARNING:at_mm/kfence/core.c:#kfence_protect | 0 | 15 |
> +----------------------------------------------------------+------------+------------+
>
>
> If you fix the issue, kindly add following tag
> | Reported-by: kernel test robot <[email protected]>
> | Link: https://lore.kernel.org/oe-lkp/[email protected]
>
>
> [ 1.269844][ T0] ------------[ cut here ]------------
> [ 1.270843][ T0] WARNING: CPU: 0 PID: 0 at arch/x86/include/asm/kfence.h:46 kfence_protect (arch/x86/include/asm/kfence.h:46 mm/kfence/core.c:235)
Should be fixed by:
https://lkml.kernel.org/r/[email protected]
I think.