Linux · Linux Kernel · CVE-2021-46997
**Name of the Vulnerable Software and Affected Versions**
Linux kernel versions prior to 5.12.0-rc8+
**Description**
The issue arises when booting a kernel with "irqchip.gicv3 pseudo nmi=1" on the command line, causing a warning during kernel entry due to the manipulation of the PMR. The `lockdep hardirqs off()` function checks if interrupts are masked before setting `GIC PRIO PSR I SET` in exception entry paths. To avoid this warning, `GIC PRIO PSR I SET` should be consistently set during exception entry. The `local daif inherit()` function needs to be updated to undo this, and `local daif restore()` will update both DAIF and the PMR.
**Recommendations**
To resolve the issue, update the Linux kernel to a version that includes the fix for this vulnerability. Ensure that `GIC PRIO PSR I SET` is consistently set during exception entry, and update `local daif inherit()` to properly handle DAIF and PMR. If an update is not available, consider temporarily disabling the `irqchip.gicv3 pseudo nmi=1` option to minimize the risk of exploitation.