lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <81544837-6e2b-4a75-a6d9-595128519447@tenstorrent.com>
Date: Wed, 19 Mar 2025 12:56:10 +1100
From: Cyril Bur <cyrilbur@...storrent.com>
To: palmer@...belt.com, aou@...s.berkeley.edu, paul.walmsley@...ive.com,
 charlie@...osinc.com, jrtc27@...c27.com, ben.dooks@...ethink.co.uk,
 alex@...ti.fr
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
 jszhang@...nel.org
Subject: Re: [PATCH v4 0/5] riscv: uaccess: optimizations



On 18/3/2025 5:15 pm, Cyril Bur wrote:
> This series tries to optimize riscv uaccess by allowing the use of
> user_access_begin() and user_access_end() which permits grouping user accesses
> and avoiding the CSR write penalty for each access.
> 
> The error path can also be optimised using asm goto which patches 3 and 4
> achieve. This will speed up jumping to labels by avoiding the need of an
> intermediary error type variable within the uaccess macros
> 
> I did read the discussion this series generated. It isn't clear to me
> which direction to take the patches, if any.
> 
> V2:
> I've taken on this series as there isn't any response from Jisheng. No
> significant changes other than build fixes.
> - Fixes build breakage in patch 3 to do with not having used 'goto' keyword.
> - Fixes build breakage in patch 4 on 32bit not having delcared __ptr in the
>    macro.
> 
> V3:
> Significant commit message rewrites.
>   - Corrected the justification for patch 2
>   - Better explained/justified patches 3 and 4
> Minor code changes for legibility and more comments
> 
> V4:
> Fixed checkpatch errors
> Added a unsafe_copy_from_user()
> Added patch from Ben Dooks to save SR_SUM bit on switch

There is something uniquely wrong with V4 (not sure of the cause yet). I 
will send a new version.

> 
> Ben Dooks (1):
>    riscv: save the SR_SUM status over switches
> 
> 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/processor.h |   1 +
>   arch/riscv/include/asm/uaccess.h   | 218 ++++++++++++++++++++++-------
>   arch/riscv/kernel/asm-offsets.c    |   5 +
>   arch/riscv/kernel/entry.S          |   8 ++
>   4 files changed, 179 insertions(+), 53 deletions(-)
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ