From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753707AbdLGMzQ (ORCPT ); Thu, 7 Dec 2017 07:55:16 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49908 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753625AbdLGMzN (ORCPT ); Thu, 7 Dec 2017 07:55:13 -0500 Date: Thu, 7 Dec 2017 13:55:07 +0100 From: Martin Schwidefsky To: Michal Suchanek Cc: Heiko Carstens , Marcelo Henrique Cerri , Greg Kroah-Hartman , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390/decompressor: add fortify_panic as x86 has. In-Reply-To: <20171207103727.9461-1-msuchanek@suse.de> References: <20171207103727.9461-1-msuchanek@suse.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17120712-0012-0000-0000-0000059666A9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120712-0013-0000-0000-000019116C2A Message-Id: <20171207135507.275c5809@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-07_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712070191 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Dec 2017 11:37:27 +0100 Michal Suchanek 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 > --- > 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. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.