Skip to content

Commit cb51761

Browse files
Tong Tiangenbp3tk0v
authored andcommitted
x86/extable: Remove unused fixup type EX_TYPE_COPY
After 034ff37 ("x86: rewrite '__copy_user_nocache' function") rewrote __copy_user_nocache() to use EX_TYPE_UACCESS instead of the EX_TYPE_COPY exception type, there are no more EX_TYPE_COPY users, so remove it. [ bp: Massage commit message. ] Signed-off-by: Tong Tiangen <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 62fbc01 commit cb51761

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

arch/x86/include/asm/asm.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,6 @@ register unsigned long current_stack_pointer asm(_ASM_SP);
229229
#define _ASM_EXTABLE_UA(from, to) \
230230
_ASM_EXTABLE_TYPE(from, to, EX_TYPE_UACCESS)
231231

232-
#define _ASM_EXTABLE_CPY(from, to) \
233-
_ASM_EXTABLE_TYPE(from, to, EX_TYPE_COPY)
234-
235232
#define _ASM_EXTABLE_FAULT(from, to) \
236233
_ASM_EXTABLE_TYPE(from, to, EX_TYPE_FAULT)
237234

arch/x86/include/asm/extable_fixup_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define EX_TYPE_DEFAULT 1
3737
#define EX_TYPE_FAULT 2
3838
#define EX_TYPE_UACCESS 3
39-
#define EX_TYPE_COPY 4
39+
/* unused, was: #define EX_TYPE_COPY 4 */
4040
#define EX_TYPE_CLEAR_FS 5
4141
#define EX_TYPE_FPU_RESTORE 6
4242
#define EX_TYPE_BPF 7

arch/x86/kernel/cpu/mce/severity.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ static noinstr int error_context(struct mce *m, struct pt_regs *regs)
290290

291291
switch (fixup_type) {
292292
case EX_TYPE_UACCESS:
293-
case EX_TYPE_COPY:
294293
if (!copy_user)
295294
return IN_KERNEL;
296295
m->kflags |= MCE_IN_KERNEL_COPYIN;

arch/x86/mm/extable.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ static bool ex_handler_uaccess(const struct exception_table_entry *fixup,
164164
return ex_handler_default(fixup, regs);
165165
}
166166

167-
static bool ex_handler_copy(const struct exception_table_entry *fixup,
168-
struct pt_regs *regs, int trapnr)
169-
{
170-
WARN_ONCE(trapnr == X86_TRAP_GP, "General protection fault in user access. Non-canonical address?");
171-
return ex_handler_fault(fixup, regs, trapnr);
172-
}
173-
174167
static bool ex_handler_msr(const struct exception_table_entry *fixup,
175168
struct pt_regs *regs, bool wrmsr, bool safe, int reg)
176169
{
@@ -341,8 +334,6 @@ int fixup_exception(struct pt_regs *regs, int trapnr, unsigned long error_code,
341334
return ex_handler_fault(e, regs, trapnr);
342335
case EX_TYPE_UACCESS:
343336
return ex_handler_uaccess(e, regs, trapnr, fault_addr);
344-
case EX_TYPE_COPY:
345-
return ex_handler_copy(e, regs, trapnr);
346337
case EX_TYPE_CLEAR_FS:
347338
return ex_handler_clear_fs(e, regs);
348339
case EX_TYPE_FPU_RESTORE:

0 commit comments

Comments
 (0)