linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Kees Cook <keescook@chromium.org>
Cc: Dmitry Vyukov <dvyukov@google.com>,
	akpm@linux-foundation.org, andreyknvl@google.com,
	kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, Marco Elver <elver@google.com>
Subject: Re: [PATCH] kcov: don't instrument with UBSAN
Date: Thu, 10 Dec 2020 08:49:50 +1100	[thread overview]
Message-ID: <20201210084950.208c89ba@canb.auug.org.au> (raw)
In-Reply-To: <202012091054.08D70D4F@keescook>

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

Hi all,

On Wed, 9 Dec 2020 10:54:39 -0800 Kees Cook <keescook@chromium.org> wrote:
>
> On Wed, Dec 09, 2020 at 11:01:52AM +0100, Dmitry Vyukov wrote:
> > Both KCOV and UBSAN use compiler instrumentation. If UBSAN detects a bug
> > in KCOV, it may cause infinite recursion via printk and other common
> > functions. We already don't instrument KCOV with KASAN/KCSAN for this
> > reason, don't instrument it with UBSAN as well.
> > 
> > As a side effect this also resolves the following gcc warning:
> > 
> > conflicting types for built-in function '__sanitizer_cov_trace_switch';
> > expected 'void(long unsigned int,  void *)' [-Wbuiltin-declaration-mismatch]
> > 
> > It's only reported when kcov.c is compiled with any of the sanitizers
> > enabled. Size of the arguments is correct, it's just that gcc uses 'long'
> > on 64-bit arches and 'long long' on 32-bit arches, while kernel type is
> > always 'long long'.
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Suggested-by: Marco Elver <elver@google.com>
> > Signed-off-by: Dmitry Vyukov <dvyukov@google.com>  
> 
> Reviewed-by: Kees Cook <keescook@chromium.org>
> 
> Thanks for chasing this down!
> 
> Andrew, can you add this to the stack of ubsan patches you're carrying,
> please?

Added to linux-next today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2020-12-09 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 10:01 [PATCH] kcov: don't instrument with UBSAN Dmitry Vyukov
2020-12-09 10:50 ` Marco Elver
2020-12-09 13:51 ` Andrey Konovalov
2020-12-09 18:54 ` Kees Cook
2020-12-09 21:49   ` Stephen Rothwell [this message]

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=20201210084950.208c89ba@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).