lkml.org 
[lkml]   [2020]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectclean up and streamline probe_kernel_* and friends v3
Date
Hi all,

this series start cleaning up the safe kernel and user memory probing
helpers in mm/maccess.c, and then allows architectures to implement
the kernel probing without overriding the address space limit and
temporarily allowing access to user memory. It then switches x86
over to this new mechanism by reusing the unsafe_* uaccess logic.

This version also switches to the saner copy_{from,to}_kernel_nofault
naming suggested by Linus.

I kept the x86 helprs as-is without calling unsage_{get,put}_user as
that avoids a number of hard to trace casts, and it will still work
with the asm-goto based version easily.

Changes since v2:
- rebased on 5.7-rc6 with the bpf trace format string changes
- rename arch_kernel_read to __get_kernel_nofault and arch_kernel_write
to __put_kernel_nofault
- clean up the tracers to only allowd "mixed" reads when the kernel
has non-overlapping address spaces

\
 
 \ /
  Last update: 2020-05-19 15:47    [W:0.509 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site