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 'efi-fixes-for-v6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:
"A couple of fixes for EFI regressions introduced this cycle:

- Make EDID handling in the EFI stub mixed mode safe

- Ensure that efi_mm.user_ns has a sane value - this is needed now
that EFI runtime calls are preemptible on arm64"

* tag 'efi-fixes-for-v6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
kthread: Warn if mm_struct lacks user_ns in kthread_use_mm()
arm64: efi: Fix NULL pointer dereference by initializing user_ns
efi/libstub: gop: Fix EDID support in mixed-mode

+6 -4
+1
drivers/firmware/efi/efi.c
··· 73 73 MMAP_LOCK_INITIALIZER(efi_mm) 74 74 .page_table_lock = __SPIN_LOCK_UNLOCKED(efi_mm.page_table_lock), 75 75 .mmlist = LIST_HEAD_INIT(efi_mm.mmlist), 76 + .user_ns = &init_user_ns, 76 77 .cpu_bitmap = { [BITS_TO_LONGS(NR_CPUS)] = 0}, 77 78 #ifdef CONFIG_SCHED_MM_CID 78 79 .mm_cid.lock = __RAW_SPIN_LOCK_UNLOCKED(efi_mm.mm_cid.lock),
+4 -4
drivers/firmware/efi/libstub/gop.c
··· 513 513 status = efi_bs_call(handle_protocol, handle, &EFI_EDID_ACTIVE_PROTOCOL_GUID, 514 514 (void **)&active_edid); 515 515 if (status == EFI_SUCCESS) { 516 - gop_size_of_edid = active_edid->size_of_edid; 517 - gop_edid = active_edid->edid; 516 + gop_size_of_edid = efi_table_attr(active_edid, size_of_edid); 517 + gop_edid = efi_table_attr(active_edid, edid); 518 518 } else { 519 519 status = efi_bs_call(handle_protocol, handle, 520 520 &EFI_EDID_DISCOVERED_PROTOCOL_GUID, 521 521 (void **)&discovered_edid); 522 522 if (status == EFI_SUCCESS) { 523 - gop_size_of_edid = discovered_edid->size_of_edid; 524 - gop_edid = discovered_edid->edid; 523 + gop_size_of_edid = efi_table_attr(discovered_edid, size_of_edid); 524 + gop_edid = efi_table_attr(discovered_edid, edid); 525 525 } 526 526 } 527 527
+1
kernel/kthread.c
··· 1599 1599 1600 1600 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD)); 1601 1601 WARN_ON_ONCE(tsk->mm); 1602 + WARN_ON_ONCE(!mm->user_ns); 1602 1603 1603 1604 /* 1604 1605 * It is possible for mm to be the same as tsk->active_mm, but