Skip to content

Commit a389e54

Browse files
committed
Merge tag 'riscv-for-linus-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Palmer Dabbelt: - use the correct mask for c.jr/c.jalr when decoding instructions - build fix for get_user() to avoid a sparse warning * tag 'riscv-for-linus-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: uaccess: fix type of 0 variable on error in get_user() riscv, kprobes: Stricter c.jr/c.jalr decoding
2 parents 56f8145 + b9b916a commit a389e54

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/riscv/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ do { \
165165
might_fault(); \
166166
access_ok(__p, sizeof(*__p)) ? \
167167
__get_user((x), __p) : \
168-
((x) = 0, -EFAULT); \
168+
((x) = (__force __typeof__(x))0, -EFAULT); \
169169
})
170170

171171
#define __put_user_asm(insn, x, ptr, err) \

arch/riscv/kernel/probes/simulate-insn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ __RISCV_INSN_FUNCS(fence, 0x7f, 0x0f);
3131
} while (0)
3232

3333
__RISCV_INSN_FUNCS(c_j, 0xe003, 0xa001);
34-
__RISCV_INSN_FUNCS(c_jr, 0xf007, 0x8002);
34+
__RISCV_INSN_FUNCS(c_jr, 0xf07f, 0x8002);
3535
__RISCV_INSN_FUNCS(c_jal, 0xe003, 0x2001);
36-
__RISCV_INSN_FUNCS(c_jalr, 0xf007, 0x9002);
36+
__RISCV_INSN_FUNCS(c_jalr, 0xf07f, 0x9002);
3737
__RISCV_INSN_FUNCS(c_beqz, 0xe003, 0xc001);
3838
__RISCV_INSN_FUNCS(c_bnez, 0xe003, 0xe001);
3939
__RISCV_INSN_FUNCS(c_ebreak, 0xffff, 0x9002);

0 commit comments

Comments
 (0)