Skip to content

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Apr 9, 2024

reloTypeIDTarget is used to substitute the ID of an equivalent type in vmlinux. This is problematic when dealing with kmod types, since their IDs are defined to be sequential with vmlinux. If the last vmlinux type ID is 99, the first type in kmod a and b has ID 100. To disambiguate between these we need a (BTF ID, Type ID) tuple, which we currently don't support.

Poison any relocation which tries to use the target ID of a kmod type. This also gets rid of mergedSpec which didn't take overlapping ID ranges into account.

@lmb lmb marked this pull request as ready for review April 9, 2024 12:08
@lmb lmb requested a review from dylandreimerink as a code owner April 9, 2024 12:08
reloTypeIDTarget is used to substitute the ID of an equivalent type in
vmlinux. This is problematic when dealing with kmod types, since their
IDs are defined to be sequential with vmlinux. If the last vmlinux type
ID is 99, the first type in kmod a and b has ID 100. To disambiguate
between these we need a (BTF ID, Type ID) tuple, which we currently don't
support.

Poison any relocation which tries to use the target ID of a kmod type.
This also gets rid of mergedSpec which didn't take overlapping ID
ranges into account.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the btf-merged-spec branch from d69d5eb to 904d0f7 Compare April 10, 2024 09:56
@lmb lmb merged commit 5d2a5d1 into cilium:main Apr 10, 2024
@lmb lmb deleted the btf-merged-spec branch April 10, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants