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: <CAHk-=wjFL-4p-4FrJbtKADXRaBPK_Pi_-BSSqm_j784Mq6aHjQ@mail.gmail.com>
Date:   Tue, 6 Nov 2018 11:18:59 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
        bp@...en8.de, namit@...are.com, joe@...ches.com,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        segher@...nel.crashing.org, Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH] tree-wide: Remove __inline__ and __inline usage

On Tue, Nov 6, 2018 at 2:02 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> Therefore I'm proposing to run:
>
>   git grep -l "\<__inline\(\|__\)\>" | while read file
>   do
>         sed -i -e 's/\<__inline\(\|__\)\>/inline/g' $file
>   done
>
> On your current tree, and apply the below fixup patch on top of that
> result.

So I started doing this, and in fact fixed up a few more issues by
hand on top of your patch, but then realized hat it's somewhat
dangerous and possibly broken.

For the uapi header files in particular, __inline__ may actually be
required. Depending on use, and compiler settings, "inline" can be a
word reserved for the user, and shouldn't be used by system headers.

Now, several uapi headers obviously *do* use "inline", and I think in
this day and age that's fine, but I don't actually want to break
possible valid uses.

So I'd argue that we don't actually want to get rid of "__inline__" at
all, because we may need it.

But we *could* get rid of these two lines in include/linux/compiler_types.h

  #define __inline__ inline
  #define __inline   inline

and just say that "inline" for the kernel means "always_inline", but
if you use __inline__ or __inline then you get the "raw" compiler
inlining.

Then people can decide to get rid of __inline__ on a case-by-case basis.

                 Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ