amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
501 stars 38 forks source link

[Bug] - eBPF - unable to attach kprobe to kernel module functions #600

Open brycekahle opened 6 months ago

brycekahle commented 6 months ago

Describe the bug

https://github.com/amazonlinux/linux/commit/b022f0c7e404887a7c5229788fc99eff9f9a80d5 introduced a bug which made it impossible to attach a kprobe to a kernel module function, returning ENOENT. This was subsequently fixed a week later in https://github.com/amazonlinux/linux/commit/926fe783c8a64b33997fec405cf1af3e61aed441 but this commit has not been back-ported to Amazon Linux 2023.

To Reproduce Steps to reproduce the behavior:

Attach a kprobe to a kernel module function, such as __nf_conntrack_hash_insert in the nf_conntrack kernel module. You get the same error regardless if you get use the PMU or tracefs methods of attaching.

Expected behavior

Successful kprobe attach.

Additional context

uname -r = 6.1.61-85.141.amzn2023.x86_64