/Linux-v6.1/kernel/ |
D | rseq.c | 123 static int rseq_get_rseq_cs(struct task_struct *t, struct rseq_cs *rseq_cs) in rseq_get_rseq_cs() argument 125 struct rseq_cs __user *urseq_cs; in rseq_get_rseq_cs() 132 if (get_user(ptr, &t->rseq->rseq_cs)) in rseq_get_rseq_cs() 135 if (copy_from_user(&ptr, &t->rseq->rseq_cs, sizeof(ptr))) in rseq_get_rseq_cs() 139 memset(rseq_cs, 0, sizeof(*rseq_cs)); in rseq_get_rseq_cs() 144 urseq_cs = (struct rseq_cs __user *)(unsigned long)ptr; in rseq_get_rseq_cs() 145 if (copy_from_user(rseq_cs, urseq_cs, sizeof(*rseq_cs))) in rseq_get_rseq_cs() 148 if (rseq_cs->start_ip >= TASK_SIZE || in rseq_get_rseq_cs() 149 rseq_cs->start_ip + rseq_cs->post_commit_offset >= TASK_SIZE || in rseq_get_rseq_cs() 150 rseq_cs->abort_ip >= TASK_SIZE || in rseq_get_rseq_cs() [all …]
|
/Linux-v6.1/tools/testing/selftests/rseq/ |
D | rseq-arm.h | 115 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 118 "str r0, %[" __rseq_str(rseq_cs) "]\n\t" \ 163 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpeqv_storev() 186 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_storev() 231 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpnev_storeoffp_load() 257 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpnev_storeoffp_load() 301 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_addv() 319 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_addv() 358 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpeqv_trystorev_storev() 384 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-ppc.h | 70 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 77 "std %%r17, %[" __rseq_str(rseq_cs) "]\n\t" \ 130 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 134 RSEQ_STORE_INT(rseq_cs) "%%r17, %[" __rseq_str(rseq_cs) "]\n\t" \ 225 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_cmpeqv_storev() 245 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_storev() 290 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_cmpnev_storeoffp_load() 316 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpnev_storeoffp_load() 360 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_addv() 379 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_addv() [all …]
|
D | rseq-riscv.h | 87 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 90 REG_S RSEQ_ASM_TMP_REG_1 ", %[" __rseq_str(rseq_cs) "]\n" \ 183 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_cmpeqv_storev() 198 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_storev() 237 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_cmpnev_storeoffp_load() 255 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpnev_storeoffp_load() 291 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_addv() 305 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_addv() 339 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_cmpeqv_trystorev_storev() 356 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-mips.h | 121 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 124 LONG_S " $4, %[" __rseq_str(rseq_cs) "]\n\t" \ 170 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpeqv_storev() 191 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_storev() 231 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpnev_storeoffp_load() 255 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpnev_storeoffp_load() 294 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_addv() 312 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_addv() 348 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpeqv_trystorev_storev() 372 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-s390.h | 111 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 114 LONG_S " %%r0, %[" __rseq_str(rseq_cs) "]\n\t" \ 150 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_cmpeqv_storev() 169 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_storev() 218 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_cmpnev_storeoffp_load() 242 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpnev_storeoffp_load() 286 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_addv() 302 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_addv() 342 RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) in rseq_cmpeqv_trystorev_storev() 364 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-arm64.h | 127 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 132 " str " RSEQ_ASM_TMP_REG ", %[" __rseq_str(rseq_cs) "]\n" \ 219 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_cmpeqv_storev() 234 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_storev() 277 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_cmpnev_storeoffp_load() 295 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpnev_storeoffp_load() 336 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_addv() 350 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_addv() 387 RSEQ_ASM_STORE_RSEQ_CS(2, 1b, rseq_cs) in rseq_cmpeqv_trystorev_storev() 404 [rseq_cs] "m" (rseq_get_abi()->rseq_cs.arch.ptr), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-abi.h | 128 } rseq_cs; member
|
D | rseq.h | 158 RSEQ_WRITE_ONCE(rseq_get_abi()->rseq_cs.arch.ptr, 0); in rseq_clear_rseq_cs()
|
D | rseq-x86.h | 87 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 90 "movq %%rax, " __rseq_str(rseq_cs) "\n\t" \ 697 #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ argument 699 "movl $" __rseq_str(cs_label) ", " __rseq_str(rseq_cs) "\n\t" \
|
/Linux-v6.1/include/uapi/linux/ |
D | rseq.h | 45 struct rseq_cs { struct 112 __u64 rseq_cs; member
|