Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
"Miscellaneous fixes:

- Fix kexec() crash if call depth tracking is enabled

- Fix SMN reads on inaccessible registers on certain AMD systems"

* tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/amd_nb: Check for invalid SMN reads
x86/kexec: Fix bug with call depth tracking

+17 -3
+8 -1
arch/x86/kernel/amd_nb.c
··· 215 215 216 216 int amd_smn_read(u16 node, u32 address, u32 *value) 217 217 { 218 - return __amd_smn_rw(node, address, value, false); 218 + int err = __amd_smn_rw(node, address, value, false); 219 + 220 + if (PCI_POSSIBLE_ERROR(*value)) { 221 + err = -ENODEV; 222 + *value = 0; 223 + } 224 + 225 + return err; 219 226 } 220 227 EXPORT_SYMBOL_GPL(amd_smn_read); 221 228
+9 -2
arch/x86/kernel/machine_kexec_64.c
··· 295 295 void machine_kexec(struct kimage *image) 296 296 { 297 297 unsigned long page_list[PAGES_NR]; 298 - void *control_page; 298 + unsigned int host_mem_enc_active; 299 299 int save_ftrace_enabled; 300 + void *control_page; 301 + 302 + /* 303 + * This must be done before load_segments() since if call depth tracking 304 + * is used then GS must be valid to make any function calls. 305 + */ 306 + host_mem_enc_active = cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT); 300 307 301 308 #ifdef CONFIG_KEXEC_JUMP 302 309 if (image->preserve_context) ··· 365 358 (unsigned long)page_list, 366 359 image->start, 367 360 image->preserve_context, 368 - cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)); 361 + host_mem_enc_active); 369 362 370 363 #ifdef CONFIG_KEXEC_JUMP 371 364 if (image->preserve_context)