Skip to content

Minor adjustsments#276

Merged
bobrik merged 2 commits intocloudflare:masterfrom
netoptimizer:reading03
Dec 27, 2023
Merged

Minor adjustsments#276
bobrik merged 2 commits intocloudflare:masterfrom
netoptimizer:reading03

Conversation

@netoptimizer
Copy link
Copy Markdown
Contributor

Hi @bobrik

I made these two small adjustments while trying out the benchmarks in ebpf_exporter.


#if defined(__TARGET_ARCH_x86)
#define FENTRY_SEC() SEC("fentry/__x64_sys_getpid")
#define FENTRY_SEC() SEC("fentry/__do_sys_getpid")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see both on our x86_64 running v6.1:

$ cat /proc/kallsyms | grep -E '( __x64_sys_getpid|__do_sys_getpid)$'
0000000000000000 t __do_sys_getpid
0000000000000000 T __x64_sys_getpid

On arm64 we only have one:

$ cat /proc/kallsyms | grep -E '( __arm64_sys_getpid|__do_sys_getpid)$'
0000000000000000 T __arm64_sys_getpid

Switching to __do_sys_getpid makes sense given what you say, even if it makes me sad for the lack of consistency.

netoptimizer and others added 2 commits December 26, 2023 19:44
Wanted to demo the shorter URL https://git.kernel.org/torvalds/c/.

Plus, adding desc "subject" after commit SHA like kernel commits
usually does for e.g. Fixes tags.

Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
On my kernel __x64_sys_getpid() is not available in BTF vmlinux.
The function __do_sys_getpid() is to use that instead.

Tested on kernels:
 - 6.4.10-200.fc38.x86_64
 - 6.5.0-rc5-net-next

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
@bobrik bobrik merged commit 4145b41 into cloudflare:master Dec 27, 2023
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