)]}'
{
  "commit": "2d5ec1c66e25f0b4dd895a211e651a12dec2ef4f",
  "tree": "2e0b4d06450323d5c9cd64e2a9afb6e189009747",
  "parents": [
    "277641859e833549722eb82c97cbc2d55421df7c"
  ],
  "author": {
    "name": "Andrii Nakryiko",
    "email": "andrii@kernel.org",
    "time": "Wed Sep 15 18:58:33 2021 -0700"
  },
  "committer": {
    "name": "Alexei Starovoitov",
    "email": "ast@kernel.org",
    "time": "Fri Sep 17 09:05:00 2021 -0700"
  },
  "message": "libbpf: Allow skipping attach_func_name in bpf_program__set_attach_target()\n\nAllow to use bpf_program__set_attach_target to only set target attach\nprogram FD, while letting libbpf to use target attach function name from\nSEC() definition. This might be useful for some scenarios where\nbpf_object contains multiple related freplace BPF programs intended to\nreplace different sub-programs in target BPF program. In such case all\nprograms will have the same attach_prog_fd, but different\nattach_func_name. It\u0027s convenient to specify such target function names\ndeclaratively in SEC() definitions, but attach_prog_fd is a dynamic\nruntime setting.\n\nTo simplify such scenario, allow bpf_program__set_attach_target() to\ndelay BTF ID resolution till the BPF program load time by providing NULL\nattach_func_name. In that case the behavior will be similar to using\nbpf_object_open_opts.attach_prog_fd (which is marked deprecated since\nv0.7), but has the benefit of allowing more control by user in what is\nattached to what. Such setup allows having BPF programs attached to\ndifferent target attach_prog_fd with target functions still declaratively\nrecorded in BPF source code in SEC() definitions.\n\nSelftests changes in the next patch should make this more obvious.\n\nSigned-off-by: Andrii Nakryiko \u003candrii@kernel.org\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nAcked-by: Yonghong Song \u003cyhs@fb.com\u003e\nLink: https://lore.kernel.org/bpf/20210916015836.1248906-5-andrii@kernel.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5ba11b249e9b59c454fac1ff8f465d2e0f6fe742",
      "old_mode": 33188,
      "old_path": "tools/lib/bpf/libbpf.c",
      "new_id": "552d05a85cbbfce91cdd5f6de47cf10d164efa41",
      "new_mode": 33188,
      "new_path": "tools/lib/bpf/libbpf.c"
    }
  ]
}
