Commit de8ac817 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86_core_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core x86 updates from Borislav Petkov:

 - Remove all the code around GS switching on 32-bit now that it is not
   needed anymore

 - Other misc improvements

* tag 'x86_core_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  bug: Use normal relative pointers in 'struct bug_entry'
  x86/nmi: Make register_nmi_handler() more robust
  x86/asm: Merge load_gs_index()
  x86/32: Remove lazy GS macros
  ELF: Remove elf_core_copy_kernel_regs()
  x86/32: Simplify ELF_CORE_COPY_REGS
parents a13dc4d4 69505e3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
	14472:	.string file;					\
		.popsection;					\
								\
		.long 14472b - 14470b;				\
		.long 14472b - .;				\
		.short line;
#else
#define _BUGVERBOSE_LOCATION(file, line)
@@ -25,7 +25,7 @@
#define __BUG_ENTRY(flags) 				\
		.pushsection __bug_table,"aw";		\
		.align 2;				\
	14470:	.long 14471f - 14470b;			\
	14470:	.long 14471f - .;			\
_BUGVERBOSE_LOCATION(__FILE__, __LINE__)		\
		.short flags; 				\
		.popsection;				\
+8 −6
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@
#ifdef CONFIG_DEBUG_BUGVERBOSE
.macro __EMIT_BUG_ENTRY addr,file,line,flags
	 .section __bug_table,"aw"
5001:	 .4byte \addr - 5001b, 5002f - 5001b
5001:	 .4byte \addr - .
	 .4byte 5002f - .
	 .short \line, \flags
	 .org 5001b+BUG_ENTRY_SIZE
	 .previous
@@ -24,7 +25,7 @@
#else
.macro __EMIT_BUG_ENTRY addr,file,line,flags
	 .section __bug_table,"aw"
5001:	 .4byte \addr - 5001b
5001:	 .4byte \addr - .
	 .short \flags
	 .org 5001b+BUG_ENTRY_SIZE
	 .previous
@@ -49,15 +50,16 @@
#ifdef CONFIG_DEBUG_BUGVERBOSE
#define _EMIT_BUG_ENTRY				\
	".section __bug_table,\"aw\"\n"		\
	"2:\t.4byte 1b - 2b, %0 - 2b\n"		\
	"\t.short %1, %2\n"			\
	"2:	.4byte 1b - .\n"		\
	"	.4byte %0 - .\n"		\
	"	.short %1, %2\n"		\
	".org 2b+%3\n"				\
	".previous\n"
#else
#define _EMIT_BUG_ENTRY				\
	".section __bug_table,\"aw\"\n"		\
	"2:\t.4byte 1b - 2b\n"			\
	"\t.short %2\n"				\
	"2:	.4byte 1b - .\n"		\
	"	.short %2\n"			\
	".org 2b+%3\n"				\
	".previous\n"
#endif
+1 −1
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ u32 *__init fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs)
	 * FIXME: How do i get PID? Do I really need it?
	 * prstatus.pr_pid = ????
	 */
	elf_core_copy_kernel_regs(&prstatus.pr_reg, regs);
	elf_core_copy_regs(&prstatus.pr_reg, regs);
	buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS,
			      &prstatus, sizeof(prstatus));
	return buf;
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ static void __init fill_prstatus(struct elf_prstatus *prstatus, int pir,
			  struct pt_regs *regs)
{
	memset(prstatus, 0, sizeof(struct elf_prstatus));
	elf_core_copy_kernel_regs(&(prstatus->pr_reg), regs);
	elf_core_copy_regs(&(prstatus->pr_reg), regs);

	/*
	 * Overload PID with PIR value.
+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@
typedef u32 bug_insn_t;

#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
#define __BUG_ENTRY_ADDR	RISCV_INT " 1b - 2b"
#define __BUG_ENTRY_FILE	RISCV_INT " %0 - 2b"
#define __BUG_ENTRY_ADDR	RISCV_INT " 1b - ."
#define __BUG_ENTRY_FILE	RISCV_INT " %0 - ."
#else
#define __BUG_ENTRY_ADDR	RISCV_PTR " 1b"
#define __BUG_ENTRY_FILE	RISCV_PTR " %0"
Loading