linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Acs <acsjakub@amazon.de>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	kernel test robot <lkp@intel.com>, <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: Tue, 7 Oct 2025 07:07:14 +0000	[thread overview]
Message-ID: <20251007070611.GA88971@dev-dsk-acsjakub-1b-6f9934e2.eu-west-1.amazon.com> (raw)
In-Reply-To: <cd2ea7d4-6b12-4933-b1ae-cd4db18d3671@nvidia.com>

On Thu, Oct 02, 2025 at 05:24:48PM -0700, John Hubbard wrote:
> On 10/2/25 3:43 PM, Andrew Morton wrote:
> > 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:
> ...
> > 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;
> > _
> 
> Yes, this fixes the build on my system too, so:
> 
> Tested-by: John Hubbard <jhubbard@nvidia.com>
> 
> ...of course, we'll have to undo this later, as part of the fix
> for the Rust for Linux build system, to handle BIT() and similar
> macros in bindgen.
> 

Hi, 

sorry for the issues this has caused. We're also changing the other
defines to BIT() for consistency, it was applied to mm-new in [1]. I
assume this will have the same breaking effect. Not sure what is the
solution - whether to wait for the fix mentioned by John or add similar
defintions to a/rust/bindings/bindings_helper.h for all consts?

[1]: https://lore.kernel.org/all/20251002202112.C2293C4CEF4@smtp.kernel.org/

Kind Regards,
Jakub



Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597

  reply	other threads:[~2025-10-07  7:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 20:52 kernel test robot
2025-10-02 21:19 ` 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
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 [this message]
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=20251007070611.GA88971@dev-dsk-acsjakub-1b-6f9934e2.eu-west-1.amazon.com \
    --to=acsjakub@amazon.de \
    --cc=akpm@linux-foundation.org \
    --cc=jhubbard@nvidia.com \
    --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