public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
	kasan-dev@googlegroups.com, Marco Elver <elver@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Alexander Potapenko <glider@google.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Borislav Petkov <bp@suse.de>,
	Miroslav Benes <mbenes@suse.cz>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Sathvika Vasireddy <sv@linux.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] objdump: add UACCESS exception for more stringops
Date: Wed, 8 Feb 2023 19:09:42 +0100	[thread overview]
Message-ID: <Y+PlZi8mrHray92j@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230208164011.2287122-3-arnd@kernel.org>

On Wed, Feb 08, 2023 at 05:39:57PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The memset/memmove/memcpy string functions are wrapped in different
> ways based on configuration. While the __asan_mem* functions already
> have exceptions, the ones called from those do not:
> 
> mm/kasan/shadow.o: warning: objtool: __asan_memset+0x30: call to __memset() with UACCESS enabled
> mm/kasan/shadow.o: warning: objtool: __asan_memmove+0x51: call to __memmove() with UACCESS enabled
> mm/kasan/shadow.o: warning: objtool: __asan_memcpy+0x51: call to __memcpy() with UACCESS enabled
> vmlinux.o: warning: objtool: .altinstr_replacement+0x1406: call to memcpy_erms() with UACCESS enabled
> vmlinux.o: warning: objtool: .altinstr_replacement+0xed0: call to memset_erms() with UACCESS enabled
> vmlinux.o: warning: objtool: memset+0x4: call to memset_orig() with UACCESS enabled
> vmlinux.o: warning: objtool: memset+0x4: call to memset_orig() with UACCESS enabled
> 
> Add these to the list as well.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  tools/objtool/check.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index 0f67c6a8bc98..e8fb3bf7a2e3 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -1248,6 +1248,13 @@ static const char *uaccess_safe_builtin[] = {
>  	"clear_user_erms",
>  	"clear_user_rep_good",
>  	"clear_user_original",
> +	"__memset",
> +	"__memcpy",
> +	"__memmove",
> +	"memset_erms",
> +	"memcpy_erms",
> +	"memset_orig",
> +	"memcpy_orig",
>  	NULL
>  };

Hmm, I wanted to go the other way and remove __asan_mem*.

  https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=sched/core-robot&id=79cdfdacd5b8d1ac77e24ccbc178bba0294d0d78



  reply	other threads:[~2023-02-08 18:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
2023-02-08 16:39 ` [PATCH 2/4] kmsan: disable ftrace in kmsan core code Arnd Bergmann
2023-02-08 17:00   ` Marco Elver
2023-02-08 19:31     ` Arnd Bergmann
2023-02-09 15:42       ` Alexander Potapenko
2023-02-08 16:39 ` [PATCH 3/4] objdump: add UACCESS exception for more stringops Arnd Bergmann
2023-02-08 18:09   ` Peter Zijlstra [this message]
2023-02-08 19:27     ` Arnd Bergmann
2023-02-08 16:39 ` [PATCH 4/4] objtool: add UACCESS exceptions for __tsan_volatile_read/write Arnd Bergmann
2023-02-08 16:59   ` Marco Elver
2023-02-08 19:53     ` Arnd Bergmann
2023-02-08 20:10       ` Marco Elver
2023-02-08 17:01 ` [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Marco Elver
2023-02-08 18:10 ` Peter Zijlstra
2023-02-09 19:26 ` Josh Poimboeuf
2023-02-09 22:21 ` Andrey Konovalov

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=Y+PlZi8mrHray92j@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=andreyknvl@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bp@suse.de \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=jpoimboe@kernel.org \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mpe@ellerman.id.au \
    --cc=ryabinin.a.a@gmail.com \
    --cc=sv@linux.ibm.com \
    --cc=vincenzo.frascino@arm.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