{"id":17911446,"url":"https://github.com/tklauser/kernel-bisect","last_synced_at":"2025-04-03T06:44:00.493Z","repository":{"id":139858522,"uuid":"414276966","full_name":"tklauser/kernel-bisect","owner":"tklauser","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-19T16:46:29.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-08T20:30:59.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tklauser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-06T15:53:41.000Z","updated_at":"2022-01-19T17:15:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"c75434c1-b410-47cc-a794-afcdfb8795f3","html_url":"https://github.com/tklauser/kernel-bisect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tklauser%2Fkernel-bisect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tklauser%2Fkernel-bisect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tklauser%2Fkernel-bisect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tklauser%2Fkernel-bisect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tklauser","download_url":"https://codeload.github.com/tklauser/kernel-bisect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952273,"owners_count":20859811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T19:38:17.995Z","updated_at":"2025-04-03T06:44:00.463Z","avatar_url":"https://github.com/tklauser.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finding a kernel regression using `git bisect run`\n\nSee https://github.com/cilium/cilium/issues/18500 for context. The test failure\nsuspiciously looked like a kernel issue (i.e. a netlink command that previously\nsucceeded started returning `EINVAL` after updating to latest `net-next`\nkernel).\n\n```\n# assuming linux source tree in $HOME/src/linux\nK=$HOME/src/linux\nmake\ncp bisect.sh initrd.gz $K\ncd $K\ngit bisect start\ngit bisect good v5.16\ngit bisect bad 0c947b893d69231a9add855939da7c66237ab44f # master as of 2022-01-17\ngit bisect run sh -c ./bisect.sh\n```\n\nThis should eventually lead to the following commit being identified as\nintroducing the regression:\n\n```\n68ac0f3810e76a853b5f7b90601a05c3048b8b54 is the first bad commit\ncommit 68ac0f3810e76a853b5f7b90601a05c3048b8b54\nAuthor: Antony Antony \u003cantony.antony@secunet.com\u003e\nDate:   Sun Dec 12 11:35:00 2021 +0100\n\n    xfrm: state and policy should fail if XFRMA_IF_ID 0\n\n    xfrm ineterface does not allow xfrm if_id = 0\n    fail to create or update xfrm state and policy.\n\n    With this commit:\n     ip xfrm policy add src 192.0.2.1 dst 192.0.2.2 dir out if_id 0\n     RTNETLINK answers: Invalid argument\n\n     ip xfrm state add src 192.0.2.1 dst 192.0.2.2 proto esp spi 1 \\\n                reqid 1 mode tunnel aead 'rfc4106(gcm(aes))' \\\n                0x1111111111111111111111111111111111111111 96 if_id 0\n     RTNETLINK answers: Invalid argument\n\n    v1-\u003ev2 change:\n     - add Fixes: tag\n\n    Fixes: 9f8550e4bd9d (\"xfrm: fix disable_xfrm sysctl when used on xfrm interfaces\")\n    Signed-off-by: Antony Antony \u003cantony.antony@secunet.com\u003e\n    Signed-off-by: Steffen Klassert \u003csteffen.klassert@secunet.com\u003e\n\n net/xfrm/xfrm_user.c | 21 ++++++++++++++++++---\n 1 file changed, 18 insertions(+), 3 deletions(-)\n```\n\nThe fix needs to be made in the netlink library to only set the `XFRMA_IF_ID`\nnetlink attribute in case `if_id` is `!= 0`, see\nhttps://github.com/vishvananda/netlink/pull/727\n\n## Reference\n\nThe use of `git bisect run` with a simple initrd was based on\nhttps://ldpreload.com/blog/git-bisect-run\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftklauser%2Fkernel-bisect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftklauser%2Fkernel-bisect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftklauser%2Fkernel-bisect/lists"}