mbox series

[v2,0/3] arm64: Use memory copy instructions in usercopy routines

Message ID 20250228170006.390100-1-kristina.martsenko@arm.com (mailing list archive)
Headers show
Series arm64: Use memory copy instructions in usercopy routines | expand

Message

Kristina Martšenko Feb. 28, 2025, 5 p.m. UTC
Hi,

This is a follow-up to the series using CPY/SET instructions in the kernel's
memory copy routines [1]. This series extends that to the usercopy routines.
This required some additions to exception fixups since a CPY instruction
accesses both user and kernel memory.

Changes in v2:
 - Improved readability of cpy_faulted_on_uaccess()
 - v1: https://lore.kernel.org/all/20250218171430.28227-1-kristina.martsenko@arm.com/

Note that this conflicts with Tong's series [2].

Thanks,
Kristina

[1] https://lore.kernel.org/all/20240930161051.3777828-1-kristina.martsenko@arm.com/
[2] https://lore.kernel.org/all/20241209024257.3618492-1-tongtiangen@huawei.com/


Kristina Martšenko (3):
  arm64: extable: Add fixup handling for uaccess CPY* instructions
  arm64: mm: Handle PAN faults on uaccess CPY* instructions
  arm64: lib: Use MOPS for usercopy routines

 arch/arm64/include/asm/asm-extable.h | 10 +++++++-
 arch/arm64/include/asm/asm-uaccess.h |  4 ++++
 arch/arm64/include/asm/extable.h     |  5 +++-
 arch/arm64/lib/clear_user.S          | 25 +++++++++++++++----
 arch/arm64/lib/copy_from_user.S      | 10 ++++++++
 arch/arm64/lib/copy_template.S       | 10 ++++++++
 arch/arm64/lib/copy_to_user.S        | 10 ++++++++
 arch/arm64/mm/extable.c              | 36 +++++++++++++++++++++++++++-
 arch/arm64/mm/fault.c                |  6 +++--
 9 files changed, 107 insertions(+), 9 deletions(-)


base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6