diff options
| author | Jisheng Zhang <[email protected]> | 2025-04-10 07:05:24 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2025-05-08 17:01:00 +0000 |
| commit | 62135bf660b2c3887e22f33d3adbefedb4dc9c7a (patch) | |
| tree | fb5d7d06864069075f24c8473087ffdfb2944e67 /lib/crypto/mpi/mpi-cmp.c | |
| parent | riscv: implement user_access_begin() and families (diff) | |
| download | kernel-62135bf660b2c3887e22f33d3adbefedb4dc9c7a.tar.gz kernel-62135bf660b2c3887e22f33d3adbefedb4dc9c7a.zip | |
riscv: uaccess: use input constraints for ptr of __put_user()
Putting ptr in the inputs as opposed to output may seem incorrect but
this is done for a few reasons:
- Not having it in the output permits the use of asm goto in a
subsequent patch. There are bugs in gcc [1] which would otherwise
prevent it.
- Since the output memory is userspace there isn't any real benefit from
telling the compiler about the memory clobber.
- x86, arm and powerpc all use this technique.
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 # 1
Signed-off-by: Jisheng Zhang <[email protected]>
[Cyril Bur: Rewritten commit message]
Signed-off-by: Cyril Bur <[email protected]>
Reviewed-by: Alexandre Ghiti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions
