)]}'
{
  "commit": "f7d89c3910ac57da91a29602b0b0f37f960ea1e3",
  "tree": "174b53c012cf2374ec49d4cb3bd404156a85cbc0",
  "parents": [
    "0d6262ad0a07d942673c924823b5c2d04568f34b"
  ],
  "author": {
    "name": "Toke Høiland-Jørgensen",
    "email": "toke@redhat.com",
    "time": "Sat Feb 12 00:48:19 2022 +0100"
  },
  "committer": {
    "name": "Andrii Nakryiko",
    "email": "andrii.nakryiko@gmail.com",
    "time": "Tue Feb 15 22:32:04 2022 -0800"
  },
  "message": "libbpf: Use dynamically allocated buffer when receiving netlink messages\n\nWhen receiving netlink messages, libbpf was using a statically allocated\nstack buffer of 4k bytes. This happened to work fine on systems with a 4k\npage size, but on systems with larger page sizes it can lead to truncated\nmessages. The user-visible impact of this was that libbpf would insist no\nXDP program was attached to some interfaces because that bit of the netlink\nmessage got chopped off.\n\nFix this by switching to a dynamically allocated buffer; we borrow the\napproach from iproute2 of using recvmsg() with MSG_PEEK|MSG_TRUNC to get\nthe actual size of the pending message before receiving it, adjusting the\nbuffer as necessary. While we\u0027re at it, also add retries on interrupted\nsystem calls around the recvmsg() call.\n\nv2:\n  - Move peek logic to libbpf_netlink_recv(), don\u0027t double free on ENOMEM.\n\nFixes: 8bbb77b7c7a2 (\"libbpf: Add various netlink helpers\")\nReported-by: Zhiqian Guan \u003czhguan@redhat.com\u003e\nSigned-off-by: Toke Høiland-Jørgensen \u003ctoke@redhat.com\u003e\nSigned-off-by: Andrii Nakryiko \u003candrii@kernel.org\u003e\nAcked-by: Kumar Kartikeya Dwivedi \u003cmemxor@gmail.com\u003e\nLink: https://lore.kernel.org/bpf/20220211234819.612288-1-toke@redhat.com\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c39c37f99d5c4949021656dc2c11e1c694e0b41d",
      "old_mode": 33188,
      "old_path": "src/netlink.c",
      "new_id": "a598061f6fea52b257f2f7e3bed3cee605728256",
      "new_mode": 33188,
      "new_path": "src/netlink.c"
    }
  ]
}
