diff options
author | Fabio M. De Francesco <[email protected]> | 2022-07-24 23:25:23 +0200 |
---|---|---|
committer | Kees Cook <[email protected]> | 2022-07-27 14:15:09 -0700 |
commit | c6e8e36c6ae4b11bed5643317afb66b6c3cadba8 (patch) | |
tree | d00ed947848a3c17a423d1f0f7734858479716a3 /tools/perf/util/trace-event-scripting.c | |
parent | 5036793d7dbd0b14aec51526441a50b01c7bf66d (diff) |
exec: Call kmap_local_page() in copy_string_kernel()
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().
Tested with xfstests on a QEMU/ KVM x86_32 VM, 6GB RAM, booting a kernel
with HIGHMEM64GB enabled.
Suggested-by: Ira Weiny <[email protected]>
Signed-off-by: Fabio M. De Francesco <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions