)]}'
{
  "commit": "7b5105001aca6b257316f50efef6f4256b08148a",
  "tree": "540146701d1e5301a4770c70a04be1a52d4e07cb",
  "parents": [
    "35bd0a3a1dab02c29da395b16c545a99b427de7f"
  ],
  "author": {
    "name": "Kees Cook",
    "email": "keescook@chromium.org",
    "time": "Wed Jan 17 16:40:03 2024 -0800"
  },
  "committer": {
    "name": "Kees Cook",
    "email": "keescook@chromium.org",
    "time": "Mon Jan 22 15:47:04 2024 -0800"
  },
  "message": "timekeeping: Refactor intentional wrap-around test\n\nIn an effort to separate intentional arithmetic wrap-around from\nunexpected wrap-around, we need to refactor places that depend on this\nkind of math. One of the most common code patterns of this is:\n\n\tVAR + value \u003c VAR\n\nNotably, this is considered \"undefined behavior\" for signed and pointer\ntypes, which the kernel works around by using the -fno-strict-overflow\noption in the build[1] (which used to just be -fwrapv). Regardless, we\nwant to get the kernel source to the position where we can meaningfully\ninstrument arithmetic wrap-around conditions and catch them when they\nare unexpected, regardless of whether they are signed[2], unsigned[3],\nor pointer[4] types.\n\nRefactor open-coded wrap-around addition test to use add_would_overflow().\nThis paves the way to enabling the wrap-around sanitizers in the future.\n\nLink: https://git.kernel.org/linus/68df3755e383e6fecf2354a67b08f92f18536594 [1]\nLink: https://github.com/KSPP/linux/issues/26 [2]\nLink: https://github.com/KSPP/linux/issues/27 [3]\nLink: https://github.com/KSPP/linux/issues/344 [4]\nCc: John Stultz \u003cjstultz@google.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Stephen Boyd \u003csboyd@kernel.org\u003e\nSigned-off-by: Kees Cook \u003ckeescook@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "266d02809dbb1dceabfb2a05276385c6a3be9b0c",
      "old_mode": 33188,
      "old_path": "kernel/time/timekeeping.c",
      "new_id": "2fc7cf16584c59aa5430c3d055ce75b01db2550c",
      "new_mode": 33188,
      "new_path": "kernel/time/timekeeping.c"
    }
  ]
}
