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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 31 Jul 2022 15:09:37 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>, <lkp@...ts.01.org>, <lkp@...el.com>
Subject: [x86,static_call]  7723edf5ed:
 WARNING:at_arch/x86/kernel/alternative.c:#apply_returns


(please be noted we reported
[x86,static_call]  ee88d363d1: WARNING:at_arch/x86/kernel/alternative.c:#apply_returns
upon mainline at
https://lore.kernel.org/all/Ys58BxHxoDZ7rfpr@xsang-OptiPlex-9020/
and we noticed there are some discussion based on it.
this report FYI the similar issue happens on linux-5.10.y branch)


Greeting,

FYI, we noticed the following commit (built with gcc-11):

commit: 7723edf5edfdfdabd8234e45142be86598a04cad ("x86,static_call: Use alternative RET encoding")
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git linux-5.10.y

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


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang@...el.com>


[    2.806038][    T0] ------------[ cut here ]------------
[ 2.806807][ T0] WARNING: CPU: 0 PID: 0 at arch/x86/kernel/alternative.c:711 apply_returns (arch/x86/kernel/alternative.c:711 (discriminator 1)) 
[    2.807794][    T0] Modules linked in:
[    2.808793][    T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.132-00087-g7723edf5edfd #1
[    2.809793][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[ 2.810810][ T0] RIP: 0010:apply_returns (arch/x86/kernel/alternative.c:711 (discriminator 1)) 
[ 2.811799][ T0] Code: ff ff 74 cb 48 83 c5 04 49 39 ee 0f 87 81 fe ff ff e9 22 ff ff ff 0f 0b 48 83 c5 04 49 39 ee 0f 87 6d fe ff ff e9 0e ff ff ff <0f> 0b 48 83 c5 04 49 39 ee 0f 87 59 fe ff ff e9 fa fe ff ff 48 89
All code
========
   0:	ff                   	(bad)  
   1:	ff 74 cb 48          	pushq  0x48(%rbx,%rcx,8)
   5:	83 c5 04             	add    $0x4,%ebp
   8:	49 39 ee             	cmp    %rbp,%r14
   b:	0f 87 81 fe ff ff    	ja     0xfffffffffffffe92
  11:	e9 22 ff ff ff       	jmpq   0xffffffffffffff38
  16:	0f 0b                	ud2    
  18:	48 83 c5 04          	add    $0x4,%rbp
  1c:	49 39 ee             	cmp    %rbp,%r14
  1f:	0f 87 6d fe ff ff    	ja     0xfffffffffffffe92
  25:	e9 0e ff ff ff       	jmpq   0xffffffffffffff38
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	48 83 c5 04          	add    $0x4,%rbp
  30:	49 39 ee             	cmp    %rbp,%r14
  33:	0f 87 59 fe ff ff    	ja     0xfffffffffffffe92
  39:	e9 fa fe ff ff       	jmpq   0xffffffffffffff38
  3e:	48                   	rex.W
  3f:	89                   	.byte 0x89

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	48 83 c5 04          	add    $0x4,%rbp
   6:	49 39 ee             	cmp    %rbp,%r14
   9:	0f 87 59 fe ff ff    	ja     0xfffffffffffffe68
   f:	e9 fa fe ff ff       	jmpq   0xffffffffffffff0e
  14:	48                   	rex.W
  15:	89                   	.byte 0x89
[    2.812800][    T0] RSP: 0000:ffffffff94c07d50 EFLAGS: 00010202
[    2.813795][    T0] RAX: 0000000000000000 RBX: ffffffff941428c5 RCX: 000000000000000f
[    2.814795][    T0] RDX: 0000000000000003 RSI: 0000000000000000 RDI: ffffffff941428c5
[    2.815793][    T0] RBP: ffffffff967a1a7c R08: 0000000000000001 R09: ffffffff941428c5
[    2.816794][    T0] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff941428c0
[    2.817794][    T0] R13: dffffc0000000000 R14: ffffffff967b53fc R15: 1ffffffff2980fad
[    2.818796][    T0] FS:  0000000000000000(0000) GS:ffff88839d200000(0000) knlGS:0000000000000000
[    2.819797][    T0] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    2.820793][    T0] CR2: ffff88843ffff000 CR3: 0000000371a2a000 CR4: 00000000000406f0
[    2.821796][    T0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    2.822794][    T0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    2.823790][    T0] Call Trace:
[ 2.824800][ T0] ? synchronize_rcu (arch/x86/include/asm/atomic.h:29 (discriminator 11) include/asm-generic/atomic-instrumented.h:28 (discriminator 11) include/linux/cpumask.h:112 (discriminator 11) kernel/rcu/tree.c:3633 (discriminator 11) kernel/rcu/tree.c:3677 (discriminator 11)) 
[ 2.825676][ T0] ? apply_retpolines (arch/x86/kernel/alternative.c:692) 
[ 2.825801][ T0] ? lock_downgrade (kernel/locking/lockdep.c:5218) 
[ 2.826815][ T0] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4426) 
[ 2.827773][ T0] ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:50 (discriminator 22)) 
[ 2.827781][ T0] alternative_instructions (arch/x86/kernel/alternative.c:1024) 
[ 2.827781][ T0] ? arch_init_ideal_nops (arch/x86/kernel/alternative.c:996) 
[ 2.828808][ T0] check_bugs (arch/x86/kernel/cpu/bugs.c:150) 
[ 2.829654][ T0] start_kernel (init/main.c:1049) 
[ 2.829806][ T0] secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:292) 
[    2.830816][    T0] irq event stamp: 79897
[ 2.831554][ T0] hardirqs last enabled at (79905): console_unlock (kernel/printk/printk.c:2561 (discriminator 1)) 
[ 2.832798][ T0] hardirqs last disabled at (79920): console_unlock (kernel/printk/printk.c:2476 (discriminator 1)) 
[ 2.833800][ T0] softirqs last enabled at (79930): irq_enter_rcu (kernel/softirq.c:360) 
[ 2.834800][ T0] softirqs last disabled at (79941): irq_enter_rcu (include/linux/bottom_half.h:19 kernel/softirq.c:358) 
[    2.835804][    T0] ---[ end trace 31475ec15dcd2824 ]---
[    2.850069][    T0] Freeing SMP alternatives memory: 40K
[    2.851980][    T1] smpboot: CPU0: Intel Xeon E312xx (Sandy Bridge) (family: 0x6, model: 0x2a, stepping: 0x1)
[    2.855218][    T1] Performance Events: unsupported p6 CPU model 42 no PMU driver, software events only.
[    2.856245][    T1] rcu: Hierarchical SRCU implementation.
[    2.862806][    T1] NMI watchdog: Perf NMI watchdog permanently disabled
[    2.865285][    T1] smp: Bringing up secondary CPUs ...
[    2.867775][    T1] x86: Booting SMP configuration:
[    2.868801][    T1] .... node  #0, CPUs:      #1
[    0.155873][    T0] kvm-clock: cpu 1, msr 373647041, secondary cpu clock
[    0.155873][    T0] masked ExtINT on CPU#1
[    2.872197][   T17] kvm-guest: stealtime: cpu 1, msr 39d327b80
[    2.874110][    T1] smp: Brought up 1 node, 2 CPUs
[    2.874830][    T1] smpboot: Max logical packages: 1
[    2.875805][    T1] smpboot: Total of 2 processors activated (8380.31 BogoMIPS)
[    3.114131][   T22] node 0 deferred pages initialised in 234ms
[    3.187142][    T1] allocated 100663296 bytes of page_ext
[    3.188053][    T1] Node 0, zone      DMA: page owner found early allocated 0 pages
[    3.190781][    T1] Node 0, zone    DMA32: page owner found early allocated 0 pages
[    3.210704][    T1] Node 0, zone   Normal: page owner found early allocated 26141 pages
[    3.218861][    T1] devtmpfs: initialized
[    3.220911][    T1] x86/mm: Memory block size: 128MB
[    3.276990][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    3.277871][    T1] futex hash table entries: 512 (order: 4, 65536 bytes, linear)
[    3.279992][    T1] pinctrl core: initialized pinctrl subsystem
[    3.284414][    T1] NET: Registered protocol family 16
[    3.288060][    T1] audit: initializing netlink subsys (disabled)
[    3.289162][   T27] audit: type=2000 audit(1659158580.734:1): state=initialized audit_enabled=0 res=1
[    3.292047][    T1] thermal_sys: Registered thermal governor 'fair_share'
[    3.292059][    T1] thermal_sys: Registered thermal governor 'bang_bang'
[    3.292810][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    3.293815][    T1] thermal_sys: Registered thermal governor 'user_space'
[    3.296162][    T1] cpuidle: using governor menu
[    3.302106][    T1] ACPI: bus type PCI registered
[    3.302804][    T1] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    3.305549][    T1] PCI: Using configuration type 1 for base access
[    3.366781][    T1] Kprobes globally optimized
[    3.372347][    T1] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    3.381842][    T1] cryptd: max_cpu_qlen set to 1000
[    3.403819][    T1] ACPI: Added _OSI(Module Device)
[    3.404805][    T1] ACPI: Added _OSI(Processor Device)
[    3.405807][    T1] ACPI: Added _OSI(3.0 _SCP Extensions)
[    3.406810][    T1] ACPI: Added _OSI(Processor Aggregator Device)
[    3.407901][    T1] ACPI: Added _OSI(Linux-Dell-Video)
[    3.408831][    T1] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    3.409827][    T1] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    3.465803][    T1] ACPI: 1 ACPI AML tables successfully acquired and loaded
[    3.485891][    T1] ACPI: Interpreter enabled
[    3.487182][    T1] ACPI: (supports S0 S3 S4 S5)
[    3.487801][    T1] ACPI: Using IOAPIC for interrupt routing
[    3.489133][    T1] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    3.494678][    T1] ACPI: Enabled 2 GPEs in block 00 to 0F
[    3.630243][    T1] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    3.630891][    T1] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[    3.632459][    T1] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[    3.648441][    T1] acpiphp: Slot [3] registered
[    3.649289][    T1] acpiphp: Slot [4] registered
[    3.650404][    T1] acpiphp: Slot [5] registered
[    3.651377][    T1] acpiphp: Slot [6] registered
[    3.652379][    T1] acpiphp: Slot [7] registered
[    3.653341][    T1] acpiphp: Slot [8] registered
[    3.654448][    T1] acpiphp: Slot [9] registered
[    3.655421][    T1] acpiphp: Slot [10] registered
[    3.656280][    T1] acpiphp: Slot [11] registered
[    3.657314][    T1] acpiphp: Slot [12] registered
[    3.658409][    T1] acpiphp: Slot [13] registered
[    3.659409][    T1] acpiphp: Slot [14] registered
[    3.660368][    T1] acpiphp: Slot [15] registered
[    3.661408][    T1] acpiphp: Slot [16] registered
[    3.662404][    T1] acpiphp: Slot [17] registered
[    3.663372][    T1] acpiphp: Slot [18] registered
[    3.664323][    T1] acpiphp: Slot [19] registered
[    3.665369][    T1] acpiphp: Slot [20] registered
[    3.666478][    T1] acpiphp: Slot [21] registered
[    3.667397][    T1] acpiphp: Slot [22] registered
[    3.668408][    T1] acpiphp: Slot [23] registered
[    3.669331][    T1] acpiphp: Slot [24] registered
[    3.670398][    T1] acpiphp: Slot [25] registered
[    3.671159][    T1] acpiphp: Slot [26] registered
[    3.672398][    T1] acpiphp: Slot [27] registered
[    3.673364][    T1] acpiphp: Slot [28] registered
[    3.674421][    T1] acpiphp: Slot [29] registered
[    3.675407][    T1] acpiphp: Slot [30] registered
[    3.676389][    T1] acpiphp: Slot [31] registered
[    3.677046][    T1] PCI host bridge to bus 0000:00
[    3.677838][    T1] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    3.678835][    T1] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    3.679828][    T1] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    3.680866][    T1] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window]


To reproduce:

        # build kernel
	cd linux
	cp config-5.10.132-00087-g7723edf5edfd .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-5.10.132-00087-g7723edf5edfd" of type "text/plain" (158393 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ