lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 3 Aug 2017 08:22:51 -0700
From:   Yonghong Song <yhs@...com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     <ast@...com>, <daniel@...earbox.net>, <netdev@...r.kernel.org>,
        <kernel-team@...com>, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH net-next v2 1/2] bpf: add support for sys_enter_* and
 sys_exit_* tracepoints



On 8/3/17 1:08 AM, Peter Zijlstra wrote:
> On Wed, Aug 02, 2017 at 10:28:27PM -0700, Yonghong Song wrote:
>> Currently, bpf programs cannot be attached to sys_enter_* and sys_exit_*
>> style tracepoints. The iovisor/bcc issue #748
>> (https://github.com/iovisor/bcc/issues/748) documents this issue.
>> For example, if you try to attach a bpf program to tracepoints
>> syscalls/sys_enter_newfstat, you will get the following error:
>>     # ./tools/trace.py t:syscalls:sys_enter_newfstat
>>     Ioctl(PERF_EVENT_IOC_SET_BPF): Invalid argument
>>     Failed to attach BPF to tracepoint
>>
>> The main reason is that syscalls/sys_enter_* and syscalls/sys_exit_*
>> tracepoints are treated differently from other tracepoints and there
>> is no bpf hook to it.
>>
>> This patch adds bpf support for these syscalls tracepoints by
>>    . permitting bpf attachment in ioctl PERF_EVENT_IOC_SET_BPF
>>    . calling bpf programs in perf_syscall_enter and perf_syscall_exit
>>
>> Signed-off-by: Yonghong Song <yhs@...com>
> 
> Ack for the perf bits, but you should've Cc'ed steve too I suppose.

Thanks, Peter. This is first time I posted for tracing related changes.
Will for sure remember this next time.

There is a build error:
======
    kernel/events/core.c: In function 'perf_event_set_bpf_prog':
 >> kernel/events/core.c:8073:18: error: implicit declaration of 
function 'is_syscall_trace_event' [-Werror=implicit-function-declaration]
      is_syscall_tp = is_syscall_trace_event(event->tp_event);
======

Will address this and send another patch soon.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ