From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754208AbcIMGqf (ORCPT ); Tue, 13 Sep 2016 02:46:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55251 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752563AbcIMGqa (ORCPT ); Tue, 13 Sep 2016 02:46:30 -0400 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: heiko.carstens@de.ibm.com X-IBM-RcptTo: linux-kbuild@vger.kernel.org;linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org Date: Tue, 13 Sep 2016 08:46:22 +0200 From: Heiko Carstens To: Christian Borntraeger Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Martin Schwidefsky , Michal Marek , Andrey Ryabinin , Yang Shi , Andrew Morton Subject: Re: [PATCH 1/2] ubsan: allow to disable the null sanitizer References: <1473683840-8700-1-git-send-email-borntraeger@de.ibm.com> <1473683840-8700-2-git-send-email-borntraeger@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473683840-8700-2-git-send-email-borntraeger@de.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16091306-0036-0000-0000-0000022872F5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16091306-0037-0000-0000-0000126D693F Message-Id: <20160913064622.GA4047@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-13_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609130099 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 12, 2016 at 02:37:19PM +0200, Christian Borntraeger wrote: > Some architectures use a hardware defined struct at address zero. > Checking for a null pointer will result in many ubsan reports. > Let users disable the null sanitizer. > > Signed-off-by: Christian Borntraeger > --- > lib/Kconfig.ubsan | 11 +++++++++++ > scripts/Makefile.ubsan | 5 ++++- > 2 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan > index 39494af..851c3f2 100644 > --- a/lib/Kconfig.ubsan > +++ b/lib/Kconfig.ubsan > @@ -1,6 +1,9 @@ > config ARCH_HAS_UBSAN_SANITIZE_ALL > bool > > +config ARCH_WANTS_UBSAN_NO_NULL > + def_bool n > + > config UBSAN > bool "Undefined behaviour sanity checker" > help > @@ -34,3 +37,11 @@ config UBSAN_ALIGNMENT > This option enables detection of unaligned memory accesses. > Enabling this option on architectures that support unaligned > accesses may produce a lot of false positives. > + > +config UBSAN_NULL > + bool "Enable checking of null pointers" > + depends on UBSAN > + default y if UBSAN && !ARCH_WANTS_UBSAN_NO_NULL I removed the not needed UBSAN from the "default y" and applied both patches to the s390 tree. Thanks!