rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: kernel test robot <lkp@intel.com>, Jakub Acs <acsjakub@amazon.de>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	rust-for-linux@vger.kernel.org
Subject: Re: [linux-next:master 13069/13300] error[E0425]: cannot find value `VM_MERGEABLE` in crate `bindings`
Date: Thu, 2 Oct 2025 15:43:23 -0700	[thread overview]
Message-ID: <20251002154323.ca15e98421255ae2978e8d6b@linux-foundation.org> (raw)
In-Reply-To: <CANiq72kWWPAZ3gq2ktMpVeMKpWOU1nAmYi-4d-BgbuDti77ggg@mail.gmail.com>

On Fri, 3 Oct 2025 00:39:16 +0200 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Fri, Oct 3, 2025 at 12:27 AM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > Sorry, this is rather annoying.  Rust is breaking the build for a very
> > simple patch.  Many developers aren't rust-enabled and probably aren't
> > even able to test a fix - my attempt to get a rust build setup working
> > didn't end happily.
> >
> > Jakub's patch fixes a kernel crash and needs to be merged into mainline
> > and -stable reasonably soon.  But that is now blocked until someone who
> > knows how to fix this error and how to test it gets down and does those
> > things.
> >
> > Jakub's patch is present in current linux-next.  Can someone please
> > send us a fix?
> 
> I am not sure I follow -- the diff I gave you should work.

It would be nice if someone were to test it!

> If you have a branch you want me to test and/or give you a formal
> patch on top of that or similar, I can do that.

Thanks.  As mentioned, today's linux-next is where the problem is being
observed.

I'm queueing the below as a fixup against Jakub's original.  This should
appear in tomorrow's linux-next.  Or the day after - it's a timezone
thing.

From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-ksm-fix-flag-dropping-behavior-in-ksm_madvise-fix
Date: Thu Oct  2 03:37:47 PM PDT 2025

Rust bindgen wasn't able to handle the BIT() macro.  Add a helper (from
Miguel) to fix this.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510030449.VfSaAjvd-lkp@intel.com/
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jakub Acs <acsjakub@amazon.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Xu Xin <xu.xin16@zte.com.cn>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 rust/bindings/bindings_helper.h |    1 +
 1 file changed, 1 insertion(+)

--- a/rust/bindings/bindings_helper.h~mm-ksm-fix-flag-dropping-behavior-in-ksm_madvise-fix
+++ a/rust/bindings/bindings_helper.h
@@ -99,3 +99,4 @@ const xa_mark_t RUST_CONST_HELPER_XA_PRE
 
 const gfp_t RUST_CONST_HELPER_XA_FLAGS_ALLOC = XA_FLAGS_ALLOC;
 const gfp_t RUST_CONST_HELPER_XA_FLAGS_ALLOC1 = XA_FLAGS_ALLOC1;
+const vm_flags_t RUST_CONST_HELPER_VM_MERGEABLE = VM_MERGEABLE;
_


  reply	other threads:[~2025-10-02 22:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202510030449.VfSaAjvd-lkp@intel.com>
2025-10-02 21:19 ` [linux-next:master 13069/13300] error[E0425]: cannot find value `VM_MERGEABLE` in crate `bindings` Andrew Morton
2025-10-02 21:42   ` Miguel Ojeda
2025-10-02 21:51     ` John Hubbard
2025-10-02 22:11       ` Miguel Ojeda
2025-10-02 22:27     ` Andrew Morton
2025-10-02 22:32       ` Alice Ryhl
2025-10-02 22:39       ` Miguel Ojeda
2025-10-02 22:43         ` Andrew Morton [this message]
2025-10-02 22:50           ` Alice Ryhl
2025-10-02 22:50           ` Miguel Ojeda
2025-10-02 23:16           ` Miguel Ojeda
2025-10-03  0:24           ` John Hubbard
2025-10-07  7:07             ` Jakub Acs
2025-10-07  7:15               ` 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=20251002154323.ca15e98421255ae2978e8d6b@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=acsjakub@amazon.de \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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;
as well as URLs for NNTP newsgroup(s).