arm64: Use daifflag_restore after bp_hardening
authorJulien Thierry <julien.thierry@arm.com>
Tue, 28 Aug 2018 15:51:15 +0000 (16:51 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 3 Oct 2018 15:12:21 +0000 (16:12 +0100)
commit9a0c032825e073e002ee80cf2577431d7296a7f7
tree25254503623e42c0689570c1a59f3f71d12a4dbd
parentf05692919bdd44ad2a1a1fe85222dec16fec7e80
arm64: Use daifflag_restore after bp_hardening

For EL0 entries requiring bp_hardening, daif status is kept at
DAIF_PROCCTX_NOIRQ until after hardening has been done. Then interrupts
are enabled through local_irq_enable().

Before using local_irq_* functions, daifflags should be properly restored
to a state where IRQs are enabled.

Enable IRQs by restoring DAIF_PROCCTX state after bp hardening.

Acked-by: James Morse <james.morse@arm.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/fault.c