[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202506262153.vo9sMbM8-lkp@intel.com>
Date: Thu, 26 Jun 2025 22:05:44 +0800
From: kernel test robot <lkp@...el.com>
To: Mitchell Levy <levymitchell0@...il.com>,
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>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Andrew Morton <akpm@...ux-foundation.org>,
Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Danilo Krummrich <dakr@...nel.org>,
Benno Lossin <lossin@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Linux Memory Management List <linux-mm@...ck.org>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
Mitchell Levy <levymitchell0@...il.com>
Subject: Re: [PATCH 1/5] rust: percpu: introduce a rust API for per-CPU
variables
Hi Mitchell,
kernel test robot noticed the following build errors:
[auto build test ERROR on 19272b37aa4f83ca52bdf9c16d5d81bdd1354494]
url: https://github.com/intel-lab-lkp/linux/commits/Mitchell-Levy/rust-percpu-introduce-a-rust-API-for-per-CPU-variables/20250625-061219
base: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
patch link: https://lore.kernel.org/r/20250624-rust-percpu-v1-1-9c59b07d2a9c%40gmail.com
patch subject: [PATCH 1/5] rust: percpu: introduce a rust API for per-CPU variables
config: x86_64-buildonly-randconfig-004-20250626 (https://download.01.org/0day-ci/archive/20250626/202506262153.vo9sMbM8-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250626/202506262153.vo9sMbM8-lkp@intel.com/reproduce)
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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506262153.vo9sMbM8-lkp@intel.com/
All errors (new ones prefixed by >>):
>> error[E0425]: cannot find function `align_of` in this scope
--> rust/kernel/percpu.rs:106:65
|
106 | let ptr: *mut T = unsafe { alloc_percpu(size_of::<T>(), align_of::<T>()) } as *mut T;
| ^^^^^^^^ not found in this scope
|
help: consider importing this function
|
6 + use core::mem::align_of;
|
--
>> error: use of extern static is unsafe and requires unsafe block (error E0133)
--> rust/kernel/percpu.rs:71:53
|
71 | let this_cpu_off_pcpu = core::ptr::addr_of!(this_cpu_off);
| ^^^^^^^^^^^^ use of extern static
|
= note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
--> rust/kernel/percpu.rs:70:5
|
70 | pub unsafe fn get_ref(&self) -> &mut T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: requested on the command line with `-D unsafe-op-in-unsafe-fn`
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists