Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665321 > unrolled thread

Re: [PATCH 4/4] samples/bpf: Fix tracex5 to work with MIPS syscalls.

Started byDaniel Borkmann <daniel@iogearbox.net>
First post2017-06-14 02:30 +0200
Last post2017-06-14 02:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 4/4] samples/bpf: Fix tracex5 to work with MIPS syscalls. Daniel Borkmann <daniel@iogearbox.net> - 2017-06-14 02:30 +0200

#1665321 — Re: [PATCH 4/4] samples/bpf: Fix tracex5 to work with MIPS syscalls.

FromDaniel Borkmann <daniel@iogearbox.net>
Date2017-06-14 02:30 +0200
SubjectRe: [PATCH 4/4] samples/bpf: Fix tracex5 to work with MIPS syscalls.
Message-ID<tS4m6-6rv-17@gated-at.bofh.it>
On 06/14/2017 01:49 AM, David Daney wrote:
> There are two problems:
>
> 1) In MIPS the __NR_* macros expand to an expression, this causes the
>     sections of the object file to be named like:
>
>    .
>    .
>    .
>    [ 5] kprobe/(5000 + 1) PROGBITS        0000000000000000 000160 ...
>    [ 6] kprobe/(5000 + 0) PROGBITS        0000000000000000 000258 ...
>    [ 7] kprobe/(5000 + 9) PROGBITS        0000000000000000 000348 ...
>    .
>    .
>    .
>
> The fix here is to use the "asm_offsets" trick to evaluate the macros
> in the C compiler and generate a header file with a usable form of the
> macros.
>
> 2) MIPS syscall numbers start at 5000, so we need a bigger map to hold
> the sub-programs.
>
> Signed-off-by: David Daney <david.daney@cavium.com>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web