linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, fmdefrancesco@gmail.com,
	ebiederm@xmission.com, Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>, ira.weiny@intel.com
Subject: Re: [PATCH v2] fs: Call kmap_local_page() in copy_string_kernel()
Date: Wed, 27 Jul 2022 14:13:44 -0700	[thread overview]
Message-ID: <165895642099.601089.13587838249930753502.b4-ty@chromium.org> (raw)
In-Reply-To: <20220724212523.13317-1-fmdefrancesco@gmail.com>

On Sun, 24 Jul 2022 23:25:23 +0200, Fabio M. De Francesco wrote:
> The use of kmap_atomic() is being deprecated in favor of kmap_local_page().
> 
> With kmap_local_page(), the mappings are per thread, CPU local and not
> globally visible. Furthermore, the mappings can be acquired from any
> context (including interrupts).
> 
> Therefore, replace kmap_atomic() with kmap_local_page() in
> copy_string_kernel(). Instead of open-coding local mapping + memcpy(),
> use memcpy_to_page(). Delete a redundant call to flush_dcache_page().
> 
> [...]

Applied to for-next/execve, thanks!

[1/1] fs: Call kmap_local_page() in copy_string_kernel()
      https://git.kernel.org/kees/c/0ff95c390bc8

-- 
Kees Cook



      reply	other threads:[~2022-07-27 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 21:25 Fabio M. De Francesco
2022-07-27 21:13 ` Kees Cook [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=165895642099.601089.13587838249930753502.b4-ty@chromium.org \
    --to=keescook@chromium.org \
    --cc=ebiederm@xmission.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    /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