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]
Date:   Fri, 19 Jun 2020 10:07:34 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sparse: use identifiers to define address spaces

Hi Luc,

On Thu, Jun 18, 2020 at 7:05 AM Luc Van Oostenryck
<luc.vanoostenryck@...il.com> wrote:
> On Thu, Jun 18, 2020 at 03:22:15AM +0200, Miguel Ojeda wrote:
> > On Thu, Jun 18, 2020 at 12:02 AM Luc Van Oostenryck
> > <luc.vanoostenryck@...il.com> wrote:
> > >
> > > diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
> > > index 21aed0981edf..e368384445b6 100644
> > > --- a/include/linux/compiler_types.h
> > > +++ b/include/linux/compiler_types.h
> > > @@ -5,20 +5,20 @@
> > >  #ifndef __ASSEMBLY__
> > >
> > >  #ifdef __CHECKER__
> > > -# define __user                __attribute__((noderef, address_space(1)))
> > >  # define __kernel      __attribute__((address_space(0)))
> > > +# define __user                __attribute__((noderef, address_space(__user)))
> >
> > I guess `__kernel` moves to the first place since it uses the first
> > address space?
>
> No, there is no really an order between address spaces. Even before
> this patch, the number were only used as an ID to distinguish them
> from each other.
>
> I just moved __kernel above because it is quite different from
> the others because it's the default one, and so:
> * it's never displayed
> * it's normally not needed, nor in type annotations, nor in cast
>   between address spaces. The only time it's needed is when it's
>   combined with a typeof to express "the same type as this one but
>   without the address space"
> * it can't be defined with a name, '0' must be used.
>
> So, it seemed strange to me to have it in the middle of the other ones.

Indeed. It looks like this whole list is completely unsorted, and was created
by appending new definitions at the bottom.
So perhaps all the address_space ones should be grouped together?

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ