[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mhng-de264348-59f7-46b4-9f6c-cecee67f2eda@palmer-ri-x1c9>
Date: Wed, 24 Jul 2024 15:57:28 -0700 (PDT)
From: Palmer Dabbelt <palmer@...belt.com>
To: jszhang@...nel.org
CC: Paul Walmsley <paul.walmsley@...ive.com>, aou@...s.berkeley.edu,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] riscv: uaccess: optimizations
On Mon, 24 Jun 2024 21:04:56 PDT (-0700), jszhang@...nel.org wrote:
> This series tries to optimize riscv uaccess in the following way:
>
> patch1 implement the user_access_begin and families, I.E the unsafe
> accessors. when a function like strncpy_from_user() is called,
> the userspace access protection is disabled and enabled for every
> word read. After patch1, the protection is disabled at the beginning
> of the copy and enabled at the end.
>
> patch2 is a simple clean up
>
> patch3 uses 'asm goto' for put_user()
> patch4 uses 'asm goto output' for get_user()
>
> Both patch3 and patch4 are based on the fact -- 'asm goto' and
> 'asm goto output'generates noticeably better code since we don't need
> to test the error etc, the exception just jumps to the error handling
> directly.
>
>
> Jisheng Zhang (4):
> riscv: implement user_access_begin and families
> riscv: uaccess: use input constraints for ptr of __put_user
> riscv: uaccess: use 'asm goto' for put_user()
> riscv: uaccess: use 'asm goto output' for get_user
>
> arch/riscv/include/asm/uaccess.h | 201 +++++++++++++++++++++++--------
> 1 file changed, 149 insertions(+), 52 deletions(-)
This genreally looks good to me, but there's some failures reported by
the LKP tester and I don't think they're spurious.
Powered by blists - more mailing lists