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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CR55BD4YCDR1.22R5TLYJW6YS0@vincent-arch>
Date:   Mon, 13 Mar 2023 10:25:19 +0100
From:   "Vincenzo Palazzo" <vincenzopalazzodev@...il.com>
To:     "Andrew Morton" <akpm@...ux-foundation.org>
Cc:     <linux-kernel@...r.kernel.org>, <jgg@...pe.ca>,
        <Liam.Howlett@...cle.com>, <jhubbard@...dia.com>,
        <david@...hat.com>, <willy@...radead.org>,
        <linux-kernel-mentees@...ts.linuxfoundation.org>,
        "Suren Baghdasaryan" <surenb@...gle.com>
Subject: Re: [RFC PATCH v1 1/1] linux: mm_types: allow to modified the
 vm_flags in vm_area_struct

On Mon Mar 13, 2023 at 1:57 AM CET, Andrew Morton wrote:
> On Sun, 12 Mar 2023 23:42:50 +0100 Vincenzo Palazzo <vincenzopalazzodev@...il.com> wrote:
>
> > With 6.3-rc1 is not possible to build the following drivers
>
> Well, let's cc Suren who actually wrote bc292ab00f6c ("mm: introduce
> vma->vm_flags wrapper functions").
>
> > - nvidia, that the compilation returns the following errors
> > 
> > - vboxhost/7.0.6_OSE where the build fails with the following errors
> > 
> > ...
> >
> > --- a/include/linux/mm_types.h
> > +++ b/include/linux/mm_types.h
> > @@ -497,7 +497,7 @@ struct vm_area_struct {
> >  	 * To modify use vm_flags_{init|reset|set|clear|mod} functions.
> >  	 */
> >  	union {
> > -		const vm_flags_t vm_flags;
> > +		vm_flags_t vm_flags;
> >  		vm_flags_t __private __vm_flags;
> >  	};
>
> These out-of-tree drivers should be converted to use the wrappers which
> bc292ab00f6c added.  Their maintainers have a couple of months to do
> this before bc292ab00f6c is released in 6.3.

Yeah I thought about that! nvidia update as soon as the 6.3 is out, not sure
about vboxhost. But let the driver update to this new feature make sense.

>
> It's unfortunate.  I guess it would be better if we were to find a way
> to permit these drivers to compile OK but to generate warnings, as an
> interim thing for six months or so.  Perhaps there's some clever way.

Yeah it is! Regarding giving the possiblity to compile ok (and
preserving the previous behavior) look like an interesting thought for 
kernel API, but am I think that it this is difficult to do?

The real things that I'm missing with the new wrapper API
is the meaning of the new `vm_flags_t vm_flags`, before the 
field was only one and it was getting modified, but now the real
value is the private one `__vm_flags`, so what is the meaning of 
the new `vm_flags`?

I feel that this question is stupid but I can not avoid do it, otherwise 
my mind think about it till I will not find an answer :)

P.S: regaring the warning at compile time the __deprecated looks a good
fit to generate error message, but to me in this particular case do not.

Thanks,

Vincent.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ