HomeFreeBSD

amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service.

Description

amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service.

If service code faulted, we might end up unwinding with interrupts
disabled. Top-level kernel code should have interrupts enabled, which
is enforced by checks.

Save %rflags before entering EFI, and restore to the known good value
on return. This handles situation with disabled interrupts on fault
and perhaps other potential bugs, e.g. invalid value for PSL_D.

Reported and tested by: Jan Martin Mikkelsen <janm@transactionware.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Committed
kibJun 3 2019, 3:32 PM
Parents
rS348538: MFC r348509: jail_getid(3): add special-case immediate return for jid 0
Branches
Unknown
Tags
Unknown