Skip to content

Commit 722926e

Browse files
hcahcaAlexander Gordeev
authored andcommitted
s390/extable: Rename EX_TABLE_UA_STORE to EX_TABLE_UA_FAULT
Rename EX_TABLE_UA_STORE to a more generic EX_TABLE_UA_FAULT name. This allows to use the extable type also for uaccess inline assemblies which read from userspace, without causing confusion. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
1 parent 836968f commit 722926e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

arch/s390/include/asm/asm-extable.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define EX_TYPE_NONE 0
1010
#define EX_TYPE_FIXUP 1
1111
#define EX_TYPE_BPF 2
12-
#define EX_TYPE_UA_STORE 3
12+
#define EX_TYPE_UA_FAULT 3
1313
#define EX_TYPE_UA_LOAD_MEM 4
1414
#define EX_TYPE_UA_LOAD_REG 5
1515
#define EX_TYPE_UA_LOAD_REGPAIR 6
@@ -70,8 +70,8 @@
7070
#define EX_TABLE_AMODE31(_fault, _target) \
7171
__EX_TABLE(.amode31.ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
7272

73-
#define EX_TABLE_UA_STORE(_fault, _target, _regerr) \
74-
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_STORE, _regerr, _regerr, 0)
73+
#define EX_TABLE_UA_FAULT(_fault, _target, _regerr) \
74+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_FAULT, _regerr, _regerr, 0)
7575

7676
#define EX_TABLE_UA_LOAD_MEM(_fault, _target, _regerr, _regmem, _len) \
7777
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_MEM, _regerr, _regmem, _len)

arch/s390/include/asm/uaccess.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ __put_user_##type##_noinstr(unsigned type __user *to, \
103103
"0: mvcos %[_to],%[_from],%[_size]\n" \
104104
"1: xr %[rc],%[rc]\n" \
105105
"2:\n" \
106-
EX_TABLE_UA_STORE(0b, 2b, %[rc]) \
107-
EX_TABLE_UA_STORE(1b, 2b, %[rc]) \
106+
EX_TABLE_UA_FAULT(0b, 2b, %[rc]) \
107+
EX_TABLE_UA_FAULT(1b, 2b, %[rc]) \
108108
: [rc] "=&d" (rc), [_to] "+Q" (*(to)) \
109109
: [_size] "d" (size), [_from] "Q" (*(from)), \
110110
[spec] "d" (__oac_spec.val) \
@@ -351,8 +351,8 @@ int __noreturn __put_kernel_bad(void);
351351
"0: " insn " %[_val],%[_to]\n" \
352352
"1: xr %[rc],%[rc]\n" \
353353
"2:\n" \
354-
EX_TABLE_UA_STORE(0b, 2b, %[rc]) \
355-
EX_TABLE_UA_STORE(1b, 2b, %[rc]) \
354+
EX_TABLE_UA_FAULT(0b, 2b, %[rc]) \
355+
EX_TABLE_UA_FAULT(1b, 2b, %[rc]) \
356356
: [rc] "=d" (__rc), [_to] "+Q" (*(to)) \
357357
: [_val] "d" (val) \
358358
: "cc"); \

arch/s390/mm/extable.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static bool ex_handler_fixup(const struct exception_table_entry *ex, struct pt_r
2727
return true;
2828
}
2929

30-
static bool ex_handler_ua_store(const struct exception_table_entry *ex, struct pt_regs *regs)
30+
static bool ex_handler_ua_fault(const struct exception_table_entry *ex, struct pt_regs *regs)
3131
{
3232
unsigned int reg_err = FIELD_GET(EX_DATA_REG_ERR, ex->data);
3333

@@ -97,8 +97,8 @@ bool fixup_exception(struct pt_regs *regs)
9797
return ex_handler_fixup(ex, regs);
9898
case EX_TYPE_BPF:
9999
return ex_handler_bpf(ex, regs);
100-
case EX_TYPE_UA_STORE:
101-
return ex_handler_ua_store(ex, regs);
100+
case EX_TYPE_UA_FAULT:
101+
return ex_handler_ua_fault(ex, regs);
102102
case EX_TYPE_UA_LOAD_MEM:
103103
return ex_handler_ua_load_mem(ex, regs);
104104
case EX_TYPE_UA_LOAD_REG:

0 commit comments

Comments
 (0)