mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 14:56:54 -04:00
Merge tag 'x86-boot-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 boot updates from Ingo Molnar: - Ignore NMIs during very early boot, to address kexec crashes - Remove redundant initialization in boot/string.c's strcmp() * tag 'x86-boot-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Remove redundant initialization of the 'delta' variable in strcmp() x86/boot: Ignore NMIs during very early boot
This commit is contained in:
@@ -386,3 +386,8 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code)
|
||||
*/
|
||||
kernel_add_identity_map(address, end);
|
||||
}
|
||||
|
||||
void do_boot_nmi_trap(struct pt_regs *regs, unsigned long error_code)
|
||||
{
|
||||
/* Empty handler to ignore NMI during early boot */
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ void load_stage2_idt(void)
|
||||
boot_idt_desc.address = (unsigned long)boot_idt;
|
||||
|
||||
set_idt_entry(X86_TRAP_PF, boot_page_fault);
|
||||
set_idt_entry(X86_TRAP_NMI, boot_nmi_trap);
|
||||
|
||||
#ifdef CONFIG_AMD_MEM_ENCRYPT
|
||||
/*
|
||||
|
||||
@@ -70,6 +70,7 @@ SYM_FUNC_END(\name)
|
||||
.code64
|
||||
|
||||
EXCEPTION_HANDLER boot_page_fault do_boot_page_fault error_code=1
|
||||
EXCEPTION_HANDLER boot_nmi_trap do_boot_nmi_trap error_code=0
|
||||
|
||||
#ifdef CONFIG_AMD_MEM_ENCRYPT
|
||||
EXCEPTION_HANDLER boot_stage1_vc do_vc_no_ghcb error_code=1
|
||||
|
||||
@@ -196,6 +196,7 @@ static inline void cleanup_exception_handling(void) { }
|
||||
|
||||
/* IDT Entry Points */
|
||||
void boot_page_fault(void);
|
||||
void boot_nmi_trap(void);
|
||||
void boot_stage1_vc(void);
|
||||
void boot_stage2_vc(void);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ int strcmp(const char *str1, const char *str2)
|
||||
{
|
||||
const unsigned char *s1 = (const unsigned char *)str1;
|
||||
const unsigned char *s2 = (const unsigned char *)str2;
|
||||
int delta = 0;
|
||||
int delta;
|
||||
|
||||
while (*s1 || *s2) {
|
||||
delta = *s1 - *s2;
|
||||
|
||||
Reference in New Issue
Block a user