Re: [PATCH 0/4] initial work on making VMA flags a bitmap
From: Lorenzo Stoakes
Date: Thu Oct 30 2025 - 08:04:42 EST
On Thu, Oct 30, 2025 at 11:43:25AM +0000, Alice Ryhl wrote:
> On Thu, Oct 30, 2025 at 08:33:10AM +0000, Lorenzo Stoakes wrote:
> > +cc Alice - could you help look at this? It seems I have broken the rust
> > bindings here :)
> >
> > 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 :)
> >
> > Cheers, Lorenzo
> >
> > [0]:https://github.com/lorenzo-stoakes/review-scripts
>
> I can help convert the Rust bindings to work with this approach. I see
> there is a nice and simple vma_test() method for checking a flag, but I
> don't see any equivalent method for setting or unsetting a given bit.
> What would be the best function for Rust to call to set or unset a given
> bit in the vma flags?
Thanks much appreciated!
I was thinking of adding that in but have no C users currently, on respin
can add.
If you give me a rough idea of what needs to be changed I can always try
and wrap that into my respin?
>
> Alice
Thanks, Lorenzo