Le 03/04/2020 à 11:35, Nicholas Piggin a écrit :
There is no need to allow user accesses when probing kernel addresses.

I just discovered the following commit https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=75a1a607bb7e6d918be3aca11ec2214a275392f4

This commit adds probe_kernel_read_strict() and probe_kernel_write_strict().

When reading the commit log, I understand that probe_kernel_read() may be used to access some user memory. Which will not work anymore with your patch.

Isn't it probe_kernel_read_strict() and probe_kernel_write_strict() that you want to add ?


Signed-off-by: Nicholas Piggin <npig...@gmail.com>
---
v2:
- Enable for all powerpc (suggested by Christophe)
- Fold helper function together (Christophe)
- Rename uaccess.c to maccess.c to match kernel/maccess.c.

  arch/powerpc/include/asm/uaccess.h | 25 +++++++++++++++-------
  arch/powerpc/lib/Makefile          |  2 +-
  arch/powerpc/lib/maccess.c         | 34 ++++++++++++++++++++++++++++++

x86 does it in mm/maccess.c

  3 files changed, 52 insertions(+), 9 deletions(-)
  create mode 100644 arch/powerpc/lib/maccess.c


Christophe

Reply via email to