[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <165895642099.601089.13587838249930753502.b4-ty@chromium.org>
Date: Wed, 27 Jul 2022 14:13:44 -0700
From: Kees Cook <keescook@...omium.org>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, fmdefrancesco@...il.com,
ebiederm@...ssion.com, Al Viro <viro@...iv.linux.org.uk>
Cc: Kees Cook <keescook@...omium.org>, ira.weiny@...el.com
Subject: Re: [PATCH v2] fs: Call kmap_local_page() in copy_string_kernel()
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
Powered by blists - more mailing lists