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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202503141300.7VvqEzvm-lkp@intel.com>
Date: Fri, 14 Mar 2025 13:54:17 +0800
From: kernel test robot <lkp@...el.com>
To: Antonio Hickey <contact@...oniohickey.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>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	Danilo Krummrich <dakr@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
	Antonio Hickey <contact@...oniohickey.com>,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] rust: clippy: disable `addr_of!` and `addr_of_mut`
 macros

Hi Antonio,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rust/rust-next]
[also build test WARNING on driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus shuah-kselftest/kunit shuah-kselftest/kunit-fixes pci/next pci/for-linus linus/master v6.14-rc6 next-20250313]
[cannot apply to rust/rust-block-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Antonio-Hickey/rust-clippy-disable-addr_of-and-addr_of_mut-macros/20250313-133646
base:   https://github.com/Rust-for-Linux/linux rust-next
patch link:    https://lore.kernel.org/r/010001958dfeb4c7-0ed042d2-613b-4023-bb91-0c64f8a84fc9-000000%40email.amazonses.com
patch subject: [PATCH 2/3] rust: clippy: disable `addr_of!` and `addr_of_mut` macros
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250314/202503141300.7VvqEzvm-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250314/202503141300.7VvqEzvm-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/202503141300.7VvqEzvm-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/fs/file.rs:334:18
   |
   334 |         unsafe { core::ptr::addr_of!((*self.as_ptr()).f_flags).read_volatile() }
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/list.rs:179:34
   |
   179 |         unsafe { Opaque::raw_get(ptr::addr_of!((*me).inner)) }
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/sync/arc.rs:246:18
   |
   246 |         unsafe { core::ptr::addr_of!((*ptr).data) }
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/task.rs:260:29
   |
   260 |         let ptr = unsafe { *ptr::addr_of!((*self.as_ptr()).group_leader) };
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/task.rs:272:19
   |
   272 |         unsafe { *ptr::addr_of!((*self.as_ptr()).pid) }
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/workqueue.rs:406:34
   |
   406 |         unsafe { Opaque::raw_get(core::ptr::addr_of!((*ptr).work)) }
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ