LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Tony Lindgren <tony@atomide.com>
Cc: "Stephen Rothwell" <sfr@canb.auug.org.au>,
	"Linux-Next Mailing List" <linux-next@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	pali.rohar@gmail.com, sre@kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-omap@vger.kernel.org, khilman@kernel.org,
	aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com,
	patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com,
	clayton@craftyguy.net, martijn@brixit.nl,
	sakari.ailus@linux.intel.com,
	"Filip Matijević" <filip.matijevic.pz@gmail.com>,
	jinb.park7@gmail.com, keescook@chromium.org,
	rmk+kernel@armlinux.org.uk
Subject: FORTIFY_SOURCE breaks ARM compilation in -next -- was Re: ARM compile failure in Re: linux-next: Tree for Apr 4
Date: Wed, 4 Apr 2018 22:18:37 +0200	[thread overview]
Message-ID: <20180404201837.GA9710@amd> (raw)
In-Reply-To: <20180404195951.GJ5700@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]

On Wed 2018-04-04 12:59:51, Tony Lindgren wrote:
> * Pavel Machek <pavel@ucw.cz> [180404 18:47]:
> > Hi!
> > 
> > > > When trying to build kernel for N900, I get:
> > > > 
> > > >   CC      lib/timerqueue.o
> > > >     CC      lib/vsprintf.o
> > > >     lib/string.c: In function 'strstr':
> > > >     lib/string.c:478:8: error: inlining failed in call to
> > > >     always_inline 'strlen': function not inlinable
> > > >     lib/string.c:903:5: error: called from here
> > > >     lib/string.c:478:8: error: inlining failed in call to
> > > >     always_inline 'strlen': function not inlinable
> > > >     lib/string.c:906:5: error: called from here
> > > >     lib/string.c:855:15: error: inlining failed in call to
> > > >     always_inline 'memcmp': function not inlinable
> > > >     ...
> > > > pavel@duo:/data/l/linux-next-n900$ git branch -l
> > > > * (detached from next-20180403)
> > > > 
> > > > I'm using
> > > > 
> > > > eval ` eldk-switch.sh -r 5.4 armv7a`
> > > > 
> > > > for cross-compilation.
> > > 
> > > Hmm I'm not seeing build issues with next-20180404, did this somehow
> > > already get sorted out?
> > 
> > It seems it is config-dependend. omap2plus_defconfig compiles ok for
> > me.
> > 
> > Can you try with attached .config?
> 
> That still builds for me. This with plain gcc-7.3.0 binutils-2.30
> built with buildall script.

Thanks.

Ok, let me try to bisect it. Compile-problem should be easy...

Hmm. And as it is compile-problem in single file, it should even be
reasonably fast. I did not realize how easy it would be:

#!/bin/bash
set -e
cp config.ok .config
yes '' | ARCH=arm make lib/string.o

And the winner is:

ee333554fed55555a986a90bb097ac7f9d6f05bf is the first bad commit
commit ee333554fed55555a986a90bb097ac7f9d6f05bf
Author: Jinbum Park <jinb.park7@gmail.com>
Date:   Tue Mar 6 01:39:24 2018 +0100

    ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE

    CONFIG_FORTIFY_SOURCE detects various overflows at compile-time.
        (6974f0c4555e ("include/linux/string.h:
    add the option of fortified string.h functions)
    
    ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built
    and
    run with CONFIG_FORTIFY_SOURCE.
    
    Since ARM can be built and run with that flag like other
    architectures,
    select ARCH_HAS_FORTIFY_SOURCE as default.
    
    Acked-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Jinbum Park <jinb.park7@gmail.com>
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

:040000 040000 2bff2f75ba36dd838a8ded3028b745d9f13f4c4a
									e61289e33a1fb71b1a6c05c442d45ea40bd5aba0
									M
									arch
bisect run success
pavel@duo:/data/l/linux-next-n900$ 


									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-04-04 20:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04  6:55 Stephen Rothwell
2018-04-04  7:48 ` ARM compile failure in " Pavel Machek
2018-04-04 17:58   ` Tony Lindgren
2018-04-04 18:15     ` Pavel Machek
2018-04-04 18:46     ` Pavel Machek
2018-04-04 19:59       ` Tony Lindgren
2018-04-04 20:18         ` Pavel Machek [this message]
2018-04-15 17:39           ` [regression v4.17-rc0] Re: FORTIFY_SOURCE breaks ARM compilation in -next -- was " Pavel Machek
2018-04-15 18:00             ` Kees Cook
2018-04-15 20:58               ` Pavel Machek
2018-04-20  7:34               ` Pavel Machek
2018-04-20 15:05                 ` Kees Cook
2018-04-20 17:21                   ` Russell King - ARM Linux
2018-04-20 19:15                   ` Pavel Machek
2018-04-20 19:18                     ` Daniel Micay
2018-04-20 19:28                       ` Pavel Machek
2018-04-20 19:30                         ` Daniel Micay
2018-04-20 20:30                           ` Pavel Machek
2018-04-04  7:50 ` x32 suspend failuer " Pavel Machek
2018-04-04  7:58   ` Rafael J. Wysocki
2018-04-04  8:49     ` Pavel Machek
2018-04-05 12:25       ` update-binfmts breaking suspend was " Pavel Machek
2018-04-05 20:30         ` Pavel Machek
2018-04-05 22:27           ` Rafael J. Wysocki
     [not found]           ` <SN4PR2101MB073673B12998428D48DA62E5CBBA0@SN4PR2101MB0736.namprd21.prod.outlook.com>
     [not found]             ` <20180406144355.GA20605@bombadil.infradead.org>
2018-04-11  4:30               ` update-binfmts breaking suspend Matthew Wilcox
2018-04-11  6:09                 ` Pavel Machek
2018-04-06 22:41   ` x32 suspend failuer in Re: linux-next: Tree for Apr 4 Pavel Machek

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=20180404201837.GA9710@amd \
    --to=pavel@ucw.cz \
    --cc=aaro.koskinen@iki.fi \
    --cc=abcloriens@gmail.com \
    --cc=clayton@craftyguy.net \
    --cc=filip.matijevic.pz@gmail.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=jinb.park7@gmail.com \
    --cc=keescook@chromium.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=martijn@brixit.nl \
    --cc=pali.rohar@gmail.com \
    --cc=patrikbachan@gmail.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=sakari.ailus@linux.intel.com \
    --cc=serge@hallyn.com \
    --cc=sfr@canb.auug.org.au \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    --subject='FORTIFY_SOURCE breaks ARM compilation in -next -- was Re: ARM compile failure in Re: linux-next: Tree for Apr 4' \
    /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

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).