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: <CAKwvOdkkCxNHJKBVPJfixn1gO4PjT9VAynXX0m4KBD+YfLUo5Q@mail.gmail.com>
Date:   Tue, 5 Jun 2018 10:55:38 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     joe@...ches.com
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>, akataria@...are.com,
        boris.ostrovsky@...cle.com, brijesh.singh@....com,
        Cao jin <caoj.fnst@...fujitsu.com>,
        Greg KH <gregkh@...uxfoundation.org>, hpa@...or.com,
        "J. Kiszka" <jan.kiszka@...mens.com>,
        jarkko.sakkinen@...ux.intel.com, jgross@...e.com,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        kirill.shutemov@...ux.intel.com, mingo@...hat.com,
        mjg59@...gle.com, Matthias Kaehlcke <mka@...omium.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        rostedt@...dmis.org, Thomas Gleixner <tglx@...utronix.de>,
        thomas.lendacky@....com, Thiebaud Weksteen <tweek@...gle.com>,
        linux-efi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        x86@...nel.org, virtualization@...ts.linux-foundation.org,
        Alistair Strachan <astrachan@...gle.com>,
        Manoj Gupta <manojgupta@...gle.com>,
        Greg Hackmann <ghackmann@...gle.com>, sedat.dilek@...il.com,
        tstellar@...hat.com, Kees Cook <keescook@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        geert@...ux-m68k.org, Will Deacon <will.deacon@....com>,
        mawilcox@...rosoft.com, Arnd Bergmann <arnd@...db.de>,
        David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations

On Tue, Jun 5, 2018 at 10:23 AM Joe Perches <joe@...ches.com> wrote:
> On Tue, 2018-06-05 at 10:05 -0700, Nick Desaulniers wrote:
> >  #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) ||             \
> >      !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
> > -#define inline inline                __attribute__((always_inline,unused)) notrace
> > -#define __inline__ __inline__        __attribute__((always_inline,unused)) notrace
> > -#define __inline __inline    __attribute__((always_inline,unused)) notrace
> > +#define inline \
> > +     inline __attribute__((always_inline, unused, gnu_inline)) notrace
> > +#define __inline__ \
> > +     __inline__ __attribute__((always_inline, unused, gnu_inline)) notrace
> > +#define __inline \
> > +     __inline __attribute__((always_inline, unused, gnu_inline)) notrace
>
> Perhaps these are simpler as
>
> #define __inline__      inline
> #define __inline        inline
>
> >  #else
> >  /* A lot of inline functions can cause havoc with function tracing */
> > -#define inline inline                __attribute__((unused)) notrace
> > -#define __inline__ __inline__        __attribute__((unused)) notrace
> > -#define __inline __inline    __attribute__((unused)) notrace
> > +#define inline inline                __attribute__((unused, gnu_inline)) notrace
> > +#define __inline__ __inline__        __attribute__((unused, gnu_inline)) notrace
> > +#define __inline __inline    __attribute__((unused, gnu_inline)) notrace
> >  #endif
>
> And only set once along with:
>
> >  #define __always_inline      inline __attribute__((always_inline))
>
> And perhaps this __always_inline should be updated
> with gnu_inline as well
>

Great idea, I'll pick this up and add you to the Suggested-by: tag in
v3. Thanks Joe!
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ