)]}'
{
  "commit": "6323ccdce8fe4532ebbbd3cd02facdde4e3e1247",
  "tree": "3136fb2d281dcbcbd878310c6fee5644ac283526",
  "parents": [
    "5bc4580f9b31d4aebc4b7f5dce80f2aa471d3a69"
  ],
  "author": {
    "name": "Ian Rogers",
    "email": "irogers@google.com",
    "time": "Tue Sep 29 15:23:32 2026 -0700"
  },
  "committer": {
    "name": "Peter Zijlstra",
    "email": "peterz@infradead.org",
    "time": "Thu Oct 01 14:00:31 2026 +0200"
  },
  "message": "perf: Replace perf_event_header__init_id with full header init\n\nperf_iterate_sb() invokes its callback for each matching perf_event on\nthe CPU and task context, passing a shared caller-allocated event\nstructure.\n\nperf_event_header__init_id() mutated header-\u003esize in place by adding\nevent-\u003eid_header_size, requiring sideband output callbacks to save and\nrestore header fields across iterations. Three sideband callbacks failed\nto save and restore header.size around perf_event_header__init_id():\n - perf_event_ksymbol_output()\n - perf_event_bpf_output()\n - perf_event_text_poke_output()\n\nWhen multiple events with attr.ksymbol, attr.bpf_event, or\nattr.text_poke and sample_id_all are active on the same CPU, each\nsubsequent event receives a record whose header.size is inflated by all\npreceding events\u0027 id_header_size values while only a single id_sample is\nwritten, leaving uninitialized ring-buffer bytes at the end of the\nrecord and causing userspace perf to fail with -EFAULT (\"Bad address\")\nwhen parsing the sample_id trailer.\n\nSimilarly, perf_event_mmap_output() set PERF_RECORD_MISC_MMAP_BUILD_ID\nin mmap_event-\u003eevent_id.header.misc when event-\u003eattr.build_id was\nenabled, but only saved and restored header.size and header.type. If an\nevent with attr.build_id was followed by an event with attr.mmap2 and\n!attr.build_id, the second event received PERF_RECORD_MISC_MMAP_BUILD_ID\nin header.misc while its payload contained maj/min/ino/ino_generation\ninstead of a build ID.\n\nRather than splitting header initialization between callers and output\ncallbacks and saving/restoring mutated header fields, replace\nperf_event_header__init_id() with perf_event_header__init(), which\ninitializes header-\u003etype, header-\u003emisc, and header-\u003esize alongside the\nsample_id fields on each invocation.\n\nFixes: 76193a94522f (\"perf, bpf: Introduce PERF_RECORD_KSYMBOL\")\nFixes: 6ee52e2a3fe4 (\"perf, bpf: Introduce PERF_RECORD_BPF_EVENT\")\nFixes: e17d43b93e54 (\"perf: Add perf text poke event\")\nFixes: 88a16a130933 (\"perf: Add build id data in mmap2 event\")\nAssisted-by: Antigravity:gemini-3.1-pro\nSigned-off-by: Ian Rogers \u003cirogers@google.com\u003e\nSigned-off-by: Peter Zijlstra (Intel) \u003cpeterz@infradead.org\u003e\nLink: https://patch.msgid.link/20260929222332.973435-1-irogers@google.com\nCc: stable@vger.kernel.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f401181d8669c035aae4971148f8374e4cb09eb7",
      "old_mode": 33188,
      "old_path": "arch/powerpc/perf/imc-pmu.c",
      "new_id": "a9f8464997a227f187dd12a4e89b95a42109f151",
      "new_mode": 33188,
      "new_path": "arch/powerpc/perf/imc-pmu.c"
    },
    {
      "type": "modify",
      "old_id": "915c6fd3f084583819bc7c100e33ace6dc2f0be7",
      "old_mode": 33188,
      "old_path": "include/linux/perf_event.h",
      "new_id": "2d5e7687875b0cdd50e3e00532689d9f6292b551",
      "new_mode": 33188,
      "new_path": "include/linux/perf_event.h"
    },
    {
      "type": "modify",
      "old_id": "c2882b5be7c369c47d8a4b783f24a23cd156f971",
      "old_mode": 33188,
      "old_path": "kernel/events/core.c",
      "new_id": "3aa223595e7d46b470ae9f976c73249917eac0eb",
      "new_mode": 33188,
      "new_path": "kernel/events/core.c"
    },
    {
      "type": "modify",
      "old_id": "1b1ffe0533e58a9d976d0eb0fc23e09d5936da2b",
      "old_mode": 33188,
      "old_path": "kernel/events/ring_buffer.c",
      "new_id": "13bd42e5493d5411067ca6a0648b245f4e4996b0",
      "new_mode": 33188,
      "new_path": "kernel/events/ring_buffer.c"
    }
  ]
}
