Greetings,
0day kernel testing robot got the below dmesg and the first bad commit is
https://github.com/0day-ci/linux/commits/Uros-Bizjak/x86-asm-Use-CC_SET-C...
commit 4768ab44d72e992a1f00ecca2f48e2137b3e90d0
Author: Uros Bizjak <ubizjak(a)gmail.com>
AuthorDate: Fri Dec 28 16:37:59 2018 +0100
Commit: 0day robot <lkp(a)intel.com>
CommitDate: Sat Dec 29 00:53:11 2018 +0800
x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double
Use CC_SET(z)/CC_OUT(z) instead of explicit setz instruction.
Using these two defines, the compiler that supports generation of
condition code outputs from inline assembly flags generates one
conditional jump instruction, e.g:
[lea (%rdi),%rsi
callq this_cpu_cmpxchg16b_emu]
-- or --
[cmpxchg16b %gs:(%rdi)]
jne 199764 <kmem_cache_alloc+0x44>
instead of
[lea (%rdi),%rsi
callq this_cpu_cmpxchg16b_emu]
-- or --
[cmpxchg16b %gs:(%rdi)]
sete %cl
test %cl,%cl
je 19ae04 <kmem_cache_alloc+0x44>
The complication with percpu_cmpxchg16b_double is, that the definition
defaults to the call to this_cpu_cmpxchg16b_emu library function, which
(depending on X86_FEATURE_CX16 flag) is later patched with real cmpxchg16b
instruction. To solve this complication, the patch changes
this_cpu_cmpxchg16b_emu library function to return the result in ZF flag of
%rflags register, instead of %al register. Please also note that instead
of popf instruction (which restores flags register to a previously saved state),
the patched function uses sti, but followed by a nop, which ends the
inhibition of interrupts early.
The patch also introduces alternative_io_tail definition. This definition
can take a tail instruction, common to all alternatives. By using this
definition, it is possible to remove setz from cmpxchg16b alternatives, saved
in .altinstr_replacement section, thus saving a few bytes from the binary.
Signed-off-by: Uros Bizjak <ubizjak(a)gmail.com>
Cc: x86(a)kernel.org
00c569b567 Merge tag 'locks-v4.21-1' of
git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
4768ab44d7 x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double
+----------------------------------------------------------+------------+------------+
| | 00c569b567 | 4768ab44d7 |
+----------------------------------------------------------+------------+------------+
| boot_successes | 32 | 0 |
| boot_failures | 1 | 11 |
| BUG:kernel_hang_in_test_stage | 1 | |
| WARNING:at_kernel/locking/lockdep.c:#lockdep_hardirqs_on | 0 | 11 |
| RIP:lockdep_hardirqs_on | 0 | 11 |
| WARNING:at_init/main.c:#start_kernel | 0 | 11 |
| RIP:start_kernel | 0 | 11 |
+----------------------------------------------------------+------------+------------+
[ 1.491161] sysrq: sysrq always enabled.
[ 1.566498] Memory: 208392K/523768K available (12291K kernel code, 3453K rwdata, 5060K
rodata, 2324K init, 24148K bss, 87324K reserved, 0K cma-reserved)
[ 1.566627] random: get_random_u64 called from __kmem_cache_create+0x31/0x579 with
crng_init=0
[ 1.569125] ------------[ cut here ]------------
[ 1.569154] DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled))
[ 1.569287] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2803
lockdep_hardirqs_on+0xc5/0x19e
[ 1.569321] Modules linked in:
[ 1.569355] CPU: 0 PID: 0 Comm: swapper Not tainted 4.20.0-06429-g4768ab4 #1
[ 1.569382] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 1.569412] RIP: 0010:lockdep_hardirqs_on+0xc5/0x19e
[ 1.569420] Code: 1f 00 85 c0 0f 84 f5 00 00 00 83 3d f0 37 68 01 00 0f 85 e8 00 00 00
48 c7 c6 22 80 1b 82 48 c7 c7 3e 16 1a 82 e8 87 d7 f9 ff <0f> 0b e9 ce 00 00 00 65
48 8b 04 25 00 4f 01 00 83 b8 04 0c 00 00
[ 1.569448] RSP: 0000:ffffffff82403d68 EFLAGS: 00010086
[ 1.569477] RAX: 0000000000000037 RBX: 0000000000000297 RCX: 0000000000000000
[ 1.569484] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff810e119a
[ 1.569511] RBP: ffffffff81958451 R08: 0000000000000037 R09: ffffffff82403d00
[ 1.569518] R10: ffffffff82403d10 R11: 0000000000000000 R12: 00000000ffffffff
[ 1.569545] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 1.569553] FS: 0000000000000000(0000) GS:ffff88801dc00000(0000)
knlGS:0000000000000000
[ 1.569607] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.569614] CR2: ffff888004401000 CR3: 0000000002413000 CR4: 00000000000006b0
[ 1.569641] Call Trace:
[ 1.569680] _raw_read_unlock_irqrestore+0x3c/0x48
[ 1.569712] get_random_u64+0x8d/0x9c
[ 1.569743] __kmem_cache_create+0x31/0x579
[ 1.569776] ? create_kmalloc_cache+0x31/0xb8
[ 1.569805] create_boot_cache+0x64/0x8a
[ 1.569835] create_kmalloc_cache+0x6b/0xb8
[ 1.569845] new_kmalloc_cache+0x79/0x94
[ 1.569875] create_kmalloc_caches+0x32/0x139
[ 1.569907] kmem_cache_init+0xb5/0x14e
[ 1.569939] start_kernel+0x29c/0x646
[ 1.569996] secondary_startup_64+0xa4/0xb0
[ 1.570006] irq event stamp: 0
[ 1.570034] hardirqs last enabled at (0): [<0000000000000000>] (null)
[ 1.570061] hardirqs last disabled at (0): [<0000000000000000>] (null)
[ 1.570067] softirqs last enabled at (0): [<0000000000000000>] (null)
[ 1.570094] softirqs last disabled at (0): [<0000000000000000>] (null)
# HH:MM RESULT GOOD BAD
GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start 094cf30b8e2a1767b15a0646e58ce27ad3daff6f
8fe28cb58bcb235034b64cbbb7550a8a43fd88be --
git bisect bad f488ec5a70fea534f8573d4bb603a1fa2c668354 # 21:29 B 0 6 21 0
Merge
'linux-review/Alexander-Shiyan/gpu-ipu-v3-Fix-i-MX51-CSI-control-registers-offset/20181221-022057'
into devel-hourly-2018122903
git bisect bad 7591f9794175009a64c07c661818b421ac0cd168 # 21:47 B 0 5 20 0
Merge 'linux-review/Ivan-Mironov/scsi-sd-Fix-cache_type_store/20181223-155445'
into devel-hourly-2018122903
git bisect bad 560923dad07aa030470cbca0bb97b5e092ea7417 # 22:01 B 0 9 24 0
Merge
'linux-review/Miroslav-Benes/ring-buffer-Remove-unused-function-ring_buffer_page_len/20181228-214004'
into devel-hourly-2018122903
git bisect good 1ba622a971846988d35988206b6a00659cd23ffe # 22:21 G 11 0 11 11
Merge 'kemi/rwsem_regression_debug' into devel-hourly-2018122903
git bisect bad 2366c2d9c80bb478e5df437de532b582256ee28d # 22:35 B 0 11 26 0
Merge
'linux-review/Lorenzo-Bianconi/mt76-mac-minor-optimizations-in-mt76x02_mac_tx_rate_val/20181228-180739'
into devel-hourly-2018122903
git bisect good 1316c771fe984971f7f50bbabc562121651aec70 # 22:53 G 10 0 10 10
Merge
'linux-review/Yangtao-Li/csky-fix-refcount-leak-in-setup_smp/20181228-003905' into
devel-hourly-2018122903
git bisect good 84473d4f2a5018c7dfcde97156f4c3b699216b65 # 23:10 G 11 0 11 11
Merge
'linux-review/Aditya-Pakki/net-phy-Add-a-return-value-check-on-bus-write/20181227-041720'
into devel-hourly-2018122903
git bisect good 359a221175533a2335060fab7b54ca517508b304 # 23:32 G 11 0 11 11
Merge
'linux-review/Kangjie-Lu/net-marvell-fix-a-missing-check-of-acpi_match_device/20181226-194212'
into devel-hourly-2018122903
git bisect bad 7188e3902d391c8933485d61428fdd9ec86d58a0 # 23:49 B 0 10 25 0
Merge
'linux-review/Uros-Bizjak/x86-asm-Use-CC_SET-CC_OUT-in-percpu_cmpxchg16b_double/20181229-005310'
into devel-hourly-2018122903
git bisect good 0a95d7a1d68cd9b44a3f7e038ee52bad3ae865c6 # 00:04 G 11 0 11 11
Merge 'andersson-remoteproc/for-next' into devel-hourly-2018122903
git bisect bad 4768ab44d72e992a1f00ecca2f48e2137b3e90d0 # 00:19 B 0 3 18 0
x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double
# first bad commit: [4768ab44d72e992a1f00ecca2f48e2137b3e90d0] x86/asm: Use CC_SET/CC_OUT
in percpu_cmpxchg16b_double
git bisect good 00c569b567c7f1f0da6162868fd02a9f29411805 # 00:50 G 32 0 0 0
Merge tag 'locks-v4.21-1' of
git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
# extra tests with debug options
git bisect bad 4768ab44d72e992a1f00ecca2f48e2137b3e90d0 # 01:06 B 0 10 25 0
x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double
# extra tests on HEAD of linux-devel/devel-hourly-2018122903
git bisect bad 094cf30b8e2a1767b15a0646e58ce27ad3daff6f # 01:07 B 0 343 361 0
0day head guard for 'devel-hourly-2018122903'
# extra tests on tree/branch
linux-review/Uros-Bizjak/x86-asm-Use-CC_SET-CC_OUT-in-percpu_cmpxchg16b_double/20181229-005310
git bisect bad 4768ab44d72e992a1f00ecca2f48e2137b3e90d0 # 01:10 B 0 11 26 0
x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double
# extra tests with first bad commit reverted
git bisect good 3fae91c5f623ad6f0118bc695733931861787317 # 01:43 G 11 0 1 1
Revert "x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double"
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/lkp Intel Corporation