)]}'
{
  "log": [
    {
      "commit": "f5931061c005db3233c1ee6909f0fac5ea30d562",
      "tree": "b622d34fc83f01f47ac9d5bd42bcb8c73a77e467",
      "parents": [
        "4c815ad86a28527ad47e88268de12bf838e28591"
      ],
      "author": {
        "name": "Hang Zhengyang",
        "email": "hang.zhengyang1010@gmail.com",
        "time": "Fri Nov 20 14:59:02 2026 +0800"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:37:37 2026 +0000"
      },
      "message": "selftests/bpf: Fix file_reader/on_open_non_sleepable_first on overlayfs\n\non_open_non_sleepable_first fails every time when the test_progs binary\nis on overlayfs, as under /home and /tmp in a virtme-ng guest:\n\n  run_test:FAIL:err unexpected err: actual 4 !\u003d expected 0\n\nbpf_task_work_schedule_signal() returns -EBUSY.  On overlayfs, the\nopen() of /proc/self/exe calls security_file_open() twice: once for\nthe overlay file, and once more for the backing file through\novl_open() -\u003e backing_file_open() -\u003e vfs_open().  The program runs\ntwice in the same task, and the second call finds the work from the\nfirst one still pending, since it only runs on return to user space.\n\nAct only on the first call.  The other file_open programs in the file\neither don\u0027t schedule task work or don\u0027t check the result, so running\ntwice doesn\u0027t affect them.\n\nFixes: fc38f07781ca (\"selftests/bpf: Test per-call site function specialization\")\nSigned-off-by: Hang Zhengyang \u003chang.zhengyang1010@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120-file-reader-overlayfs-v1-1-81aa7f3041d1@gmail.com\n"
    },
    {
      "commit": "4c815ad86a28527ad47e88268de12bf838e28591",
      "tree": "0b2c1f155043560f7a9fb16cbc300acd1a09153c",
      "parents": [
        "5f99e3e8a1819ed5b5fc84defa6581b7a71c8e78",
        "3dda220338a62f8be384f39b3884f3e3253ed101"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:36:29 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:36:37 2026 +0000"
      },
      "message": "Merge branch \u0027bpf-use-an-on-stack-pt_regs-in-the-raw-tracepoint-helpers\u0027\n\nMike Bazov says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nbpf: Use an on-stack pt_regs in the raw tracepoint helpers\n\nbpf_perf_event_output(), bpf_get_stackid() and bpf_get_stack() of raw\ntracepoint and tracing programs share three per-CPU pt_regs slots,\npicked by a nest counter. These programs can be preempted, and tasks\nthen leave the slots out of order, so a sample or stack trace of one\ntask gets the registers of another. Patch 3 fills in a pt_regs on the\nstack of each helper instead and removes the slots.\n\nThe slots also limited how deep these helpers nest. Two things need a\nlimit of their own without them, and both can already be hit today\nwithout raw tracepoint programs:\n\n- bpf_perf_event_output() WARNs when entered a fourth time on a CPU.\n\n- Build ID collection in bpf_get_stack()/bpf_get_stackid() and\n  bpf_find_vma() take mmap_read_trylock(), which fires the mmap_lock\n  tracepoints. Programs on them that call these helpers nest into each\n  other as deep as there are programs. Patch 2 limits it to three\n  levels.\n\nResults on bpf-next 0fb18ce8a2e9, x86-64, debug config, CONFIG_PREEMPT\u003dy,\npreempt\u003dfull. \"base\" is that tree, \"v2\" adds only patch 3, \"v3\" all\nthree.\n\nThe slot race, 5 runs of 10s each. Two raw tracepoint programs on\nsys_enter call the helper, two threads make syscalls on CPU 0 and a\nSCHED_FIFO thread preempts them every 20us. For bpf_perf_event_output()\nthe reproducer reads the return address of each program\u0027s helper call\nfrom its JIT image and checks the IP of every sample; bpf_get_stack()\nand bpf_get_stackid() get an empty kernel stack instead, because the\nunwinder looks for the other task\u0027s sp on the current stack:\n\n                                     base        v3\n  bpf_perf_event_output, wrong IP    7-18        0      per program\n  bpf_get_stack, empty stacks        362-535     0\n  bpf_get_stackid, empty stacks      168-364     0\n\nThe bpf_get_stackid() case with bpftrace, whose kstack calls it; @a[]\nand @b[] count the empty stacks:\n\n  bpftrace -e \u0027\n  rawtracepoint:sys_enter /comm \u003d\u003d \"dd\"/ { @a[kstack(1)] \u003d count(); }\n  rawtracepoint:sys_enter /comm \u003d\u003d \"dd\"/ { @b[kstack(1)] \u003d count(); }\u0027 \u0026\n  taskset -c 0 dd if\u003d/dev/zero of\u003d/dev/null bs\u003d1 \u0026\n  taskset -c 0 dd if\u003d/dev/zero of\u003d/dev/null bs\u003d1 \u0026\n  taskset -c 0 chrt -f 1 perl -e \u0027select(undef, undef, undef, 2e-5) while 1\u0027 \u0026\n\nNesting. For the WARN, a raw tracepoint or kprobe program calls\nbpf_perf_event_output(), and three fentry programs on\nperf_event_output() call it too. For mmap_read_trylock(), six programs\non mmap_lock_acquire_returned call bpf_get_stack() with build IDs, or\nbpf_find_vma(), while the process does 1000 mmap()/munmap():\n\n                                         base     v2       v3\n  WARN, started from raw tracepoint      no       yes      no\n  WARN, started from kprobe              yes      -        no\n  bpf_get_stack, build IDs: depth        4        6        4\n                            calls        1.5M     5.9M     1.5M\n  bpf_find_vma: depth                    6        6        4\n                calls                    5.9M     5.9M     1.5M\n\nDepth counts the programs on the stack; at 4, the last one gets -EBUSY\nor the fallback to IPs. The kprobe case wasn\u0027t run on v2, which doesn\u0027t\nchange that path.\n---\nChanges in v3:\n- New patch 1: don\u0027t WARN when bpf_perf_event_output() nests too deep\n  (reported by the BPF CI bot).\n- New patch 2: limit nesting of mmap_read_trylock() in BPF helpers\n  (per Alexei\u0027s suggestion).\n- Patch 3: correct the commit message, bpf_perf_event_output() keeps\n  its own nesting limit.\n- Link to v2: https://lore.kernel.org/r/20261119-bpf-raw-tp-regs-preempt-v2-1-e1e1b90857d6@gmail.com\n\nChanges in v2:\n- Use a pt_regs on the stack of each helper and remove the per-CPU\n  slots, instead of disabling preemption while a slot is in use\n  (per Andrii\u0027s suggestion).\n- Link to v1: https://lore.kernel.org/r/20261116-bpf-raw-tp-regs-preempt-v1-1-d01b6dd8573c@gmail.com\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20261120-bpf-raw-tp-regs-preempt-v3-0-ec109009a5d2@gmail.com\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "3dda220338a62f8be384f39b3884f3e3253ed101",
      "tree": "0b2c1f155043560f7a9fb16cbc300acd1a09153c",
      "parents": [
        "c38e4eb110a16df75ffd5f3381199ba7f24b725f"
      ],
      "author": {
        "name": "Mike Bazov",
        "email": "mike.bazov@gmail.com",
        "time": "Fri Nov 20 12:59:13 2026 +0200"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:36:28 2026 +0000"
      },
      "message": "bpf: Use an on-stack pt_regs in the raw tracepoint helpers\n\nbpf_perf_event_output(), bpf_get_stackid() and bpf_get_stack() of raw\ntracepoint and tracing programs have no pt_regs, so they fill in one of\nthree per-CPU slots, picked by a per-CPU nest counter:\n\n  get_bpf_raw_tp_regs()   level++, use regs[level - 1]\n  put_bpf_raw_tp_regs()   level--\n\nThat only works if the users of a CPU leave in the reverse order they\ncame, as a task, an interrupt and an NMI do. These programs run with\nmigration disabled but preemption enabled, so tasks can leave in any\norder:\n\n  task A              task B              task C\n  get: regs[0]\n  \u003cpreempted\u003e\n                      get: regs[1]\n                      \u003cpreempted\u003e\n  put: level 1\n                                          get: regs[1]\n                                          fills in its regs\n                      uses regs[1]\n\nB sends a sample or a stack trace with the registers of C. Profilers and\ntracers then attribute it to the wrong task, and nothing reports an\nerror. The per-CPU recursion counter of a program doesn\u0027t prevent it:\nthe slots are shared by all programs, so it takes two of them.\n\nFill in a pt_regs on the stack of each helper instead, as\nbpf_get_stack_raw_tp_sleepable() already does, and remove the slots.\nEach caller then has its own registers, however it nests or gets\npreempted. This also removes the three-level nesting limit the slots put\non the three helpers. bpf_perf_event_output() keeps its own limit, and\nthe mmap_read_trylock() for build IDs has a separate one.\n\nThe cost is sizeof(struct pt_regs) of stack per call, 168 bytes on\nx86-64, in helpers that can also run in IRQ and NMI context, and\nzeroing it on every call. It has to be zeroed: perf_fetch_caller_regs()\nsets only a few registers, and a sample with PERF_SAMPLE_REGS_INTR\ncopies all of them to user space.\n\nSigned-off-by: Mike Bazov \u003cmike.bazov@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120-bpf-raw-tp-regs-preempt-v3-3-ec109009a5d2@gmail.com\n"
    },
    {
      "commit": "c38e4eb110a16df75ffd5f3381199ba7f24b725f",
      "tree": "69c332f640978a141dc0f9ecbd6a173e243be2e8",
      "parents": [
        "53a0f597cf4d6a39bd96a1983d09836f3e5f5512"
      ],
      "author": {
        "name": "Mike Bazov",
        "email": "mike.bazov@gmail.com",
        "time": "Fri Nov 20 12:59:12 2026 +0200"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:36:28 2026 +0000"
      },
      "message": "bpf: Limit nesting of mmap_read_trylock() in BPF helpers\n\nbpf_get_stack() and bpf_get_stackid() with BPF_F_USER_BUILD_ID, and\nbpf_find_vma(), take mmap_read_trylock() on the current mm. That fires\nthe mmap_lock tracepoints, so a program on one of them that calls these\nhelpers runs the tracepoint again from inside itself:\n\n  prog 1 on mmap_lock_acquire_returned\n    bpf_get_stack(BPF_F_USER_STACK | BPF_F_USER_BUILD_ID)\n      mmap_read_trylock()\n        prog 2 on mmap_lock_acquire_returned\n          bpf_get_stack(...)\n            mmap_read_trylock()\n              ...\n\nThe recursion check of each program only stops it from running inside\nitself, so this nests as deep as there are programs attached, and each\nlevel runs all programs that aren\u0027t on the stack yet: the work per\ntracepoint hit grows with the factorial of the number of programs. With\nirqs disabled, the per-CPU irq_work already allows only one level; with\nirqs enabled nothing limits it.\n\nCount the levels per CPU with irqs enabled too and fail with -EBUSY past\nthree, the same depth as the other per-CPU nesting limits of BPF\ntracing. The helpers then fall back as they do when the trylock fails:\nbpf_get_stack() and bpf_get_stackid() return IPs instead of build IDs,\nand bpf_find_vma() returns -EBUSY.\n\nThe counter is per CPU, and programs with irqs enabled can be\npreempted, so a preempted holder counts against the other tasks on its\nCPU. They can hit the limit early and get the fallback; they never get\nwrong data.\n\nSuggested-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nSigned-off-by: Mike Bazov \u003cmike.bazov@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120-bpf-raw-tp-regs-preempt-v3-2-ec109009a5d2@gmail.com\n"
    },
    {
      "commit": "53a0f597cf4d6a39bd96a1983d09836f3e5f5512",
      "tree": "c730d8bf939be81891a5d0a17793249ef06da827",
      "parents": [
        "5f99e3e8a1819ed5b5fc84defa6581b7a71c8e78"
      ],
      "author": {
        "name": "Mike Bazov",
        "email": "mike.bazov@gmail.com",
        "time": "Fri Nov 20 12:59:11 2026 +0200"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:36:28 2026 +0000"
      },
      "message": "bpf: Don\u0027t WARN when bpf_perf_event_output() nests too deep\n\nbpf_perf_event_output() takes one of three per-CPU perf_sample_data\nslots per nesting level, and fails with -EBUSY and a WARN_ON_ONCE() when\nit is entered a fourth time on a CPU. Programs get there without any\nbug: a kprobe program calls it, and fentry programs on\nperf_event_output() call it again from inside. Each program\u0027s own\nrecursion check lets it in once, so three of them reach the fourth\nlevel. With panic_on_warn, that takes the machine down.\n\nKeep the -EBUSY and drop the warning, as commit 3880cdbed1c4 (\"bpf: Fix\nWARN() in get_bpf_raw_tp_regs\") did for the raw tracepoint regs slots.\n\nSigned-off-by: Mike Bazov \u003cmike.bazov@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120-bpf-raw-tp-regs-preempt-v3-1-ec109009a5d2@gmail.com\n"
    },
    {
      "commit": "5f99e3e8a1819ed5b5fc84defa6581b7a71c8e78",
      "tree": "0561fc1e9fd63e152aa3feba4dbf254ca1216333",
      "parents": [
        "6c725670966add64b23d83aef5e48a2fe3342459",
        "2d602d0e4296bcc475b327894b23692eb100b451"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:20:40 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:20:40 2026 +0000"
      },
      "message": "Merge branch \u0027documentation-bpf-fix-stale-references-in-map-docs\u0027\n\nAhmad Wicaksono says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nDocumentation/bpf: Fix stale references in map docs\n\nTwo documentation fixes for the BPF map pages.\n\nPatch 1 records which program types may still mutate a sockmap or\nsockhash: tracing programs attached to the sockmap iterator, sock_ops\n(delete only), sk_reuseport and sk_lookup. Anything else is rejected\nwith \"cannot update sockmap in this context\". The kernel-side sections\nof map_sockmap.rst did not mention this. It also drops the reference to\nprogs/test_sockmap_update.c, removed by\ncommit 5de7a6eaed89 (\"selftests/bpf: Drop\ntc/xdp/flow_dissector/socket_filter sockmap mutation tests\").\n\nPatch 2 fixes two moved selftests paths: test_lpm_map.c, now\nmap_tests/lpm_trie_map_basic_ops.c, and test_xdp_noinline.c, now under\nprogs/.\n\nDocumentation only; no functional change.\n\nChanges in v2:\n- Patch 1: narrow the note to the sockmap iterator, after\n  commit 18f6c47d1097 (\"bpf, sockmap: Restrict iter-context sockmap\n  updates to iter/sockmap\") (Alexei)\n- Rebased onto bpf-next, which now has the bpf tree merged in\n- Kept Jakub\u0027s Reviewed-by tags, as Alexei asked\n- Link to v1: https://lore.kernel.org/bpf/20261114170117.196552-1-supersonix03@gmail.com/\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20261123155200.16676-1-supersonix03@gmail.com\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "2d602d0e4296bcc475b327894b23692eb100b451",
      "tree": "0561fc1e9fd63e152aa3feba4dbf254ca1216333",
      "parents": [
        "7cc87577394a4339e8f6888ef4d25ddcf32580c9"
      ],
      "author": {
        "name": "Ahmad Wicaksono",
        "email": "supersonix03@gmail.com",
        "time": "Mon Nov 23 22:52:00 2026 +0700"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:20:40 2026 +0000"
      },
      "message": "Documentation/bpf: Fix stale selftests file references\n\nTwo selftests paths in the BPF docs no longer exist:\n\nmap_lpm_trie.rst points at tools/testing/selftests/bpf/test_lpm_map.c,\nwhich was moved by commit 3e18f5f1e5a1 (\"selftests/bpf: Move\ntest_lpm_map.c to map_tests\") and now lives at\ntools/testing/selftests/bpf/map_tests/lpm_trie_map_basic_ops.c.\n\nbtf.rst points at tools/testing/selftests/bpf/test_xdp_noinline.c, which\nis now tools/testing/selftests/bpf/progs/test_xdp_noinline.c.\n\nUpdate both so readers can find the code.\n\nSigned-off-by: Ahmad Wicaksono \u003csupersonix03@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nReviewed-by: Jakub Sitnicki \u003cjakub@cloudflare.com\u003e\nLink: https://patch.msgid.link/20261123155200.16676-3-supersonix03@gmail.com\n"
    },
    {
      "commit": "7cc87577394a4339e8f6888ef4d25ddcf32580c9",
      "tree": "b49e53a88be648ff73e7d38f5d6097f253719591",
      "parents": [
        "6c725670966add64b23d83aef5e48a2fe3342459"
      ],
      "author": {
        "name": "Ahmad Wicaksono",
        "email": "supersonix03@gmail.com",
        "time": "Mon Nov 23 22:51:59 2026 +0700"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:20:40 2026 +0000"
      },
      "message": "Documentation/bpf: Update sockmap docs for mutation restrictions\n\nCommit be39165224d0 (\"bpf, sockmap: Disallow update and delete from tc,\nxdp, socket_filter and flow_dissector\") dropped those program types from\nmay_update_sockmap(), so tc, tc act, XDP, socket_filter and\nflow_dissector programs can no longer call bpf_map_update_elem() or\nbpf_map_delete_elem() on a sockmap or sockhash; the verifier rejects\nthem at load time with \"cannot update sockmap in this context\".\nCommit 18f6c47d1097 (\"bpf, sockmap: Restrict iter-context sockmap\nupdates to iter/sockmap\") then narrowed the tracing case to programs\nattached to the sockmap iterator. The kernel-side sections of\nmap_sockmap.rst mention none of this.\n\nRecord which program types may still mutate these maps, and note that\nsock_ops programs may delete entries but have to use\nbpf_sock_map_update() or bpf_sock_hash_update() to add them.\n\nAlso drop the reference to\ntools/testing/selftests/bpf/progs/test_sockmap_update.c and its link\ntarget. That file was removed by commit 5de7a6eaed89 (\"selftests/bpf:\nDrop tc/xdp/flow_dissector/socket_filter sockmap mutation tests\").\n\nSigned-off-by: Ahmad Wicaksono \u003csupersonix03@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nReviewed-by: Jakub Sitnicki \u003cjakub@cloudflare.com\u003e\nLink: https://patch.msgid.link/20261123155200.16676-2-supersonix03@gmail.com\n"
    },
    {
      "commit": "6c725670966add64b23d83aef5e48a2fe3342459",
      "tree": "97534043efcda88c95924418825c005d297291cc",
      "parents": [
        "6036922777d33f909867c910212f913f7b088a2b"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Mon Nov 23 20:57:13 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:20:26 2026 +0000"
      },
      "message": "bpf: Force BPF_JIT on x86-64 and arm64\n\nAn arm64 kernel with CONFIG_BPF_SYSCALL\u003dy and CONFIG_BPF_JIT\u003dn is open\nto Spectre v1 if unprivileged BPF is enabled. The verifier adds\nBPF_NOSPEC to such progs. The interpreter calls barrier_nospec() for it,\nwhich is empty on arm64.\n\nA real barrier doesn\u0027t make the interpreter safe, since it sits behind\nan indirect branch:\n\n  goto *jumptable[insn-\u003ecode];\n\nIf the prog trains this branch, the CPU can skip the barrier and run the\nnext insn. arm64 has no retpoline. x86-64 turns it off when it picks\neIBRS or IBRS. The JITs emit the barrier inline.\n\nCommit 8db2aca155a4 (\"bpf: Force BPF_JIT_ALWAYS_ON on x86-64 and arm64\")\nkept the interpreter for CONFIG_BPF_JIT\u003dn. Select BPF_JIT from\nBPF_SYSCALL on these archs.\n\nKMSAN kernels keep the interpreter. KMSAN doesn\u0027t see the stores of JITed\nprogs and reports a map key on the prog stack as uninit. syzbot runs\nKMSAN with CONFIG_BPF_JIT\u003dn.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://lore.kernel.org/bpf/20261117172341.3152407-1-ryan.roberts@arm.com/\nLink: https://patch.msgid.link/20261123205713.4094553-1-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "6036922777d33f909867c910212f913f7b088a2b",
      "tree": "735c68e314d05b76f8a784727cdc0718f3ac05aa",
      "parents": [
        "351668b0b8b7e1447482595df4b2294dcffbb040",
        "885fd5836d3dd8c65f226e8615536196089648e1"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:19:57 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:19:57 2026 +0000"
      },
      "message": "Merge branch \u0027libbpf-fix-co-re-relocations-of-unsigned-32-bit-enum-values\u0027\n\nYonghong Song says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nlibbpf: Fix CO-RE relocations of unsigned 32-bit enum values\n\nFor a BPF_CORE_ENUMVAL_VALUE relocation, libbpf sign-extends the value\nof a 32-bit enumerator even if the enum is unsigned. A value in\n[0x80000000, 0xffffffff], e.g., DCACHE_PRIVATE of enum dentry_flags,\nthen doesn\u0027t match the zero-extended value clang emits, and the whole\nobject is refused. And a target value in that range is patched\nsign-extended.\n\nPatch 1 extends a 32-bit enum value according to the kflag of its enum,\ni.e., sign-extends it if the enum is signed (kflag 1), and zero-extends\nit otherwise (kflag 0), for both the local and the target value. The\nkernel builds the same relo_core.c, so it gets the fix too.\n\nGCC emits every 32-bit enum value sign-extended, since its\n__builtin_preserve_enum_value() returns int, so a GCC object with an\nunsigned enum value in [0x80000000, 0xffffffff] is now refused. That\nneeds to be fixed in GCC.\n\nPatch 2 tests the unsigned enum values. With GCC, the test is skipped\nif the target BTF has the unsigned enum.\n\nChangelog:\n  v5 -\u003e v6:\n    - v5: https://lore.kernel.org/bpf/20261120214957.868409-1-yonghong.song@linux.dev/\n    - Extend a 32-bit enum value according to the kflag of its own enum\n      in bpf_core_calc_enumval_relo(), instead of zero-extending the\n      values in bpf_core_calc_relo() (patch 1).\n    - Don\u0027t take a target value with the kflag 0 as signed if the local\n      enum is signed, and drop its test (patch 3).\n    - Don\u0027t accept the sign-extended form of an unsigned enum value\n      emitted by GCC (patch 1), and skip the test with GCC instead\n      (patch 2).\n  v4 -\u003e v5:\n    - v4: https://lore.kernel.org/bpf/20261120165540.2074139-1-yonghong.song@linux.dev/\n    - Keep the sign extension in bpf_core_calc_enumval_relo(), and\n      zero-extend the 32-bit values of unsigned enums once in\n      bpf_core_calc_relo(). This drops btf_enum_value() from\n      include/linux/btf.h and the three helpers in relo_core.c. No\n      change in behavior (patch 1).\n  v3 -\u003e v4:\n    - v3: https://lore.kernel.org/bpf/20261119232647.3392045-1-yonghong.song@linux.dev/\n    - Take a 32-bit target enum value as signed if the target enum has\n      the kflag 0 but the local enum is signed, for the BTF of kernels\n      without enum signedness (patch 1).\n    - Test it with a target BTF whose enums have the kflag cleared\n      (patch 3).\n  v2 -\u003e v3:\n    - v2: https://lore.kernel.org/bpf/20261119051443.1902163-1-yonghong.song@linux.dev/\n    - Fold patch 3 into patch 1 and patch 4 into patch 2 to avoid test\n      failures when bisecting.\n  v1 -\u003e v2:\n    - v1: https://lore.kernel.org/bpf/20261118161053.1768878-1-yonghong.song@linux.dev/\n    - Accept the sign-extended enum values emitted by GCC (patch 3), and\n      make the new test work with GCC (patch 4).\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20261124000514.2955878-1-yonghong.song@linux.dev\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "885fd5836d3dd8c65f226e8615536196089648e1",
      "tree": "735c68e314d05b76f8a784727cdc0718f3ac05aa",
      "parents": [
        "4fad237494f100f3038509209d661b9a138b6ad3"
      ],
      "author": {
        "name": "Yonghong Song",
        "email": "yonghong.song@linux.dev",
        "time": "Mon Nov 23 16:05:24 2026 -0800"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:19:57 2026 +0000"
      },
      "message": "selftests/bpf: Test CO-RE relocations of unsigned 32-bit enum values\n\nTest the extension of unsigned 32-bit enum values in CO-RE relocations\nfrom the previous patch.\n\ntest_core_reloc_enumval gets an optional local enum with values out of\nthe range of int, i.e., an unsigned 4-byte enum, whose values clang\nemits zero-extended in the ld_imm64 of the relocations. The enumval\ntarget has the same enum with different values, 0x80000001 and\n0xffffffff, which are expected zero-extended in the 64-bit outputs.\n\nGCC\u0027s __builtin_preserve_enum_value() returns int, so GCC emits these\nvalues sign-extended, and libbpf refuses the object. With GCC, don\u0027t\nread the values of enum named_uint_enum. Only test whether the enum\nexists in the target BTF, which libbpf patches without checking the\nvalue, and skip the test if it does.\n\nWithout the fix, the check of the original value fails, and the whole\nobject is refused:\n\n  libbpf: prog \u0027test_core_enumval\u0027: relo #11: unexpected insn #53 (LDIMM64)\n          value: got 2147483648, exp 18446744071562067968 -\u003e 18446744071562067969\n  libbpf: prog \u0027test_core_enumval\u0027: relo #11: failed to patch insn #53: -EINVAL\n  #122/71  core_reloc/enumval:FAIL\n\nSigned-off-by: Yonghong Song \u003cyonghong.song@linux.dev\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261124000524.2956489-1-yonghong.song@linux.dev\n"
    },
    {
      "commit": "4fad237494f100f3038509209d661b9a138b6ad3",
      "tree": "0fdd9d201cf2122809fa860cb291a1371ebd6c58",
      "parents": [
        "351668b0b8b7e1447482595df4b2294dcffbb040"
      ],
      "author": {
        "name": "Yonghong Song",
        "email": "yonghong.song@linux.dev",
        "time": "Mon Nov 23 16:05:19 2026 -0800"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 03:19:57 2026 +0000"
      },
      "message": "libbpf: Fix CO-RE relocations of unsigned 32-bit enum values\n\nFor a BPF_CORE_ENUMVAL_VALUE relocation, bpf_core_calc_enumval_relo()\nreads the value of a 32-bit enumerator from btf_enum-\u003eval, which is\n__s32, so the value is sign-extended to 64 bits even if the enum is\nunsigned. A value in [0x80000000, 0xffffffff] of an unsigned enum\nbecomes 0xffffffff80000000 or above.\n\nClang emits such a value zero-extended in the ld_imm64 of the\nrelocation, so the check of the original value fails, and the whole\nobject is refused even if the target value is the same:\n\n  enum dentry_flags { DCACHE_PRIVATE \u003d 0x80000000 };\n  out \u003d bpf_core_enum_value(enum dentry_flags, DCACHE_PRIVATE);\n\n  libbpf: prog \u0027p\u0027: relo #0: unexpected insn #0 (LDIMM64) value: got\n          2147483648, exp 18446744071562067968 -\u003e 18446744071562067968\n  libbpf: prog \u0027p\u0027: relo #0: failed to patch insn #0: -EINVAL\n\nAnd a target value in that range is patched sign-extended, which is\nwrong wherever the program uses it as a 64-bit value. The x86 vmlinux\nhas 29 enums with such values, e.g., dentry_flags, init_ns_ino and\ne820_type.\n\nCommit 89e7a42e3030 (\"libbpf: Normalize enum values according to\nsignedness\") fixed this for btf_dump and map fields, but not for CO-RE\nrelocations, whose relo_core.c is also built into the kernel. Extend a\n32-bit enum value according to the kflag of its enum in\nbpf_core_calc_enumval_relo(), i.e., sign-extend it if the kflag is 1,\nand zero-extend it otherwise, for both the local and the target value.\n\nThe kflag 0 is taken as unsigned. pahole records the signedness since\nv1.24. The BTF of a kernel before v6.0 has the kflag 0 on every enum,\nthough, so a negative target value there is now patched zero-extended.\n\nGCC sign-extends every 32-bit enum value in the ld_imm64, since its\n__builtin_preserve_enum_value() returns int, so a GCC object with an\nunsigned enum value in [0x80000000, 0xffffffff] is now refused. That\nneeds to be fixed in GCC, whose builtin should return long, as clang\u0027s\ndoes.\n\nFixes: 776281652ddc (\"libbpf: Permit 64bit relocation value\")\nSigned-off-by: Yonghong Song \u003cyonghong.song@linux.dev\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261124000519.2956216-1-yonghong.song@linux.dev\n"
    },
    {
      "commit": "351668b0b8b7e1447482595df4b2294dcffbb040",
      "tree": "dbef931fabd237d689be5ed93f45edf9037ec9b3",
      "parents": [
        "2bf3351c5f894697e8443eeef5333d4c4ce90cab"
      ],
      "author": {
        "name": "Jose Fernandez (Anthropic)",
        "email": "jose.fernandez@linux.dev",
        "time": "Fri Nov 20 04:28:36 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Tue Nov 24 00:20:09 2026 +0000"
      },
      "message": "bpf: Make bpf_lsm_get_retval_range() return void\n\nWith CONFIG_BPF_FMODRET_SCAN\u003dy, fmod_ret programs can attach to tagged\nfunctions, so a program on bpf_lsm_get_retval_range() can make it fail\nfor an LSM hook that returns a value. get_func_retval_range() then\nreports no range, and do_refine_retval_range() and check_helper_call()\nignore the error and use a range the call did not set.\n\nThe function fails only for a void hook, which every caller but\nget_func_retval_range() already rules out. Check for a void hook there\nand make the function return void, so resolve_btfids no longer tags\nit and no fmod_ret program can attach to it.\n\nFixes: bc45414d1690 (\"bpf: Allow fmod_ret on tagged functions and check the return value\")\nSigned-off-by: Jose Fernandez (Anthropic) \u003cjose.fernandez@linux.dev\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nAcked-by: Anton Protopopov \u003ca.s.protopopov@gmail.com\u003e\nLink: https://patch.msgid.link/20261120-jf-bpf-lsm-retval-range-v1-1-d712e4090907@linux.dev\n"
    },
    {
      "commit": "2bf3351c5f894697e8443eeef5333d4c4ce90cab",
      "tree": "7aa0d5c4fcc320882369311cffa6bb9afbba9f95",
      "parents": [
        "9867c61abbd44f7053a871566b3d982f62c6d8dc",
        "695ce5ca70fcc4cc430a6d215cf44b033d0d96bc"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:33 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:33 2026 +0000"
      },
      "message": "Merge branch \u0027bpf-fixes-for-the-verifier-passes\u0027\n\nAlexei Starovoitov says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nbpf: Fixes for the verifier passes\n\nFrom: Alexei Starovoitov \u003cast@kernel.org\u003e\n\nFixes for the series \"bpf: Verify in passes, with equations in the state\".\nNone of the bugs makes the verifier accept an unsafe program.\n\nPatch 1: the build fails without CONFIG_NET.\nPatches 2, 3 and 5: the path-sensitive run finds a failing path that the\nprogram does not have. It cuts the budget, and a valid program is rejected.\nPatch 4: the log shows only the last basic block, not the path to the error.\nPatch 6: after a failed allocation a load gets -E2BIG in place of -ENOMEM.\nPatch 7: nfp can refuse to attach a valid offloaded program.\n\n385572 programs of cilium, tetragon, tracee, scx, Meta, systemd, rust-bpf and\nother projects have the same verdict and the same number of processed insns.\n\nv1 -\u003e v2:\n- patch 1: add the Closes tag.\n- patch 2: do not skip if the bound differs, in place of a guess. A bound that\n  is a range gave a false guess, and a rejected program took much more insns.\n  Truncate the bound to u32 for jmp32.\n- patch 3: describe a case that is not fixed.\n- patch 5: drop only a path that is out of frames, not each -E2BIG.\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20261121221344.3958866-1-alexei.starovoitov@gmail.com\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "695ce5ca70fcc4cc430a6d215cf44b033d0d96bc",
      "tree": "7aa0d5c4fcc320882369311cffa6bb9afbba9f95",
      "parents": [
        "9ec090cadfe0aefe32bacf1807ad2997060a63f9"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:44 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Replay an offloaded program with the precision of the good pass\n\nOnly offloaded programs are affected. A valid program loads, but nfp\ncan refuse to attach it. No unsafe program is accepted, because the\npass that the driver sees is a full pass with all checks.\n\nThe driver must see only a pass without errors. So the verifier runs\nthe good pass once more with the hooks of the driver. This is the\nreplay. Before it, bpf_partition_for_pessimized() tries more precision.\nIf that fails, bpf_restore_precision() takes the precision masks back\nfrom prec-\u003eundo.\n\npartition_next() makes that copy. If find_calls_to_unproven() is over\nthe cost limit, partition_next() does not run, and prec-\u003eundo has the\nmasks of an older pass. The limit is low after the first good pass, so\nthis happens if a later good pass ends just below it. Then the replay\ncan join more states than that pass did. In a test with a stub driver\nmax_pkt_offset was 448 in place of 56. If that value and the MTU are\nabove the packet split boundary, nfp refuses to attach the program.\n\nMake the copy in bpf_partition_for_pessimized() too.\n\nFixes: cd97aa1387d9 (\"bpf: Do not let a join raise what a program requires\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-8-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "9ec090cadfe0aefe32bacf1807ad2997060a63f9",
      "tree": "0cefb0f1f917818455afe7ea34339182747ee1f4",
      "parents": [
        "5f2775434dc280e888bd49c722ba06dfd0be261b"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:43 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Return -ENOMEM if the next partition has no memory\n\nThis fixes the error code after a failed allocation. No unsafe program\nis accepted.\n\nIf a pass is over its budget, bpf_undo_precision() undoes the last\npartition and calls partition_next() to select another one. That call\ncan fail with -ENOMEM. bpf_undo_precision() returns bool, so the error\nbecomes \"there is no other partition\". If the pass had no other error,\nthe load fails with -E2BIG. The log has an error of a less precise pass\nand \"the limit on cost or memory ended pass N\". If the program is\nvalid, the user looks for a problem that is not there.\n\nReturn the value of partition_next(), and end the load with -ENOMEM.\nDo that also if the pass had another error. Before, the verifier tried\nthe allocation again, and the program could load. If an earlier pass\nwas good, the program still loads with that pass.\n\nFixes: ecb43124db39 (\"bpf: Partition the states after an error\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-7-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "5f2775434dc280e888bd49c722ba06dfd0be261b",
      "tree": "8e6379f4e0d549a259729ad365855e3789a4d9b7",
      "parents": [
        "e42c915f6a9fd5c6b2f4036ec2e67a1378c6fbf0"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:42 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Drop a path of a path-sensitive run that is out of frames\n\nA valid program with recursion can be rejected with \"the call stack of\n33 frames is too deep\". No unsafe program is accepted, because the\npath-sensitive run accepts nothing.\n\nA pass can check a recursive function on its own, with no frame for\neach call. The run has each call of a static function in frames. It can\nrun out of frames and get -E2BIG where no pass does. If the last pass\nhad another error at that call, for example a callx with an unknown\ntarget, the run takes -E2BIG for the failing path. The budget of the\nnext passes is cut. If the program needs more, it is rejected.\n\nDrop such a path. If each pass is out of frames too, the program is\nstill rejected. Now its log has only the last basic block, not the full\npath.\n\nFixes: a46de5d64e18 (\"bpf: Reproduce an error on one path, with no joins\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-6-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "e42c915f6a9fd5c6b2f4036ec2e67a1378c6fbf0",
      "tree": "f0925fe5626a4a57801a9db31a925c79f3825a0f",
      "parents": [
        "e247bf610bee123b88683ffa4391e536b5342f4f"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:41 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Do not lose the failing path if only an equation differs\n\nThis fixes the log of a rejected program. It is not a safety bug: only\nthe path-sensitive run uses bpf_equations_hash(), and that run accepts\nnothing.\n\nAfter a pass with an error, the run looks for one path to the error and\nputs it in the log. It drops a state if a state with the same hash was\nat the insn. The hash has the xregs that share a sym, but not their\nrelation:\n\n  r1 \u003d unknown; r6 \u003d r1;\n  if (rnd) r6 +\u003d 1;\n  if (r6 !\u003d r1) bad access;\n\nr6 \u003d\u003d r1 and r6 \u003d\u003d r1 + 1 have the same bounds and the same hash. The\nfirst state does not get to the bad access. The second one is dropped,\nso the run finds no failing path. The program is still rejected, but\nthe log has only the last basic block.\n\nHash the relation too: both coefs, and the offset between the xreg and\nthe first xreg of its sym. Now the log has the path from insn 0 through\n\u0027r6 +\u003d 1\u0027 to the bad access.\n\nFixes: a46de5d64e18 (\"bpf: Reproduce an error on one path, with no joins\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-5-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "e247bf610bee123b88683ffa4391e536b5342f4f",
      "tree": "280c83efb9c4d4c631878153e2ba6ba8bb6f287c",
      "parents": [
        "d7db96e1c61beca350d1f9a48c5a5e802b3f4ca7"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:40 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Mark a skip of trips as a guess if a 32-bit value wraps\n\nA valid program can be rejected. No unsafe program is accepted, because\nthe path-sensitive run accepts nothing.\n\nAfter a pass with an error, the run looks for one path to the error.\nIt skips trips of a loop: it adds step * trips to each xreg that moves.\nIt adds in 64 bits, but a 32-bit insn wraps:\n\n  r7 \u003d 0;\n  for (i \u003d 0; i \u003c 100; i++) {\n          x \u003d r7;\n          if (!flag) w7 +\u003d 0x4000000;\n  }\n  if (!flag) buf[x - 0x8c000000];\n\nIf flag is 0, x is 0x8c000000 after the loop. The skip gives\n0x18c000000. No path has this value, but the access to buf fails with\nit. The error counts as real, so the budget of the next passes is cut.\nIf the program needs more than that budget, it is rejected.\n\nIf the skip moves a number past a multiple of 2^31, a 32-bit insn can\nwrap. If such an insn writes an xreg that the skip moves, and the upper\nhalf is live, mark the skip as a guess. A guess does not cut the budget.\n\nThe test sees the values at the header. It can miss a wrap if a 64-bit\ninsn adds to the result in the same trip: \u0027w7 +\u003d 1; r7 +\u003d 5\u0027. Such a\nprogram is handled as before.\n\nFixes: a46de5d64e18 (\"bpf: Reproduce an error on one path, with no joins\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-4-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "d7db96e1c61beca350d1f9a48c5a5e802b3f4ca7",
      "tree": "847fd7d1864a4bbd8dd5c2c8e967f84c9a9350e7",
      "parents": [
        "625e1bdc1db807e3cf182ff71f9624124b9a2fd3"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:39 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Do not skip trips if the bound moves\n\nA valid program can be rejected. No unsafe program is accepted, because\nthe path-sensitive run accepts nothing.\n\nAfter a pass with an error, the run looks for one path to the error.\nIt skips trips of a loop. It gets the number of trips from the step of\nthe iv and the bound, as if the bound stays:\n\n  i \u003d 0; n \u003d 60;\n  do { end \u003d flag ? 60 : --n; } while (++i \u003c end);\n  buf[n - 30];\n\nIf flag is 0, the loop ends at i \u003d 30, n \u003d 30. At i \u003d 5, n \u003d 55 the run\ncounts 50 more trips and skips to i \u003d 54, n \u003d 6. No path has this state,\nbut the access to buf fails with it. The error counts as real, so the\nbudget of the next passes is cut. If the program needs more than that\nbudget, it is rejected.\n\nKeep the bound in exit_threshold, which this run does not use, and\ncompare it with the bound of the saved trip. If it moved, do not skip.\nIf the bound is a range, the jump moves one end of it. Keep the other\nend. If the jump refines that end too, a later saved trip has the new\nvalue, and the run skips then.\n\nFixes: a46de5d64e18 (\"bpf: Reproduce an error on one path, with no joins\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-3-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "625e1bdc1db807e3cf182ff71f9624124b9a2fd3",
      "tree": "94e941ca2bb846f682c0a0a747bc379ecff8ba0a",
      "parents": [
        "9867c61abbd44f7053a871566b3d982f62c6d8dc"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 22:13:38 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 23:32:32 2026 +0000"
      },
      "message": "bpf: Fix the build without CONFIG_NET\n\noffload.o is built only with CONFIG_NET. Without it the verifier links\nonly if the compiler removes each call of an offload function as dead\ncode. It does not do that for two calls:\n\n  undefined reference to `bpf_prog_offload_verify_insn\u0027\n  undefined reference to `bpf_prog_offload_verifier_prep\u0027\n\nAdd stubs for the offload functions that bpf_verifier.h declares.\n\nFixes: cd97aa1387d9 (\"bpf: Do not let a join raise what a program requires\")\nFixes: 09c84023b0b4 (\"bpf: Verify in passes\")\nReported-by: kernel test robot \u003clkp@intel.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261121221344.3958866-2-alexei.starovoitov@gmail.com\nCloses: https://lore.kernel.org/oe-kbuild-all/202611220224.dm18oPJv-lkp@intel.com/\n"
    },
    {
      "commit": "9867c61abbd44f7053a871566b3d982f62c6d8dc",
      "tree": "20fe8c040f8569a1f603c4f62c81f3f2bb35c08f",
      "parents": [
        "27d68caf0e220c1a024c53bfe77b46b07ce201b1",
        "a45635128d1e80429d5b4f2b27eeaf8751a6b092"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:42 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:25:13 2026 +0000"
      },
      "message": "Merge branch \u0027bpf-verify-in-passes-with-equations-in-the-state\u0027\n\nAlexei Starovoitov says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nbpf: Verify in passes, with equations in the state\n\nThis series replaces the main analysis of the verifier and scev.c. Against\nbpf-next, the base of the series:\n\n  - More valid programs load. The verdict depends less on the code pattern.\n  - Numbers keep states apart only if an error, or a bound that the program\n    requires, depends on them.\n  - The work does not grow with the number of iterations of a loop, unless an\n    error needs them one by one.\n  - The log shows a path to the bug, if the verifier finds one.\n  - The proof is separate from the guesses. There is less code.\n\nThis letter compares three verifiers:\n\n  7.4-rc3    follows one path after another. It has scev.c and no flow.c.\n  bpf-next   ea80d2afd285, the base of v1. flow.c joins states.\n  series     bpf-next with these patches.\n\nA trip is one iteration of a loop. The sections below explain the other words.\n\n                        7.4-rc3               bpf-next              series\n  two states meet       prune or keep apart   guess: join or        join; keep apart after\n                                              keep apart            an error\n  values that matter    backtrack.c, for      8 tables, before      backward slice from\n                        each path             the pass              the error\n  related numbers       ids of copies         value numbers of      equations in the state\n                                              scev.c, rules\n  loop, trip count      scev.c, else each     scev.c, else each     trip index, checked\n                        trip                  trip up to a limit\n  loop, no trip count   each trip; widen at   each trip up to a     join and widen,\n                        may_goto, iterator    limit, then widen     may_goto\n                                              and may_goto\n  static function       at each call          once for the joined   once for each\n                                              calls (*)             instance (*)\n  limits                1M insns, 8192 jumps  states, trips         cost, memory\n\n  (*) At each call, if the function gets a pointer to the stack.\n\n  331763 builds of 6005 programs of other projects load on all three:\n  insns, mean           18110                 2716                  1750\n  insns, median         585                   397                   384\n  time, mean, ms        23.2                  10.3                  5.2\n  time, median, ms      1.8                   2.1                   1.0\n  peak states, mean     562                   143                   18\n  peak states, median   41                    22                    6\n\nPatches 1 and 2 make the analyses before the main pass faster. They give most of\nthe gain in time against bpf-next: with them alone the mean is 6.1 ms, and the\nmedian is 1.0 ms.\n\nThe problem\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nTwo states meet at a join point of the CFG. The verifier can join them or keep\nthem apart. An example:\n\n  state A: i \u003d 0..63    err \u003d 0    --+\n                                     +--\u003e join, or keep apart ?\n  state B: i \u003d 64..max  err \u003d -22  --+\n\n  join         cheap, but it can lose \"err \u003d\u003d 0 means i \u003c 64\"\n  keep apart   exact, but n branches can make 2^n states\n\n7.4-rc3 does not join at a branch. It stops (\"prunes\") a path if an earlier\nstate has all values of the path in the registers that matter (\"precise\"). Else\nit keeps the states apart. No fact is lost there, but the paths multiply. The\nlimits are 1M insns and 8192 pending jumps: jumps where one side waits for its\ncheck. In loops it can lose facts. scev.c gives each counter its own range. At\nmay_goto, an iterator or a callback a number that is not precise becomes\nunknown.\n\nbpf-next makes the choice as the states meet. It does not know yet if the join\nloses a needed fact. So it guesses: 8 tables that tell which values matter,\none rule for each code pattern, and limits on states. The guess is final, and it\ncan be wrong in two ways:\n\n  if the states are                   then\n  joined, and a needed fact is lost   a valid program is rejected\n  kept apart, with no need            the states can grow to the limit\n\nThis series decides after the error:\n\n  7.4-rc3:    each path --\u003e error or limit ? --yes--\u003e REJECT\n\n  bpf-next:   guess --\u003e pass --\u003e error ? --yes--\u003e REJECT\n\n  series:     join all --\u003e pass --\u003e error ? --no--\u003e ACCEPT\n              numbers       ^          | yes\n                            |          v\n                            +-yes- partition ? --no--\u003e REJECT\n\nA pass checks all functions. An insn whose check fails in a pass is \"unproven\".\nA partition keeps more states apart in the next pass (trace partitioning). The\nfirst partition makes a backward slice from the unproven insn. It gives two sets\nof registers and stack slots, the \"deps\":\n\n  data_deps      they flow into an operand of the unproven insn\n  control_deps   they flow into a jump that can skip that insn\n\nThe join rule looks only at the deps that differ between two states. A \"gap\" is\na value of the join that is in neither state.\n\n  if the deps that differ are      then         example\n  not in data_deps                 join         only err differs\n  one, in data_deps, no gap        join         i \u003d 0..7 and i \u003d 8..9\n  one, in data_deps, with a gap    keep apart   i \u003d 0..1 and i \u003d 100\n  two or more, one in data_deps    keep apart   i and err above\n\nIf one state has all values of the other in the deps, they are joined. A state\nthat comes back to a loop header is joined. Later partitions keep more apart.\n\nAll other numbers stay joined. Two states with different locks, references, or\ntypes of a live register stay apart from pass 0.\n\nA pass without errors is a \"good pass\". It is a complete proof. What a pass\nkeeps apart is its \"precision\", and it is a guess. A wrong guess costs time,\nadds a may_goto or a nospec insn that is not needed, or rejects a valid program.\nIt cannot accept an unsafe program. A loop \"gets may_goto\" if the verifier adds\nthis insn to it. At run time the insn can stop the loop before its end. Then the\nfunction returns 0 or, if that is not possible, the code after the loop runs.\n\nWhat gets better\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nThe examples are C, built with clang 21, -O2, -mcpu\u003dv4. barrier_var() is left\nout. The counts are \"insns processed\". The verdicts are the same for\n-mcpu\u003dv2/v3/v4 and -O1/-O2/-O3/-Os, with one exception in example 5. All\nexamples are valid, except MAX \u003d 64 in example 8. \"old\" is 7.4-rc3 and bpf-next,\nif they give the same verdict. I also tested 16 variants in which the largest\naccess ends at the last byte. 7.4-rc3 loads 7 of them, bpf-next 1, the series\nall. If the access can go one byte further, all three reject them.\n\n1. Only the correlated branches in the slice keep states apart\n--------------------------------------------------------------\n  i \u003d ktime(); err \u003d 0;                 i is any u64\n  if (i \u003e 63) err \u003d -22;                err stores the result of i \u003e 63\n  c1 \u003d rnd() ? 1 : -1;  ...  cN \u003d ...   N more stored conditions\n  if (c1 \u003e 0) cnt[1]++; ...             buf[i] does not depend on them\n  if (err) return 0;                    correlated with \u0027if (i \u003e 63)\u0027\n  return buf[i];                        char buf[64]\n\n  N                   4        8        12       24\n  7.4-rc3    insns    498      13765    341011   REJECT\n             time     0.5 ms   9 ms     213 ms   656 ms\n  bpf-next   insns    396      8090     REJECT   REJECT\n             time     0.7 ms   60 ms    688 ms   1.5 s\n  series     insns    242      470      698      1683\n             time     0.4 ms   0.7 ms   1.1 ms   2.6 ms\n\n7.4-rc3 marks c1 .. cN as precise, because they decide a jump. So the paths\nmultiply. With N \u003d 16 it gets to the limit of 1M insns.\n\nbpf-next keeps states apart for each stored condition, because a jump tests it.\nWith N \u003d 12 it gets to its limit on states. It joins all states, and loses the\nrelation between i and err.\n\nThe series joins all numbers in pass 0. The join loses the relation, and buf[i]\nis unproven. i is in data_deps, err is in control_deps. Pass 1 keeps two states\napart: both i and err differ. c1 .. cN are not in the deps and stay joined.\n\n2. The verdict does not depend on the code pattern\n--------------------------------------------------\n  off \u003d 0; len \u003d 64;                     char buf[64]\n  if (x) { off \u003d 56; len \u003d 8; }\n\n                                         7.4-rc3   bpf-next          series\n  probe_read_kernel(buf + off, len, p)   loads     loads             loads\n  buf[off + len - 1]                     loads     REJECT, off\u003d119   loads\n  buf[off + len / 2]                     loads     REJECT, off\u003d88    loads\n  buf[off * len / 8]                     loads     REJECT, off\u003d448   loads\n\n7.4-rc3 checks the two paths one by one. bpf-next has a table for the first row,\nand none for the others.\n\nThe series has no table. The join finds off \u003d 56 * s, len \u003d 64 - 56 * s, where s\nis 0 or 1. That proves rows 1, 2 and 3 in pass 0. Row 4 is not linear: it is\nunproven, and pass 1 keeps the two states apart.\n\n3. The work does not grow with the trip count\n---------------------------------------------\n  append    for (i \u003d 0; i \u003c N; i++) {\n                    n \u003d read_str(big + off, 16);\n                    if (n \u003c 0 || n \u003e 16) break;\n                    off +\u003d n;\n            }\n  compact   for (i \u003d 0; i \u003c N; i++) if (in[i]) out[n++] \u003d in[i];\n  reverse   for (l \u003d 0, r \u003d N - 1; l \u003c r; l++, r--) swap(a[l], a[r]);\n  best      for (i \u003d 0; i \u003c N; i++) if (x \u003e max) { max \u003d x; at \u003d i; }  a[at]\n  nested    for (j \u003c N) { for (k \u003c N) off +\u003d 0..1; off +\u003d 0..1; }  a[off]\n\nA trip is one iteration of a loop. Insns processed for each N:\n\n            7.4-rc3                     bpf-next                    series\n  N         100      1000     10000     100      1000     10000     each N\n  append    1204     12004    REJECT    1104     11004    REJECT    38\n  compact   REJECT   REJECT   REJECT    1104     11004    REJECT    37\n  reverse   554      5504     55004     554      REJECT   REJECT    38\n  best      REJECT   REJECT   REJECT    1108     11008    REJECT    198\n  nested    50907    REJECT   REJECT    50907    REJECT   REJECT    55\n\nscev.c has no expression for off, n and at, and no trip count for \u0027l \u003c r\u0027. So\n7.4-rc3 checks the trips one by one, up to 1M insns or 8192 pending jumps. In\ncompact and best a branch in each trip changes a precise value, and the paths\nmultiply.\nbpf-next checks the trips one by one, if all trips take 100000 insns or less.\nWith no trip count it stops after 4096 insns. If N is larger, it rejects the\nprogram.\n\nThe trip index k is the canonical induction variable, and it is a value in the\nstate. The join at the loop header finds the values that are linear in k. One\njump bounds all of them:\n\n  append:   i \u003d k,  off \u003d 16 * k + d,  d \u003c\u003d 0      \u0027i \u003c N\u0027 bounds k\n\n4. A test of one number bounds the related numbers\n--------------------------------------------------\n  a and b are 0..65535\n  s \u003d a + b;\n  if (s \u003e 63) return 0;                      old:      REJECT, off\u003d65535\n  buf[a]                                     series:   13 insns\n\n  a is 0..7, b is 8..15                      char big[169]\n  for (i \u003d 12 * a; i !\u003d 12 * b; i +\u003d 12)     old:      REJECT\n          big[i]                             series:   34 insns, 15 trips\n\n  n \u003d bpf_get_stack(ctx, buf, 800, 0);       char buf[800]\n  if (n \u003c 0) return 0;                       old:      REJECT, off\u003d800 size\u003d800\n  bpf_get_stack(ctx, buf + n, 800 - n, 0);   series:   19 insns\n\n  off is 0..63                               char buf[64]\n  if (len \u003e 64 - off) return 0;              old:      REJECT, off\u003d63 size\u003d64\n  probe_read_kernel(buf + off, len, p);      series:   41 insns\n\nEach state has a table of equations. An insn makes them, a jump uses them, a\njoin guesses them, and a prune checks them. sym0 is a symbolic value:\n\n  r2 \u003d r1                r1 \u003d sym0, r2 \u003d sym0\n  r2 \u003c\u003c\u003d 2               r2 \u003d 4 * sym0\n  if r1 \u003e 7 goto out     sym0 is 0..7, so r2 is 0..28\n\nThe check of a memory argument uses the equations too: offset n plus size\n800 - n is 800. test_get_stack_rawtp.c doubles its buffer to pass this check.\nPatch 45 gives the buffer its real size.\n\nA jump can make an equation: \u0027len \u003e 64 - off\u0027 gives d \u003d len + off - 64 and\nd \u003c\u003d 0. It does that only if len is in data_deps, so in pass 1.\n\n7.4-rc3 links only copies and \u0027x + constant\u0027, up to 5 at a jump. On bpf-next\nscev.c has one expression for all paths. An equation holds in one state, so it\ncan differ between paths.\n\n5. Loops without a trip count\n-----------------------------\n  lo \u003d 0; hi \u003d N;                    7.4-rc3:  REJECT, 1M insns, also for N \u003d 8\n  while (lo \u003c hi) {                            (N \u003d 8 loads with -Os)\n          mid \u003d (lo + hi) / 2;       bpf-next: REJECT, also for N \u003d 8\n          if (a[mid] \u003c key)          series:   79 insns,   N \u003d 8\n                  lo \u003d mid + 1;                970 insns,  N \u003d 1024\n          else                                 1596 insns, N \u003d 1M\n                  hi \u003d mid;\n  }\n\n  while (can_loop) {                 7.4-rc3:  1654 insns\n          if (push) {                bpf-next: REJECT\n                  if (d \u003d\u003d 63)       series:   313 insns\n                          break;\n                  d++;\n          } else {\n                  if (!d) break;\n                  d--;\n          }\n          buf[d]\n  }\n\n7.4-rc3 checks the trips one by one. clang makes two jumps for \u0027a[mid] \u003c key\u0027.\nOn the path where they disagree, lo and hi do not change, so the paths are long.\nIn the second loop d has 64 values, and may_goto prunes a state that repeats.\n\nIf a[mid] or buf[d] is unproven in pass 0, lo, hi and d get into the deps. Then\nthey are \"widened\": a bound that grows moves to the next constant of the loop.\nIf that is not sufficient, a partition peels only the loop that made one of them\nimprecise: its trips are checked one by one. The binary search has no trip\ncount, so it gets may_goto.\n\n6. Calls are context-sensitive\n------------------------------\n  static u64 next(u64 x) { return x + 1; }      char buf[64]\n\n  i \u003d next(7);                       7.4-rc3:  18 insns\n  sum \u003d next(rnd());                 bpf-next: REJECT, i is any number\n  buf[i]                             series:   24 insns\n\n7.4-rc3 checks a static function again at each call, on each path. bpf-next\njoins the two calls.\n\nThe series checks a static function once for each instance. An instance is an\nentry state, its exit states and its calls. Here next(7) is checked first, and\nit gets the exit state with 8. If two calls share an instance and this causes an\nerror, the next pass gives each call its own instance. If the function gets a\npointer to the stack, bpf-next and the series check it at each call too.\n\n  static bool ok(u64 x) { return x \u003c 64; }\n\n  if (!ok(x)) return 0;              7.4-rc3:  22 insns\n  buf[x]                             bpf-next: REJECT\n                                     series:   118 insns\n\nAn instance does not know that its argument is x of the caller. If an error\ndepends on such an argument, a partition checks this call with the state of the\ncaller.\n\n7. Arrays of pointers on the stack\n----------------------------------\n  char *p[2] \u003d { a, b };           old:      REJECT, \"invalid mem access\"\n  return p[i \u0026 1][63];             series:   45 insns\n\n  bpf_for(i, 0, 2)                 old:      REJECT, \"invalid mem access\"\n          sum +\u003d p[i][63];         series:   135 insns\n\nA load from one of several stack slots gives a number. If a later insn needs a\npointer, the next pass \"forks\" the state: it does the load once for each slot.\n\n8. The log shows the bug\n------------------------\n  for (i \u003d 0; i \u003c 100000; i++)\n          if (rnd() \u0026\u0026 n \u003c MAX) n++;\n  buf[n]                             char buf[64], n is in R6\n\n  MAX \u003d 63, valid\n    7.4-rc3    BPF program is too large. Processed 1000001 insn\n    bpf-next   R6\u003dscalar()\n               math between map_value pointer and register with unbounded\n               min value is not allowed\n    series     loads, 198 insns\n\n  MAX \u003d 64, off by one\n    7.4-rc3    R6\u003d64, after 899878 insns\n               invalid access to map value, value_size\u003d64 off\u003d64 size\u003d1\n    bpf-next   the same message as for MAX \u003d 63\n    series     R6\u003d0..64, after 13964 insns\n               invalid access to map value, value_size\u003d64 off\u003d64 size\u003d1\n\n7.4-rc3 checks the 100000 trips one by one: the first path takes 900k insns. It\nshows the path to the bug, if it gets there before its limit.\n\nbpf-next prints a joined state. The author cannot tell a bug from a limit of the\nverifier. The series tries to reproduce the error in a path-sensitive run: one\npath after another, with no joins. The path on which the check fails is the\nfailing path. The log shows it from insn 0. With a failing path the error is\nprobably real. So the verifier decreases its limit on work, see section 10.\n\"The price\" has the exception. R6 has a range on one path, because clang makes\n\u0027n +\u003d rnd() \u0026 1\u0027 with no branch.\n\n9. The proof is separate from the guesses\n-----------------------------------------\nThere are two kinds of code in the verifier:\n\n  trusted   A bug in it can accept an unsafe program. It is the proof: the\n            checks of an insn, the compare and the join of states.\n  guess     It selects what to try next, and trusted code checks the result. A\n            bug in it can reject a valid program or waste time. It cannot\n            accept an unsafe program.\n\nIn 7.4-rc3 almost all of this code is trusted. If a bug in backtrack.c misses a\nregister, a path with an error can be pruned. Its guesses are small: which\nstates to keep, and which numbers to widen. bpf-next mixes the two kinds in\nflow.c (\"both\"). The series puts the guesses into their own files:\n\n  7.4-rc3      lines  kind      bpf-next   lines  kind      series           lines  kind\n  scev.c        2945  trusted   scev.c      5504  trusted   equation.c        2423  trusted\n  states.c      1767  trusted   flow.c      3411  both      flow.c            1837  trusted\n  backtrack.c   1052  trusted   join.c       627  trusted   join.c             250  trusted\n                                states.c     700  trusted   states.c           671  trusted\n                                                            precision.c       1784  guess\n                                                            equation_join.c   1458  guess\n                                                            failing_path.c     269  guess\n  total         5764            total      10242            total             8692\n                                                            of them trusted   5181\n  verifier.c   24331  trusted   verifier.c 25361  trusted   verifier.c       25971  trusted\n\nSo the series has less code than bpf-next, and more than 7.4-rc3.\n\nAn example: what a bug in the trip count can do. The bug is invented. This loop\nmakes 34 trips, i is 0, 3, .. 99:\n\n  char a[100];\n  i \u003d 0; do { a[i] \u003d 0; i +\u003d 3; } while (i \u003c 100);\n\n7.4-rc3 and bpf-next compute the trip count N with a formula of scev.c. The\nformula has a case for each form of a loop: \u003c, \u003c\u003d, !\u003d, wrap around, 32-bit\ncounters. N gives the range of i at the loop header. Nothing checks N. The state\nthat comes back to the header gets the same range before the compare, so the\ncompare passes.\n\n  If the formula is correct, it gives N \u003d 34. The body is checked with\n  i \u003d 0..99.\n\n  If the formula has a bug, it can give N \u003d 30. Then the body is checked with\n  i \u003d 0..87 only. After the body i is 3..90, so \u0027i \u003c 100\u0027 looks always true.\n  The verifier removes the exit as dead code, and the program loads. At run\n  time the loop does not end, and it writes past the end of \u0027a\u0027.\n\nSo the formula and each case of it are trusted code.\n\nThe series has such a formula too, but it checks the result. The trip index k\nis 0 in the first trip, and the back edge adds 1. The formula is only a guess\nfor the largest k. \u0027i \u003d 3 * k\u0027 is a guess too. The verifier checks the body for\nk \u003d 0..guess. Then it compares the state that comes back with the header.\n\n  If the formula is correct, the guess is 33. The header has k \u003d 0..33 and\n  i \u003d 3 * k \u003d 0..99. After the body i is 3..102. The test \u0027i \u003c 100\u0027 lets only\n  3..99 go back, so k \u003d 1..33 comes back. This is inside of 0..33. So all trips\n  are checked, and this is the proof.\n\n  If the formula has a bug, the guess can be 29. The header has k \u003d 0..29 and\n  i \u003d 0..87. After the body i is 3..90, and all of it goes back: k \u003d 1..30. This\n  is not inside of 0..29. The guess fails. If another jump of the loop gives a\n  larger guess, the verifier takes it. This loop has none. So k gets no bound,\n  and the loop gets may_goto. The program loads, and all stores are checked.\n\nIf k has a bound in the state that comes back, the loop ends, because k grows by\n1 in each trip. If k has no bound up to 2^32, the loop has no trip count.\n\nSo a bug in the formula costs time, adds a may_goto, or rejects a valid program.\nIt cannot accept an unsafe program. A new case needs tests, not a proof.\n\n10. Two total limits replace the separate limits\n------------------------------------------------\n  7.4-rc3    1M insns processed, 8192 pending jumps, 256 functions, 64 maps,\n             256 kfuncs, 10000 calls in liveness. For a trip count: 1 back\n             edge, 4 exit tests, 256 exits\n  bpf-next   1024 states at an insn, 4096 live states + 16 for each insn, 65536\n             total states + 256 for each insn, 100000 and 4096 insns for the\n             trips of a loop, 8 trips of bpf_loop(), 10000 calls in liveness.\n             For a trip count: 16 back edges with 4 exit tests each, 256 exits\n             of an inner loop\n  series     cost 2^33 and memory 2 GB, for the full load\n  all three  1M insns in a program, 16 nested loops, 32 frames (7.4-rc3: 16)\n\nbpf-next removed the limits on insns processed, jumps, functions, maps and\nkfuncs. The series removes the others. Both have a limit on the ids of a state.\n\nA limit on one kind of work rejects a program that needs much of that kind and\nlittle else. \"Cost\" counts work, not time: one step of a scan costs 1, the check\nof an insn costs 128, a new state costs 512. So the verdict does not depend on\nthe speed or the load of the machine. The heaviest program of the projects below\ntakes 11% of the cost. The largest peak of memory of a program that loads is\n751 MB on 7.4-rc3, 304 MB on bpf-next and 265 MB with the series. The fixed\ntables take 1.2 KB for each insn, as in bpf-next. The passes can add 256 MB,\nplus 32 KB for each insn, within the 2 GB. So a small program gets less than\n2 GB.\n\nAfter the first error the limit on cost is 2^33 / 3, or two times the cost so\nfar if that is more. One more limit on precision: a state keeps 4 equations such\nas a + b for each register or slot that has an equation. A loop gets may_goto if\nk can be above 2^32.\n\nResults\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n7.4-rc3, bpf-next ea80d2afd285 and the series have the same config. The tests\nran on x86-64 and arm64. veristat ran as root on x86-64, in VMs with\nmitigations\u003doff and 20 loads in parallel. Time is the best of three runs. \"peak\nstates\" is the largest number of states that the verifier keeps at a time.\n7.4-rc3 does not count the states of pending jumps. In the wide tables rc3 is\n7.4-rc3, next is bpf-next, new is the series, and \"-\" is a program that does not\nload.\n\nSelftests\n---------\nAgainst bpf-next:\n\n  test_progs      no new failure. default: 770 tests, without some network and\n                  perf tests. no_alu32, cpuv4, KASAN: 400 tests of the verifier\n  test_verifier   793 of 793\n\nveristat on the selftests of 7.4-rc3, 5683 programs. The sums are for the 3958\nprograms that load on all three:\n\n                                    7.4-rc3     bpf-next    series\n  programs that load                3962        3990        3996\n  insns, sum                        5.15M       2.13M       600k\n  time, sum                         5.1 s       3.3 s       1.5 s\n  peak states, sum                  80k         64k         15k\n\nTop gains and top losses, by time against the faster one of the old verifiers:\n\n                                               insns             time, ms           peak states\n                                           rc3  next   new     rc3  next   new     rc3  next   new\n  pyperf600                               258k  151k   39k    1023   366   140     17k  6102   607\n  test_verif_scale2                       780k  520k   12k     201   174    25     801  4186     4\n  core_kern                               556k  540k   13k     165   184    28     693  4186     4\n  pyperf600_nounroll                      466k  184k  1324     359   125   3.4    1141   146    12\n  pyperf100                                43k   27k   27k     385   171    71    3216  2042     6\n  pyperf180                                74k   44k   22k     334   165    70    5515  3702   367\n  call_large_imm_test                      66k   66k   66k     192   258   103       2     6     7\n  test_verif_scale1                       547k   51k   12k     143    76    16    2146  8193     6\n  test_verif_scale3                       837k   58k   18k     210    81    26    2146  8193     6\n  gotol_large_imm                          40k   40k   40k     106   150    54       0     2     1\n\n  res_spin_lock_test_held_lock_max        2356  4088   49k     4.7   7.1   183      62   148   640\n  test_tcp_custom_syncookie                19k  5629   13k      21    14    28    1029   259   175\n  rbtree_search                           7326  4236  9558     7.7   7.8    13     118   232   532\n  profiler2 kprobe_ret__do_file_open      3038  1822  6588     4.0   3.9   7.3      87    40    15\n  bpf_loop_iter_limit_nested               624   496  1942    0.74  0.91   3.1      41    90    42\n  xdp_synproxy_kern syncookie_xdp          12k  4164  7630      19    11    13    1124   105    36\n\nveristat on the selftests of bpf-next. 5165 programs load on bpf-next and with\nthe series: insns change by -60%, time by -68%. Patches 1 and 2 alone change\nthe time by -21%. 11 more load with the series. The four new files of\nverifier tests have 271 valid programs. bpf-next rejects 72 of them.\n\nBPF CI builds the selftests in four ways: default, no_alu32, cpuv4, gcc.\n16306 programs of these builds load on bpf-next and with the series: insns\nchange by -66%, time by -76%. 60 more load with the series. In these builds\nand in the selftests above the series rejects one program that bpf-next loads:\nstash_rb_nodes, see \"The price\". Two tests of 7.4-rc3 load only on 7.4-rc3:\nprivate_stack_two_frames and test_arena_member_cb.\n\nPrograms of other projects\n--------------------------\nThe series loads all programs that 7.4-rc3 or bpf-next loads. It loads 8908\nmore than 7.4-rc3 and 2002 more than bpf-next. 1858 load only with the series.\n\nA build is one choice of release, clang (14 .. 20, 24), -mcpu (v1 .. v4), -O\nlevel and options of the project. A program counts once for each build. Not all\nprojects have all builds. Some builds are not options of the project:\n__always_inline is removed or becomes noinline, or constants of the loader are\nunknown. These have 27947 programs, 1983 of the 8908 and 232 of the 2002.\nThe 2002 are builds of 168 programs. For 164 of them another build loads on\nbpf-next. The objects are adapted to load on one kernel, with a patched\nveristat.\n\n\"progs\" is the number of all programs. insns, time and peak states are averages\nfor one program, over the programs that load on all three. Patches 1 and 2 alone\nchange the time of bpf-next by -41%, and all patches by -51%.\n\n                               programs that load       insns          time, ms        peak states\n  project              progs    rc3   next    new    rc3 next  new    rc3 next  new    rc3 next  new\n  all                 385572 331907 338813 340815    18k 2716 1750     23   10  5.2    562  143   18\n\n  alaz                    69     69     69     69   1477  853  846    4.1  4.3  2.1     96   28    9\n  bad-bpf                142    122    130    135   8091   77  100    5.6 0.61 0.35     64    6    4\n  bcc                   3364   3311   3319   3327    206   98  118   0.53 0.58 0.35     13   10    5\n  below                   14     14     14     14   1349  591  591    3.1  2.9  1.4    105   32    4\n  bouheki                 53     51     53     53    19k  717  471     39  3.3  1.5   1629   86   12\n  bpf-dev-tutorial       772    754    755    766    424   68   69   0.53 0.43 0.23     10    6    3\n  bpf-examples           481    470    464    475   8994  928  703    8.2  3.1  2.1     95   92   13\n  bpfjailer             1625   1411   1431   1465    16k 3185 5216     38   18   14   1333  104   48\n  bpfsnoop                78     75     76     76   2230  488  117    2.6  2.2 0.79     32   23    6\n  bpftune                125    113    113    125    475  311  284    1.7  2.0 0.85     31   23    5\n  cilium                5496   5490   5490   5490   7914 2023 1714     14   10  6.4    345  160   22\n  coolbpf               1178   1107   1156   1156    14k 3184 1752     29  9.9  5.6   1100  114   23\n  datadog-agent       234993 190601 192987 193112   2342  732  619    5.3  3.9  1.9    107   40    7\n  elastic-ebpf          1079    646    646   1065   3437 1368  561    4.6  3.0  1.2     36   15    7\n  falco                38108  37388  37583  37583    17k 1274 1035     18  6.7  2.6    283   53   13\n  gala-gopher            215    209    215    215   9241 5172 5114     15   14  7.2    412  196    8\n  inspektor-gadget      5422   5165   5402   5419    14k  515  339     19  2.3  1.0    124   22    5\n  katran                 238    236    236    236    15k 1630 2426     16  5.3  4.6    279   83   11\n  krie                  6930   6922   6908   6924   5080 2010 2007    9.5  7.5  3.1    177   31   15\n  kubearmor             1100   1100   1100   1100    57k  12k  12k    117   61   32   2793  554   22\n  kubescape node-agent   582    508    517    549   187k 7629 3195    213   20  7.5   1801  187   16\n  kubeshark-tracer       264    252    252    264   2239  610  521    3.2  2.7  1.3     88   15    4\n  kyanos                 818    818    818    818   8126 1248 1015     13  7.1  3.2    403   80    9\n  lightswitch             67     61     63     63    67k 1420  621     51  3.5  3.6    393   63   21\n  linux perf             345    335    341    341   8503 1073  286    9.3  1.6 0.62     67   17    6\n  linux selftests/net     47     41     41     41   2289 1409  678    4.4  4.5  2.1    122   92    8\n  loxilb-ebpf             47     45     45     45   1815 1273  350    1.9  2.1 0.77     66   28    5\n  lsmtrace              2375   2337   2359   2359    290  269  270    1.0  1.2 0.50     18    9    4\n  netobserv              389    361    373    373   1707  454  319    5.4  4.4  1.9    108   43    7\n  opentelemetry obi     3982   3915   3946   3965   5098  846  664    7.4  4.6  2.4    119   40    8\n  pulsar                 665    623    616    623   6307 2125 2121     27   12  5.9    423  119   10\n  pwru                   302    300    301    302   2600  654  307    5.1  3.9  1.8     69   23    4\n  rbperf                  20     20     20     20   4356 3006 3006     25   18  8.9    346  148    5\n  retis                   10      9      9     10   2659 2247 2110    8.2  9.6  4.4    210  118   15\n  retsnoop               118    118    118    118   3636 1301 1476    7.9  5.6  4.2    157   65   30\n  runtime-enforcer        66     66     66     66   1261  732  702    4.6  4.6  2.3    106   52   18\n  rust-bpf              1089      8    861    861     25   23   23   0.18 0.22 0.13      2    6    4\n  scx                   1272   1163   1165   1165   4681  480  501    8.1  2.7  1.7    215   35   19\n  seabee                 511    503    511    511    300  243  250   0.94  1.1 0.61     26   17   10\n  skywalking-rover      1310   1310   1310   1310   162k 1870 1241    141  8.4  3.8    547  103   14\n  stackrox fact          154     98     98     98   2624  835  633    6.4  6.0  2.5    101   43   11\n  systemd                575    541    559    560    12k 4450  790     14  6.4  2.1    312   70   15\n  tetragon             40814  37639  39944  40074   101k  15k 7712    117   46   25   3364  854   80\n  tracee               22774  20214  20957  22098    24k 3226 2849     34   15  6.4    656  115   24\n  tracexec                94     66     66     66   5501 1157 1371     13  5.1  3.7    541   58   27\n  wazuh                  183    175    183    183   168k  76k  76k    427  348  183    11k 1729   13\n  wprof                  192    192    192    192    11k 3602 5466     15   14   11    288  209   93\n  xdp-tools               67     67     67     67    25k 1656  797     19  3.1  2.0     68  143   13\n  31 more projects      4958   4868   4868   4868    382  241  244    1.2  1.4 0.68     25   15    5\n\nIn the 31 more projects the three verifiers load the same programs, and 7.4-rc3\ntakes less than 1000 insns on average. The number is \"progs\":\n\n  bpflock 250, bpfman 60, bpftop 8, calico 10, cilium/ebpf 122,\n  cloudflare lsm-bpf 27, dynolog 64, ebpf-exporter 581, ecapture 213,\n  ehids-agent 55, facebook dns 15, kubeskoop 184, learning-ebpf 20,\n  libbpf-bootstrap 88, libbpf-rs 149, libbpfgo 77, linux bpftool 24,\n  linux preload 8, linux samples 204, linux selftests/drv 3,\n  linux selftests/scx 621, pamspy 6, parca-agent 11, portmaster 32, psc 17,\n  ptcpdump 631, retina 25, rezolus 566, strobelight 6, systing 834, teleport 47\n\n- cilium has one build for each week from February to November 2026. tetragon,\n  tracee, falco (libs) and datadog-agent have the main branch and one release of\n  each minor version, from v1.0, v0.12, 0.13 and 7.50.\n- rust-bpf is github.com/4ast/rust-bpf: tests of Rust crates and of the Rust\n  library, and scx schedulers in Rust. LLVM with a pending pull request builds\n  them. Most of them need the arena stack, which 7.4-rc3 does not have. So the\n  row shows only 8 of them. For the 861 against bpf-next:\n  insns -51%, time +2%, peak states +45%.\n- Two of the 31 take many more insns than on bpf-next: cloudflare lsm-bpf\n  52 -\u003e 113, systing 286 -\u003e 355.\n- 44757 programs load on no kernel, 41881 of them in datadog-agent. Most of\n  these attach to a function that the kernel config does not have (583 in a\n  sample of 600).\n\nWhy the old verifiers reject a program that the series loads:\n\n                                               7.4-rc3    bpf-next\n  a bound is not proven                        3069       1959\n  an offset of 2^29 or more at a pointer add   739        0\n  limit of 1M insns                            2054       no limit\n  limit of 8192 pending jumps                  157        no limit\n  \"infinite loop detected\"                     3          0\n  limit on states                              no limit   30\n  a rule or a feature that came later          2886       13\n  total                                        8908       2002\n\nThe last error in the log gives the group. On bpf-next a limit can show as a\nbound that is not proven, see example 1. bpf-next has the same rule for a large\noffset as 7.4-rc3, and it loads these 739 programs. The last group is not about\nthe main analysis. On bpf-next it has the rules that patches 8 and 38 change. On\n7.4-rc3 it has:\n\n  tail call in a function that does not return int   1467\n  arena stack                                        840\n  32-bit add to a pointer                            328\n  arguments on the stack                             126\n  more than 256 functions                            13\n  others                                             112\n\nExamples of programs that only the series loads, in some -O2 builds with the\noptions of the project:\n\n  tracee             sys_exit_submit, sched_process_exec_signal\n  elastic-ebpf       fentry__vfs_rename, fexit__do_file_open\n  tetragon           event_execve, generic_retkprobe_event\n  datadog-agent      hook_cgroup_procs_write\n  obi                obi_packet_extender_find_existing_tp\n  bpftune            bpftune_sysctl\n  inspektor-gadget   trace_uprobe_mutex_unlock\n  systemd            monitor_varlink_socket_sendmsg\n\n144 programs load on 7.4-rc3 and with the series, and not on bpf-next:\ndatadog-agent 89, krie 16, kubescape node-agent 16, pulsar 7, others 16.\n\nTop gains and top losses\n------------------------\nThe number of programs whose time changes by more than 1 ms or 10 ms:\n\n                                       faster by           slower by\n                       load on both      1 ms     10 ms      1 ms     10 ms\n  series vs 7.4-rc3          331907    150316     49795       677        89\n  series vs bpf-next         338813    175428     31667      4173      1729\n\nEach table has the programs with the largest change of time, one program and one\nbuild for each project. Programs below 1000 insns are left out. A program can be\nin two tables with two builds.\n\n                                                               insns              time, ms\n  project          program                                 rc3  next   new      rc3  next   new\n  gains against 7.4-rc3\n  datadog-agent    socket__http2_headers_parser           738k  145k  141k     4866  1349   645\n  falco            sendmmsg_x                             950k  2249  2090     1630    15   7.1\n  tetragon         generic_lsm_actions                    951k  5183  3499     1306    11   8.9\n  tracee           trace_security_file_mprotect           866k   11k  8210     1301    55    20\n  inspektor-gadget ig_topfile_rd_e                        611k   14k  7615     1219    42    17\n  kubescape        tracepoint__x86_fpu_regs_deactivated   600k   13k  7545     1096    40    17\n  scx              flow_select_cpu                        293k  1145  1803     1046   5.8   5.8\n  krie             perf_event_syscall_table_ticker        865k   54k   27k     1093   156    58\n  coolbpf          trace_mremap_exit                      327k   40k   22k     1005    81    65\n  skywalking       go_tls_write_ret                       573k  4147  2585      684    19   8.2\n  pulsar           sched_switch                            48k   20k   20k      678   151    62\n  lightswitch      dwarf_unwind                           721k   12k  2119      594    22    14\n\n  gains against bpf-next\n  datadog-agent    __x64_sys_openat2_exit                    -   57k  2194        -  2310   9.7\n  coolbpf          trace_openat_exit                         -  944k   76k        -   949   213\n  falco            dump_task                                 -   44k   26k        -   632    90\n  rust-bpf         smol_str_ryu                              -  587k   76k        -   854   435\n  tetragon         generic_fexit_event                    291k  109k   29k      496   469   104\n  wazuh            path_rename_old_walk                   198k   90k   90k      504   425   188\n  systemd          userns_restrict_inode_symlink          301k  149k   819      286   139   2.5\n  tracee           uprobe_syscall_table_check             517k  127k   12k      518   150    31\n  bpfjailer        test_dyn_map                            63k   18k   11k      217   192    81\n  krie             perf_event_syscall_table_ticker        865k   54k   27k     1093   156    58\n  pulsar           sched_switch                            26k   20k   20k      672   146    57\n  kubearmor        enforce_proc                           201k   30k   27k      291   128    68\n\n  losses against 7.4-rc3\n  krie             perf_event_syscall_table_ticker        378k     -  455k      664     -   916\n  obi              obi_packet_extender_find_existing_tp   157k     -  113k      119     -   237\n  wprof            wprof_task_switch                      121k   32k   80k      154   112   202\n  datadog-agent    uprobe__http2_tls_filter                84k   33k   44k       87    85   136\n  coolbpf          unwind_native                           55k   31k   31k       69    84   113\n  bpfjailer        bpfj_remount                           1717  1110   16k      2.5   2.6    32\n  tetragon         generic_uprobe_process_event           7153  3856   29k       92   112   109\n  retsnoop         retsn_inj_kretprobe                    1378   642  6220      4.4   3.9    15\n  scx              layered_runnable                       9827  4457   12k       18    13    27\n  bpf-examples     flowmap_cleanup                        1446   423  4032      2.6   2.3    10\n\n  losses against bpf-next\n  rust-bpf         vec_sort_stable                           -   85k   95k        -   142   547\n  wprof            wprof_task_switch                      121k   32k   80k      154   112   202\n  coolbpf          trace_mmap_exit                           -   11k   53k        -    30   114\n  tetragon         generic_usdt_actions                   245k  4233   41k      156   7.3    85\n  kubearmor        enforce_proc                           254k   41k  112k      342   144   220\n  datadog-agent    socket__http2_filter                      -   36k   47k        -   100   160\n  krie             perf_event_syscall_table_ticker        504k   25k   97k      761    98   154\n  obi              parse_dns_response                        -   11k   33k        -    13    63\n  tracee           lkm_seeker_kset_tail                   342k   15k   76k      373    78   125\n  falco            dump_task                                 -   21k   71k        -    60    91\n  bpfjailer        bpfj_remount                           1717  1110   16k      2.5   2.6    32\n  scx              layered_runnable                       9827  4457   12k       18    13    27\n\nThe price\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n(35) means patch 35.\n\n- A program that needs more passes takes more insns: the count is the sum of\n  all passes. There is no separate limit on this count, in bpf-next or in the\n  series. In the series each insn adds to the cost, see section 10. Most\n  losses against bpf-next are such programs. 1032 of the 1729 are\n  generic_*_actions of tetragon: 6 -\u003e 38 ms on average (7.4-rc3: 179 ms). The\n  gcc build of the selftest strobemeta is one more: 254k -\u003e 383k insns,\n  482 -\u003e 1011 ms.\n\n- Time can grow when insns do not. The work on equations and on deps is not in\n  this count. See vec_sort_stable and unwind_native above. 43 of the 89\n  losses against 7.4-rc3 are of this kind.\n\n- Only a partition peels a loop. So a short loop without a trip count gets\n  may_goto, where the old verifiers check all trips. 7.4-rc3 does not add\n  may_goto. bpf-next adds it to 745 programs of the projects, the series to 290.\n  170 of the 290 do not load on 7.4-rc3, 30 do not load on bpf-next. The series\n  against bpf-next:\n\n    more may_goto     44 programs  rust-bpf 16, tracee 14, coolbpf 10,\n                                   bpfjailer 4\n    fewer may_goto   762 programs  rust-bpf 264, falco 211, tetragon 152,\n                                   datadog-agent 36, obi 34, others 65\n\n- After a join the verifier can fail to see that a path is dead. Then it does\n  not remove the code of that path. Here \"size\" is the number of insns in the\n  loaded program. The last column is for programs with the same number of\n  may_goto. Most of them are in tetragon. The largest growth is in\n  generic_lsm_process_event, size 4k -\u003e 17k. The row for 7.4-rc3 also has the\n  changes of bpf-next in the fixups.\n\n                         larger   smaller   sum of sizes   larger by 5%\n    series vs 7.4-rc3    19209    8650      +0.6%          1853\n    series vs bpf-next   7027     7991      +0.5%          346\n\n- If the address of a function is taken and it has a callx, it counts as\n  recursive. Then a program can fail if the function returns a pointer or passes\n  a pointer to the stack. bpf-next does the same, 7.4-rc3 loads it.\n\n- An unsafe program takes longer to reject. The verifier partitions more and\n  looks for a failing path first. These programs fail on each kernel that ran\n  them. Of the projects: those that get to the main analysis of bpf-next.\n\n                            programs  7.4-rc3  bpf-next  series  slowest, series\n    selftests of bpf-next   1964      not run  2.9 s     6.8 s   3.3 s\n    selftests of 7.4-rc3    1684      3.8 s    1.3 s     0.2 s   0.05 s\n    projects                3573      92 s     91 s      280 s   8.0 s\n\n  An off-by-one in example 3 takes up to 5 s for the largest N. The log of a\n  failing path through 10000 trips can have 170k lines.\n\n- A valid program can get to the limit on cost or memory. No program of the\n  projects does. These generated programs do. The first four are very large.\n  The last two are small, their states multiply:\n\n                                                     7.4-rc3        bpf-next\n    1000 calls with \u0026local, function of 10000 insns  REJECT         35 s\n    100k branches with 16 states each                REJECT         19 s, 4 GB\n    400k branches with a large stack                 REJECT         39 s, 14 GB\n    a loop of 240k insns with a stack of 2 KB        5 s, 2.2 GB    12 s, 2.2 GB\n    12 pairs of pointers that can be equal           4 s, 17 MB     REJECT\n    12 ring buffer records, each of 8 or 16 bytes    0.4 s          REJECT\n\n- A search with hand-written tests found more valid programs that bpf-next\n  loads and the series rejects. No program of the projects has such a shape:\n\n    3 nested loops in 12k insns take two locks in one of the trips\n    a function that callx calls stores an index and a flag for its caller\n    36 pairs of constants, then 20 branches that add to one of them\n    16 live pointers, each has a copy on one path that is never read\n    40 blocks with 10 pointers, each points to one of two members\n    a word of a table of pointers on the stack is added to such a pointer (43)\n    the only exit of a loop is after bpf_throw()\n    a path that only a join makes tests or uses a sum of 24 optional numbers\n    900 loops call one function that has 32k constants\n\n- A program is rejected if one call needs two different fixups (10):\n  bpf_obj_drop() for two types with different special fields, list push with two\n  node offsets. A compiler can make such a call. The fix is\n  __attribute__((nomerge)). stash_rb_nodes needs it (45).\n\n- The path-sensitive run skips trips of a long loop. If the step is not a\n  constant, the skip is a guess, and the failing path can be false (35). Then\n  the limit on cost is not decreased. An example of an unsafe program, and the\n  time to reject it:\n\n    for (i \u003d 0; i \u003c N; i++) sum +\u003d i;   N          1000     1000000\n    buf[sum]                            7.4-rc3    1.6 ms   0.4 s\n                                        bpf-next   1.4 ms   0.1 ms\n                                        series     11 ms    7 s\n\nOther changes of behaviour\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nAgainst bpf-next:\n\n- A loop without a trip count gets may_goto, unless it has may_goto or an\n  iterator, or all trips are peeled. If may_goto is not possible (no exit,\n  offload), or its new edge is not safe, the program is rejected. Only a\n  partition peels a loop. There is no trip count without CAP_PERFMON.\n- The form of a loop does not matter for the trip count: two entries, many\n  exits, many back edges. The trip index can be up to 2^32. Some loops lose\n  the trip count and get may_goto (44, 45).\n- Without bypass_spec_v1 a pointer add that ALU sanitation cannot mask gets a\n  nospec insn (11).\n- A pointer that is 2^29 or more away from the object fails at the access, not\n  at the add. An add of a number that can be -2^29 or less still fails. A far\n  load from a flexible array of a BTF object gets a fault handler, and a far\n  load-acquire fails (8).\n- Without allow_ptr_leaks a packet pointer is compared with data_end only from\n  -MAX_PACKET_OFF to 2 * MAX_PACKET_OFF (8).\n- Without allow_ptr_leaks a store of a pointer at a variable stack offset is\n  rejected (21).\n- With CAP_PERFMON a load can take a part of a spilled pointer at a constant\n  offset (8).\n- A function can leave a pointer to the stack in r0. The caller cannot read it\n  (38).\n- A join can increase a bound that is checked at attach time, such as the size\n  of the context. Such an insn is \"pessimized\", and it gets a partition in a\n  small budget. One case is not covered: a join hides that a path is dead, and\n  an insn there has constant operands (36).\n- Without CAP_BPF there are no equations. Without bypass_spec_v1 a join makes no\n  equations from constants, and pointers and speculative states have none.\n- Without CAP_BPF the limits on cost and memory are 1/32.\n\nHow to read the series\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nStart with patch 49. It rewrites Documentation/bpf/verifier.rst, and explains\nall parts and all words with examples.\n\nPatches 1 and 2 do not need the rest. Patches 3 .. 43 are one change, divided\nfor review. The kernel builds after each patch. After patches 3 .. 36 it has no\nmain pass, and each load fails with -EOPNOTSUPP. Programs load again from patch\n37 on. Only 3 lines are temporary, each other line changes in one patch only.\n\nRead the patches in this order:\n\n  49         docs\n  37         do_check_all(): the loop of passes\n  21-25      compare, unproven insn, deps, join rule, join\n  28-29      prune or join, the order of the worklist\n  16-20      equations: arithmetic, table, jump, insn, clean-up\n  26-27, 32  equations at a prune and at a join: check, guess, join rule\n  15, 30-31  loops: peel, trip index, trip count or may_goto\n  33-36      instances, partition and undo, failing path, pessimized\n  38-43      less work: fewer passes, one check of a loop body, fork\n  5-14       small changes that the above needs\n  3-4        deletions\n  44-48      selftests\n\nPatches with trusted code, see section 9: the checks of an insn (8-14, 19, 38,\n42), equation.c (16-20, 26, 30, 41), subsumes and join (7, 21, 25, 30), prune or\njoin and the order (28, 29), peel (15, 28, 31, 35), recovery after an unproven\ninsn (22), cycles get may_goto (31), exits of instances (33), liveness (2, 6),\nlimits (5), passes and snapshots (9, 35-37), the fork (43).\n\n  kernel/bpf and include   +11272   -12028   net -756\n  selftests                +10130   -1079    net +9051\n  docs                     +1499    -519     net +980\n\nChanges in v2\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n- The kernel builds after each patch. About 500 lines moved to another patch.\n- Fix the build of the selftests with GCC (47), and three warnings of clang\n  (23, 34, 35).\n- A far load from a flexible array of a BTF object gets a fault handler (8).\n- Valid programs that v1 rejects load now: a trip index that gets to S64_MAX\n  (30), an error in one function of a callx set (33), a recursion with two exit\n  insns (28), an AND that splits a number with a step (12).\n- Count the scan of a table of functions and the sort of gotox targets (5). An\n  error in the collection of thresholds does not leak the charge of memory (25).\n- A failed speculative state does not bring back a fastcall rewrite (11).\n- The log has no false trip count for a loop with an iterator or may_goto (31).\n- More selftests (46 .. 48), better comments (7, 8, 17).\n- Rebase on bpf-next 82cc2b4383e3. The tables have the numbers of v1. With v2\n  each program of the projects has the same verdict, and 5 have other insns.\n- v1: https://lore.kernel.org/r/20261120074430.2704488-1-alexei.starovoitov@gmail.com\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20261120204959.614908-1-alexei.starovoitov@gmail.com\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "a45635128d1e80429d5b4f2b27eeaf8751a6b092",
      "tree": "20fe8c040f8569a1f603c4f62c81f3f2bb35c08f",
      "parents": [
        "78884791786aff5809d0099a0ad9b18f7221c7c7"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:57 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf, docs: Rewrite verifier.rst\n\nThe document describes a walk over paths with pruning. The verifier does\nnot work that way. The types, the log text and the errors are old too.\n\nWrite it from scratch, in reading order, with examples:\n\n  overview     the main idea, proof and guess\n  state        numbers, pointers, ids, the stack, what is held\n  one insn     the checks, packets\n  pass         liveness, prune, join, join_key, the order\n  precision    data and control deps, the join rule, on one example\n  equations    insn, jump, call, join, prune\n  loops        widening, trip index, may_goto, peel, suspects\n  functions    instances, callbacks, recursion\n  errors       partition, fork, budget, failing path, all passes\n  the rest     fixups, speculation, limits, what is trusted, the log\n\nUpdate the limits and one reference in bpf_design_QA.rst.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-50-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "78884791786aff5809d0099a0ad9b18f7221c7c7",
      "tree": "c765aea278fa18a8acd46b090c791cd31188eeb6",
      "parents": [
        "81c7c630a9a8c9904687179958f0a80f12a4e85a"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:56 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "selftests/bpf: Test equations\n\nverifier_equations.c has one group for each kind of insn: truncation,\nAND, op, shift, division, spill. It also tests joins, rings such as\n\u0027(i + 1) \u0026 63\u0027, irreducible loops, the join rule, steps, an int that\ngoes through 0, sign extensions, the distance of two pointers, packet\npointers, far pointers, new ids, speculation past a stored condition, a\nnumber that grows in two loops, right and wrong steps from the code of a\nloop, the offset and the size of a memory argument, a test against the\nrest of a buffer, and a test of the carry.\nINDEX_TEST() makes two programs: the array is large enough for the\nindex, and the array is too small.\n\nThe other files get tests for the trip index, thresholds, atomic insns,\npacket pointers that share an id or have two lengths, hidden registers,\ndivision, and an AND that splits the state.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-49-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "81c7c630a9a8c9904687179958f0a80f12a4e85a",
      "tree": "14ab741ba1063a5f1474cc6f97214048b4d2d0e9",
      "parents": [
        "7cdea9de4a699045fac5fb6700f6b78ff12599df"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:55 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "selftests/bpf: Test passes, instances, precision and the failing path\n\nverifier_passes.c has one group for each mechanism, for example deps,\nlive types, unreadable, peel, trip count, ids, instances, held, fixups,\npessimized, strings, failing_path, budget, log.\nverifier_partition.c tests the order of the partitions, the undo, the\nsuspect loops, calls in frames, the load of a part of a spilled pointer\nand arrays of pointers on the stack. Many valid programs have an unsafe\ntwin that has to be rejected.\n\nliveness_many_calls has 12000 calls. verifier_callx_rodata.c tests an\nerror in one function of a set.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-48-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "7cdea9de4a699045fac5fb6700f6b78ff12599df",
      "tree": "772cd1b0b7ac18a83cde3b1f08edf1b891d0ed7a",
      "parents": [
        "298ff459cc89da595b54204a9dd3fa4bb833f7d9"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:54 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "selftests/bpf: Test barriers and far pointers\n\nverifier_barrier.c: check the place of the barrier for each kind of\nedge: inlined bpf_loop(), exit of a callback, may_goto, recursion, a\ncall that never returns, far jumps.\nCheck what a speculative state must not decide for other states.\nCheck that a far pointer gives no compare, no access and no constant\noffset. Check the log of a dropped path, of a leak and of a speculative\nstate.\n\nfar_map_value.c: a load through a far pointer to a read-only map value\nis not folded to a constant.\n\nverifier_btf_array_access.c, verifier_load_acquire.c: a far load from a\nflexible array gets a fault handler, a far load-acquire is rejected.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-47-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "298ff459cc89da595b54204a9dd3fa4bb833f7d9",
      "tree": "9bdcbe7181668f8085150241b18469566f8917bc",
      "parents": [
        "5ecc636cbed7858bdf4f4610c971c36419e6e9be"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:53 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "selftests/bpf: Adjust tests that get another verdict or may_goto\n\nPrograms that were rejected and load now:\n- Unprivileged \u0027ptr +\u003d reg\u0027 gets a barrier or one mask for the joined\n  range. The tests check the xlated insns.\n- conditional_assignment_on_second_iteration: the read is unproven in\n  pass 0. A later pass peels the trips, and no trip gets to the read.\n- from_stack_in_small_chunks, partial_fill_from_cleaned_pointer_spill:\n  a load of a part of a spilled pointer. They load with CAP_PERFMON and\n  are rejected without it, as before.\n- to_leak_tainted_dst_reg: a far pointer is no error. It loads with\n  CAP_PERFMON and is rejected without it, as before.\n- test_get_stack_rawtp: the buffer is not two times larger any more.\n- New: callback_full_frame, an arena stack entry with a full frame.\n- Four programs are safe. Each gets an unsafe twin:\n\n  pointer_minus_index              p + 63 - i, i is 0..63\n  callee_writes_memory_of_caller   tests x \u003c\u003d 63, stores x / 2\n  callee_writes_through_alias      the same through a second pointer\n  pkt_add_negative                 data + 20 + (-4..4), 54 bytes checked\n\nPrograms that load as before and get may_goto: the loop has no trip\ncount, and no error asks to peel it.\n\n  do { r8 +\u003d 1; r7 \u003c\u003c\u003d 1; } while (r7 !\u003d 0x400);\n\nOne program is rejected now. clang makes one call of bpf_obj_drop()\nfor two types in local_kptr_stash.c:\n\n  if (...) r8 \u003d plain_local;      no special field\n  else     r8 \u003d node_data;        a kptr\n  r1 \u003d r8\n  call bpf_obj_drop\n\nDeclare bpf_obj_drop() with nomerge, as struct_ops_refcounted.c does\nfor bpf_task_release().\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-46-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "5ecc636cbed7858bdf4f4610c971c36419e6e9be",
      "tree": "76368d831ee6b68b8a49084a36993a643fbf43b2",
      "parents": [
        "de2cf44a0a34777cb8f1efd04aac89831e22b3b3"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:52 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "selftests/bpf: Adjust tests to the new log text\n\nverifier_scev.c tests trip counts and ranges in loops. Rename it to\nverifier_trip_count.c. All programs stay. The verdicts do not change.\n\n  old text                          new text\n  id\u003d2                              id\u003d{{[0-9]+}}, ids are renumbered\n  from 3 to 7: within               from 3 to 7: pruned\n  header_count is 5                 loop at 3 has trip count 5\n  can\u0027t compute iterations count    loop at 3 has no trip count\n  widening r7 to 0..99              the state at the header, see RANGE()\n  r6\u003d(linear r6 2), can\u0027t widen r7  no such text\n  exit from 5 to 7                  first exit to 7\n  processed 48 insns                another number, or a pattern\n  math between ... is not allowed   the access through the far pointer\n                                    fails, not the add\n  R1 has pointer with unsupported   gone with REASON_*, unprivileged\n  alu operation                     loads get the error of root\n  first error in the order          the error on the failing path\n  cannot return stack pointer       R0 !read_ok in the caller\n\nSome ranges are smaller, so an error has another offset or text. Some\nresults keep a step.\n\nSome loops get may_goto, or lose it:\n- NO_COUNT now: \u0027w6 +\u003d -n\u0027 wraps in each trip (post32_gt, _ge, _ne,\n  _sgt, _sge, backedges_end_then_wrap), the first step can wrap\n  (range_first_wraps_s32), or the counter starts with any value\n  (uninit_slot_counter, range_lt_dir_any_first,\n  no_widen_small_spill_counter).\n- COUNT() now: irreducible loops, 17 back edges, 301 exits in a nested\n  loop, back edges that test different registers.\n\nA jump on r9 gives a trip count now. LIMIT_ITERATIONS hides r9 behind\nan atomic add, so the count comes from the tested jump. Three pre_lt\ntests move to the new largest count.\n\nA few tests change an insn to keep the error that they are about.\nTwo tests of a double release keep NULL away from the second release.\nshift_with_64_bit_input needs an access through the far pointer, else\nit loads. variable_subtraction loads a second number. Five tests in\nverifier_spill_fill.c make STACK_MISC with other stores: a spill keeps\nits low bytes now. dynptr_slice_var_len2 uses 29 sizes: the call is\nsafe for each of 15, and then a later store is the error.\naggregate_ret_static_ptr_fail reads through r2, else it loads.\nvar_off_insn_off_test1 and _test2 keep NULL away from the access.\nmore_back_edge was safe, it tests a new number in each trip now.\n\nguard_at_head_dead_slot was safe and loads now: the slot is live at the\nheader. A larger shift makes it fail with another error.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-45-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "de2cf44a0a34777cb8f1efd04aac89831e22b3b3",
      "tree": "14ed218f04ab4aef2f7133366aee2d12ebe7496e",
      "parents": [
        "5124dee218b28fcc58b3ee7b2d4a243abc58486d"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:51 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Keep spilled pointers at a range of stack offsets\n\nAn access to the stack with a range of offsets forgets the pointers\nthat are spilled in the range. The access is proven, and a later use of\nthe pointer is unproven. Two cases need no such loss.\n\n1. A call writes at one of several offsets:\n\n     *(u64 *)(r10 - 16) \u003d ptr\n     r1 \u003d fp-24 or fp-8           the join is fp-24..fp-8, step 16\n     r2 \u003d 8\n     call bpf_probe_read_kernel   it does not touch fp-16\n\n   Skip the bytes between two offsets. The size has to be a constant,\n   see size_at_max_offset().\n\n2. A load reads one element of an array of pointers:\n\n     char *p[2] \u003d { a, b };\n     bpf_for(i, 0, 2)\n             sum +\u003d p[i][63];\n\n   i is 0..1 in each trip. The range comes from a load and a test, not\n   from a join. So it does not help to keep states apart.\n   fork_stack_load() does the load once for each slot:\n\n     r1 \u003d *(u64 *)(r2 + 0)\n\n     r2 \u003d fp-16 or fp-8  --+--\u003e r2 \u003d fp-16, r1 \u003d a\n                           +--\u003e r2 \u003d fp-8,  r1 \u003d b\n\n   The equations refine the related numbers: i is 0 in the first state\n   and 1 in the second one.\n\n   A program can also use such a word as a number. \u0027sum +\u003d word[i]\u0027\n   fails if the word is a pointer. So a load forks only if its result\n   flows into an insn that needed a pointer and got a number. ADD_DEPS\n   finds these loads with one more backward slice. The slice follows\n   both operands of an add. So if a program adds such a word to such a\n   pointer, both loads fork, and the add can fail.\n\n   The cpu can speculate with the address of another state, so the fork\n   needs bypass_spec_v1.\n\n                                             insns processed\n  program                                bpf-next   without   with\n  wprof wprof_task_switch                32379      123446    79727\n  tetragon generic_lsm_process_event     114211     64030     31347\n  tracee trace_ret_vfs_write             5418       9413      3495\n  bpf_flow flow_dissector_0              715        2235      701\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-44-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "5124dee218b28fcc58b3ee7b2d4a243abc58486d",
      "tree": "0fb01a11cadb997551b4d1745971f6adbcd02bc1",
      "parents": [
        "a2aee95cc318418d570080bc1677f17512f38fb8"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:50 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Allow a range of offsets for a constant string\n\nclang merges two calls that differ only in a string. The join of the\ntwo pointers has a range. \"is not a constant address\" costs one more\npass.\n\nThe map is read-only. If a zero is at the largest offset or after it,\nit ends all strings that start before it:\n\n  .rodata   a % d 0 b c d 0\n            ^       ^     ^\n            umin    umax  ends both\n\nAllow the range. There are two exceptions:\n- bpf_snprintf(): the verifier checks the format,\n- no bypass_spec_v1: the cpu can speculate past the test of the offset.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-43-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "a2aee95cc318418d570080bc1677f17512f38fb8",
      "tree": "b744af461e51454bc5f07d6b4a4e68accaa02e70",
      "parents": [
        "97f92b0c1df6fea3e17cc4e4915a7a6b2ef30fef"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:49 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Refine the copies of a number that AND or OR splits\n\nmaybe_fork_scalars() splits the state when AND or OR reads a number\nthat is 0 or -1. The copies of the number are not split. The two states\nforget that the copies go with the result:\n\n  w8 \u003d 0 or -1\n  w2 \u003d w8; w2 \u0026\u003d 255          state A: w2 \u003d 255   state B: w2 \u003d 0\n  if w2 \u003e 9 goto out          only B continues, w8 is still 0 or -1\n  r2 \u003d r8; r2 \u0026\u003d 255          split again, a use of r2 \u003d 255 fails\n\nA split is a jump that is not in the program. Refine the related\nnumbers as after a jump: w8 is -1 in A and 0 in B.\n\nWithout bypass_spec_v1 a join does not relate two constants again. So\nthe copies are not refined there.\n\nA program with this code in a loop goes from 11 passes to 1.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-42-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "97f92b0c1df6fea3e17cc4e4915a7a6b2ef30fef",
      "tree": "9b00d81369c5002a4145b104526f3a78e44aa8d8",
      "parents": [
        "afafa4255b17f69fc33f74e006c7981bd91f5ae0"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:48 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Check the body of a counted loop once\n\nThe leftover needs three walks over the body. Two walks only collect\nwhat the third walk needs:\n\n  walk 1   i \u003d 0          shows the step, 150\n  walk 2   i \u003d 0, 150     shows the threshold, k \u003c\u003d 3\n  walk 3   i \u003d 150 * k    is the proof\n\nOften the code shows the step and the bound. The spine is the insns\nthat each trip runs once. find_steps() follows the xregs along it:\n\n  header -\u003e a -\u003e b -\u003e ... -\u003e back edge    on the spine:  x +\u003d constant\n             `-\u003e c -\u0027                     off the spine: x is inexact\n\nbpf_guess_first_trips() makes the states that trips 1 and 2 possibly\ngive, and joins them with the state that enters. So walk 3 is first.\n\nIt is a guess. The state only grows, and the state that comes back is\ncompared with it as before. The guess is not used if\n- a carried xreg is a sum, or the last value of an iv, and its start\n  is known: only two walks show its equation,\n- \u0027i !\u003d n\u0027 has a range, see add_distance_equation(),\n- a partition needs an xreg that the loop changes,\n- a state had no trip count for the loop.\n\nA wrong guess can cost the trip count. Then the loop gets may_goto. It\ncan also move a register that const_fold.c knows as a constant. So\ndo_check_block() does not compare the two after env-\u003eextra_values is\nset.\n\n                       insns processed\n  program              bpf-next   without   with this patch\n  pyperf600            37285      109729    37284\n  pyperf180            22165      43304     22164\n  pyperf600_nounroll   1289       1758      1288\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-41-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "afafa4255b17f69fc33f74e006c7981bd91f5ae0",
      "tree": "4bf80aedc7e07973575d23124d8ddfe0b1556168",
      "parents": [
        "da543d022de61f7f87101fa1e17b97eb3ee1c364"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:47 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Keep two states apart if a live xreg has two types\n\nPass 0 joins all states. A join of two types or two objects is\nunreadable. If the xreg is live, the program probably reads it. Then the\npass has an error, and the price is two more runs:\n\n  r6 \u003d 0;               r6 \u003d map value;\n          \\            /\n           if (r6 \u003d\u003d 0) goto out;\n\n  old:  join -\u003e r6 !read_ok -\u003e path-sensitive run -\u003e pass 1: apart\n  new:  pass 0: apart\n\nThe same holds for a packet pointer that has checked bytes in one state\nand has none in the other state.\n\nbpf_hash_live_types() adds the types and objects of the live xregs to\nthe hash of a state. So such states do not meet.\n\n- Numbers are joined as before.\n- The arguments of the calls of an instance are joined as before, else\n  the calls do not share it.\n- N such xregs can give 1 \u003c\u003c N states. So the rule has a budget in each\n  pass: 1/64 of the limits on cost and memory. The cost of a state\n  that is alone does not count, see bpf_flow_next(). A pass that is over\n  the budget joins from there on, and so do the next passes. Then an\n  error selects the xregs.\n- Offloaded programs are joined as before. The replay for the driver\n  has to join where the good pass did.\n\n                                     insns processed\n  program                            before    after\n  profiler3 kprobe__vfs_link         7969      3865\n  test_cls_redirect_subprogs         5726      3091\n  xdp_synproxy_kern syncookie_xdp    8136      7630\n  bpf_flow flow_dissector_0          1363      701\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-40-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "da543d022de61f7f87101fa1e17b97eb3ee1c364",
      "tree": "bef13a4a9e7a9472bc21545d59e9dc66fd764f04",
      "parents": [
        "09c84023b0b4ef040548929859de81177a15bab2"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:46 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Make a returned pointer to the stack unreadable\n\nA void static function does not set r0. So r0 can hold a pointer to the\nstack at the exit:\n\n  static void f(void) { char buf[8]; r0 \u003d buf; ...; }\n  f();                  \u003c- nothing reads r0\n\nThe exit failed with \"cannot return stack pointer to the caller\".\nLet the read fail, not the exit: the register is unreadable in the\ncaller.\n\n  old:  exit of f() -\u003e fails\n  new:  exit of f() -\u003e r0 is unreadable -\u003e a read fails\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-39-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "09c84023b0b4ef040548929859de81177a15bab2",
      "tree": "c728a18d9059191afc6b7b91bf4700039b6e0901",
      "parents": [
        "cd97aa1387d94782d1d2cc420c0e38aa8c5ebf5e"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:45 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Verify in passes\n\nPut the parts together. do_check_all() runs passes until a pass has no\nerror, or until there is no more precision:\n\n        pass 0: join all numbers\n                  |\n  +---------\u003e run a pass\n  |               |\n  |            error ? --- no ---\u003e pessimized ? --- no ---\u003e ACCEPT\n  |               | yes                 | yes\n  |               v                     v\n  |       good pass before ?      save the good pass,\n  |          | no      | yes      partition, cut the budget\n  |          |         v                |\n  |          |   ACCEPT, use that pass  +---\u003e run a pass\n  |          v\n  |      partition\n  |          |\n  |  failing path ? --- yes ---\u003e log it; if no guess, cut the budget\n  |          | no                       |\n  |          +\u003c-------------------------+\n  |          v\n  +- yes - is more kept apart ? --- no ---\u003e REJECT\n\nA good pass has no error. It is a complete proof, with any precision.\nIf no state before the error was imprecise, the error is real and the\nverifier stops. The path-sensitive run needs the deps, so it comes after\nthe partition. A failing path with a guess does not cut the budget. If a\npass has a real error, the log has that error and not the guess.\n\nA valid program that no precision can prove must not use up the limit.\nAfter the first error the limit is the larger of BPF_PARTITION_BUDGET\nand two times the cost so far.\n\nA program of 1M insns needs 1.2 GB for its tables, so BPF_MAX_MEM is\nlarge. If the states of a small program explode, they must not use all\nof it. With 2 GB a program of 500 insns takes 30 seconds before it is\nrejected. So the passes can add 256 MB to the tables, and 32 KB for each\ninsn. That is one state with a full stack.\n\nThe later passes and the path-sensitive runs have no log, and make no\ntext for diagnostics. The one that gives the log runs once more. That\nwork is not in the limit on cost. Log level 2 has all of them.\n\nA later pass must not hide a bug of the verifier. bpf_note_bug() sets\nenv-\u003ebug and turns the log on. The load ends with -EFAULT.\n\nPrograms load again: remove the refusal in bpf_check() and\n-Wno-unused-function. Rename round_is_dropped() to pass_needs_restart().\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-38-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "cd97aa1387d94782d1d2cc420c0e38aa8c5ebf5e",
      "tree": "281de07de641ac84904e4a1cc0bdb9505c0ec824",
      "parents": [
        "a46de5d64e18603dd4c55fb06254a9fbccea5d0b"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:44 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:41 2026 +0000"
      },
      "message": "bpf: Do not let a join raise what a program requires\n\nA pass can have no error and still ask for too much:\n\n  (off, len) \u003d (0, 64) or (56, 8)     each path needs 64 bytes\n  join: off \u003d 0..56, len \u003d 8..64      the pass asks for 120 bytes\n\nSuch bounds are checked at attach time or at run time. The program\nloads, and then it cannot attach or run.\n\nMark the insn as pessimized if it raises such a bound after an\nimprecise join, and an operand has a range. See struct\nprog_requirements. A barrier and a lost fastcall pattern count too. The\nverifier then keeps a snapshot of the pass and partitions more as for\nan unproven insn, in a small budget. If a later pass has an error, the\nsnapshot is the result.\n\n  r0 \u003d *(u64 *)(ctx + 8)        no range, a join cannot change it\n  read(ctx + off, len)          a join can add values to off and len\n\nOne case is not covered: a join makes a dead path reachable, and an\ninsn on that path has constant operands. The bound stays larger.\n\nkprobe_override and the bounds on buffers that a tail call sets move to\nthe main pass, so they are compared too.\n\nThe driver of an offloaded program cannot forget what it saw. So it\nsees only a pass without errors: that pass runs once more for the\ndriver (env-\u003ereplay). Before that, each insn after an imprecise join is\npessimized. An insn that the driver refuses is unproven. prepare() now\nruns before each pass for the driver, and destroy() between two such\npasses. An offloaded program gets no fastcall rewrite.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-37-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "a46de5d64e18603dd4c55fb06254a9fbccea5d0b",
      "tree": "91749ecb80fa0be4364b91b225eb59f6a8d48ca0",
      "parents": [
        "ecb43124db3947b1d632e2fe651d994a399186ef"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:43 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Reproduce an error on one path, with no joins\n\nAfter a join a pass cannot tell a real error from a false one. If the\nerror is real, more passes are wasted work, and the log of the joined\nstate does not show the bug:\n\n  R6\u003dscalar(smin\u003d0,smax\u003dmax)  R7\u003dscalar(smin\u003d-22,smax\u003d0)\n\nfind_failing_path() tries to reproduce the error. It checks one path\nafter another until the check of an insn in err_insns fails. This is a\npath-sensitive run. It has the same checks as a pass, and goes depth\nfirst, the shortest way first:\n- There are no joins. A call stays in the frames of its caller. Each\n  trip is peeled.\n- A state is dropped if a state with the same values in the deps was at\n  the insn.\n- If only the jump on the iv of a loop depends on the xregs that moved,\n  the path skips trips, see below.\n- If the jumps of a loop see the same values in two trips, the loop is\n  infinite. The path continues where may_goto leaves it.\n- A run that is cut by its budget starts again, fall-through edge first.\n  If it is cut again, or by its limit on trips, it starts again with the\n  next limit on trips.\n\nThe path on which the check fails is the failing path. If the run made\nno guess, see below, the passes that are left get a small budget. So a\nwrong program is rejected fast. And the log has the full path. Only log\nlevel 2 has the paths that the run dropped.\n\nA path can have errors that do not end it: in a speculative state, or\nin the BTF check of the arguments of a static function. Such an error\ngets no \"Verification failed\" report, see env-\u003eno_report. A missing\nstack argument ends the path, so report it at the first check.\n\nThe paths that continue from a header share a copy of the state there,\nsee bpf_header_state. leave_loops() drops the copy. check_funcs() checks\nall functions from a snapshot. A pass uses it too.\n\nA path has to get through a long loop to an error after it:\n\n  for (i \u003d 0; i \u003c 100000; i++) { if (rnd() \u0026\u0026 n \u003c 8) n++; }\n  a[n] \u003d 0;\n\nIt makes no joins, so it has no equation for the trip index. Two trips\ngive the step:\n\n  trip 3: the jump sees i \u003d 3      step 1\n  trip 4: the jump sees i \u003d 4      99996 trips left\n\nfailing_path_trip() compares the state with the saved state of an\nearlier trip. If the other jumps do not depend on the xregs that moved,\nbpf_fast_forward_xregs() moves them to the last trips.\n\nThe nonlinear_xregs of the loop are not moved: the step of two trips\ndoes not tell where \u0027(i + 1) \u0026 63\u0027 is after 99996 trips.\n\nTwo paths can have the same ranges, and only one of them has r1 \u003d\u003d r6.\nThe other one can be the path that fails. So the hash of a state has\nthe xregs that share a sym, see bpf_equations_hash().\n\nThree guesses of the run can make a path that the program cannot take.\nIf such a path cuts the budget, a valid program can be rejected. So a\nguess sets env-\u003erun_has_guess, and the budget is not cut.\n\n1. The skip. Two trips show a step also for \u0027sum +\u003d i\u0027:\n\n     for (i \u003d 0; i \u003c 1000; i++) sum +\u003d i;\n     buf[sum - 499500]               valid, this is buf[0]\n\n     trip   i      sum    real sum\n     2      2      1      1          saved\n     4      4      6      6          since trip 2: i +2, sum +5\n     skip   998    2491   497503     497 times: (996 left - 1) / 2\n     exit   1000   4488   499500     buf[-495012] fails\n\n   bpf_steps_are_constant() looks at the xregs that move and at the\n   operands of the jump on the iv, such as \u0027i \u003c n / i\u0027. A copy has to\n   have the step of its source.\n\n2. \"The loop is infinite\". Two trips give more than 2^32 trips also for\n   this loop of 512 trips:\n\n     u64 i \u003d 600; do { i \u003d (i + 1) \u0026 1023; } while (i !\u003d 88);\n\n   The next runs keep this answer. So it is also a guess if the run made\n   a guess before it.\n\n3. The target of may_goto. All states have the same one. A state that\n   only a join makes can hold a lock. Then the target is the code after\n   the loop, also for a path with no lock.\n\nThe run accepts nothing. It is not the verdict either: a path has ranges\ntoo, and it can fail at an insn that a pass proves.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-36-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "ecb43124db3947b1d632e2fe651d994a399186ef",
      "tree": "cf17f33abf421387e6154ac274b8da2cf4799bc3",
      "parents": [
        "762e1478d7c5da93ac82a7cb8f5a8c0f8d650a9f"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:42 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Partition the states after an error\n\nIf a pass has an error, what does the next pass keep apart? This is\ntrace partitioning. More precision costs more, so take the cheap steps\nfirst. bpf_partition_more() takes the first line that adds something:\n\n  ADD_DEPS             the deps of the unproven insns\n  PEEL                 suspect loops: one trip, then what a budget pays\n  PEELED_APART         suspect loops: the join rule holds at the start\n                       of a peeled trip\n  TRANSITIVE_DEPS      data_deps |\u003d control_deps; add the jumps that can\n                       skip their writes\n  DISJOINT_APART       disjoint values in data_deps stay apart\n  LOOP_DISJOINT_APART  suspect loops: the same at the header\n  PEEL_MORE            suspect loops: 4, 16, 64, ... trips; no prune of\n                       a peeled trip if the last pass pruned one\n  IN_FRAMES            calls with an argument that is in the deps and\n                       has an equation: if (!ok(x)) return; buf[x]\n\nA step can be the wrong one, and use up the limit of the load: to peel\na loop of 100000 trips does not help if the error needs control_deps. So\neach step but the first has a budget, and can be undone:\n\n            +-----------------+   in the budget, or it helped\n       +---\u003e| partition, pass |------------------------------\u003e keep\n       |    +--------+--------+\n       |             | over its part of the budget\n       |             v\n       +--- undo, take the next line\n       |             | no line left, one was too costly\n       |             v\n       +--- budget *\u003d 4, undo all since one helped\n\nIf a step was too costly for a loop, a later step is a second choice.\nIt is undone when the budget grows, also if it helped:\nLOOP_DISJOINT_APART makes each later peel much more costly.\n\nThe first budget is two times the cost of a pass. charge_loops() gives\nthe cost of a state to the loops that keep it apart.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-35-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "762e1478d7c5da93ac82a7cb8f5a8c0f8d650a9f",
      "tree": "21325abb3f00dcb04fa13279cd62857b630669ae",
      "parents": [
        "fb08fa4a46cda903de57065d021664f128a63d7b"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:41 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Verify a static function once for each instance\n\nA chain of calls multiplies the work if each call is verified in the\nframes of its caller. 18 levels with 2 calls each are 1 \u003c\u003c 18 chains.\nA function that cannot get to the frames of its callers is verified on\nits own. The old pass united two calls if their states met anywhere in\nthe function. Then each call got the results of both. Now the states of\ntwo calls meet only at the first insn:\n\n  call1 f(0) --+\n  call2 f(1) --+--\u003e first insn\n\n  in pass 0                join         -\u003e one instance\n  if r1 is in data_deps    keep apart   -\u003e two instances\n\nAn instance is an entry state, its exit states and the calls that wait\nfor them. So the result of a call goes with its arguments. An instance\nthat has started does not grow. The join starts a new instance:\n\n  call1 f(0)  instance 1: f(0)     exits 1 -\u003e call1\n  call2 f(1)  instance 2: f(0..1)  exits 1 -\u003e call2, call3  at once\n  call3 f(2)              f(0..2)  exits 2 -\u003e call2, call3  later\n\nA call waits if it has no exit state to continue with, or if it is in\na peeled trip.\n\nInstances can multiply too. The functions that have more than one\ninstance divide a budget. When a function has used its part, the next\ncalls are joined, see flow_may_add_instance().\n\nA function can test a reference of its caller for NULL and return it.\nbpf_flow_return() then marks the copies in the caller as not NULL. Else\n\u0027if (!n)\u0027 drops the reference, and copy still has its id:\n\n  copy \u003d throw_if_null(n);  if (!n) return copy-\u003ea;\n\ncallx of a set checks each function with a copy of the state. After an\nerror do_check_block() has to see that copy.\n\nA speculative call gets an instance too. flow_end_instance() frees the\ncalls that have all exit states.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-34-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "fb08fa4a46cda903de57065d021664f128a63d7b",
      "tree": "03bcd97807c05d84d26edaca511c61715186549d",
      "parents": [
        "2da4d8226c27e93a228c9fb63d65a797471fc80f"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:40 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Use the equations in the join rule\n\nThe join rule compares the ranges of the deps. Two cases need the\nequations.\n\n1. State 1 has all ranges of state 2, but only state 1 has a relation:\n\n                r1 (data)    r6 (control)\n     state 1    0..99        0..99        r1 \u003d\u003d r6\n     state 2    0..7         0..99\n     join       0..99        0..99        a test of r6 tells nothing\n\n   bpf_equations_join_forgets() finds such a pair. It counts as two\n   xregs that differ, so the states stay apart. One xreg has to be in\n   data_deps: the rule joins what differs in control_deps only.\n\n2. LOOP_DISJOINT_APART keeps disjoint values apart at the header. A\n   counter has another value in each trip, so it keeps all trips apart:\n\n     for (i \u003d 0; i \u003c 400; i++) if (x \u003e best) { best \u003d x; at \u003d i; }\n\n   The join has i \u003d trip index and keeps i. So an xreg that moves\n   with the trip index keeps no trips of one entry apart.\n   bpf_note_linear_xregs() notes these xregs. If a pass notes a new\n   one, it does not stop at the errors of the last pass. Later trips\n   can show that the xreg moves with the trip index only at first.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-33-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "2da4d8226c27e93a228c9fb63d65a797471fc80f",
      "tree": "e08dc92c090d7bba6ef8eb3a5439ffc141a1a508",
      "parents": [
        "b00adefb7a6570069114121ba99fef0c5eca9793"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:39 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Give a loop a checked trip count or may_goto\n\nA fixpoint proves that each insn is safe. It does not prove that a loop\nends. A state that is pruned by its own ancestor closes a cycle:\n\n  t --\u003e ... --\u003e header --\u003e ... --\u003e s\n  ^                                |\n  `----------- subsumes -----------\u0027\n\nAll pruned states go through flow_check_trip_counts(). If s made more\ntrips than t, look at the trip index k of s:\n\n  if k \u003c\u003d BPF_MAX_TRIPS (2^32)   the loop has a trip count, no may_goto\n  else                           the loop gets may_goto\n\nA loop that has may_goto or an iterator needs nothing. There is no trip\ncount without CAP_PERFMON, as before.\n\nmay_goto is there for all states at run time. If a state went through\nthe loop without its edges, the pass starts again.\nbpf_flow_drop_guards() removes may_goto that no state needed.\n\nA peeled trip that an earlier trip subsumes is pruned for the price of\nmay_goto, see flow_prune_peeled(). bpf_flow_trip_is_new() tells if one\nmore peeled trip can help. bpf_guard_edge and the old members of\nloop_stack_entry go away.\n\nmay_goto at a header skips the body. So a slot that is live at its\ntarget is live at the header.\n\nbpf_loop_spine_end() finds the insns that dominate all back edges. It\nreplaces the counters in flow_place_guards().\n\nIf both edges of a jump are dead, no run gets to the jump. It becomes\n\u0027goto -1\u0027.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-32-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "b00adefb7a6570069114121ba99fef0c5eca9793",
      "tree": "fe5b8dc361bdb62970a2f64ee23276028b41bce5",
      "parents": [
        "4148dd9a7f452f3603688efd60620990460e5ae4"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:38 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Get the trip count from the trip index\n\nA loop needs a trip count or may_goto. The trip index k is an xreg. It\nis 0 at the entry, and each back edge adds 1. The join at the header\nfinds what moves with k. A jump that tests such an xreg refines k.\n\n  for (i \u003d 0; i \u003c 100; i +\u003d 4)\n    join        i \u003d 4 * k\n    threshold   \u0027i \u003c 100\u0027 holds up to k \u003d 24: widen k to 0..25\n    jump        i \u003c 100  -\u003e  k 0..24\n    back edge   k + 1 is 1..25, the header state subsumes it\n\nThis is the proof: k grows in each trip and stays in 0..25. The next\npatch checks that. No jump has to test p here, its equation limits it:\n\n  for (i \u003d 0, p \u003d buf; i \u003c 8; i++, p +\u003d 8)      p \u003d buf + 8 * k\n          *p \u003d 0;\n\nA threshold is a guess, see bpf_collect_iv_thresholds(). If it is too\nsmall, k grows to the next one, and at last to S64_MAX. No run makes\n2^63 trips, so a state with k \u003d S64_MAX ends at the back edge.\n\nTwo states can enter a loop with two bounds. So each entry has the trip\nindex at which its jumps leave the loop, see exit_threshold:\n\n  (n, size) \u003d (1 \u003c\u003c 18, 4) or (1 \u003c\u003c 17, 8)\n  for (i \u003d 0; i !\u003d n; i++)\n          buf[i * size];        1 \u003c\u003c 18 is too much for size 8\n\n- The trip count is known only when the pass ends. So pass 0 takes the\n  edges of may_goto in all loops. After it only the loops that need\n  may_goto keep them.\n- \u0027i !\u003d n\u0027 with two ranges: add_distance_equation() makes a sym for\n  i - n in the first trip. It does that for two pointers into one\n  object too: for (p \u003d t + 0..3; p !\u003d t + 4..7; p++)\n- A test against the rest of a buffer gets a sym for the difference\n  too, in a loop or not:\n    if (len \u003e 64 - off) return; read(buf + off, len);\n  An equation has a cost, so len has to be in data_deps. If it is not,\n  the pass is imprecise, and a later pass makes the sym.\n- With -mcpu\u003dv1 and v2 clang can count down and test the carry:\n    x \u003d (u32)x + 0xffffffff; if (x !\u003d (u32)x) continue;\n  The two operands have one step. If the carry is set in the first\n  trips, the jump gives the threshold of \u0027x \u003e U32_MAX\u0027.\n- A distance of two truncated numbers can have a range of 2^31 after a\n  widening. clamp_diff_start() takes the ranges of the two numbers.\n- bpf_note_linear_xregs() notes the xregs that are linear in k, and\n  those that are linear only at first: i \u003d (i + 1) \u0026 63\n- A leftover is walked more than once. The new walk makes all values\n  again. So flow_is_stale() frees a state of an earlier walk.\n- With may_goto k has no bound. trip_index_safe() lets it start again\n  from a smaller number, so the states can be pruned. loop_stack_safe()\n  calls it for each loop of a frame.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-31-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "4148dd9a7f452f3603688efd60620990460e5ae4",
      "tree": "16fd6d2589cf8f6855c496af3a6a052645f4ad32",
      "parents": [
        "0e5e78acdf2a625f7266e74235eff622a1268134"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:37 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Order the pending states and free the states that are done\n\nThe order decides how often an insn is checked. A join point has to get\nall its states before it runs:\n\n  if (c) x \u003d 1; else x \u003d 2;      both branches first,\n  use(x);                        then one check with x \u003d 1..2\n\nflow_set_pending() sets the order:\n1. a function that a call waits for,\n2. callers, so that the calls of a function meet before it is checked,\n3. the trip and the position in each frame: a trip is complete before\n   the next trip, a loop before the code after it,\n4. exit states last.\n\nWith this order most states can meet no later state. They are freed\nwhen their turn comes. flow_keep() keeps a state at a join point\n- in the leftover of a loop, until the states leave the loop,\n- at the start of a peeled trip (0, 1, 2, 4, 8, ...), to find a trip\n  that repeats a state,\n- at the entry of a function, or while a call can get more exit states,\n- in an async callback, because it can start again.\n\nWithout that the memory grows with the number of peeled trips.\n\ndo_check() takes the next state and checks its basic block.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-30-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "0e5e78acdf2a625f7266e74235eff622a1268134",
      "tree": "50bd9d97e6df5b0c6c546ac9b7411a4b0d94b5de",
      "parents": [
        "473d366fc137eecbc8fae73a665c956a4b0b6224"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:36 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Prune or join each state that arrives\n\nAdd the table of states of the main pass. All states go one way:\n\n              +---------+   next    +-------------------+\n        +----\u003e| pending |----------\u003e| check basic block |\n        |     +---------+           +---------+---------+\n        | new                                 v\n        |                           +-------------------+   subsumed\n        +---------------------------|    join point     |-----\u003e prune\n          joined, or kept apart     +-------------------+\n\nbpf_flow_deliver() cleans the state and updates its loop stack.\nflow_prune_or_join() compares it with the states that have the same\njoin_key:\n\n  if bpf_must_keep_apart()   look at the next state\n  if old subsumes new        prune new\n  if new subsumes old        free old, but widen in a leftover\n  else                       join, and compare the join again\n\nWhat the calls of a function already have is joined, it is not replaced.\nElse the result of a recursion with two exit insns is never widened.\nAn exit state has no equations, because the calls do not get them.\n\nThere is no cap on the states at an insn. A list makes n states cost\nn * n. So one interval tree sorts all states by the hash of the\njoin_key, then by the range of one xreg of data_deps, see flow_find().\n\nThe hash has kernel addresses, such as the address of a map. If it has\n32 bits, two of 2048 states at one insn collide in 1 of 2000 loads, and\nthat can change the result. So it has 64 bits. The tree has room for\n32 bits. A state that collides only there is skipped.\n\n@again is for an insn that is checked once more with a part of the\nstate: one function of a set, one part of a range. It meets no other\nstate at that insn, see FLOW_AGAIN. The parts meet at the next insn.\n\nbpf_flow_start_leftover() starts the leftover after the states that\nenter it are joined. The next patch makes a state pending.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-29-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "473d366fc137eecbc8fae73a665c956a4b0b6224",
      "tree": "3d4cbe13680840932f89b34feb3f438c20db44c5",
      "parents": [
        "de3bb1ef2ce5d20ec3bb47925c25596ab9632488"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:35 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Guess the equations of a join\n\nA join of ranges forgets what moves together. A phi is a sym of the\njoin. It has one value in each state:\n\n               trip   r1         r2             r3\n   old state   0      0          p              0..9\n   new state   1      4          p + 8          1..9\n   join        sym0   4 * sym0   p + 8 * sym0   sym0 + (0..9)\n\njoin_expr() looks for a phi that gives both values. If there is none,\nit makes one. The sums and ops of the two states are translated to the\nphis. A sym can become two phis. Each of them is tried.\n\nThe phi that is 0 in the old state and 1 in the new state is the\nselector. It can be a stored condition:\n\n  c \u003d 0, len \u003d 0..8   |   c \u003d 1, len \u003d 64..72\n  join: len - 64 * c \u003d 0..8\n\nA number gets a phi if its two ranges are disjoint, in 64 bits or in\nthe low 32 bits. A helper returns an int, and the high bits are not\nknown:\n\n  w9 \u003d 0; if w0 s\u003e -1 goto L; w9 \u003d -155; L: ...; if w0 s\u003c 0 goto err\n\nA phi that grows is widened to a threshold, and keeps its step. The\nlow 32 bits go around their own circle, so an int can go through 0:\n\n  int i \u003d -5; do { ... } while (++i !\u003d 3);      0xfffffffb .. 0 .. 2\n\nIt terminates. From the third join around a cycle only the equations\nof the old state are kept, and an equation can only get weaker.\n\nThe cpu can speculate past the test of c. So a constant makes no\nphi without bypass_spec_v1.\n\nA number can grow in a loop and in the loop around it:\n\n  for (j \u003d 0; j \u003c 13; j++) {\n          for (k \u003d 0; k \u003c 20; k++)\n                  off +\u003d 0..2;\n          off +\u003d 0..1;\n  }\n  buf[off]                      off is 0..533\n\nThe second outer trip enters the inner loop again. Each state shows one\ntrip index, the other one is 0:\n\n  old state   j \u003d 0   off \u003d 2 * k + d\n  new state   k \u003d 0   off \u003d 41 * j + d\n\nNo equation holds in both, so off has no bound, and all trips have to\nbe peeled. Make a sym for the two parts:\n\n  join        m \u003d 2 * k + 41 * j,  off \u003d m + d\n\nAll of this file is a guess, see the previous patch.\n\n                          insns processed\n  program                 bpf-next   without m   with m\n  strobemeta_nounroll1    10658      48984       1127\n  strobemeta_nounroll2    22116      52061       1127\n  strobemeta_subprogs     10829      45634       1007\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-28-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "de3bb1ef2ce5d20ec3bb47925c25596ab9632488",
      "tree": "6c342a5e31045e9b62064972c0189528e6ea916f",
      "parents": [
        "627ce07df2d9107777d4739a9b5273232ee8c8c0"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:34 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Check the equations when a state is pruned or joined\n\nRanges do not show that a state has a relation:\n\n  old:  r1 0..7, r2 0..7, r1 \u003d\u003d r2\n  cur:  r1 0..7, r2 0..7              old does not subsume cur\n\ncheck_equations() looks for a value in cur for each sym of old:\n\n  old:  r1 \u003d sym0       r2 \u003d 4 * sym0 + 8     sym0 0..7\n  cur:  r1 \u003d sym5 + 1   r2 \u003d 4 * sym5 + 12    sym5 0..3\n\n  r1:   sym0 is sym5 + 1, and 1..4 is in 0..7\n  r2:   (4 * sym5 + 12 - 8) / 4 is sym5 + 1 too\n\nA join needs equations that hold in both states. The next patch guesses\nthem. This patch checks the guess with the same function:\n\n  guess -\u003e check in dst and in src -\u003e delete what fails -\u003e check again\n\nThe worst guess gives no equation.\n\nA widened state is saved as it is. Its equations are applied to the\ncopy that runs, see needs_refine. Else the state at the header can get\nsmaller again, and the loop has no fixpoint.\n\nAn infeasible state ends after the next jump. It does not subsume a\nstate that is feasible.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-27-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "627ce07df2d9107777d4739a9b5273232ee8c8c0",
      "tree": "9479b4d114cbf749c55d694d9e1eb5face8ecaec",
      "parents": [
        "6de365ae6608456675cc6fb9a5d5f1dd7fcd4663"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:33 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Join any two states that have the same join_key\n\nThe old join could fail: a pointer and a number had no join, and the\nstates stayed apart. So the number of states had no bound but the caps.\nThe new join is total:\n\n  map ptr  |  scalar      -\u003e unreadable -+\n  two objects             -\u003e unreadable -+-\u003e a use is unproven\n  p+1, p+2, ... at header -\u003e p+unknown  -+   -\u003e next pass keeps apart\n\nIf nothing uses the value, the join costs nothing. An unreadable xreg\ncan hold a pointer, so __is_pointer_value() is true for it.\n\nA number can grow in each trip of a leftover. The first growth is a\njoin. After that the bound that moves goes to a threshold:\n\n  do { a[i] \u003d 0; i +\u003d 3; } while (i \u003c 30);     29\n  while (i \u003c 30) { a[i] \u003d 0; i +\u003d 3; }         32\n\nThe thresholds are the constants of the loop and of the functions that\nit calls, one less, and one step more. They apply to the deps.\nOther xregs stop at 0, S32_MAX, U32_MAX or S32_MIN. A threshold is a\nguess: the state that comes back is compared with it.\nbpf_flow_insn_after() walks the insns of a loop.\n\nThe old join compared its result with both inputs on each call. The\nnew one changes dst in place. It compares the result only with src, and\nonly with BPF_F_TEST_REG_INVARIANTS.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-26-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "6de365ae6608456675cc6fb9a5d5f1dd7fcd4663",
      "tree": "0bee92d7676e873fc4d575843a660f6675bcafea",
      "parents": [
        "37e13b091537b2e41b85a2f362e6defece1ed351"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:32 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Keep two states apart if data and control deps differ\n\nTwo states meet at a join point. The join does harm if it makes a pair\nof values that no path has, and the unproven insn depends on the pair:\n\n                r6 (data)    r7 (control)\n   ok_state     0..7         0\n   err_state    8..max       -22\n   join         0..max       -22..0     has r6 \u003d 8 with r7 \u003d 0\n\nOne rule decides at all join points, bpf_must_keep_apart():\n\n  what differs               action\n  data dep and control dep   keep apart\n  two data deps              keep apart\n  one data dep, with a gap   keep apart   (0..1 and 100)\n  one data dep, no gap       join         (0..7 and 8..9)\n  control deps only          join\n  other regs only            join\n\nIn pass 0 the masks are empty, so all states are joined.\n\nAt the header of a loop only a type or an object keeps states apart,\nelse the loop has no end. If the join is imprecise, the loop is a\nsuspect, also if the other state entered the loop at another time.\nAt the first insn of a function a difference in data_deps is sufficient.\n\nThe hash functions and bpf_range_of_data_dep() let the table of states\nskip states that the rule keeps apart. They can skip more: two constants\nthat differ by 2 or more, or a value and an unreadable xreg.\n\nThis rule replaces all flow_*_differs() rules and their tables.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-25-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "37e13b091537b2e41b85a2f362e6defece1ed351",
      "tree": "09945321208d2f57a00b9511670130ecef101d60",
      "parents": [
        "0e549bbe75ab747b0e879b737981ad2d966b9a80"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:31 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Find the xregs that an unproven insn depends on\n\nAfter an error the next pass has to keep some states apart. To keep all\napart is too costly. Find the xregs that the unproven insn depends on,\nthe deps:\n\n  data_deps      their value flows into an operand of the insn\n  control_deps   their value flows into a jump that can skip the insn\n\nbpf_compute_deps() makes a backward slice. It is the analysis of\nliveness with other seeds:\n\n                                        data     control\n   1: r6 \u003d ctx-\u003eidx                     r1       -\n   2: r7 \u003d 0                            r6       -\n   3: if r6 \u003c\u003d 7 goto 5                 r6       r7\n   4: r7 \u003d -22                          r6       -\n   5: if r7 !\u003d 0 goto exit  join point  r6       r7    \u003c- seed\n   6: r3 \u003d map value                    r6       -\n   7: r3 +\u003d r6                          r6 r3    -\n   8: r0 \u003d *(u8 *)(r3 + 0)              r3       -     \u003c- seed\n\nIt follows values through calls, returns and the frames of callers.\nWhat a helper stores is not known. But the address and the size decide\nwhich slots it keeps.\nA store through a join of two addresses forgets the slots between them.\nSo may_write_mask has these slots too.\nWhat is held is tracked like an xreg: the insns that acquire or release\nwrite it. find_control_seeds() finds the jumps with one edge that leads\nto the insn and one edge that does not.\n\nbpf_flow_is_bb_start() comes in a later patch. It tells where a basic\nblock starts.\n\nThe masks are a guess. They select where a pass does more work. A wrong\nmask cannot make the verifier accept an unsafe program.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-24-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "0e549bbe75ab747b0e879b737981ad2d966b9a80",
      "tree": "08ab21a9c5486219e9ecc4cb726e540cb9a4126c",
      "parents": [
        "a03670bf0cf38b9429887b8d8f9334e1fd1b3e95"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:30 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Continue a pass after an unproven insn\n\nA pass stops at its first error. A program with many insns that need\nprecision then takes one pass for each insn. Let the pass find all of\nthem:\n\n  r0 \u003d *(u64 *)(r2 + 0)    unproven; r0 \u003d unknown, from_unproven\n  r4 \u003d *(u8 *)(r0 + 0)     unproven because of r0: not a new error\n  r5 \u003d *(u8 *)(r7 + 0)     unproven: noted too\n\nskip_unproven_insn() continues as if the insn is proven. Such a pass\naccepts nothing: env-\u003eerr keeps the first error, and the log ends there.\nIf the insn is a call that changes what is held, the path ends.\n\nbpf_note_unproven_insn() notes what the next pass needs: the insn, the\ncalls that lead to it, and the suspect loops of the state. A loop is a\nsuspect if it made a value imprecise. The pass ends early when all\nunproven insns of the last pass are unproven again.\n\nTwo errors have no state that caused them:\n\n  fixups differ        The first state is gone. The insn remembers the\n                       suspect loops of its states. If a speculative\n                       state was first, the insn gets a barrier.\n  check_after_pass()   bpf_find_unproven_after_pass() takes the calls\n                       and the insns that set the depth of a stack.\n\nSmall fixes that this needs:\n- A join can make an unset stack argument: -EINVAL, not -EFAULT.\n- An unproven call does not mark a global function as unreliable.\n- The log does not skip a slot if it starts at the main dynptr slot.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-23-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "a03670bf0cf38b9429887b8d8f9334e1fd1b3e95",
      "tree": "03f7240ac27dfd9689e3a83b8a58438b43ea6087",
      "parents": [
        "ecfcecce56ba4ff7f75086b99e20c82a80df54ba"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:29 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Compare states by join_key, then by value\n\nThe compare and the join of two states start with the same question:\ncan they be one state at all? Each had its own list of fields. Put the\nfields in one group, the join_key:\n\n  what is held    references, locks, dynptrs, iterators, irq flags\n  where it is     the call chain, the instance of the function\n  which trip      the peeled trip, or the leftover\n\nThe group is compared and hashed as bytes, so it has no padding.\nStates with two join_keys never meet. bpf_state_subsumes() looks only\nat values.\n\nregsafe() had a case for each type. All say the same: the type and the\nobject are equal, and the number is within. bpf_same_type_and_object()\nanswers the first part, also for the join.\n\nTwo rules are new. A later patch joins such values:\n- Pointers to the packet are compared by the bytes that are left:\n\n   smin           smax              range\n    |-- offsets ---|-- bytes left ---|\n\n  Pointers that share an id have to keep their distance. The pairs of\n  ids are in env-\u003epkt_pairs, which grows on demand.\n- stacksafe() knows the bytes that a join makes. An unreadable spill\n  subsumes a written byte, misc subsumes a spilled number, zero\n  subsumes a spilled 0.\n\nThis also fixes a leak in the old code. A store of a pointer at a\nvariable stack offset makes a number of it. With the mitigations off\nthat needed no CAP_PERFMON. Reject it: a join of two offsets makes such\na store too.\n\nThis replaces check_ids(), regs_exact(), refsafe() and stack_arg_safe().\nasync_entry_cnt goes away: states of an async callback are joined.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-22-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "ecfcecce56ba4ff7f75086b99e20c82a80df54ba",
      "tree": "80149a3ad6022cd3d8d5b242f86dbc5343a9e23d",
      "parents": [
        "92907a9af6523655cb70ce3800e9ed01d892b1da"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:28 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:40 2026 +0000"
      },
      "message": "bpf: Delete the equations that say nothing\n\nInsns add syms, and registers die. Without a clean-up the table grows,\nand two states with the same facts have tables that do not compare.\n\n  if                      then\n  sym0 is 5               put 5 into the equations\n  sym1 \u003d sym0 + 8         replace sym1\n  r1 \u003d sym0, only use     delete, the range of r1 says the same\n  no xreg holds sym0      eliminate it:\n    p \u003d sym0 + len, sym0 \u003d 8 * trip + sym1  -\u003e  p \u003d 8 * trip + sym2\n\nThe result can be a second equation for the same sum, often with a\nsmaller range than the guess of a join. refine_same_sum() gives the\nrange to the first equation and deletes the second one. Two sums can\nalso become the same when a sym is replaced.\n\nThe new range needs a sym to hold it. If the equation has no sym with\none use, the sym of the deleted equation holds it:\n\n  x \u003d m + d, m \u003d 2 * k + 41 * j, k is dead  -\u003e  x \u003d 41 * j + d\u0027\n\nnormalize_equations() also sets the order: each equation has at most\none sym that the xregs and the earlier equations do not determine. A\nlater patch needs that order to check a table in one walk.\n\nA state keeps 2 * SUMS_PER_XREG sym equations for each xreg equation.\nThat cuts a chain such as \u0027x +\u003d k; x +\u003d k; ...\u0027. A pass that is over\nits budget drops all equations. So does a speculative state.\n\nA state without an equation has more values. So it is always safe to\ndelete an equation.\n\nThe clean-up runs when a state is cleaned, and when the number of syms\ndoubles.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-21-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "92907a9af6523655cb70ce3800e9ed01d892b1da",
      "tree": "a6affd8170e521be92b69451f172ce90aa6caae0",
      "parents": [
        "340bb75c4a56d60d4425b17db7c73815356d1000"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:27 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Make equations from ALU, spill, fill and call insns\n\nAn insn deletes the equations of the registers that it writes, see\ndef_regs. The result gets a new equation:\n\n  r2 \u003d r1             r1 \u003d sym0, r2 \u003d sym0\n  r2 +\u003d 8             r2 \u003d sym0 + 8\n  r2 \u003c\u003c\u003d 2            r2 \u003d 4 * sym0 + 32\n  r2 +\u003d r3            r2 \u003d sym2, sum: sym2 \u003d 4 * sym0 + sym1 + 32\n  r1 \u003e\u003e\u003d 3            r1 \u003d quot, sum: rem \u003d sym0 - 8 * quot\n  w4 \u003d w1             r4 \u003d low,  sum: low \u003d sym0 - 2^32 * high\n  r1 ^\u003d 5             r1 \u003d sym3, op:  sym3 \u003d sym0 ^ 5\n  *(fp - 8) \u003d r1      fp-8 \u003d sym0, and a fill reads it back\n  call                r1-r5 go to the frame of the callee\n  exit                r0 goes to the frame of the caller\n\nA number gets a sym only when a second xreg needs it.\n\nA truncation is a sum for the low bits. Compilers test one truncation\nand use another one:\n\n  w2 \u003d w1; w2 +\u003d -1; w2 \u0026\u003d 255; if w2 \u003e 99 goto out; use (u8)r1\n\nexpr_low_bits() looks for a number with the same low bits before it\nmakes a new sym. \u0027w1 \u003c\u003c\u003d 24; w1 s\u003e\u003e\u003d 24\u0027 is a truncation to 8 bits.\nAn op that reads only the low bits gets them from a truncation, also if\nthe test of the truncation was earlier:\n\n  w2 \u003d w1; w2 \u0026\u003d 0xff; if w2 \u003e 0xdf goto out; w1 \u0026\u003d 0xf0     0..0xd0\n\nfind_same_op() finds an op with the same operands. So two insns that\ncompute one number get one sym.\n\nA call uses the equations of its arguments before it deletes them. The\nlargest offset and the largest size do not have to go together:\n\n  read(buf + off, 64 - off)     r1 \u003d buf + sym0, r2 \u003d 64 - sym0\n\nsize_at_max_offset() gives the check the size that is left at the\nlargest offset. It can be 0 for a call that touches memory. So\ncheck_stack_access_within_bounds() tests the range, not the size.\n\nA speculative state gets no equations.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-20-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "340bb75c4a56d60d4425b17db7c73815356d1000",
      "tree": "4b01de948d096f360b87a3ff6da51ee299d43fac",
      "parents": [
        "ab04a7655be54a7d049ee32864c760c1fbca4424"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:26 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Refine all related numbers after a jump\n\nA jump refines its operands. Take that through the equations:\n\n  xreg -\u003e its sym -\u003e the other syms -\u003e their xregs\n\n  r1 \u003d sym0, r2 \u003d 4 * sym0\n  if r1 \u003e 7 goto out        r1 0..7 -\u003e sym0 0..7 -\u003e r2 0..28\n\npropagate_bounds() keeps the refined syms in a queue, and links the\nequations that use a sym. A sym propagates once, so the work is linear\nin the size of the table. A sum refines all of its syms. An op refines\nonly its result: run_op() runs scalar_alu() on the new operands.\n\nA jump that compares two numbers compares their difference with 0:\n\n  end \u003d p + sym0\n  if (p !\u003d end)             sym0 !\u003d 0\n\nA 32-bit test for equal does that for the numbers before a truncation\ntoo, see skip_truncation():  w1 +\u003d 1; if w1 !\u003d w2\n\nCode with no 32-bit insns can test the carry of a sum, see\nrefine_carry():\n\n  r5 \u003d r2; r5 \u003c\u003c\u003d 32; r5 \u003e\u003e\u003d 32\n  if r5 !\u003d r2 goto carry    if the jump is taken, r2 is above U32_MAX\n\nPacket pointers that share an id move together, see refine_ptr().\n\nThe two branches can get other bounds for one pointer. The test for the\nend of the packet takes the operands of one branch for both. So\nbpf_equations_jump() is last in check_cond_jmp_op().\n\nIf the equations cannot hold, the state ends after the next conditional\njump. The removal of dead code deletes an edge only from such a jump: a\ncall or a goto has to keep its target. The cpu can speculate past the\njump, so that needs bypass_spec_v1. See infeasible_state_ends().\n\nTwo pointers to one object have the order of their offsets:\n\n  for (p \u003d buf; p \u003c end; p++)\n          *p \u003d 0;\n\nThe jump refines both offsets, and is_branch_taken() decides it. This\nholds if no address wraps, so both offsets have to be near the object.\nIt is off without bypass_spec_v1.\n\nThis replaces refine_linked_regs().\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-19-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "ab04a7655be54a7d049ee32864c760c1fbca4424",
      "tree": "a8bd127ed5d61627165bd054fe2f0b780dfaf2c0",
      "parents": [
        "e9b3a99d48bc64cc5f878c0da8ee0226293ed45c"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:25 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Keep a table of equations in each state\n\nWhat holds on one path has to be in the state of that path. Give each\nstate a table of equations. The state says: there are numbers for the\nsyms, in their ranges, for which all equations hold.\n\n  xreg equations    sym equations         syms\n  r1 \u003d sym0         sym2 \u003d sym0 + sym1    sym0  0..7\n  r2 \u003d 4 * sym0                           sym1  0..255\n  fp-8 \u003d sym2                             sym2  0..262\n\nThe three arrays are one allocation. It is copied, freed and charged\nwith the state. An insn deletes the sym equations of its earlier visit.\nThe clean-up of a later patch limits the size of the table.\n\nEach scan of a table adds to the cost. At the limit a scan does not\nstart, see over_limit(). The work on equations stops half way then, and\nthe pass proves nothing. The last state can get there after the last\ntest of the limits. So the new do_check() of a later patch tests them\nagain when it ends.\n\nAn equation does not outlive its xreg. bpf_find_var_bounds() has no\nbounds for a register that is not set, or for a slot without a spill.\nA pointer that became a scalar is another number.\n\nThe trip index of a loop is an xreg too. A later patch counts it.\n\nThe number in a pointer is its offset. The cpu can speculate past the\njump that refines it, so pointers need bypass_spec_v1. There are no\nequations without CAP_BPF.\n\nThe log has the table:  0:r2\u003d4*sym0+0 sym0\u003d[0,+7]\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-18-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "e9b3a99d48bc64cc5f878c0da8ee0226293ed45c",
      "tree": "dd932b84465ee68b5b35b4eb5216f9cf3c2c5d0f",
      "parents": [
        "623109e0f9313770bc8d15c0cb20ca1dc87f4702"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:24 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Add equations and their arithmetic\n\nA state has a range for each xreg. It does not have the relation of two\nxregs:\n\n  r2 \u003d r1\n  r2 \u003c\u003c\u003d 2\n  if r1 \u003e 7 goto out      r2 is 0..28, but nothing says so\n\nAn equation relates two or three numbers. A sym is a number that the\nprogram had or could have had. There are three kinds:\n\n  xreg \u003d coef * sym + off                       r2 \u003d 4 * sym0 + 8\n  sym  \u003d coef * sym + coef * sym + off    sum   sym2 \u003d sym0 + sym1\n  sym  \u003d what an insn makes of two exprs  op    sym3 \u003d sym2 \u0026 0xf8\n\nAll equations hold mod 2^64, as the registers do. Add the types and\nthe arithmetic on ranges that the next patches use:\n\n  scalar_scale()          sym0 \u003d 0..7          -\u003e  4 * sym0 \u003d 0..28\n  refine_from_product()   4 * sym0 \u003d 8..20     -\u003e  sym0 \u003d 2..5\n  bpf_expr_div_exact()    (4 * sym0 + 8) / 4   -\u003e  sym0 + 2\n  bpf_find_next_diff()    sym2 - sym0          -\u003e  sym1\n\nIf the product can wrap, the range tells nothing. A power of two still\ntells the low bits. If a range becomes empty, the equations cannot\nhold: the state is infeasible.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-17-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "623109e0f9313770bc8d15c0cb20ca1dc87f4702",
      "tree": "91fb31f624269aebc887faef94099423b1f7b871",
      "parents": [
        "ebb272e84ec8fe2741c10f22491c2975cc3b3510"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:23 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Peel the first trips of a loop and join the other trips\n\nA loop can be verified trip by trip, or with one state for all trips.\nThe first way is precise and too long for a long loop. The second way\nis short and loses what differs between trips:\n\n  char buf[64]; off \u003d 255; ok \u003d 0;             trip 0 is different\n  for (...) { if (ok) buf[off] \u003d 0; off \u003d x \u0026 63; ok \u003d 1; }\n\nUse both. A loop has peeled trips and a leftover:\n\n  entry -\u003e [0] -\u003e [1] -\u003e ... -\u003e [d-1] -\u003e +----------+ \u003c--+\n           peeled trips, kept apart      | LEFTOVER |    |\n                                         |  widened |----+\n                                         +----------+\n\nPass 0 peels nothing. A later pass peels if an error asks for it, see\ntry_peel_trip(). bpf_flow_loop_enter() keeps the loop stack of a frame.\n\nThe calls of a callback and recursive calls go around like the body of\na loop. One struct bpf_loop describes the three:\n\n  kind                 header\n  BPF_LOOP_JUMPS       the target of the back edge\n  BPF_LOOP_CALLBACK    the call of the helper\n  BPF_LOOP_RECURSION   the start of the first function of the cycle\n\nWhat is held has no join. A loop that acquires in each trip makes new\nstates without end. check_held_in_leftover() stops it: a reference that\nis in no xreg is a leak, and the peeled trips limit the locks.\n\ncheck_loop_guard() still reads the old members of loop_stack_entry. They\ngo away with \"bpf: Give a loop a checked trip count or may_goto\". Later\npatches also start the leftover at a back edge, note the error of\ncheck_held_in_leftover() and leave the loop of a callback.\n\nThe log has the innermost loop. Level 2 has all loops for each block.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-16-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "ebb272e84ec8fe2741c10f22491c2975cc3b3510",
      "tree": "3ae6332d1933af6be02266c71146fe747a6052aa",
      "parents": [
        "12766488e77a3d85dea5ff5e023f7acdb8fe96c7"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:22 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Mark a state that no run of the program has\n\nA jump can leave an xreg without a value: the ranges and the known bits\nhave no number in common. No run of the program has such a state.\n\n  jump -\u003e range is empty -\u003e infeasible -\u003e a pass:              continues\n                                          a run without joins: drops it\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-15-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "12766488e77a3d85dea5ff5e023f7acdb8fe96c7",
      "tree": "b1479765e75c107c45d9af3837c8478085f7b6df",
      "parents": [
        "8f58839c9ebbb539ad874f04a640789648538a39"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:21 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Remember how many bytes of a packet are checked\n\nThe range of a packet pointer is lost when the number that is added can\nbe negative:\n\n  if (data + 54 \u003e data_end) return;\n  p \u003d data + 20;       range 54\n  p +\u003d -4..4;          range 0\n  *p                   fails, but the offset is 16..24\n\nThe check of 54 bytes holds for the packet, wherever the pointer goes.\nKeep that number in pkt_min_len. If the largest offset of the pointer is\nbelow pkt_min_len, the range is at least pkt_min_len.\n\nA join takes the smaller number. A state with the larger number does\nnot subsume a state with the smaller number. The join rule does not\nlook at the number: each trip of a scan loop checks one byte more, so\nall exits of the loop would stay apart.\n\nEquations will let a jump refine a pointer that has any offset, and\nthey bring a far pointer back:\n\n  r9 \u003d data + r2                  r2 is 0..255, 8 bytes are checked\n  r8 \u003d r9 + 0x7fffffffffffffc0    the largest offset wraps\n  if r2 \u003e 100 goto out            refines r2, r9 and r8\n  r8 -\u003d 0x7fffffffffffffc0        r8 is r9 again\n\nAn earlier patch has the rule for that: an id and a range hold only\nwithin BPF_MAX_VAR_OFF of the start. So r8 has no range, and pointers\nwith one id are all near, or they are copies of one far pointer.\n\nsmax can go from S64_MAX to -3, and the difference does not fit in s64.\nbpf_trim_pkt_range() computes it in u64.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-14-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "8f58839c9ebbb539ad874f04a640789648538a39",
      "tree": "719a3c1329c01558053affe0fd8680dfcb679455",
      "parents": [
        "d83c595d9480edd53023ff6d7fa66bc5ec119e74"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:20 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Keep more of what is known about a number\n\nSix transfer functions lose what is known. Scalar evolution hid a part\nof that: it had expressions for extensions and for partial spills. Fix\nthe functions.\n\n1. An AND that clears no bit is a move: the old ranges hold too. If the\n   AND splits the state, the step goes away, and a part that has no\n   value gets only the new ranges.\n     r0 \u003d 1..16; w0 \u0026\u003d 255             was 0..16, now 1..16\n\n2. A sign extension does not change the low bits. The other bits are\n   copies of the sign. If the low 32 bits fit, they give the range.\n     w6 \u003d -100..100; r7 \u003d (s32)r6      was any s32, now -100..100\n\n3. A fill can be larger than the spill. On little endian the low bytes\n   are from the spill.\n     *(u32 *)(r10 - 8) \u003d 5; r1 \u003d *(u64 *)(r10 - 8)      w1 is 5\n\n4. A write above the low bytes of a spill does not change them. Keep\n   them as a narrow spill. Zero bytes next to it stay zero.\n     struct { u32 i; u32 flag; } s; s.i \u003d r6; s.flag \u003d 1;\n\n5. A range that crosses S64_MAX has no signed bounds. A later patch\n   makes such ranges. The known bits can have signed bounds, so a signed\n   shift takes the tighter ones.\n     r7 \u003d 0..0xf0 \u003c\u003c 56; r7 s\u003e\u003e\u003d 56    -128..112, not -128..127\n\n6. A number can have a step: 0, 12, 24, ... The known bits tell only a\n   power of two. A later patch counts a loop by the distance of the\n   counter to its bound:\n\n     for (i \u003d 12 * a; i !\u003d 12 * b; i +\u003d 12)\n\n     distance \u003d i - 12 * b     ..., -24, -12, 0\n     distance !\u003d 0             ..., -24, -12     with the step\n                               ..., -2, -1       without it\n\n   Without the step, \u0027i +\u003d 12\u0027 goes past the bound. Keep it:\n\n     -3 * (3 * a + 1)          step 9: a negative factor\n     3 * a + 6 * b             step 3: the gcd of the two steps\n     step 3 and step 6         step 6: one is a multiple of the other\n\n   As before, a result that can wrap has no step.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-13-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "d83c595d9480edd53023ff6d7fa66bc5ec119e74",
      "tree": "1f2049e26e5ebc32774c8e1cce3f174bd9be1b62",
      "parents": [
        "fa83ca87f43151bf0cd3c05034491b7514e53026"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:19 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Put a barrier where no mask fits\n\nWithout bypass_spec_v1 the offset of \u0027ptr +\u003d reg\u0027 is masked. The program\nis rejected if two paths need two masks, or if no mask is possible. To\nfind such paths, explore_alu_limits keeps all states with other numbers\napart. That cannot work in a pass that joins all states.\n\nAllow the insn and put a barrier before it. A mask fits if it passes\nthe largest offset that was checked, and no larger one:\n\n  offset 2 or 3, joined to 2..3                    mask passes 0..3\n  two masks, mixed signs, pointer to a packet      barrier\n\nA stack pointer with a variable offset is still rejected.\n\nAn error in a speculative state is no error. The insn gets a barrier\nand the path ends, see nospec_ends_path(). What the state noted at the\ninsn is dropped. The barrier has to stop each edge that leads there:\n\n  fall-through, jump, call, return     barrier before the insn\n  exit of a callback --\u003e helper        barrier at the exit\n  may_goto --\u003e r0 \u003d 0; exit            barrier before r0 \u003d 0\n  call --\u003e recursion in frames         barrier at the call\n  return --\u003e dead code                 \u0027goto -1\u0027 replaces the code\n\nThat \u0027goto -1\u0027 takes no zext_dst from the insn that it replaces. A jump\nthat is dead itself is not hard-wired: it is removed later, and the\ndriver of an offloaded program refuses a new target.\n\nA speculative state starts no async callback, and it asks for no slot\nof a stack argument.\n\nThis also fixes two bugs of the old code:\n- If many insns replace an insn, the barrier has to go before the first\n  one. In an inlined bpf_loop() it was before the last one, after the\n  callback.\n- A speculative path ends after a store to the stack, because a barrier\n  follows the store. It also ended after other writes to the stack: an\n  atomic, a call, a fastcall spill that is removed. No barrier follows\n  them, and the code after them was not checked. Now the path continues.\n\nexplore_alu_limits and the REASON_* errors go away. Some unprivileged\nprograms load now.\n\nRename push_budget_exit() to push_unwind_exit(): the way to stop is\n\u0027r0 \u003d 0; unwind_exit\u0027. budget_exit_insn() becomes emit_unwind_exit(),\nand budget_can_unwind() becomes state_can_unwind(). In the next patches\na budget is a limit on the work of the verifier.\nbpf_insert_loop_guards() uses emit_unwind_exit() too. A later patch sets\nguard_unwinds. pass_cnt counts the calls of do_check(): rename it to\ncheck_cnt.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-12-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "fa83ca87f43151bf0cd3c05034491b7514e53026",
      "tree": "f767f421ece70dd7b4a16d8f7f494475965730e6",
      "parents": [
        "9f9fc3dc30b2f21ca2f625fedb72d2edf4ecd7d7"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:18 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Reject a program with a call that needs two rewrites\n\nSome calls are rewritten with a number and with the special fields of\na type: bpf_obj_new(), bpf_obj_drop(), bpf_refcount_acquire(), list\npush, rbtree add, per_cpu_ptr(). One state sets them for all states.\nThat is wrong if another state has another type:\n\n  if (...) p \u003d a; else p \u003d b;     a has a kptr, b has none\n  bpf_obj_drop(p);                one btf_struct_meta for both\n\nWith the fields of b, the drop of a leaks the kptr. With the fields of\na, the drop of b frees a kptr that is not there.\n\nrecord_call_fixup() notes the number and the fields of the first state.\nIt fails if another state has other ones. Two types with equal fields\ncan share a call, see btf_record_equal(). bpf_refcount_acquire() reads\nonly the offset of the refcount, so only that has to be equal.\n\nThis rejects programs that load today. A compiler can make one call of\ntwo calls in the source. The fix is __attribute__((nomerge)) on the\ndeclaration of the function. A static function can get two types from\nits callers. The fix is to inline it. The log says so.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-11-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "9f9fc3dc30b2f21ca2f625fedb72d2edf4ecd7d7",
      "tree": "93d52e2e6b8917cf90e6e831a4ffc3a0ac036e00",
      "parents": [
        "d1252e1e9c4616b5792832663514a07819dc37ef"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:17 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Check fixups in the main pass and keep a snapshot of them\n\nThe main pass writes fixups for the code that rewrites the program: the\ntype of a pointer at a load, the mask of an add, the depth of a stack.\nThe main pass will run more than once, and a join can make a path that\nthe program does not have:\n\n  r7, r8 \u003d 0, 0 or 1, 5       join: r7 \u003d 0..1, r8 \u003d 0..5\n  if r7 !\u003d 0 goto out\n  if r8 \u003d\u003d 0 goto out\n  call f                      only the join gets here\n\nThe next pass must not see what this path wrote. Put what a pass\nwrites in groups: bpf_insn_fixups and bpf_env_per_pass. save_snapshot()\ncopies them, with subprog_info, func_info_aux, the prog and fields of\nprog-\u003eaux. Each pass starts from the snapshot. The callers of the\nsnapshot and of check_after_pass() come in later patches.\n\nSome checks ran after the main pass. That is too late for another pass.\nMove them:\n\n  to the insn          a tail call with two maps, a load of an arena\n                       member and of something else, a missing kfunc,\n                       bpf_override_return() and a map of programs\n  check_after_pass()   the depth of the stack, the prologue of an\n                       extension, r12 in a callback that is called too,\n                       the slots of stack arguments\n\nThe check for room for the arguments of an arena stack entry goes away.\nThe frame is empty at the entry, so R1-R5 wait there.\n\nAn insn has one fixup for all states. A second one is an error, see\nfixups_differ().\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-10-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "d1252e1e9c4616b5792832663514a07819dc37ef",
      "tree": "67892b949d118ee6a5a77fa3cbfe87494d5ae43b",
      "parents": [
        "cb137b692503d0cc3538bab73b78f2cadec686d0"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:16 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Do not fail a check because a state has fewer values\n\nMore precision must not make the result worse. If an insn is proven in\na state, it has to be proven in a state with fewer values too. Else it\nis proven after a join and unproven without the join. Three checks do\nnot work that way.\n\n1. Pointer arithmetic looks at the smallest offset:\n\n     r1 \u003d 1 \u003c\u003c 30            r1 \u003d 0 .. 1 \u003c\u003c 30\n     r0 +\u003d r1   fails        r0 +\u003d r1   ok\n\n   Allow the add. bpf_blur_far_offset() extends the range of the\n   offset down to BPF_MAX_VAR_OFF - 1. So the offset is not a constant\n   that overflows an int, and an access fails. The same holds far below\n   the object. The number still needs a lower bound.\n\n   A flexible array of a BTF object has no end. If a far load from it\n   passes, it gets a fault handler. A far load-acquire fails.\n\n2. A jump can cut a range in two:\n\n                         r8 \u003d -4..3            r8 \u003d any number\n     if r8 \u003c 3 goto L    -4..-1, 3 -\u003e -4..3    3..U64_MAX\n     if r8 s\u003c 0 goto L   0..3                  3..S64_MAX\n\n   The small state has 0..2, the large state does not. cut_range() does\n   the jump two times: for -4..-1 and for 0..3. It does that only if\n   an error depends on the register, see bpf_xreg_in_deps() in a later\n   patch.\n   \u0027x !\u003d 0\u0027 is \u0027x u\u003e 0\u0027, so it cuts a range too.\n\n3. A load takes a part of a spilled pointer:\n\n     *(u64 *)(r10 - 16) \u003d ptr\n     r1 \u003d r10 - 16 + (0..7)       r1 \u003d r10 - 16 + 3\n     r0 \u003d *(u8 *)(r1 + 0)  ok     r0 \u003d *(u8 *)(r1 + 0)  fails\n\n   With allow_ptr_leaks the constant offset takes the path of the\n   variable offset: the result is an unknown number. An atomic\n   read-modify-write still needs the whole slot.\n\ndo_check() has only a range for a far offset. So const_fold.c does not\nfollow a far pointer to a map value.\n\nA far pointer to the packet can wrap around:\n- It gets a new id and loses its range.\n  bpf_blur_far_offset() looks at the source and the result of the add.\n- A compare with the end of the packet leaks the address. Without\n  allow_ptr_leaks, compare only offsets from -MAX_PACKET_OFF to\n  2 * MAX_PACKET_OFF. A header and a 16-bit length fit.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-9-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "cb137b692503d0cc3538bab73b78f2cadec686d0",
      "tree": "11b5baa9e9c868bb2e060137c7c0c7ebaa6d1d61",
      "parents": [
        "37b844f5bc6fc9b9e01a1d49146e1c5fde727422"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:15 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Name an id after the xreg that has it\n\nAn id stands for the set of xregs that have it. Its number depends on\nthe path. Two states with the same sets have other numbers:\n\n  state 1:  r1\u003dptr(id\u003d17)  r6\u003dptr(id\u003d17)  r7\u003dptr(id\u003d4)\n  state 2:  r1\u003dptr(id\u003d3)   r6\u003dptr(id\u003d3)   r7\u003dptr(id\u003d9)\n\nSo the compare, the join and the return from a function each had a map\nfrom one set of ids to another.\n\nbpf_renumber_ids() names each id after the first xreg that has it:\n\n  both:     r1\u003dptr(id\u003dr1)  r6\u003dptr(id\u003dr1)  r7\u003dptr(id\u003dr7)\n\nEqual sets have equal ids now, and reg_object_equal() is a memcmp().\nIf r1 \u003d r6 in one state and r1 is not set in the other, r6 has two\nnames and counts as two objects. The maps saw one object.\n\nThe ids are renumbered at the end of a basic block and before the call\nof a function. The low bits tell the origin:\n\n  bpf_new_id()       an insn of this basic block made it\n  BPF_REF_ID()       it is held, named after its index in refs[]\n  BPF_XREG_ID()      named after an xreg\n  BPF_RETURNED_ID()  a function returned it\n\nA caller and its callee have the same refs[], so they have the same\nnames. inherited_id(), fresh_id() and BPF_MAX_ID go away. check_ids()\nstays until \"bpf: Compare states by join_key, then by value\".\n\nThe id of a __ref argument is not constant any more. refs[].ctx_arg\ntells which argument a reference came with. The report of a leak finds\nthe acquire by refs[].diag_id, which is not renumbered. A reference\nthat leaks has no release, so the events of a release go away.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-8-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "37b844f5bc6fc9b9e01a1d49146e1c5fde727422",
      "tree": "d926eacad30b923b2895b59a069e5d555abd21f1",
      "parents": [
        "3c41899af5d0855eb42997e8c5370ab2f6e884b5"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:14 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Record what each insn reads and writes\n\nLiveness knows what an insn reads and writes, and drops most of that\nwhen it is done. A later patch walks back from an unproven insn and\nneeds the same data. Keep it in bpf_insn_aux_data:\n\n  r2 +\u003d r3                   use_regs: r2 r3, def_regs: r2\n  r2 \u003d *(u64 *)(r10 - 8)     may_read_mask: fp-8\n  *(u64 *)(r1 + 0) \u003d r2      writes_outer, if r1 points to the frame\n                             of a caller\n\nGive registers and stack slots one number, the xreg:\n\n  0 .. 10      11 .. 13            14 ..\n  r0 .. r10    hidden registers    fp-8, fp-16, ...\n\nTwo sets of reads were too large:\n- LD_ABS and LD_IND read all registers and wrote none. They read r6 and\n  the source register, and they clobber r0-r5.\n- bpf_timer_set_callback() does not read r3. The verifier sets that\n  argument.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-7-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "3c41899af5d0855eb42997e8c5370ab2f6e884b5",
      "tree": "20ff1bd64d5352aae6b117e9b7607028b3b62a6b",
      "parents": [
        "0b1c6041e9f160ba18782bed92747a725bc7cdbb"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:13 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Limit the cost and the memory of a load\n\nThe caps on states are gone. Something has to stop a load that takes\ntoo long. A cap on one kind of work is a poor tool. It rejects a valid\nprogram that needs much of that kind and little else.\n\nUse two limits for the whole load, one on cost and one on memory:\n\n  weight  work\n       1  one step of a scan\n       4  copy an xreg\n      16  clean, compare or join an xreg\n     128  check an insn\n     512  make, order and free a state\n\n  BPF_MAX_COST 1 \u003c\u003c 33, BPF_MAX_MEM 2 GB, 1/32 of both without CAP_BPF\n\nThe cost counts work, not time. So the verdict does not depend on the\nspeed or the load of the machine. bpf_check_limits() calls\nbpf_must_abort() too, and replaces it in the loops that add cost. A\nthaw does not take an abort back, see env-\u003eaborted.\n\nA state knows its part of env-\u003emem, so copy and free take env.\nfree_pushed_states() frees the states that an insn pushed. A load from\na table of functions pays for the scan and for the set that it makes.\ngotox pays for the sort of its targets.\n\nThe walks up a deep nest of loops are quadratic. Move the check of\nLOOP_STACK_SIZE to bpf_compute_loops(), before these walks.\nStack liveness skips the registers and slots that hold no argument.\nIt copies the stack only for a call that passes a pointer to a stack.\n\nStack liveness has a cap on one kind of work too. It rejects a program\nafter 10000 calls of functions:\n\n  for 12000 times:\n    call small_func     liveness analysis exceeded complexity limit\n\nThe program is valid and cheap. Remove the cap. Each call site has an\ninstance, and the hash table of instances has 256 buckets. So 12000\ninstances make long chains. Use an array with the call site as the\nindex. An entry has one instance for each depth:\n\n  by_callsite[insn] -\u003e depth 2 -\u003e depth 1 -\u003e NULL\n\nA list has all instances, for the loops over them.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-6-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "0b1c6041e9f160ba18782bed92747a725bc7cdbb",
      "tree": "6eaaa5cc2e650c3d140c1f03946c24ed6b29daae",
      "parents": [
        "867a4a89969457aec635ae47a4378e473784af98"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:12 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:39 2026 +0000"
      },
      "message": "bpf: Delete scalar evolution\n\nscev.c computes an expression for each register at each insn, before\nthe main pass. The expression is the same for all paths. It has three\nusers:\n\n  what                          code\n  linked registers at a jump    refine_linked_regs()\n  ranges in a loop              bpf_widen_scev_regs(), the clamps\n  trip count                    bpf_compute_loop_iters()\n\nThe trip count is a proof with a case for each form of a loop:\n\n  compute_backedge_taken_count()  \u003c, \u003c\u003d, \u003e, \u003e\u003d, !\u003d and how each wraps\n  bound_of_zext32()               a 64-bit jump on a 32-bit counter\n  bpf_compute_leave_conds()       a condition is stored, a later\n                                  jump tests it and leaves\n  fresh_regs, mask_regs, ...      values that are not linear\n\nNothing checks the count. If it is too small, the verifier does not\ncheck a trip that runs.\n\nLater patches replace all of that with one mechanism: equations in the\nstate. A join guesses them, and a prune checks them. Delete scev.c, its\ncallers, and the helpers that only it uses.\n\nWhat is not a plain deletion:\n- Only scev.c needs all exits and all latches of a loop. The other\n  users need the first one. exit_to replaces exits[], latch replaces\n  latches[]. MAX_LOOP_EXITS and MAX_LATCHES go away.\n- find_latch() counts its steps with bpf_add_cost(). The next patch adds\n  the other weights and the limits.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-5-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "867a4a89969457aec635ae47a4378e473784af98",
      "tree": "e7f50261976a21953a9c410941f906f540ad117e",
      "parents": [
        "5aea6a7c18250f1b9c0cb06abb41e7e1dddcaf1f"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:11 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:38 2026 +0000"
      },
      "message": "bpf: Delete the old main pass of the verifier\n\nThe main pass decides at each join point if two states become one. It\ndecides before it knows if the join does harm. So it guesses, with one\ntable or one rule for each shape of code:\n\n  what decides             where\n  8 tables of \"need\"       flow_compute_need_const()\n  kinds of values          bpf_flow_compute_kinds()\n  bounds for widening      flow_compute_rungs()\n  rules for two states     flow_join_makes_up(), flow_*_differs()\n  walks of loops           flow_try_walk()\n  caps on states           1024 at an insn, 256 for each insn, ...\n\nA valid program that no rule fits is rejected, or it runs into a cap.\n\nThis series changes the order. Join first, and decide after an error.\nAn insn whose check fails is \"unproven\". The next run can prove it:\n\n  join all states --\u003e error ? --no--\u003e accept\n                       ^   | yes\n                       |   v\n                       keep apart what the unproven insn depends on\n\nDelete the tables, the rules, the caps, the work list, the join, the\nwalks, the compare of registers and references, and the code that\nbuilds the log from kept states. flow.c keeps the order of the insns\nand the places for may_goto.\n\nWhat the remaining code uses stays until the patch that replaces it:\ndo_check(), do_check_all(), check_ids(), regs_exact(), the default case\nof regsafe(), bpf_loop_rungs, bpf_guard_edge and a part of\nloop_stack_entry.\n\nThere is no main pass until \"bpf: Verify in passes\". Until then\nbpf_check() refuses each load with -EOPNOTSUPP. The code after that\nreturn is dead, so a call of a function that comes later needs only a\nprototype. Later patches add static functions before their callers, so\n-Wunused-function is off until then.\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-4-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "5aea6a7c18250f1b9c0cb06abb41e7e1dddcaf1f",
      "tree": "d3ed968848b9a9ced52cc95f52051a06ad49aa0e",
      "parents": [
        "9c8f16ab14d7f63329b8366069455bafce1af411"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:10 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:38 2026 +0000"
      },
      "message": "bpf: Make stack liveness faster\n\ncompute_subprog_args() follows the pointers to the stack. Each round\nvisits all insns and joins all slots, one by one. Most of that work\nfinds no change. Do only what can find a change:\n\n  old                              new\n  each round visits all insns      only the insns whose input changed\n  first visit: join each slot      memcpy()\n  later visit: join each slot      memcmp() first\n  half slots to slots: by bits     by words\n\nThe fixed point is the same.\n\n                                load time, ms\n  program                       before   after\n  pyperf600                     222      124\n  pyperf100                     126      64\n  strobemeta                    153      116\n  profiler1 kprobe__vfs_link    18       8\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-3-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "9c8f16ab14d7f63329b8366069455bafce1af411",
      "tree": "2b3134e27101794b99cd71864c47d4a993be8281",
      "parents": [
        "27d68caf0e220c1a024c53bfe77b46b07ce201b1"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 20:49:09 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 04:24:38 2026 +0000"
      },
      "message": "bpf: Look for bpf_clone_redirect() once in check_recursion()\n\ncheck_recursion() scans all insns of the program for each recursive\nsubprog. There is no limit on subprogs now. So the cost is subprogs x\ninsns, and no signal ends that loop. Scan once.\n\n  100000 static subprogs of 4 insns in one cycle    BPF_PROG_LOAD\n  before                                            34 s\n  after                                             11 s\n\nFixes: f7e93aa4a34f (\"bpf: Remove BPF_MAX_SUBPROGS\")\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261120204959.614908-2-alexei.starovoitov@gmail.com\n"
    },
    {
      "commit": "27d68caf0e220c1a024c53bfe77b46b07ce201b1",
      "tree": "1880b1a0d5c2c684d79ce71ecfc6dfbcf1f6d91f",
      "parents": [
        "82cc2b4383e3edfa1026c8612fb4e90a9329ba11",
        "84afebd853437e44cb71f718be11d90e4c1a59dd"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 03:07:08 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Sat Nov 21 03:07:08 2026 +0000"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 7.4-rc3\n\nCross-merge BPF and other fixes after downstream PR.\n\nConflicts:\n  kernel/bpf/btf.c\n  kernel/bpf/verifier.c\n\nAlso moved cond_resched_tasks_rcu_qs() from do_check() into bpf_must_abort().\n\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "84afebd853437e44cb71f718be11d90e4c1a59dd",
      "tree": "09dc2b20cfa9303bc824b928eb6c9a322ecb318a",
      "parents": [
        "05718d5c2907cb46fb27bb6580edb89769ea430a",
        "d5ba86298b45e1a81c578c499e9a222a3b734d5d"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 17:41:06 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 17:41:06 2026 -0800"
      },
      "message": "Merge tag \u0027bpf-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf\n\nPull bpf fixes from Alexei Starovoitov:\n \"Mostly sockmap fixes as promised, plus uprobe ctx rewrite via bpf and\n  cgroup-bpf fixes.\n\n   - Reject writable map iterators on read-only maps (Adethya\n     Srinivasan)\n\n   - Various sockmap fixes (Alexei Starovoitov):\n       - Clear the redirect target before the sk_msg prog runs\n       - Check that the redirected message is the cork\n       - Leave sk_stream_wait_memory() once the socket is dead\n       - Keep the rest of the cork after a redirect\n       - Don\u0027t let an SK_PASS verdict cover the next message\n       - Subtract all dropped bytes from the return value of sendmsg()\n       - Clear the end mark of elements added by bpf_msg_push_data() and\n         bpf_msg_pop_data()\n\n   - Fix ring capacity invariant break in bpf_msg_push_data() (Bo Cao)\n\n   - Report RCU-tasks quiescent states in do_check() to fix rcu_tasks\n     stalls during a long verification (Breno Leitao)\n\n   - Various sockmap fixes (Chris Mason):\n       - Give no progs to a TCP listener\n       - Check the target of an egress redirect before each send\n       - Check the TCP state in recvmsg()\n       - Reset the copy position when corking\n       - Don\u0027t copy 0 bytes into a full cork\n\n   - Use a dedicated workqueue for freeing BPF programs to fix a\n     deadlock between pack_mutex waiters and the vmalloc purge work\n     (Emil Tsalapatis)\n\n   - Fix verifier model mismatch on a narrow read of\n     __sk_buff.remote_port (Henry Martin)\n\n   - Fix bpf-gcc CO-RE relocation in verifier_sockmap_mutate selftest\n     (Jiayuan Chen)\n\n   - Restrict uprobe ctx writes to the registers that ptrace can set\n     (Jiri Olsa)\n\n   - Various sockmap fixes (Josef Bacik):\n       - Write sg.start when recvmsg() faults\n       - Don\u0027t let an SK_DROP verdict stick\n       - Clear the resume state of a stopped psock\n\n   - Various fixes (Michal Luczaj):\n       - Fix \"unresolved symbol tcp_request_sock\" build error with\n         CONFIG_INET\u003dn\n       - Restrict iter-context sockmap updates to iter/sockmap\n       - Restrict bpf_sock_destroy() to iter/{tcp,udp}\n       - Mark bpf_iter__sockmap::sk as PTR_TRUSTED\n\n   - Mark backing_file_alloc/free LSM hooks as untrusted (Sergei\n     Nizovtsev)\n\n   - Various cgroup-bpf fixes (Shakeel Butt):\n       - Don\u0027t read freed effective arrays in BPF_PROG_QUERY\n       - Don\u0027t attach to a removed cgroup\n       - Protect cgroup_bpf state with its own mutex, so that queries\n         and the release work don\u0027t wait for cgroup_mutex\n       - Don\u0027t lose errors in effective BPF_LSM_CGROUP queries\n\n   - Check variable-offset accesses against special fields (Shihuang\n     Liu)\"\n\n* tag \u0027bpf-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: (38 commits)\n  selftests/bpf: Test which ctx registers a uprobe prog can write\n  bpf: Restrict uprobe ctx writes to the registers ptrace can set\n  selftests/bpf: Fix bpf-gcc CO-RE relocation in verifier_sockmap_mutate\n  bpf, cgroup: Don\u0027t lose errors in effective BPF_LSM_CGROUP queries\n  bpf, cgroup: Protect cgroup_bpf state with its own mutex\n  bpf, cgroup: Don\u0027t attach to a removed cgroup\n  bpf, cgroup: Don\u0027t read freed effective arrays in BPF_PROG_QUERY\n  bpf: Fix verifier model mismatch on __sk_buff.remote_port narrow read\n  bpf: Fix \"unresolved symbol tcp_request_sock\" build error\n  selftests/bpf: Add iter/sockmap bpf_sock_destroy() negative test\n  bpf: Mark bpf_iter__sockmap::sk as PTR_TRUSTED\n  bpf: Restrict bpf_sock_destroy() to iter/{tcp,udp}\n  bpf, docs: Document BPF_ITER_NOSLEEP\n  selftests/bpf: Add negative test for sockmap update from non-sockmap iter\n  bpf, sockmap: Restrict iter-context sockmap updates to iter/sockmap\n  selftests/bpf: Remove sockmap update from bpf_iter_unix\n  bpf, lsm: Mark backing_file_alloc/free LSM hooks as untrusted\n  bpf: Report RCU-tasks quiescent states in do_check()\n  bpf: Check variable-offset accesses against special fields\n  bpf: Use dedicated workqueue for freeing BPF programs\n  ...\n"
    },
    {
      "commit": "05718d5c2907cb46fb27bb6580edb89769ea430a",
      "tree": "a37a3526500f6c0afc7479cb53bede5631a888e1",
      "parents": [
        "5f22fb20497f4983094131f00a734362300d22d2",
        "fb5289b697c965581104bafdd875b969a1db3e79"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 16:26:10 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 16:26:10 2026 -0800"
      },
      "message": "Merge tag \u0027zonefs-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs\n\nPull zonefs fixes from Damien Le Moal:\n\n - Avoid potentially opening the wrong file in the case of an overflow\n   when converting a file names to an inode number (Guangshuo)\n\n - Handle potential overflow of RLIMIT_FSIZE (Ding)\n\n* tag \u0027zonefs-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:\n  zonefs: ignore RLIMIT_FSIZE above LLONG_MAX in zonefs_write_check_limits()\n  zonefs: check multiplication overflow in zonefs_fname_to_fno()\n"
    },
    {
      "commit": "5f22fb20497f4983094131f00a734362300d22d2",
      "tree": "b0d94b29a27186e03afd32bfadf9e11f5eae3f2a",
      "parents": [
        "a5242bd5b19c1270feaeeb596aee8b43ca3a44ef",
        "7f7b822d09c5590defcc61a37ffbd5a3533ed518"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 13:10:18 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 13:10:18 2026 -0800"
      },
      "message": "Merge tag \u0027fuse-fixes-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse\n\nPull fuse fixes from Miklos Szeredi:\n\n - Fix  bugs reported by Sashiko\n\n - Fix a couple of issues introduced in this cycle\n\n - Misc bug fixes\n\n* tag \u0027fuse-fixes-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:\n  fuse: limit name size in listxattr\n  fuse: clear the old EOF tail before writeback-cache writes\n  fuse: fix UBSAN warning in fuse_iomap_writeback_range()\n  fuse: skip dcache instantiation for readdirplus names with embedded NUL\n  fuse: preserve ENOTCONN after failed initialization and disconnect\n  fuse: set dentry epoch before making the dentry visible\n  fuse: advertise support for DAX mappings\n  fuse: don\u0027t mark inode DAX without CONFIG_FS_DAX\n  fuse: don\u0027t pass a NULL inode to fuse_inode_backing() on release\n  virtiofs: zero the reply region of the argument buffer\n  virtiofs: disable request timeout\n  virtiofs: fix use-after-free of fs-\u003etag on device removal\n  fuse: derive short read EOF from the request offset\n  selftests/fuse: test post-EOF page zeroing on copy_file_range()\n  fuse: zero the partial EOF page in copy_file_range()\n  fuse: fix possible UAF in fuse_direntplus_link()\n  fuse: Use d_alloc_trylock() in fuse_direntplus_link()\n"
    },
    {
      "commit": "a5242bd5b19c1270feaeeb596aee8b43ca3a44ef",
      "tree": "66a1447bca14c760d66cda64b0e9dd03e9ccc6d8",
      "parents": [
        "b98adc197f7300e875fbcd4cf5dfa5ebe3d6dc08",
        "5a277aa7eb4d4f1f05534d6c3dcb1a9fa4f6b8f2"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 13:00:13 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 13:00:13 2026 -0800"
      },
      "message": "Merge tag \u0027libnvdimm-fixes-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm\n\nPull libnvdimm fix from Alison Schofield:\n \"Nest namespace mapping locks under the bus lock\"\n\n* tag \u0027libnvdimm-fixes-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:\n  nvdimm/namespace: Nest mapping locks under the bus lock\n"
    },
    {
      "commit": "b98adc197f7300e875fbcd4cf5dfa5ebe3d6dc08",
      "tree": "b34acf7e17cc3e5cc952632f4067c01ca9053737",
      "parents": [
        "ddefe07f600b89762853a50a61bb4ee0e3f864ed",
        "a02576de05178f15ffe6fc7551496de7de8acfde"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 12:39:08 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 12:39:08 2026 -0800"
      },
      "message": "Merge tag \u0027cxl-fixes-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl\n\nPull cxl fixes from Dave Jiang:\n \"A small collection of CXL fixes\"\n\n* tag \u0027cxl-fixes-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:\n  cxl/port: Fix endpoint RAS error unmasking\n  cxl/test: Free the decoder registry when cxl_test_init() fails\n  cxl/region: Reject a repeat write of an endpoint decoder to targetN\n  cxl/region: Restore a target\u0027s position from its slot after sorting\n"
    },
    {
      "commit": "ddefe07f600b89762853a50a61bb4ee0e3f864ed",
      "tree": "8a950b8486cb915d13b582c28aa28152572e0c69",
      "parents": [
        "a904dcf3fdf29cdac99ea354789bc5c82df0d5ad",
        "e7732ec135b501e87ab060d992b3b5f2ec4396c9"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 10:32:39 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 10:32:39 2026 -0800"
      },
      "message": "Merge tag \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma\n\nPull rdma fixes from Jason Gunthorpe:\n \"Usual set of bug fixes, many found by tools:\n\n   - Bound checks and counter widths in srpt for initiator controlled\n     descriptor tables, out of bounds read and resource leaks are remote\n     triggerable\n\n   - Use after free races in siw MR lookup and in the rtrs event handler\n     error unwind\n\n   - Don\u0027t leak kernel heap memory to userspace through query_qp\n\n   - Several rereg_mr bugs in irdma and mlx4 leaving stale or revived MR\n     state after a failure\n\n   - irdma FRWR and PBLE/AEQ setup was broken on PAGE_SIZE \u003e 4K\n\n   - bnxt_re firmware command channel races around timeouts, duplicate\n     and spurious completions, plus poll_cq and FRMR bounds fixes\n\n   - mlx5 regressions: probe failure on older FW without ib_virt, and\n     DevX umem registration failing for page sizes \u003e\u003d 4G\n\n   - nldev replied with the wrong netlink command for STAT_DEL and\n     PORT_GET\n\n   - Small fixes in ionic QID allocation, mthca, usnic and an mlx5 vport\n     rep error unwind\n\n   - MAINTAINERS updates, including Jacob Moroni as irdma co-maintainer\"\n\n* tag \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (31 commits)\n  RDMA/mlx5: Skip vport context query on FW without ib_virt support\n  RDMA/mlx5: Add missing error flow in mlx5_ib_set_vport_rep\n  RDMA/mlx5: Fix DevX umem page size truncation for pages \u003e\u003d 4G\n  MAINTAINERS: Add Jacob Moroni as irdma co-maintainer\n  RDMA/uverbs: Zero the QP attrs in ib_uverbs_query_qp\n  RDMA: Remove pointless links\n  RDMA: Clean up the INFINIBAND subsystem entry\n  RDMA: Add missing UAPI files\n  RDMA: Rely on the generic Patchwork instance\n  RDMA/rtrs: Register client event handler after capability check\n  RDMA/siw: Fix use-after-free in siw_mem_id2obj()\n  RDMA/nldev: Reply to RDMA_NLDEV_CMD_STAT_DEL with its own command\n  RDMA/nldev: Reply to RDMA_NLDEV_CMD_PORT_GET with its own command\n  RDMA/ionic: Use a linear QID space when udma_shift is zero\n  RDMA/irdma: Do not change mr-\u003epd in driver during rereg_mr\n  RDMA/irdma: Do not allow rereg_mr to revive defunct MRs\n  RDMA/mlx4: Fix stale umem and MTT state after rereg_mr failures\n  RDMA/irdma: Fix paged PBLE and virtual AEQ for PAGE_SIZE \u003e 4K\n  RDMA/irdma: Fix FRWR logic for PAGE_SIZE \u003e 4K\n  RDMA/bnxt_re: Bound FRMR page list by max_num_sg\n  ...\n"
    },
    {
      "commit": "a904dcf3fdf29cdac99ea354789bc5c82df0d5ad",
      "tree": "bb7e05226460d2e69d174997ac8e9d6bbfa55d8b",
      "parents": [
        "78d9aedf2342cac9968392995d8f7fd488caa337",
        "5a29cfaf51105039d156dd8a61d2783e8b653667"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 10:17:06 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 10:17:06 2026 -0800"
      },
      "message": "Merge tag \u0027block-7.4-20261119\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux\n\nPull block fixes from Jens Axboe:\n\n - NVMe fixes via Keith:\n     - nvme-tcp fixes for TLS record handling and waiting for an\n       in-flight TLS handshake callback\n     - Fix a deadlock on nvme_subsystems_lock in nvme_init_subsystem()\n     - Fix a gendisk leak in nvme_alloc_ns()\n     - Stop AEN work before ANA teardown\n     - Remove namespaces in parallel\n     - Various nvmet fixes for auth, the file backend, fc, tcp, loop,\n       and connection failure rollback\n     - sysfs input validation and kfree_sensitive() for DH-HMAC-CHAP\n       secrets\n     - Dead code removal\n\n - Fix a 32-bit overflow in the blk-iocost donation weight calculation\n\n - ublk fixes: validate all parameters for zoned devices, and dispatch\n   the next fetch after a batch failure\n\n - Fix a pm_only underflow when a runtime resume is retried after a\n   failed one\n\n - nbd: reclassify sockets in the reconnect path too, to avoid lockdep\n   false positives\n\n - Take quiesce_lock when removing a queue from the tag set, fixing a\n   use-after-free in blk_mq_unquiesce_tagset()\n\n - Allow error injection rules to delay bios, and reject unknown status\n   tags\n\n* tag \u0027block-7.4-20261119\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (49 commits)\n  Documentation: block: document error injection delay feature\n  block: allow error injection rules to delay bios\n  block: Reject unknown status tags in error injection rules\n  blk-mq: take quiesce_lock when removing a queue from the tag set\n  nbd: Reclassify sockets in the reconnect path\n  block: Keep RPM_ACTIVE in blk_pre_runtime_resume() when already active\n  nvme-fabrics: use kfree_sensitive() for the old DH-HMAC-CHAP secret\n  nvme-sysfs: use kfree_sensitive() for DH-HMAC-CHAP secrets\n  nvmet: roll back queue bindings on connection failure\n  nvmet-fc: reject duplicate queue IDs on Create Connection\n  nvmet-fcloop: free the LS request when delivery fails\n  nvme-tcp: require the R2T offset to match the data sent\n  nvmet-tcp: only wait for in-capsule data for inline SGLs\n  nvme-loop: release the target request when SG setup fails\n  nvmet-auth: store the DH-CHAP key offset instead of hardcoding it\n  nvme-tcp: consume TLS records without application data\n  nvme-tcp: move the TLS record read loop into a helper\n  nvme-tcp: use an aligned buffer for the TLS record type\n  nvmet: use overflow-safe range checks in the file backend\n  nvmet: handle short reads and writes in the file backend\n  ...\n"
    },
    {
      "commit": "78d9aedf2342cac9968392995d8f7fd488caa337",
      "tree": "0cee10f7c172933722c8ac2f8b09d9a8d082b391",
      "parents": [
        "2d25709ac3c005279d36fd0e9623889433b49f20",
        "0659e44ce739ecd856164c75a5325b7959a2921d"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 10:04:53 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 10:04:53 2026 -0800"
      },
      "message": "Merge tag \u0027io_uring-7.4-20261119\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux\n\nPull io_uring fixes from Jens Axboe:\n\n - Don\u0027t run canceled local work from a task that doesn\u0027t share the mm\n   of the submitter on ring release\n\n - Fail soft links on negative IOU_COMPLETE results, on cancelled futex\n   waits, and on short or failed IOPOLL IO\n\n - Show the stuck io-wq workers rather than WARN on a slow exit, as the\n   WARN can be triggered at will and the exiting task\u0027s stack trace is\n   never the interesting one\n\n - Don\u0027t rearm a multishot timeout on cancel, as that could delay ring\n   teardown for a long time\n\n - Keep the old registered file when a file update fails\n\n - Honor the sqe-\u003elen limit for legacy provided buffers in\n   io_buffers_select()\n\n - Apply the current cpuset of the cgroup to new io-wq workers rather\n   than the one captured when the io-wq was created\n\n* tag \u0027io_uring-7.4-20261119\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:\n  io_uring/io-wq: apply the current cpuset to new workers\n  io_uring/kbuf: initialize arg-\u003eout_len from arg-\u003emax_len in io_buffers_select()\n  io_uring/rsrc: keep the old file when a file update fails\n  io_uring/timeout: don\u0027t rearm a multishot timeout on cancel\n  io_uring/io-wq: show stuck workers rather than WARN on a slow exit\n  io_uring/rw: fail soft links on IOPOLL short or error IO\n  io_uring/futex: fail soft links when cancelling a wait\n  io_uring: fail soft links on negative IOU_COMPLETE results\n  io_uring: don\u0027t run canceled local work from a foreign mm on release\n"
    },
    {
      "commit": "2d25709ac3c005279d36fd0e9623889433b49f20",
      "tree": "8b66540df58f269b646790f5094dcfdc961a26d8",
      "parents": [
        "0097b4aab00e02249532dfa5c1c10abc00d1cd59",
        "3c3db0de2aa937e80ef96e21da940dc8816d3c16"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 09:57:17 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 09:57:17 2026 -0800"
      },
      "message": "Merge tag \u0027sound-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound\n\nPull sound fixes from Takashi Iwai:\n \"A collection of various small fixes.  Nothing really stands out.\n  While we still get more fixes than before, things look still well\n  manageable (fingers crossed).  Here are the highlights:\n\n  ALSA core:\n   - Fix page leaks at buffer allocation retries\n   - Fix in compress-offload API for setting metadata_set flag\n   - Parameter flag handling fixes on setup and error in PCM OSS layer\n\n  HD-audio:\n   - Fix AE-5 LED strip color corruption during animation in ca0132\n   - Correct boost values for CS35L41 on several HP laptops\n   - Realtek quirk regression fixes for Lenovo Legion and V14 G2 ITL\n   - Fix quiet speakers on HP 250 G6\n   - Various Realtek quirks and mute LED fixups (HP, Lenovo, THUNDEROBOT)\n\n  USB-audio:\n   - Fix UBSAN array bounds warning and period wake-up issue in usx2y\n   - Quirk for Yamaha MODX M\n\n  ASoC:\n   - Intel / SoundWire: Support for Senary SN6245 codec\n   - AMD: Fix ACP7.x DMIC/PDM ring buffer address on resume, ACP quirks\n   - Fixes for Qualcomm to reject oversized compress ring buffers,\n     AudioReach routing disconnect, LPASS clocks probe ordering and\n     WCD934x MCLK initialization\n   - Fixes for Meson about locking and sleeping in atomic context\n   - Rockchip fix to avoid stuck clear condition in I2S/TDM consumer mode\n   - Mediatek fix for ETDM3_OUT DAI startup error on MT8195\n   - Codec fixes for CS35L56, TAS2781, ES9039Q2M, and WM8962\"\n\n* tag \u0027sound-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (41 commits)\n  ASoC: tas2781: Avoid possible zero-division\n  ASoC: meson: gx-formatter: add lockdep_assert_held check\n  ASoC: meson: gx-formatter: change stream lock from mutex to spinlock\n  ALSA: memalloc: Fix DMA allocation retry cleanup\n  ALSA: hda/realtek: Add LED fixup for HP ZBook Ultra G1a Laptops\n  ASoC: es9039q2m: Enable the DAC clock at component probe\n  ASoC: rockchip: i2s-tdm: Don\u0027t reset a pending clear in consumer mode\n  ASoC: qcom: q6asm-dai: reject compress rings larger than the DMA buffer\n  ASoC: qcom: q6apm-dai: reject compress rings larger than the DMA buffer\n  ASoC: codecs: wcd934x: keep MCLK enabled so init writes reach the codec\n  ASoC: wm8962: Fix broken headset button caused by wrong guard constant\n  ASoC: qcom: q6dsp-lpass-clocks: Set driver data before registering clocks\n  ALSA: hda/realtek: Fix regression on Lenovo Legion 16IRX9H\n  ALSA: hda: cs35l41: Correct Boost values for several laptops with overridden ACPI\n  ALSA: hda/realtek: Fix quiet speakers on HP 250 G6\n  ALSA: hda/realtek: Add mute LED quirk for HP OMEN 15t-ek000\n  ALSA: hda/realtek: Enable mute LEDs on HP Laptop 15-fd1xxx\n  ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP9\n  ALSA: hda/realtek: Add quirk for HP Pavilion 15-cw1xxx\n  ALSA: hda/realtek: Add quirk for THUNDEROBOT Gravity16G2Pro\n  ...\n"
    },
    {
      "commit": "0097b4aab00e02249532dfa5c1c10abc00d1cd59",
      "tree": "0272d6e2393c6b27e1c42a32a5bfa87a53bd0ee0",
      "parents": [
        "7032230365d8093c9a63020732f2bf20d4a628cc",
        "31678e68f82636a27fbad58ae40054557da4fd7e"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:45:31 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:45:31 2026 -0800"
      },
      "message": "Merge tag \u0027gpio-fixes-for-v7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux\n\nPull gpio fixes from Bartosz Golaszewski:\n \"GPIO core fixes:\n   - delay freeing the line state workqueue to device release and\n     fix a UAF bug\n   - fix races in access to the flags field of GPIO descriptors\n   - clear the debounce period field of struct gpio_desc before\n     clearing the \"requested\" flag\n   - propagate -ENOTSUPP from .set_config() in gpio-shared-proxy\n\n  GPIO driver fixes:\n   - check the return value of clk_prepare in gpio-omap\n   - reject bulk-in endpoints smaller than 3 bytes in gpio-mpsse\n   - validate the pin index of interrupt events in gpio-ljca\n   - disable interrupts around the chip lock in direction callbacks\n     in gpio-mlxbf2\n   - fix line name handling in gpio-virtio\n\n  Other:\n   - do not clobber errno on read() errors in gpio-watch user-space\n     tool\"\n\n* tag \u0027gpio-fixes-for-v7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:\n  gpio: shared-proxy: propagate -ENOTSUPP from .set_config()\n  gpio: omap: handle debounce clock preparation failure\n  gpio: mpsse: reject bulk-in endpoints smaller than 3 bytes\n  gpio: ljca: Validate the pin index of interrupt events\n  gpiolib: keep the line state workqueue alive until device release\n  gpio: mlxbf2: Disable interrupts around the chip lock in direction ops\n  gpio: virtio: compute the line names size in a size_t\n  gpio: virtio: bound the line names block by its configured size\n  tools: gpio: gpio-watch: do not clobber errno on read error\n  gpio: cdev: don\u0027t overwrite the whole flags field when configuring lines\n  gpiolib: don\u0027t overwrite the entire flags field in gpiod_free_commit()\n  gpiolib: clear debounce period before the \"requested\" flag\n  gpio: shared: use atomic set_bit() for descriptor flags\n  gpiolib: don\u0027t overwrite the entire flags field in gpiod_get_direction()\n"
    },
    {
      "commit": "7032230365d8093c9a63020732f2bf20d4a628cc",
      "tree": "f1a17230931b4979755c53d57dd1348980d052da",
      "parents": [
        "d0f871bfb831705d9f55479f5b2b40f636ea7b16",
        "a12cc63129380a5364e787d92b30a3257f66c250"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:43:41 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:43:41 2026 -0800"
      },
      "message": "Merge tag \u0027ata-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux\n\nPull ata fixes from Niklas Cassel:\n\n - Fix an off-by-one in the REMOVE ELEMENT AND TRUNCATE translation,\n   which asked the device for one block more than requested (Nick)\n\n - Fix the INC_512 bit test in the SECURITY PROTOCOL IN/OUT\n   translation, which treated lengths in 512-byte units as bytes (me)\n\n - Limit max_sectors to 8191 on the INTEL SSDSCKKB240G8 SSD to avoid\n   NCQ command timeouts (Justinien)\n\n* tag \u0027ata-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:\n  ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8\n  ata: libata-scsi: fix the INC_512 bit test for SECURITY PROTOCOL IN/OUT\n  ata: libata-scsi: fix REQUESTED MAX LBA field for REMOVE ELEMENT AND TRUNCATE\n"
    },
    {
      "commit": "d0f871bfb831705d9f55479f5b2b40f636ea7b16",
      "tree": "2770f70490441580a1cae6ed62dc00cfe5ba6a88",
      "parents": [
        "8a1a8c335afe05d011d6c17f4d14cd9b267dab02",
        "a041bdbe1f3a8efa8a527a89c84d3771232b4942"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:25:33 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:25:33 2026 -0800"
      },
      "message": "Merge tag \u0027arm64-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux\n\nPull arm64 fixes from Catalin Marinas:\n \"BBML3 allow-list corrections for Cortex-X4 and Neoverse-V3/V3AE\n  following updated errata, a kCFI oops during kexec relocation and NEON\n  intrinsics type mismatches causing CRC64 and XOR build failures with\n  tip-of-tree Clang:\n\n   - Remove Cortex-X4 and Neoverse-V3/V3AE from the BBML3 allow list\n\n     Updated errata documents show that revisions previously reported as\n     fixed remain affected by load/store livelocks when changing mapping\n     sizes without break-before-make\n\n   - Fix a kCFI oops during kexec image relocation. Give the relocation\n     routine a type hash and enter the copied code at the correct offset\n\n   - Fix the build with recent Clang versions by removing the stdint.h\n     type overrides for NEON intrinsics. The CRC64 and XOR intrinsics\n     code no longer includes the kernel\u0027s type header\"\n\n* tag \u0027arm64-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:\n  arm64: Drop stdint.h type overrides from asm/neon-intrinsics.h\n  xor: arm/arm64: Move NEON xor_gen() dispatch into the glue code\n  lib/crc: Don\u0027t include \u003clinux/types.h\u003e in NEON intrinsics code\n  arm64: kexec: use a typed entry to fix kCFI oops\n  arm64: cpufeature: Remove Cortex-X4 from the BBML3 allow list\n  arm64: cpufeature: Remove Neoverse-V3/AE from the BBML3 allow list\n"
    },
    {
      "commit": "8a1a8c335afe05d011d6c17f4d14cd9b267dab02",
      "tree": "2c524d3fd4b43594dd8f347323ec7191b485598c",
      "parents": [
        "65e4fd942f72a9dba0e4e257290c4fa1aa756854",
        "64ee7f863655e67f26947420516daba4e232675d"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:19:08 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 20 08:19:08 2026 -0800"
      },
      "message": "Merge tag \u0027s390-7.4-2\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux\n\nPull s390 fixes from Alexander Gordeev:\n\n - Fix error handling for monitor start and stop operations\n\n   Return failures to userspace, prevent inconsistent state\n   and potential use-after-free scenarios\n\n - Ensure skipped syscalls return -ENOSYS as expected\n\n   Preserve existing ptrace behavior while separating syscall\n   number handling from the return value stored in gpr2\n\n - Fix a race during module initialization where sysfs handlers\n   could access an uninitialized device list semaphore\n\n* tag \u0027s390-7.4-2\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:\n  s390/dcssblk: Initialize device semaphore before sysfs registration\n  s390/syscall: Set -ENOSYS return value before calling syscall_enter_from_user_mode_work()\n  s390/appldata: Fix error handling in appldata_generic_handler()\n"
    },
    {
      "commit": "fb5289b697c965581104bafdd875b969a1db3e79",
      "tree": "b4ef73afd97be375c22bd3bc00136d7a86bdd763",
      "parents": [
        "fe779a359d40ece9060932467b5dbe464d43f00e"
      ],
      "author": {
        "name": "Ding Feng",
        "email": "dingf3ng@gmail.com",
        "time": "Thu Nov 19 11:10:26 2026 +0800"
      },
      "committer": {
        "name": "Damien Le Moal",
        "email": "dlemoal@kernel.org",
        "time": "Fri Nov 20 23:58:15 2026 +0900"
      },
      "message": "zonefs: ignore RLIMIT_FSIZE above LLONG_MAX in zonefs_write_check_limits()\n\nzonefs_write_check_limits() follows generic_write_check_limits() and\nhas the same problem: it stores rlimit(RLIMIT_FSIZE), an unsigned long,\nin a loff_t, so a soft limit between 2^63 and RLIM_INFINITY is negative\nand every write fails with -EFBIG and raises SIGXFSZ.\n\nKeep the limit unsigned and apply it only when it is at most LLONG_MAX,\nas the generic helper now does.\n\nFixes: ebfd68cd0c1e (\"zonefs: Fix O_APPEND async write handling\")\nCc: stable@vger.kernel.org\nAssisted-by: Claude:claude-opus-5-5 Frama-C\nSigned-off-by: Ding Feng \u003cdingf3ng@gmail.com\u003e\nSigned-off-by: Damien Le Moal \u003cdlemoal@kernel.org\u003e\n"
    },
    {
      "commit": "7f7b822d09c5590defcc61a37ffbd5a3533ed518",
      "tree": "26b2630115f5fe4a22b06daeef0754761515fdc8",
      "parents": [
        "d9013d15b9379b323f1bcdfff7e7d96df537268a"
      ],
      "author": {
        "name": "Miklos Szeredi",
        "email": "mszeredi@redhat.com",
        "time": "Fri Nov 20 11:33:01 2026 +0100"
      },
      "committer": {
        "name": "Miklos Szeredi",
        "email": "mszeredi@redhat.com",
        "time": "Fri Nov 20 13:46:29 2026 +0100"
      },
      "message": "fuse: limit name size in listxattr\n\nLimit the size of names to XATTR_NAME_MAX.  Return -EIO to the listxattr()\ncaller if the server exceeds this limit.\n\nFixes: 92a8780e1136 (\"[PATCH] FUSE - extended attribute operations\")\nCc: stable@vger.kernel.org\nSigned-off-by: Miklos Szeredi \u003cmszeredi@redhat.com\u003e\n"
    },
    {
      "commit": "d9013d15b9379b323f1bcdfff7e7d96df537268a",
      "tree": "b621a95eb02744bd0570382e4ed0ca198c17432d",
      "parents": [
        "71b2cafb76c62c0f800daa94fc4c8f32936a4fbb"
      ],
      "author": {
        "name": "Hungyu Lin",
        "email": "dennylin0707@gmail.com",
        "time": "Tue Nov 03 08:34:25 2026 +0000"
      },
      "committer": {
        "name": "Miklos Szeredi",
        "email": "mszeredi@redhat.com",
        "time": "Fri Nov 20 13:46:29 2026 +0100"
      },
      "message": "fuse: clear the old EOF tail before writeback-cache writes\n\nBuffered writeback-cache writes go through iomap_file_buffered_write(),\nbut do not clear cached data between the old EOF and the write position.\nIf a shared mapping dirtied the tail of the old EOF page, an extending\nwrite can expose those bytes as file contents instead of zeros. A later\nwriteback can also send them to the server.\n\nClear the gap under the existing inode lock before the buffered write.\nUse the same page-cache cleanup as fuse_perform_write() does for\nwrite-through writes, leaving the write range itself untouched.\n\nFixes: 4d99ff8f12eb (\"fuse: Turn writeback cache on\")\nCc: stable@vger.kernel.org\nSigned-off-by: Hungyu Lin \u003cdennylin0707@gmail.com\u003e\nSigned-off-by: Miklos Szeredi \u003cmszeredi@redhat.com\u003e\n"
    },
    {
      "commit": "71b2cafb76c62c0f800daa94fc4c8f32936a4fbb",
      "tree": "b0b01b8e1692a7d650a0e520eaff22d5b39f89a0",
      "parents": [
        "ae932b1f5727004f585d603e0cbab7e0725c04cf"
      ],
      "author": {
        "name": "Shunbo Shi",
        "email": "shishunbo@cmss.chinamobile.com",
        "time": "Tue Nov 03 03:22:10 2026 +0000"
      },
      "committer": {
        "name": "Miklos Szeredi",
        "email": "mszeredi@redhat.com",
        "time": "Fri Nov 20 13:46:01 2026 +0100"
      },
      "message": "fuse: fix UBSAN warning in fuse_iomap_writeback_range()\n\nIn fuse_iomap_writeback_range() \u0027ap\u0027 is initialized to \u0027\u0026wpa-\u003eia.ap\u0027\nunconditionally, but \u0027wpa\u0027 (\u003d\u003d data-\u003ewpa) is NULL when the writeback\nof the first folio of a batch starts: \u0027data\u0027 is zero-initialized in\nfuse_writepages() and fuse_launder_folio(), and fuse_writepages_send()\nresets data-\u003ewpa to NULL after every batch.\n\nTaking the address of a member of a NULL pointer is undefined\nbehavior.  The bogus initial value of \u0027ap\u0027 is never actually\ndereferenced: all uses are either guarded by \u0027if (wpa)\u0027 or run after\n\u0027ap\u0027 has been reassigned in the \u0027data-\u003ewpa \u003d\u003d NULL\u0027 branch, where a\nnew \u0027wpa\u0027 is allocated first.  Still, the expression lets the\ncompiler assume that \u0027wpa\u0027 is non-NULL for the whole function, which\ncould break the \u0027if (wpa)\u0027 check below and turn the latent UB into a\nreal NULL pointer dereference.\n\nThis can be observed with a kernel built with -fsanitize\u003dnull (not\npart of the default CONFIG_UBSAN flag set) when writeback of an mmap\ndirty region is triggered, e.g. via msync()/fsync():\n\n  UBSAN: member access within null pointer of type\n  \u0027struct fuse_writepage_args\u0027\n  Call Trace:\n   __ubsan_handle_type_mismatch_v1+0x3f/0x50\n   fuse_iomap_writeback_range+0x79c/0xbd0\n   iomap_writepages+0x64/0x140\n   fuse_writepages+0xe0/0x260\n   do_writepages+0xaa/0x360\n\nInitialize \u0027ap\u0027 to NULL when \u0027wpa\u0027 is NULL.  With this change the\nwarning above is gone while the writeback path is exercised\nidentically.\n\nSigned-off-by: Shunbo Shi \u003cshishunbo@cmss.chinamobile.com\u003e\nSigned-off-by: Miklos Szeredi \u003cmszeredi@redhat.com\u003e\n"
    },
    {
      "commit": "31678e68f82636a27fbad58ae40054557da4fd7e",
      "tree": "bdc5a6369858fb11e8c5e30ce62faf5f61e1f534",
      "parents": [
        "9df982f1f283d2f2a9aad764dff92e36ed764e16"
      ],
      "author": {
        "name": "Bartosz Golaszewski",
        "email": "bartosz.golaszewski@oss.qualcomm.com",
        "time": "Wed Nov 18 13:45:19 2026 +0100"
      },
      "committer": {
        "name": "Bartosz Golaszewski",
        "email": "bartosz.golaszewski@oss.qualcomm.com",
        "time": "Fri Nov 20 13:36:53 2026 +0100"
      },
      "message": "gpio: shared-proxy: propagate -ENOTSUPP from .set_config()\n\nThe gpio-shared-proxy driver does not propagate -ENOTSUPP returned from\nthe set_config() callback by real GPIO drivers controlling the shared\nGPIOs. This can lead to a situation where for an open-drain, shared GPIO,\nwe take the emulation path on request - ending up setting the direction\nto input for the initial user - and then fail to allow simulated output\ndirection for the second user if the driver in question does not\nsupport using \"real\" open-drain.\n\nPropagate all errors from the underlying .set_config() call in\ngpio_shared_proxy_set_config().\n\nReported-by: Igor Velkov \u003ciav@iav.lv\u003e\nCloses: https://lore.kernel.org/all/20261115-hc4-gpio-shared-od-1@iav.lv/\nFixes: e992d54c6f97 (\"gpio: shared-proxy: implement the shared GPIO proxy driver\")\nTested-by: Igor Velkov \u003ciav@iav.lv\u003e\nLink: https://patch.msgid.link/20261118-gpio-shared-proxy-enotsupp-v1-1-39d3fe4d3aa7@oss.qualcomm.com\nSigned-off-by: Bartosz Golaszewski \u003cbartosz.golaszewski@oss.qualcomm.com\u003e\n"
    },
    {
      "commit": "3c3db0de2aa937e80ef96e21da940dc8816d3c16",
      "tree": "38a7632a9b5ac3a2f6435b8fbddbce98dcb90fad",
      "parents": [
        "9a4a81718b057eb8768ea87aceacafdfaf3a8b38",
        "f66297be665c067d2e96da9ce1c5767b587e17b7"
      ],
      "author": {
        "name": "Takashi Iwai",
        "email": "tiwai@suse.de",
        "time": "Fri Nov 20 08:33:26 2026 +0100"
      },
      "committer": {
        "name": "Takashi Iwai",
        "email": "tiwai@suse.de",
        "time": "Fri Nov 20 08:33:26 2026 +0100"
      },
      "message": "Merge tag \u0027asoc-fix-v7.4-rc3\u0027 of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus\n\nASoC: Fixes for v7.4\n\nQuite a lot of fixes here together with a few quriks for new devices,\nmostly not particularly remarkable.  The Cirrus changes are relatively\nlarge but reasonably so, there\u0027s a bunch of data table updates and a\ncouple of new functions needed and they come with clear reasonining.\n"
    },
    {
      "commit": "d5ba86298b45e1a81c578c499e9a222a3b734d5d",
      "tree": "76987f84961a79a333d4b9e0d9d8101be23655ea",
      "parents": [
        "7543d8d314b222452258b30e5c7a40c6f4cbfcda",
        "c21b0f82ca96750e81a38b041c037de6b5dab60a"
      ],
      "author": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 02:30:59 2026 +0000"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 02:31:05 2026 +0000"
      },
      "message": "Merge branch \u0027bpf-limit-writable-registers-in-uprobe-context\u0027\n\nJiri Olsa says:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nbpf: Limit writable registers in uprobe context\n\nHi,\na uprobe BPF program can currently write fields in struct pt_regs that\nare loaded directly by the architecture’s return-to-user path. Some of\nthese fields are restricted by ptrace, but the BPF verifier does not\napply the same restrictions.\n\nThis series limits uprobe context writes to registers that ptrace can\nset to arbitrary values. It adds architecture-specific writable-register\nchecks for arm64, riscv, and x86-64; other architectures default to\nallowing no writes. Reads are unchanged.\n\nThe second patch adds verifier tests for writable and read-only registers\non x86-64, arm64, and riscv.\n\nPatch 1 fixes the issue reported by rtm and is marked for stable consideration.\nPatch 2 adds the regression tests.\n\nthanks,\njirka\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nLink: https://patch.msgid.link/20261118084451.12590-1-jolsa@kernel.org\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n"
    },
    {
      "commit": "c21b0f82ca96750e81a38b041c037de6b5dab60a",
      "tree": "76987f84961a79a333d4b9e0d9d8101be23655ea",
      "parents": [
        "ca44731a7009da1dbcdf1979438d1985d93331d1"
      ],
      "author": {
        "name": "Jiri Olsa",
        "email": "jolsa@kernel.org",
        "time": "Wed Nov 18 09:44:50 2026 +0100"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 02:30:59 2026 +0000"
      },
      "message": "selftests/bpf: Test which ctx registers a uprobe prog can write\n\nA uprobe program can write only the pt_regs fields that ptrace can set\nto any value. Add verifier tests for x86-64, arm64 and riscv:\n\n  - writes to the general registers, the stack pointer and the\n    instruction pointer load\n  - writes to cs, ss, flags and orig_ax on x86-64, to pstate and\n    orig_x0 on arm64, and to status, badaddr and cause on riscv fail\n    with \"invalid bpf_context access\"\n  - a 4-byte write to the low half of a read-only field fails too\n  - reading a read-only field still works\n  - on x86-64, a kprobe program that writes ctx-\u003eflags fails to load\n\nOther arches get one test that just loads.\n\nSigned-off-by: Jiri Olsa \u003cjolsa@kernel.org\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261118084451.12590-3-jolsa@kernel.org\n"
    },
    {
      "commit": "ca44731a7009da1dbcdf1979438d1985d93331d1",
      "tree": "8175eea5d797f1e3aa63e0a804c3de11061b81ab",
      "parents": [
        "7543d8d314b222452258b30e5c7a40c6f4cbfcda"
      ],
      "author": {
        "name": "Jiri Olsa",
        "email": "jolsa@kernel.org",
        "time": "Wed Nov 18 09:44:49 2026 +0100"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 02:30:59 2026 +0000"
      },
      "message": "bpf: Restrict uprobe ctx writes to the registers ptrace can set\n\nSince commit 7384893d970e (\"bpf: Allow uprobe program to change context\nregisters\") a uprobe program can write any field of struct pt_regs.\nSome of those fields are not plain user registers. The exit to user\nspace loads them into the CPU:\n\n  arch    field   exit path                        ptrace\n  ------  ------  -------------------------------  ------------------\n  riscv   status  csrw CSR_STATUS, a0              not in the regset\n  arm64   pstate  msr spsr_el1, x22                valid_user_regs()\n  x86-64  cs, ss  (cs \u0026 3) \u003d\u003d 0: iretq to ring 0   set_segment_reg()\n  x86-64  flags   iretq loads IF and IOPL          set_flags()\n\nOn riscv a program that sets sstatus.SPP in pt_regs.status makes\nret_from_exception return to user code in supervisor mode. On x86-64 a\nprogram that writes a kernel selector to cs makes iretq return to\nring 0.\nptrace guards these fields, but the bpf verifier does not.\n\nAdd arch_uprobe_regs_writable(). Each arch lists the registers that\nptrace can set to any value, and kprobe_prog_is_valid_access() rejects\nwrites to any other offset when the program is loaded:\n\n  arm64:   x0 to x30, sp, pc\n  riscv:   epc, ra to t6\n  x86-64:  r15 to di, ip, sp\n\nThe default is no writes, so arches without a list (and 32-bit x86)\nlose ctx writes for uprobe programs. Reads are not affected.\n\nflags on x86-64 and pstate on arm64 become read-only, including the\ncondition bits that ptrace would let a debugger change. orig_ax is\nread-only too.\n\nKprobe programs that write ctx were already rejected when they were\nattached. Those that write one of these fields now fail to load.\n\nFixes: 7384893d970e (\"bpf: Allow uprobe program to change context registers\")\nReported-by: rtm@csail.mit.edu\nSuggested-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nSigned-off-by: Jiri Olsa \u003cjolsa@kernel.org\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nCc: stable@vger.kernel.org\nLink: https://patch.msgid.link/20261118084451.12590-2-jolsa@kernel.org\nCloses: https://lore.kernel.org/bpf/30318.1794850523@30-11-166.wireless.csail.mit.edu/\n"
    },
    {
      "commit": "82cc2b4383e3edfa1026c8612fb4e90a9329ba11",
      "tree": "8b15f31c4d72e86805f64311c359daf867662190",
      "parents": [
        "bba510ab059f327135b31e0feb1c648416ce31d9"
      ],
      "author": {
        "name": "Kurt Lin",
        "email": "lylin1023@gmail.com",
        "time": "Fri Nov 20 02:39:25 2026 +0800"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Fri Nov 20 01:10:08 2026 +0000"
      },
      "message": "selftests/bpf: Keep memcg test page cache off overlayfs\n\nmemcg_proactive_reclaim and arena_memcg keep their page cache off tmpfs,\nbecause shmem cannot be reclaimed without swap. But statfs() only sees\nthe top of a stacking filesystem: with /tmp on overlayfs over tmpfs, as\nin virtme-ng guests, the check passes and the data is still charged as\nshmem. memcg_proactive_reclaim then fails in a full test_progs run with:\n\n  test_memcg_proactive_reclaim:FAIL:reclaimed unexpected reclaimed: actual 0 \u003c\u003d expected 0\n\nand arena_memcg, run from such a directory, with:\n\n  serial_test_arena_memcg:FAIL:child faulted the arena in unexpected child faulted the arena in: got FALSE\n\nReject overlayfs as well, so that memcg_proactive_reclaim moves on to\nthe next candidate directory and arena_memcg skips.\n\nAn AI coding assistant (Claude) was used to find and analyze the\nfailure and to draft this changelog.\n\nFixes: 0f9b1e9ef584 (\"selftests/bpf: Add bpf_proactive_reclaim test\")\nFixes: 1fe5a5cd01e4 (\"selftests/bpf: Add a test for arena fault-in under memory.max\")\nSuggested-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nSigned-off-by: Kurt Lin \u003clylin1023@gmail.com\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nLink: https://patch.msgid.link/20261119183925.1482217-1-lylin1023@gmail.com\n"
    },
    {
      "commit": "7543d8d314b222452258b30e5c7a40c6f4cbfcda",
      "tree": "f3e0962e5051676cd933a371d8ae30f3178c175b",
      "parents": [
        "4b4eb7f44ee05754339d07e9df649809f45d14c5"
      ],
      "author": {
        "name": "Jiayuan Chen",
        "email": "jiayuan.chen@linux.dev",
        "time": "Tue Nov 17 20:24:13 2026 +0800"
      },
      "committer": {
        "name": "Alexei Starovoitov",
        "email": "ast@kernel.org",
        "time": "Thu Nov 19 22:26:13 2026 +0000"
      },
      "message": "selftests/bpf: Fix bpf-gcc CO-RE relocation in verifier_sockmap_mutate\n\nbpf-gcc fails to load test_trace_iter_unix:\n\n  Error: #766/6 verifier_sockmap_mutate/test_trace_iter_unix\n  libbpf: elf: skipping section(3) .data (size 0)\n  libbpf: elf: skipping unrecognized data section(18) .comment\n  run_subtest:PASS:obj_open_mem 0 nsec\n  libbpf: prog \u0027test_trace_iter_unix\u0027: relo #0: insn #0 (LDX/ST/STX) accesses field incorrectly. ...\n  libbpf: prog \u0027test_trace_iter_unix\u0027: BPF program load failed: -EINVAL\n  libbpf: prog \u0027test_trace_iter_unix\u0027: failed to load: -EINVAL\n  libbpf: failed to load object \u0027verifier_sockmap_mutate\u0027\n  run_subtest:PASS:unexpected_load_success 0 nsec\n  validate_msgs:FAIL:1014 expect_msg\n  VERIFIER LOG:\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n  0: R1\u003dctx() R10\u003dfp0\n  ;  @ verifier_sockmap_mutate.c:124\n  0: \u003cinvalid CO-RE relocation\u003e\n  failed to resolve CO-RE relocation \u003cbyte_off\u003e [4] struct bpf_iter__unix (0:0 @ offset 0)\n  processed 1 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n  EXPECTED   SUBSTR: \u0027cannot update sockmap in this context\u0027\n\nGCC only applies preserve_access_index to types that carry the attribute\nthemselves. The anonymous union holding the sock pointer doesn\u0027t, so the\nCO-RE access stops at the union (\"0:0\") instead of reaching the pointer\n(\"0:0:0\"), and libbpf rejects the relocation.\n\nFixes: e16c83fa764f (\"selftests/bpf: Add negative test for sockmap update from non-sockmap iter\")\nSigned-off-by: Jiayuan Chen \u003cjiayuan.chen@linux.dev\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nAcked-by: Ihor Solodrai \u003cihor.solodrai@linux.dev\u003e\nLink: https://patch.msgid.link/20261117122417.340562-1-jiayuan.chen@linux.dev\n"
    },
    {
      "commit": "65e4fd942f72a9dba0e4e257290c4fa1aa756854",
      "tree": "d28d00cb663a4d3ae2ed99e6f7d37b8966de8fd9",
      "parents": [
        "d3e1fcc93027bec7c470bc4dfae4716e621f5cde",
        "beb0ae6bcd7505e2e61babe5d98a8dd3b3f03c7f"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Nov 19 14:05:24 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Nov 19 14:05:24 2026 -0800"
      },
      "message": "Merge tag \u0027selinux-pr-20261119\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux\n\nPull selinux fix from Paul Moore:\n \"A single SELinux fix for a problem where we were not properly handling\n  MAP_SHARED_VALIDATE\"\n\n* tag \u0027selinux-pr-20261119\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:\n  selinux: check MAP_SHARED_VALIDATE mappings as shared\n"
    },
    {
      "commit": "d3e1fcc93027bec7c470bc4dfae4716e621f5cde",
      "tree": "bceb6176e122e381087ef48c9564596e8a0900dc",
      "parents": [
        "75099ce6829ff89464cb7dd32471024c6c17c1de",
        "22139b5a46353184f43d120b569b01447843d363"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Nov 19 13:20:45 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Nov 19 13:20:45 2026 -0800"
      },
      "message": "Merge tag \u0027thermal-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm\n\nPull thermal control fix from Rafael Wysocki:\n \"Fix the Nova Lake-S PCI device ID in the int340x thermal driver\n  (Sankara Tankala)\"\n\n* tag \u0027thermal-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:\n  thermal: int340x: processor_thermal: Fix Nova Lake-S PCI device ID\n"
    },
    {
      "commit": "75099ce6829ff89464cb7dd32471024c6c17c1de",
      "tree": "398ad0fe106b20979ea63583878212f0e04b3915",
      "parents": [
        "8dac6df92a2e66e2098bbc69061964cfe7e8375b",
        "d40cb8a12ed25789f39404c5f7968a65e98d89c3"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Nov 19 12:57:22 2026 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Nov 19 12:57:22 2026 -0800"
      },
      "message": "Merge tag \u0027pm-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm\n\nPull power management and ACPI fixes from Rafael Wysocki:\n \"These fix two recent regressions related to power management, one in\n  the ACPI CPPC library (affects the CPPC interface in sysfs and the\n  intel_pstate driver), and one in the ACPI device PM core code (affects\n  platforms with shared ACPI power resources assigned to devices\n  reported as \"not present\" by firmware), another ACPI CPPC library\n  issue and two cpufreq issues, one in the core and one in the CPPC\n  cpufreq driver:\n\n   - Avoid initializing power management for absent devices in the core\n     ACPI PM code to unbreak power management on platforms where an ACPI\n     shared power resource is assigned to a device reported by the\n     platform firmware as absent (Rafael Wysocki)\n\n   - Drop compliance checks involving nominal performance from the ACPI\n     CPPC library to unbreak the CPPC sysfs interface and the\n     intel_pstate driver on some Intel platforms after a recent change\n     that added those checks (Rafael Wysocki)\n\n   - Make the ACPI CPPC library reject EPP registers that are too small\n     to store all of the possible EPP values (Christian Loehle)\n\n   - Make cpufreq_driver_target() skip inactive policies to avoid a NULL\n     pointer dereference on a frequency table access attempt (Zhongqiu\n     Han)\n\n   - Set the CPPC Enable register in cpu_init() in the CPPC cpufreq\n     driver to enable CPPC on platforms that wait for the OS to enable\n     it (Sumit Gupta)\"\n\n* tag \u0027pm-7.4-rc4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:\n  ACPI: PM: Avoid initializing power management for absent devices\n  ACPI: CPPC: Drop compliance checks involving nominal performance\n  ACPI: CPPC: Reject EPP registers narrower than 8 bits\n  cpufreq: Skip inactive policies in cpufreq_driver_target()\n  cpufreq: CPPC: Set CPPC Enable register in cpu_init()\n"
    },
    {
      "commit": "d40cb8a12ed25789f39404c5f7968a65e98d89c3",
      "tree": "32a7c2cd23e8e47901c9125e6eab3147c660dfd9",
      "parents": [
        "b91ad39f29ceeee3e3d37eedff6b7c912855623c",
        "52aedfca88cdc3c5676f65ce8ab01f87eac9e132",
        "c5bdb87573726d3a10c58bb3ae09daf017be2297"
      ],
      "author": {
        "name": "Rafael J. Wysocki",
        "email": "rafael.j.wysocki@intel.com",
        "time": "Thu Nov 19 20:23:59 2026 +0100"
      },
      "committer": {
        "name": "Rafael J. Wysocki",
        "email": "rafael.j.wysocki@intel.com",
        "time": "Thu Nov 19 20:23:59 2026 +0100"
      },
      "message": "Merge branches \u0027acpi-cppc-fixes\u0027 and \u0027pm-cpufreq-fixes\u0027\n\nMerge ACPI CPPC library fixes and cpufreq fixes for 7.4-rc1:\n\n - Drop compliance checks involving nominal performance from the ACPI\n   CPPC library to unbreak the CPPC sysfs interface and the intel_pstate\n   driver on some Intel platforms after a recent change that added those\n   checks (Rafael Wysocki)\n\n - Make the ACPI CPPC library reject EPP registers that are too small to\n   store all of the possible EPP values (Christian Loehle)\n\n - Make cpufreq_driver_target() skip inactive policies to avoid a NULL\n   pointer dereference on a frequency table access attempt (Zhongqiu Han)\n\n - Set the CPPC Enable register in cpu_init() in the CPPC cpufreq driver\n   to enable CPPC on platforms that wait for the OS to enable it (Sumit\n   Gupta)\n\n* acpi-cppc-fixes:\n  ACPI: CPPC: Drop compliance checks involving nominal performance\n  ACPI: CPPC: Reject EPP registers narrower than 8 bits\n\n* pm-cpufreq-fixes:\n  cpufreq: Skip inactive policies in cpufreq_driver_target()\n  cpufreq: CPPC: Set CPPC Enable register in cpu_init()\n"
    }
  ],
  "next": "f66297be665c067d2e96da9ce1c5767b587e17b7"
}
