Hi,

On Thu, Jan 26, 2017 at 12:15:48AM +0100, Quentin Monnet wrote:
> Hello,
> 
> I use bpf() system call, that receives frequent updates in Linux
> kernel, and I would like to submit a pull request on GitHub in order
> to support the recent commands, map types, etc. for this syscall in
> strace (i.e., I want to update patch [1]).
> 
> My question is: what is the *maximum* kernel version that would be
> acceptable to compile strace on, if I submit a pull request now? Did I
> miss a list of supported kernels somewhere?

kernel version >= 2.6 is required, older versions without a decent
PTRACE_SETOPTIONS support will not work.
Some architectures have more strict requirements.
I think, this is mentioned in NEWS file.

In practice, 2.6.18 seems to be the oldest kernel version being tested.

> I ask because my patch [2] adds updates for BPF commands that landed
> in kernel 4.4, 4.8 or… _will_ land in 4.10. This means that  the
> associated <linux/bpf.h> header must be available on the host or unit
> tests will fail to compile. Adding #ifdef guards might be a solution,
> but I am not sure this is clean enough (practically, most BPF features
> would need their own #ifdef).

We cannot assume that <linux/bpf.h> exists.  As you can see in bpf.c
and tests/bpf.c, #include <linux/bpf.h> is guarded by #ifdef.
The code that uses new bpf features would need appropriate #ifdef's
as well, and new xlat/ constants should have fallback definitions.


-- 
ldv

Attachment: pgp5KDe8Vvju4.pgp
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to