linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kees Cook <keescook@chromium.org>,
	Daniel Micay <danielmicay@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Daniel Axtens <dja@axtens.net>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH 7/7] include/linux/string.h: add the option of fortified string.h functions
Date: Sun, 10 Sep 2017 15:51:16 +0200	[thread overview]
Message-ID: <CAK8P3a2ruTGnDUrPE5zWpO1Gixd=bd=LxCWci+UL0ym0BH7e2A@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdX8BaZ9d2oqQaAhtOVJzDFgcDuq_L2YMKB_iSTyfJa94Q@mail.gmail.com>

On Sun, Sep 10, 2017 at 12:55 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
55e285a upstream.
>
>> --- a/include/linux/string.h
>> +++ b/include/linux/string.h
>> @@ -187,4 +187,204 @@ static inline const char *kbasename(const char *path)
>>         return tail ? tail + 1 : path;
>>  }
>>
>> +#define __FORTIFY_INLINE extern __always_inline __attribute__((gnu_inline))
>
> With gcc-4.1.2, I now get zillions of:
>
>     include/linux/string.h:439: warning: ‘gnu_inline’ attribute
> directive ignored
>
> This attribute seems to be supported as of gcc 4.2?
>

I think in older compilers this was the default, so we could add a macro in
compiler.h that makes becomes an empty string there. If we do that,
we should also address these new warning on gcc-4.3:

arch/x86/include/asm/string_32.h:30: warning: 'strlen' declared inline
after being called
arch/x86/include/asm/string_32.h:252: warning: 'strnlen' declared
inline after being called
arch/x86/include/asm/string_32.h:252: warning: previous declaration of
'strnlen' was here
arch/x86/include/asm/string_32.h:145: warning: 'memcpy' declared
inline after being called
include/linux/string.h:81: warning: 'strlen' declared inline after being called
include/linux/string.h:81: warning: previous declaration of 'strlen' was here
include/linux/string.h:84: warning: 'strnlen' declared inline after being called
include/linux/string.h:84: warning: previous declaration of 'strnlen' was here

      Arnd

  reply	other threads:[~2017-09-10 13:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 20:26 [PATCH 0/7] CONFIG_FORTIFY_SOURCE Kees Cook
2017-06-19 20:26 ` [PATCH 1/7] efi: Avoid fortify checks in EFI stub Kees Cook
2017-06-19 20:26 ` [PATCH 2/7] x86/power/64: Use char arrays for asm function names Kees Cook
2017-06-19 20:26 ` [PATCH 3/7] kexec_file: Adjust declaration of kexec_purgatory Kees Cook
2017-06-19 20:26 ` [PATCH 4/7] IB/rxe: Do not copy extra stack memory to skb Kees Cook
2017-06-19 20:26 ` [PATCH 5/7] powerpc: Don't fortify prom_init Kees Cook
2017-06-19 20:26 ` [PATCH 6/7] powerpc: Make feature-fixup tests fortify-safe Kees Cook
2017-06-19 20:26 ` [PATCH 7/7] include/linux/string.h: add the option of fortified string.h functions Kees Cook
2017-09-10 10:55   ` Geert Uytterhoeven
2017-09-10 13:51     ` Arnd Bergmann [this message]
2017-06-19 21:50 ` [PATCH 0/7] CONFIG_FORTIFY_SOURCE Andrew Morton
2017-06-19 22:12   ` Kees Cook
2017-06-19 22:31     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a2ruTGnDUrPE5zWpO1Gixd=bd=LxCWci+UL0ym0BH7e2A@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=cmetcalf@ezchip.com \
    --cc=danielmicay@gmail.com \
    --cc=dja@axtens.net \
    --cc=geert@linux-m68k.org \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mark.rutland@arm.com \
    --cc=mingo@elte.hu \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).