mbox series

[0/3] arm64: Usercopy refresh

Message ID cover.1664363162.git.robin.murphy@arm.com (mailing list archive)
Headers show
Series arm64: Usercopy refresh | expand

Message

Robin Murphy Sept. 28, 2022, 11:58 a.m. UTC
Hi all,

With the troublesome copy_in_user() now long gone, it's finally time for
some less-worse usercopy routines! Beyond just improving on the mangled
old code, this is also spurred on by Mark's ongoing work on exception
handling, off the back of which we had some ideas around making uaccess
fixups neater. Those can be explored in due course, but getting the last
of the old cruft out of the way first should help make it easier. For
now I've held off on clever macro stuff and stuck with hand-rolled
labels and explicit annotations which do bump the line count up a fair
bit, but in the hope of keeping the code itself more readable for
review.

Thanks,
Robin.


Robin Murphy (3):
  arm64: Update copy_from_user()
  arm64: Update copy_to_user()
  arm64: Garbage-collect usercopy leftovers

 arch/arm64/include/asm/asm-uaccess.h |  30 --
 arch/arm64/lib/copy_from_user.S      | 274 +++++++++++++++----
 arch/arm64/lib/copy_template.S       | 181 -------------
 arch/arm64/lib/copy_to_user.S        | 391 +++++++++++++++++++++++----
 4 files changed, 564 insertions(+), 312 deletions(-)
 delete mode 100644 arch/arm64/lib/copy_template.S

Comments

Will Deacon Nov. 7, 2022, 7:08 p.m. UTC | #1
On Wed, 28 Sep 2022 12:58:50 +0100, Robin Murphy wrote:
> With the troublesome copy_in_user() now long gone, it's finally time for
> some less-worse usercopy routines! Beyond just improving on the mangled
> old code, this is also spurred on by Mark's ongoing work on exception
> handling, off the back of which we had some ideas around making uaccess
> fixups neater. Those can be explored in due course, but getting the last
> of the old cruft out of the way first should help make it easier. For
> now I've held off on clever macro stuff and stuck with hand-rolled
> labels and explicit annotations which do bump the line count up a fair
> bit, but in the hope of keeping the code itself more readable for
> review.
> 
> [...]

Applied to arm64 (for-next/uaccess), thanks!

[1/3] arm64: Update copy_from_user()
      https://git.kernel.org/arm64/c/02f7a8ee7a27
[2/3] arm64: Update copy_to_user()
      https://git.kernel.org/arm64/c/c1dd028491d1
[3/3] arm64: Garbage-collect usercopy leftovers
      https://git.kernel.org/arm64/c/72a11ee6f013

Cheers,