mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
amd64 efi rt: handle #BP
PR: 282860 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47694
This commit is contained in:
parent
a03957a706
commit
e6ec41fa86
@ -598,6 +598,18 @@ trap(struct trapframe *frame)
|
||||
* FALLTHROUGH (TRCTRAP kernel mode, kernel address)
|
||||
*/
|
||||
case T_BPTFLT:
|
||||
/*
|
||||
* Most likely, EFI RT hitting INT3. This
|
||||
* check prevents kdb from handling
|
||||
* breakpoints set on the BIOS text, if such
|
||||
* option is ever needed.
|
||||
*/
|
||||
if ((td->td_pflags & TDP_EFIRT) != 0 &&
|
||||
curpcb->pcb_onfault != NULL) {
|
||||
frame->tf_rip = (long)curpcb->pcb_onfault;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If KDB is enabled, let it handle the debugger trap.
|
||||
* Otherwise, debugger traps "can't happen".
|
||||
|
Loading…
Reference in New Issue
Block a user