public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Michal Marek <mmarek@suse.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Yang Shi <yang.shi@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] ubsan: allow to disable the null sanitizer
Date: Tue, 13 Sep 2016 08:46:22 +0200	[thread overview]
Message-ID: <20160913064622.GA4047@osiris> (raw)
In-Reply-To: <1473683840-8700-2-git-send-email-borntraeger@de.ibm.com>

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 <borntraeger@de.ibm.com>
> ---
>  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!

  reply	other threads:[~2016-09-13  6:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 12:37 [PATCH 0/2] ubsan for s390 Christian Borntraeger
2016-09-12 12:37 ` [PATCH 1/2] ubsan: allow to disable the null sanitizer Christian Borntraeger
2016-09-13  6:46   ` Heiko Carstens [this message]
2016-09-12 12:37 ` [PATCH 2/2] s390/ubsan: enable UBSAN for s390 Christian Borntraeger
2016-09-12 16:38 ` [PATCH 0/2] ubsan " Andrey Ryabinin

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=20160913064622.GA4047@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=borntraeger@de.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=yang.shi@linaro.org \
    /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