Bug 400878

Summary: no support for bpf(2) syscall; overreaction to missing syscalls
Product: [Developer tools] valgrind Reporter: Frank Ch. Eigler <fche>
Component: vexAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mark
Priority: NOR    
Version: 3.13.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Frank Ch. Eigler 2018-11-09 17:39:12 UTC
Recent linux tools use the bpf(2) syscall to do bpfy work on linux.  Valgrind should accept that.

More generally, perhaps valgrind ought to have a mode, like --lax-doors on solaris, that tolerates unhandled syscalls.  (A false or missing error later on is better than complete loss of valgrind visibility into a process.)
Comment 1 Mark Wielaard 2018-11-12 16:24:51 UTC
(In reply to Frank Ch. Eigler from comment #0)
> Recent linux tools use the bpf(2) syscall to do bpfy work on linux. 
> Valgrind should accept that.

valgrind 3.14.0 supports the bpf syscall on Linux.
See bug #388786

You can also try with --trace-syscalls=yes which will show:

SYSCALL[25565,1](321) sys_bpf ( 0, 0x1ffefffbf0, 72 )[sync] --> Success(0x5) 
SYSCALL[25565,1](321) sys_bpf ( 2, 0x1fff000220, 72 )[sync] --> Success(0x0) 
SYSCALL[25565,1](321) sys_bpf ( 2, 0x1ffefffed0, 72 )[sync] --> Success(0x0) 
SYSCALL[25565,1](321) sys_bpf ( 1, 0x1fff0001f0, 72 )[sync] --> Success(0x0)

*** This bug has been marked as a duplicate of bug 388786 ***