mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Marcelo Henrique Cerri <marcelo.cerri@canonical.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/decompressor: add fortify_panic as x86 has.
Date: Mon, 11 Dec 2017 14:09:04 +0100	[thread overview]
Message-ID: <20171211140904.2f023b3c@kitsune.suse.cz> (raw)
In-Reply-To: <20171207135507.275c5809@mschwideX1>

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

Hello,

On Thu, 7 Dec 2017 13:55:07 +0100
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:

> On Thu,  7 Dec 2017 11:37:27 +0100
> Michal Suchanek <msuchanek@suse.de> wrote:
> 
> > Fix following error:
> > 
> >   LD      arch/s390/boot/compressed/vmlinux
> > drivers/s390/char/sclp_early_core.o: In function `memcpy':
> > ../include/linux/string.h:340: undefined reference to
> > `fortify_panic' make[4]: ***
> > [../arch/s390/boot/compressed/Makefile:29:
> > arch/s390/boot/compressed/vmlinux] Error 1
> > 
> > Fixes: 79962038dffa ("s390: add support for FORTIFY_SOURCE")
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > ---
> >  arch/s390/boot/compressed/misc.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/arch/s390/boot/compressed/misc.c
> > b/arch/s390/boot/compressed/misc.c index cecf38b9ec82..e79c4499c548
> > 100644 --- a/arch/s390/boot/compressed/misc.c
> > +++ b/arch/s390/boot/compressed/misc.c
> > @@ -174,3 +174,7 @@ unsigned long decompress_kernel(void)
> >  	return (unsigned long) output;
> >  }
> > 
> > +void fortify_panic(const char *name)
> > +{
> > +	error("detected buffer overflow");
> > +}  
> 
> Odd, the current linux master tree builds just fine with
> CONFIG_FORTIFY_SOURCE=y. There *is* a reference to fortify_panic in
> drivers/s390/char/sclp_early.o. This object is included in the link
> for the compressed vmlinux, but the function  that contains the call
> to fortify_panic is not included in the compressed image. I wonder
> what causes this difference in behavior.
> 
> The patch makes sense though and I will add it to the queue.
> 

It probably depends on the config.

FWIW attaching the config that fails to build for me.

Thanks

Michal

[-- Attachment #2: zfcpdump.xz --]
[-- Type: application/x-xz, Size: 7668 bytes --]

  reply	other threads:[~2017-12-11 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 10:37 Michal Suchanek
2017-12-07 12:55 ` Martin Schwidefsky
2017-12-11 13:09   ` Michal Suchánek [this message]
2017-12-13  8:33     ` Heiko Carstens
2017-12-20 14:09       ` Michal Suchánek

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=20171211140904.2f023b3c@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=marcelo.cerri@canonical.com \
    --cc=schwidefsky@de.ibm.com \
    /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

all inboxes | Powered by JetHome®