[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202508071027.8981cbd4-lkp@intel.com>
Date: Thu, 7 Aug 2025 16:42:23 +0800
From: kernel test robot <oliver.sang@...el.com>
To: Igor Korotin <igor.korotin.linux@...il.com>
CC: <oe-lkp@...ts.linux.dev>, <lkp@...el.com>, <linux-kernel@...r.kernel.org>,
<rust-for-linux@...r.kernel.org>, Miguel Ojeda <ojeda@...nel.org>, "Alex
Gaynor" <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>, "Andreas
Hindborg" <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, "Trevor
Gross" <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
<oliver.sang@...el.com>
Subject: Re: [PATCH v3 3/3] samples: rust: add Rust I2C sample driver
Hello,
kernel test robot noticed "kernel_BUG_at_rust/helpers/bug.c" on:
commit: 65aee29875487338caa52e3a4ffc41165d4798ad ("[PATCH v3 3/3] samples: rust: add Rust I2C sample driver")
url: https://github.com/intel-lab-lkp/linux/commits/Igor-Korotin/rust-i2c-add-basic-I2C-device-and-driver-abstractions/20250801-234859
patch link: https://lore.kernel.org/all/20250801154506.14810-1-igor.korotin.linux@gmail.com/
patch subject: [PATCH v3 3/3] samples: rust: add Rust I2C sample driver
in testcase: boot
config: x86_64-rhel-9.4-rust
compiler: clang-20
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
(please refer to attached dmesg/kmsg for entire log/backtrace)
+------------------------------------------+------------+------------+
| | 6c0f429b5b | 65aee29875 |
+------------------------------------------+------------+------------+
| boot_successes | 18 | 0 |
| boot_failures | 0 | 18 |
| kernel_BUG_at_rust/helpers/bug.c | 0 | 18 |
| Oops:invalid_opcode:#[##]SMP_PTI | 0 | 18 |
| RIP:rust_helper_BUG | 0 | 18 |
| Kernel_panic-not_syncing:Fatal_exception | 0 | 18 |
+------------------------------------------+------------+------------+
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@...el.com>
| Closes: https://lore.kernel.org/oe-lkp/202508071027.8981cbd4-lkp@intel.com
[ 17.294743][ T1] ------------[ cut here ]------------
[ 17.295458][ T1] kernel BUG at rust/helpers/bug.c:7!
[ 17.296172][ T1] Oops: invalid opcode: 0000 [#1] SMP PTI
[ 17.296925][ T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.16.0-08688-g65aee2987548 #1 PREEMPT(voluntary)
[ 17.296974][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 17.296974][ T1] RIP: 0010:rust_helper_BUG (rust/helpers/bug.c:7)
[ 17.296974][ T1] Code: 00 00 00 00 00 0f 1f 44 00 00 48 8d 87 10 ff ff ff e9 cf 22 82 00 cc 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <0f> 0b 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 e9 e6 00 0a 00 66
All code
========
0: 00 00 add %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 0f add %cl,(%rdi)
6: 1f (bad)
7: 44 00 00 add %r8b,(%rax)
a: 48 8d 87 10 ff ff ff lea -0xf0(%rdi),%rax
11: e9 cf 22 82 00 jmp 0x8222e5
16: cc int3
17: 66 66 66 66 66 2e 0f data16 data16 data16 data16 cs nopw 0x0(%rax,%rax,1)
1e: 1f 84 00 00 00 00 00
25: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
2a:* 0f 0b ud2 <-- trapping instruction
2c: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
33: 00 00
35: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
3a: e9 e6 00 0a 00 jmp 0xa0125
3f: 66 data16
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
9: 00 00
b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
10: e9 e6 00 0a 00 jmp 0xa00fb
15: 66 data16
[ 17.296974][ T1] RSP: 0000:ffffd25cc0013948 EFLAGS: 00010246
[ 17.296974][ T1] RAX: 0000000000000080 RBX: ffffffffb55c2ea0 RCX: 0a0c9e9b2c6f9900
[ 17.296974][ T1] RDX: 0000000000000002 RSI: 00000000ffff7fff RDI: ffffffffb651ce50
[ 17.296974][ T1] RBP: ffffd25cc0013e28 R08: 0000000000007fff R09: ffffffffb645cdf0
[ 17.296974][ T1] R10: 0000000000017ffd R11: 00000000ffff7fff R12: 0000000000000000
[ 17.296974][ T1] R13: 0000000000000000 R14: ffffffffb7172dd4 R15: 0000000000000000
[ 17.296974][ T1] FS: 0000000000000000(0000) GS:ffff8c5bb8b33000(0000) knlGS:0000000000000000
[ 17.296974][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 17.296974][ T1] CR2: 0000000000000000 CR3: 0000000048420000 CR4: 00000000000406f0
[ 17.296974][ T1] Call Trace:
[ 17.296974][ T1] <TASK>
[ 17.296974][ T1] __rustc::rust_begin_unwind (rust/kernel/lib.rs:213)
[ 17.296974][ T1] ? <&kernel::str::CStr as core::fmt::Display>::fmt (opt/cross/rustc-1.88.0-bindgen-0.72.0/rustup/toolchains/1.88.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:2636)
[ 17.296974][ T1] ? work_grab_pending (kernel/workqueue.c:2064)
[ 17.296974][ T1] core::panicking::panic_fmt (opt/cross/rustc-1.88.0-bindgen-0.72.0/rustup/toolchains/1.88.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:75)
[ 17.296974][ T1] core::panicking::panic (opt/cross/rustc-1.88.0-bindgen-0.72.0/rustup/toolchains/1.88.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:145)
[ 17.296974][ T1] core::option::unwrap_failed (opt/cross/rustc-1.88.0-bindgen-0.72.0/rustup/toolchains/1.88.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:2040)
[ 17.296974][ T1] __rust_driver_i2c_init (samples/rust/rust_driver_i2c.rs:104)
[ 17.296974][ T1] ? blake2s_update (lib/crypto/blake2s.c:45)
[ 17.296974][ T1] ? add_device_randomness (drivers/char/random.c:952)
[ 17.296974][ T1] ? <rust_dma::DmaSampleDriver as core::ops::drop::Drop>::drop (rust/kernel/driver.rs:127)
[ 17.296974][ T1] ? <rust_driver_i2c::DriverModule as kernel::InPlaceModule>::init (samples/rust/rust_driver_i2c.rs:104 samples/rust/rust_driver_i2c.rs:104 samples/rust/rust_driver_i2c.rs:104)
[ 17.296974][ T1] do_one_initcall (init/main.c:1269)
[ 17.296974][ T1] ? crng_make_state (include/linux/spinlock.h:406 drivers/char/random.c:363)
[ 17.296974][ T1] ? get_random_u32 (include/linux/string.h:366 include/crypto/chacha.h:119 drivers/char/random.c:425 drivers/char/random.c:554)
[ 17.296974][ T1] ? __get_random_u32_below (drivers/char/random.c:568)
[ 17.296974][ T1] ? allocate_slab (mm/slub.c:2578)
[ 17.296974][ T1] ? sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1050)
[ 17.296974][ T1] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:702)
[ 17.296974][ T1] ? parameq (kernel/params.c:81 kernel/params.c:91 kernel/params.c:99)
[ 17.296974][ T1] ? parameq (kernel/params.c:90 kernel/params.c:99)
[ 17.296974][ T1] ? do_initcall_level (init/main.c:1315)
[ 17.296974][ T1] ? parse_args (kernel/params.c:153)
[ 17.296974][ T1] do_initcall_level (init/main.c:1330)
[ 17.296974][ T1] do_initcalls (init/main.c:1344)
[ 17.296974][ T1] kernel_init_freeable (init/main.c:1581)
[ 17.296974][ T1] ? rest_init (init/main.c:1461)
[ 17.296974][ T1] kernel_init (init/main.c:1471)
[ 17.296974][ T1] ret_from_fork (arch/x86/kernel/process.c:154)
[ 17.296974][ T1] ? rest_init (init/main.c:1461)
[ 17.296974][ T1] ret_from_fork_asm (arch/x86/entry/entry_64.S:258)
[ 17.296974][ T1] </TASK>
[ 17.296974][ T1] Modules linked in:
[ 17.339320][ T1] ---[ end trace 0000000000000000 ]---
[ 17.340041][ T1] RIP: 0010:rust_helper_BUG (rust/helpers/bug.c:7)
[ 17.340745][ T1] Code: 00 00 00 00 00 0f 1f 44 00 00 48 8d 87 10 ff ff ff e9 cf 22 82 00 cc 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <0f> 0b 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 e9 e6 00 0a 00 66
All code
========
0: 00 00 add %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 0f add %cl,(%rdi)
6: 1f (bad)
7: 44 00 00 add %r8b,(%rax)
a: 48 8d 87 10 ff ff ff lea -0xf0(%rdi),%rax
11: e9 cf 22 82 00 jmp 0x8222e5
16: cc int3
17: 66 66 66 66 66 2e 0f data16 data16 data16 data16 cs nopw 0x0(%rax,%rax,1)
1e: 1f 84 00 00 00 00 00
25: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
2a:* 0f 0b ud2 <-- trapping instruction
2c: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
33: 00 00
35: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
3a: e9 e6 00 0a 00 jmp 0xa0125
3f: 66 data16
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
9: 00 00
b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
10: e9 e6 00 0a 00 jmp 0xa00fb
15: 66 data16
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250807/202508071027.8981cbd4-lkp@intel.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists