[PATCH v2 2/4] riscv: uaccess: use input constraints for ptr of __put_user

Charlie Jenkins charlie at rivosinc.com
Fri Jan 17 15:23:43 PST 2025


On Mon, Nov 18, 2024 at 11:01:10PM +0000, Cyril Bur wrote:
> From: Jisheng Zhang <jszhang at kernel.org>
> 
> I believe the output constraints "=m" is not necessary, because
> the instruction itself is "write", we don't need the compiler
> to "write" for us. So tell compiler we read from memory instead
> of writing.
> 
> Signed-off-by: Jisheng Zhang <jszhang at kernel.org>
> Signed-off-by: Cyril Bur <cyrilbur at tenstorrent.com>

Reviewed-by: Charlie Jenkins <charlie at rivosinc.com>
Tested-by: Charlie Jenkins <charlie at rivosinc.com>




More information about the linux-riscv mailing list