Skip to content
  1. Jun 12, 2020
    • Thomas Gleixner's avatar
      x86/entry: Make NMI use IDTENTRY_RAW · 71ed49d8
      Thomas Gleixner authored
      For no reason other than beginning brainmelt, IDTENTRY_NMI was mapped to
      IDTENTRY_IST.
      
      This is not a problem on 64bit because the IST default entry point maps to
      IDTENTRY_RAW which does not any entry handling. The surplus function
      declaration for the noist C entry point is unused and as there is no ASM
      code emitted for NMI this went unnoticed.
      
      On 32bit IDTENTRY_IST maps to a regular IDTENTRY which does the normal
      entry handling. That is clearly the wrong thing to do for NMI.
      
      Map it to IDTENTRY_RAW to unbreak it. The IDTENTRY_NMI mapping needs to
      stay to avoid emitting ASM code.
      
      Fixes: 6271fef0
      
       ("x86/entry: Convert NMI to IDTENTRY_NMI")
      Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      Debugged-by: default avatarAndy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/CA+G9fYvF3cyrY+-iw_SZtpN-i2qA2BruHg4M=QYECU2-dNdsMw@mail.gmail.com
      71ed49d8
    • Andy Lutomirski's avatar
      x86/entry: Treat BUG/WARN as NMI-like entries · 15a416e8
      Andy Lutomirski authored
      
      
      BUG/WARN are cleverly optimized using UD2 to handle the BUG/WARN out of
      line in an exception fixup.
      
      But if BUG or WARN is issued in a funny RCU context, then the
      idtentry_enter...() path might helpfully WARN that the RCU context is
      invalid, which results in infinite recursion.
      
      Split the BUG/WARN handling into an nmi_enter()/nmi_exit() path in
      exc_invalid_op() to increase the chance to survive the experience.
      
      [ tglx: Make the declaration match the implementation ]
      
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/f8fe40e0088749734b4435b554f73eee53dcf7a8.1591932307.git.luto@kernel.org
      15a416e8
  2. Jun 11, 2020