lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de187794-8a28-482d-802c-8e0fb6f89e5c@lucifer.local>
Date: Thu, 30 Oct 2025 12:02:58 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Nico Pache <npache@...hat.com>, Andrew Morton <akpm@...ux-foundation.org>,
        Muchun Song <muchun.song@...ux.dev>,
        Oscar Salvador <osalvador@...e.de>,
        David Hildenbrand <david@...hat.com>,
        "Liam R . Howlett" <Liam.Howlett@...cle.com>,
        Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
        Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Yuanchu Xie <yuanchu@...gle.com>, Wei Xu <weixugc@...gle.com>,
        Peter Xu <peterx@...hat.com>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
        Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
        Kees Cook <kees@...nel.org>, Matthew Wilcox <willy@...radead.org>,
        Jason Gunthorpe <jgg@...pe.ca>, John Hubbard <jhubbard@...dia.com>,
        Leon Romanovsky <leon@...nel.org>, Zi Yan <ziy@...dia.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
        Barry Song <baohua@...nel.org>, Lance Yang <lance.yang@...ux.dev>,
        Xu Xin <xu.xin16@....com.cn>,
        Chengming Zhou <chengming.zhou@...ux.dev>,
        Jann Horn <jannh@...gle.com>, Matthew Brost <matthew.brost@...el.com>,
        Joshua Hahn <joshua.hahnjy@...il.com>, Rakie Kim <rakie.kim@...com>,
        Byungchul Park <byungchul@...com>, Gregory Price <gourry@...rry.net>,
        Ying Huang <ying.huang@...ux.alibaba.com>,
        Alistair Popple <apopple@...dia.com>, Pedro Falcato <pfalcato@...e.de>,
        Shakeel Butt <shakeel.butt@...ux.dev>,
        David Rientjes <rientjes@...gle.com>, Rik van Riel <riel@...riel.com>,
        Harry Yoo <harry.yoo@...cle.com>,
        Kemeng Shi <shikemeng@...weicloud.com>,
        Kairui Song <kasong@...cent.com>, Nhat Pham <nphamcs@...il.com>,
        Baoquan He <bhe@...hat.com>, Chris Li <chrisl@...nel.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Qi Zheng <zhengqi.arch@...edance.com>, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 0/4] initial work on making VMA flags a bitmap

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ