summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2025-04-10 07:05:24 +0000
committerPalmer Dabbelt <palmer@rivosinc.com>2025-05-08 10:01:00 -0700
commit62135bf660b2c3887e22f33d3adbefedb4dc9c7a (patch)
treefb5d7d06864069075f24c8473087ffdfb2944e67 /scripts/lib
parent19500c6dbc5c348564a6513c801ab0889300565a (diff)
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 <jszhang@kernel.org> [Cyril Bur: Rewritten commit message] Signed-off-by: Cyril Bur <cyrilbur@tenstorrent.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20250410070526.3160847-4-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions