linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Sabyrzhan Tasbolatov" <snovitoll@gmail.com>,
	"Andrey Konovalov" <andreyknvl@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Dmitry Vyukov" <dvyukov@google.com>,
	"Marco Elver" <elver@google.com>,
	"Alexander Potapenko" <glider@google.com>,
	"Christoph Hellwig" <hch@infradead.org>,
	kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, "Andrey Ryabinin" <ryabinin.a.a@gmail.com>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>
Subject: Re: [PATCH v2] mm: unexport globally copy_to_kernel_nofault
Date: Sun, 22 Jun 2025 19:44:29 +0200	[thread overview]
Message-ID: <8ab6c624-28a1-47b9-93fc-190719c06727@app.fastmail.com> (raw)
In-Reply-To: <20250622141142.79332-1-snovitoll@gmail.com>

On Sun, Jun 22, 2025, at 16:11, Sabyrzhan Tasbolatov wrote:
> `copy_to_kernel_nofault()` is an internal helper which should not be
> visible to loadable modules – exporting it would give exploit code a
> cheap oracle to probe kernel addresses.  Instead, keep the helper
> un-exported and compile the kunit case that exercises it only when
> `mm/kasan/kasan_test.o` is linked into vmlinux.
>
> Fixes: ca79a00bb9a8 ("kasan: migrate copy_user_test to kunit")
> Suggested-by: Christoph Hellwig <hch@infradead.org>
> Suggested-by: Marco Elver <elver@google.com>
> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
> Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>


  reply	other threads:[~2025-06-22 17:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-22  5:19 [PATCH] " Sabyrzhan Tasbolatov
2025-06-22 13:00 ` Andrey Konovalov
2025-06-22 14:11   ` [PATCH v2] " Sabyrzhan Tasbolatov
2025-06-22 17:44     ` Arnd Bergmann [this message]
2025-06-22 18:20     ` Andrew Morton
2025-06-22 19:09       ` Sabyrzhan Tasbolatov
2025-06-22 23:45         ` Andrey Konovalov
2025-06-23  8:09     ` David Hildenbrand

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=8ab6c624-28a1-47b9-93fc-190719c06727@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=david@redhat.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=hch@infradead.org \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=snovitoll@gmail.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