)]}'
{
  "commit": "ade63af6cfb7b3ca19ced28730fd6461e8d1d410",
  "tree": "f166fb5186b24359faa9e122943dd472095fb4ce",
  "parents": [
    "fb685de78e6bf79e49854e7d149f69b125583de5"
  ],
  "author": {
    "name": "Breno Leitao",
    "email": "leitao@debian.org",
    "time": "Tue Oct 27 03:43:51 2026 -0700"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@kernel.org",
    "time": "Fri Nov 06 10:48:59 2026 +0100"
  },
  "message": "x86/nmi: Ignore negative NMI handler durations\n\nI am seeing NMI handlers in the Meta fleet reported as running for\nabout 584 years. Over 30 days, 11 AMD and Intel machines logged 637\nsuch lines, for example:\n\n  AMD EPYC 9D25 (family 0x1a, model 0x11, stepping 0x0):\n  [ 1650.616627] INFO: NMI handler (nmi_cpu_backtrace_handler.llvm.9643156322683129580) took too long to run: 18446744073709.551 msecs\n\n  Intel Xeon Platinum 8321HC (family 0x6, model 0x55, stepping 0xb):\n  [360448.230129] INFO: NMI handler (perf_event_nmi_handler) took too long to run: 18446744071018.936 msecs\n\n  Intel Xeon D-2191A (family 0x6, model 0x55, stepping 0x4):\n  [81787.188959] INFO: NMI handler (ghes_notify_nmi) took too long to run: 18446744073709.545 msecs\n\nnmi_handle() times each handler with two sched_clock() reads. When the\nsecond read is lower than the first, the u64 subtraction wraps, and\nnmi_check_duration() treats the result as a duration. In the three\nexamples, the clock went back by less than 1 us, by 2.7 s and by about\n6 us.\n\nThe wrapped value is also stored in action-\u003emax_duration. Every later\nreal duration is smaller, so the handler is never reported again until\nthe next boot.\n\nWhatever makes the clock read lower, a negative difference is not a\nduration, so return before it is stored or reported. A clock that steps\nforward is not covered, since that cannot be told from a real stall.\n\nA backwards clock is still worth knowing about, so print the size of\nthe step once per boot. This uses pr_warn_once() rather than WARN, as a\nstack trace says nothing about the clock and panic_on_warn machines\nshould not go down for it.\n\nFixes: 2ab00456ea8a (\"x86: Warn when NMI handlers take large amounts of time\")\nSigned-off-by: Breno Leitao \u003cleitao@debian.org\u003e\nSigned-off-by: Peter Zijlstra (Intel) \u003cpeterz@infradead.org\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\nCc: stable@vger.kernel.org\nLink: https://patch.msgid.link/20261027-nmi_negative-v1-1-b436a005eb8a@debian.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3c9f60d6ca5a763c6db46030e906824a72abc3b9",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/nmi.c",
      "new_id": "cb46da482c8558cbf662dffca83866eb868770ff",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/nmi.c"
    }
  ]
}
