From: Nathan Chancellor <nathan@kernel.org>
To: Alice Ryhl <aliceryhl@google.com>, Mike Rapoport <rppt@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Mark Brown <broonie@kernel.org>,
rust-for-linux@vger.kernel.org, Miguel Ojeda <ojeda@kernel.org>,
Danilo Krummrich <dakr@kernel.org>
Subject: Re: [linux-next:master 5585/5731] error[E0277]: `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely
Date: Fri, 13 Mar 2026 14:36:38 -0700 [thread overview]
Message-ID: <20260313213638.GA147391@ax162> (raw)
In-Reply-To: <202603121235.tpnRxFKO-lkp@intel.com>
+ relevant parties
On Thu, Mar 12, 2026 at 12:21:07PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: f90aadf1c67c8b4969d1e5e6d4fd7227adb6e4d7
> commit: 9ef1985c003ea271369c900a93f8b834119fd150 [5585/5731] Merge branch 'mm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
> config: x86_64-randconfig-002-20260312 (https://download.01.org/0day-ci/archive/20260312/202603121235.tpnRxFKO-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260312/202603121235.tpnRxFKO-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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202603121235.tpnRxFKO-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> error[E0277]: `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely
> --> drivers/android/binder/page_range.rs:146:23
> |
> 146 | static BINDER_VM_OPS: bindings::vm_operations_struct = pin_init::zeroed();
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely
> |
> = help: within `kernel::bindings::vm_operations_struct`, the trait `Sync` is not implemented for `*const kernel::bindings::vm_uffd_ops`
> note: required because it appears within the type `kernel::bindings::vm_operations_struct`
> --> rust/bindings/bindings_generated.rs:72795:12
> |
> 72795 | pub struct vm_operations_struct {
> | ^^^^^^^^^^^^^^^^^^^^
> = note: shared static variables must have a type that implements `Sync`
I see this in next-20260313 still.
$ cat kernel/configs/repro.config
CONFIG_RUST=y
CONFIG_ANDROID_BINDER_IPC_RUST=y
CONFIG_USERFAULTFD=y
$ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 mrproper defconfig repro.config drivers/android/binder/rust_binder_main.o
error[E0277]: `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely
--> drivers/android/binder/page_range.rs:146:23
|
146 | static BINDER_VM_OPS: bindings::vm_operations_struct = pin_init::zeroed();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely
|
= help: within `kernel::bindings::vm_operations_struct`, the trait `Sync` is not implemented for `*const kernel::bindings::vm_uffd_ops`
note: required because it appears within the type `kernel::bindings::vm_operations_struct`
--> rust/bindings/bindings_generated.rs:71347:12
|
71347 | pub struct vm_operations_struct {
| ^^^^^^^^^^^^^^^^^^^^
= note: shared static variables must have a type that implements `Sync`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
...
It looks like this is a conflict between Alice's "rust_binder: check ownership
before using vma" [1] (currently in char-misc-linus [2]) and Mike's
"userfaultfd: introduce vm_uffd_ops" [3] (currently in mm-unstable [4]),
hence why it was bisected to the -next merge commit.
[1]: https://lore.kernel.org/20260218-binder-vma-check-v2-1-60f9d695a990@google.com/
[2]: https://git.kernel.org/gregkh/char-misc/c/8ef2c15aeae07647f530d30f6daaf79eb801bcd1
[3]: https://lore.kernel.org/20260306171815.3160826-8-rppt@kernel.org/
[4]: https://git.kernel.org/akpm/mm/c/52b7ee1715b88c61fe0696db31ac90181999ec2e
Cheers,
Nathan
next prev parent reply other threads:[~2026-03-13 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 4:21 [linux-next:master 5585/5731] error[E0277]: `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely kernel test robot
2026-03-13 21:36 ` Nathan Chancellor [this message]
2026-03-13 22:39 ` Miguel Ojeda
2026-03-14 11:12 ` Greg Kroah-Hartman
2026-03-14 11:15 ` Alice Ryhl
2026-03-14 11:19 ` [PATCH] rust_binder: use AssertSync for BINDER_VM_OPS Alice Ryhl
2026-03-14 13:37 ` Gary Guo
2026-03-14 11:30 ` [linux-next:master 5585/5731] error[E0277]: `*const kernel::bindings::vm_uffd_ops` cannot be shared between threads safely Alice Ryhl
2026-03-14 11:53 ` Greg Kroah-Hartman
2026-03-14 11:58 ` Alice Ryhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260313213638.GA147391@ax162 \
--to=nathan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=broonie@kernel.org \
--cc=dakr@kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=rppt@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox