[DragonFlyBSD - Bug #3427] EFI page fault during kernel relocation
sigttou
bugtracker-admin at leaf.dragonflybsd.org
Wed Sep 30 20:55:34 PDT 2026
Issue #3427 has been updated by sigttou.
File 0001-executable-trampoline.patch added
File 0002-relocation-write-protection.patch added
Attached both patches in git-am format.
The EfiLoaderCode change is adapted from Ed Maste's FreeBSD commit
2b1df6149e8a2d50a09d13c64d1574dad91e10b1:
https://github.com/freebsd/freebsd-src/commit/2b1df6149e8a2d50a09d13c64d1574dad91e10b1
https://reviews.freebsd.org/D58383
Both references are now in the commit message.
The CR0.WP/CET change is not a FreeBSD backport.
----------------------------------------
Bug #3427: EFI page fault during kernel relocation
http://bugs.dragonflybsd.org/issues/3427#change-14718
* Author: sigttou
* Status: In Progress
* Priority: Normal
* Assignee: liweitianux
* Category: Kernel
* Target version: 6.6
* Start date: 2026-09-30
----------------------------------------
Problem: On an HP ProDesk 600 G4 (Intel Core i5 8500), efi_copy_finish()
faults while writing to 0x1001000. The captured #PF has error code 3
(supervisor write, protection violation) and CR0=0x80010013 (WP enabled).
Firmware maps the destination page read-only. The executable trampoline
is also allocated as EfiLoaderData.
Solution: Allocate the trampoline as EfiLoaderCode. Save CR0, clear WP only
around the relocation copy, then restore CR0 before kernel entry. Reject
active CET before leaving boot services.
---Files--------------------------------
0001-executable-trampoline.patch (478 Bytes)
0002-relocation-write-protection.patch (1.37 KB)
0001-executable-trampoline.patch (1.39 KB)
0002-relocation-write-protection.patch (2.65 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list