Re: [PATCH 0/4] initial work on making VMA flags a bitmap

From: Nico Pache

Date: Thu Oct 30 2025 - 05:20:51 EST


On Thu, Oct 30, 2025 at 2:34 AM Lorenzo Stoakes
<lorenzo.stoakes@xxxxxxxxxx> wrote:
>
> +cc Alice - could you help look at this? It seems I have broken the rust
> bindings here :)

>From a first glance it looks trivial to fix, there are a bunch of
bindings of the VM_* flags.

for example

kernel/mm/virt.rs: pub const MIXEDMAP: vm_flags_t =
bindings::VM_MIXEDMAP as vm_flags_t;

I believe this just needs to be converted to
'bindings::VM_MIXEDMAP_BIT' if I understand your series correctly
(havent fully looked at the details).

>
> Thanks!
>
> On Wed, Oct 29, 2025 at 09:07:07PM -0600, Nico Pache wrote:
> > Hey Lorenzo,
> >
> > I put your patchset into the Fedora Koji system to run some CI on it for you.
> >
> > It failed to build due to what looks like some Rust bindings.
> >
> > Heres the build: https://koji.fedoraproject.org/koji/taskinfo?taskID=138547842
> >
> > And x86 build logs:
> > https://kojipkgs.fedoraproject.org//work/tasks/7966/138547966/build.log
> >
> > The error is pretty large but here's a snippet if you want an idea
> >
> > error[E0425]: cannot find value `VM_READ` in crate `bindings`
> > --> rust/kernel/mm/virt.rs:399:44
> > |
> > 399 | pub const READ: vm_flags_t = bindings::VM_READ as vm_flags_t;
> > | ^^^^^^^ not found in `bindings`
> > error[E0425]: cannot find value `VM_WRITE` in crate `bindings`
> > --> rust/kernel/mm/virt.rs:402:45
> > |
> > 402 | pub const WRITE: vm_flags_t = bindings::VM_WRITE as vm_flags_t;
> > | ^^^^^^^^ not found
> > in `bindings`
> > error[E0425]: cannot find value `VM_EXEC` in crate `bindings`
> > --> rust/kernel/mm/virt.rs:405:44
> > |
> > 405 | pub const EXEC: vm_flags_t = bindings::VM_EXEC as vm_flags_t;
> > | ^^^^^^^ help: a
> > constant with a similar name exists: `ET_EXEC`
> > |
> > ::: /builddir/build/BUILD/kernel-6.18.0-build/kernel-6.18-rc3-16-ge53642b87a4f/linux-6.18.0-0.rc3.e53642b87a4f.31.bitvma.fc44.x86_64/rust/bindings/bindings_generated.rs:13881:1
> > |
> > 13881 | pub const ET_EXEC: u32 = 2;
> > | ---------------------- similarly named constant `ET_EXEC` defined here
> > error[E0425]: cannot find value `VM_SHARED` in crate `bindings`
> > --> rust/kernel/mm/virt.rs:408:46
> > |
> > 408 | pub const SHARED: vm_flags_t = bindings::VM_SHARED as vm_flags_t;
> > | ^^^^^^^^^ not found
> > in `bindings`
> >
> > In the next version Ill do the same and continue with the CI testing for you!
>
> Thanks much appreciated :)
>
> It seems I broke the rust bindings (clearly), have pinged Alice to have a
> look!
>
> May try and repro my side to see if there's something trivial that I could
> take a look at.
>
> I ran this through mm self tests, allmodconfig + a bunch of other checks
> but ofc enabling rust was not one, I should probably update my scripts [0]
> to do that too :)

Ah cool, thanks for sharing your scripts, Ill take a look into those!

Cheers,
-- Nico
>
> Cheers, Lorenzo
>
> [0]:https://github.com/lorenzo-stoakes/review-scripts
>