Business Proposal of $12.8m USD

2015-12-05 Thread Song
Dear Friend, I am Song Chen i have a Business Proposal of $12.8m USD for you to handle with me from my bank contact me for more information (mr.songchen...@hotmail.com) Regards, Mr Song Chen. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message

[PATCH] pci-skeleton: Misc fixes to build neatly

2008-01-21 Thread Jike Song
Hello Jeff, The pci-skeleton.c has several problems with compilation, such as missing args when calling synchronize_irq(). Fix it. Signed-off-by: Jike Song [EMAIL PROTECTED] --- drivers/net/pci-skeleton.c | 49 ++- 1 files changed, 25 insertions(+), 24

Re: [PATCH] pci-skeleton: Misc fixes to build neatly

2008-01-23 Thread Jike Song
On 1/23/08, Jeff Garzik [EMAIL PROTECTED] wrote: ACK but git-am (everybody's patch import tool) says the patch is corrupted Hi Jeff, Thank you very much for your acknowledgement! This is my first patch for Linux kernel, sorry for the corruption. I'll resend it ASAP. Regards, Jike -- To

[RESEND][PATCH] pci-skeleton: Misc fixes to build neatly

2008-01-23 Thread Jike Song
Hello Jeff, I'm sorry for the previous patch, which was mangled by gmail, with some broken lines. I'm trying to resend it by git-send-email. Please let me know in case of any problems. Thanks a lot. Best Regards, Jike -- To unsubscribe from this list: send the line unsubscribe netdev in the

[PATCH] pci-skeleton: Misc fixes to build neatly

2008-01-23 Thread Jike Song
The pci-skeleton.c has several problems with compilation, such as missing args when calling synchronize_irq(). Fix it. Signed-off-by: Jike Song [EMAIL PROTECTED] --- drivers/net/pci-skeleton.c | 49 ++- 1 files changed, 25 insertions(+), 24 deletions

[PATCH] dm9000: fix a typo

2015-09-06 Thread Barry Song
From: Barry Song <baohua.s...@csr.com> Signed-off-by: Barry Song <baohua.s...@csr.com> --- drivers/net/ethernet/davicom/dm9000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c i

[PATCH] ixgbe: initialize u64_stats_sync structures early at ixgbe_probe

2016-12-04 Thread Liwei Song
the u64_stats_init function to driver probe stage, which before we get the status of seqcount and after the RX/TX ring was finished init. Signed-off-by: Liwei Song <liwei.s...@windriver.com> --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

[PATCH net-next 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints

2017-08-02 Thread Yonghong Song
Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/Makefile | 4 +++ samples/bpf/syscall_tp_kern.c | 62 + samples/bpf/syscall_tp_user.c | 71 +++ 3 files changed, 137 insertions(+) create mode

[PATCH net-next 1/2] bpf: add support for sys_{enter|exit}_* tracepoints

2017-08-02 Thread Yonghong Song
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 <y...@fb.com> --- kernel/events/core.c

[PATCH net-next 0/2] bpf: add support for sys_{enter|exit}_* tracepoints

2017-08-02 Thread Yonghong Song
for these syscalls tracepoints and also adds a test case for it. Yonghong Song (2): bpf: add support for sys_enter_* and sys_exit_* tracepoints bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints kernel/events/core.c | 9 -- kernel/trace/trace_syscalls.c | 53

[PATCH net-next v2 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints

2017-08-02 Thread Yonghong Song
Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/Makefile | 4 +++ samples/bpf/syscall_tp_kern.c | 62 + samples/bpf/syscall_tp_user.c | 71 +++ 3 files changed, 137 insertions(+) create mode

[PATCH net-next v2 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-02 Thread Yonghong Song
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 <y...@fb.com> --- include/linux/syscalls.h

[PATCH net-next v2 0/2] bpf: add support for sys_{enter|exit}_* tracepoints

2017-08-02 Thread Yonghong Song
for these syscalls tracepoints and also adds a test case for it. Changes from v1: - Do not use TRACE_EVENT_FL_CAP_ANY to identify syscall tracepoint. Instead use trace_event_call->class. Yonghong Song (2): bpf: add support for sys_enter_* and sys_exit_* tracepoints bpf: add a test case for sysca

Re: [PATCH net-next v2 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-03 Thread Yonghong Song
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

[PATCH net-next v3 0/2] bpf: add support for sys_{enter|exit}_* tracepoints

2017-08-03 Thread Yonghong Song
for these syscalls tracepoints and also adds a test case for it. Changes from v2: - Fix a build issue Changes from v1: - Do not use TRACE_EVENT_FL_CAP_ANY to identify syscall tracepoint. Instead use trace_event_call->class. Yonghong Song (2): bpf: add support for sys_enter_* and sys_exit_* tracepoi

[PATCH net-next v3 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints

2017-08-03 Thread Yonghong Song
Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/Makefile | 4 +++ samples/bpf/syscall_tp_kern.c | 62 + samples/bpf/syscall_tp_user.c | 71 +++ 3 files changed, 137 insertions(+) create mode

Re: [PATCH net-next v3 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-03 Thread Y Song
On Thu, Aug 3, 2017 at 7:08 PM, Alexei Starovoitov <a...@fb.com> wrote: > On 8/3/17 6:29 AM, Yonghong Song wrote: >> >> @@ -578,8 +596,9 @@ static void perf_syscall_enter(void *ignore, struct >> pt_regs *regs, long id) >> if (!sys_data) >>

[PATCH net] samples/bpf: fix a build issue

2017-07-10 Thread Yonghong Song
From: Yonghong Song <yhs@localhost.localdomain> With latest net-next: clang -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/u

Re: [PATCH net] samples/bpf: fix a build issue

2017-07-10 Thread Yonghong Song
On 7/10/17 1:27 PM, Daniel Borkmann wrote: On 07/10/2017 10:12 PM, Yonghong Song wrote: From: Yonghong Song <yhs@localhost.localdomain> With latest net-next: clang -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include -I./arch/x86/include -I./arch/x86/include/gen

[PATCH net v2] samples/bpf: fix a build issue

2017-07-10 Thread Yonghong Song
in tools/testing/selftests/bpf/bpf_endian.h. Also move bpf_helpers.h from samples/bpf to selftests/bpf and change compiler include logic so that programs in samples/bpf can access the headers in selftests/bpf, but not the other way around. Signed-off-by: Yonghong Song <y...@fb.com> --- sampl

Re: [iovisor-dev] [PATCH v3 net-next 00/12] bpf: rewrite value tracking in verifier

2017-07-14 Thread Y Song
I did an experiment with one of our internal bpf programs. The program has 1563 insns. Without Edward's patch: processed 13634 insns, stack depth 160 With Edward's patch: processed 15807 insns, stack depth 160 So the number of processed insns regressed by roughly 16%. Did anybody do any similar

Re: [PATCH net-next v3 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-04 Thread Yonghong Song
On 8/4/17 11:40 AM, Alexei Starovoitov wrote: On 8/3/17 5:09 PM, Y Song wrote: On Thu, Aug 3, 2017 at 7:08 PM, Alexei Starovoitov <a...@fb.com> wrote: On 8/3/17 6:29 AM, Yonghong Song wrote: @@ -578,8 +596,9 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, l

Re: [PATCH net] bpf: fix byte order test in test_verifier

2017-08-04 Thread Yonghong Song
On 8/4/17 1:24 PM, Daniel Borkmann wrote: We really must check with #if __BYTE_ORDER == XYZ instead of just presence of #ifdef __LITTLE_ENDIAN. I noticed that when actually running this on big endian machine, the latter test resolves to true for user space, same for #ifdef __BIG_ENDIAN. E.g.,

[PATCH net-next v4 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-04 Thread Yonghong Song
returns correct max offset for each specific syscall tracepoint, which is compared against the maximum offset access in bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/syscalls.h | 12 ++ kernel/events/core.c | 10 kernel

[PATCH net-next v4 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints

2017-08-04 Thread Yonghong Song
Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/Makefile | 4 +++ samples/bpf/syscall_tp_kern.c | 62 + samples/bpf/syscall_tp_user.c | 71 +++ 3 files changed, 137 insertions(+) create mode

[PATCH net-next v4 0/2] bpf: add support for sys_{enter|exit}_* tracepoints

2017-08-04 Thread Yonghong Song
e 6 as the maximum arguments beyond syscall_nr. v2 -> v3: - Fix a build issue v1 -> v2: - Do not use TRACE_EVENT_FL_CAP_ANY to identify syscall tracepoint. Instead use trace_event_call->class. Yonghong Song (2): bpf: add support for sys_enter_* and sys_exit_* tracepoints bpf: add

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Yonghong Song
On 5/17/17 3:57 PM, Daniel Borkmann wrote: On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for tools/testing/selftest/bpf because of some missing types: $ make -C too

[PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Yonghong Song
: Provide a linux/types.h override for bpf selftests.") Signed-off-by: Yonghong Song <y...@fb.com> --- tools/testing/selftests/bpf/include/uapi/linux/types.h | 16 tools/testing/selftests/bpf/test_pkt_access.c | 1 + 2 files changed, 17 insertions(+) diff

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Yonghong Song
On 5/17/17 4:01 PM, David Miller wrote: From: Daniel Borkmann <dan...@iogearbox.net> Date: Thu, 18 May 2017 00:57:04 +0200 On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure f

[PATCH] samples/bpf: fix a build problem

2017-06-21 Thread Yonghong Song
ath, hence build failed. The fix is to add $(obj) into the clang compilation path. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index a0561dc..e7ec9b8 100644 -

[PATCH net-next] bpf: possibly avoid extra masking for narrower load in verifier

2017-06-22 Thread Yonghong Song
n back from prog-specific *_is_valid_access checking, all of them are packed into one data structure for more clarity. Acked-by: Daniel Borkmann <dan...@iogearbox.net> Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/bpf.h | 11 +- include/linux/bpf_verifier.h |

Re: [PATCH] samples/bpf: fix a build problem

2017-06-22 Thread Yonghong Song
On 6/22/17 8:36 AM, David Miller wrote: From: Yonghong Song <y...@fb.com> Date: Wed, 21 Jun 2017 13:48:27 -0700 tracex5_kern.c build failed with the following error message: ../samples/bpf/tracex5_kern.c:12:10: fatal error: 'syscall_nrs.h' file not found #include "sy

Re: running an eBPF program

2017-05-27 Thread Y Song
>From verifier error message: == 0: (bf) r6 = r1 1: (18) r9 = 0xffee 3: (69) r0 = *(u16 *)(r6 +16) invalid bpf_context access off=16 size=2 == The offset 16 of struct __sk_buff is hash. What instruction #3 tries to do is to access 2 bytes of the hash value instead of full 4 bytes.

Re: running an eBPF program

2017-05-27 Thread Y Song
On Sat, May 27, 2017 at 5:11 PM, David Miller <da...@davemloft.net> wrote: > From: Y Song <ys114...@gmail.com> > Date: Sat, 27 May 2017 13:52:27 -0700 > >> On Sat, May 27, 2017 at 1:23 PM, Y Song <ys114...@gmail.com> wrote: >>> >>> From ver

Re: running an eBPF program

2017-05-27 Thread Y Song
On Sat, May 27, 2017 at 1:23 PM, Y Song <ys114...@gmail.com> wrote: > > From verifier error message: > == > 0: (bf) r6 = r1 > > 1: (18) r9 = 0xffee > > 3: (69) r0 = *(u16 *)(r6 +16) > > invalid bpf_context access off=16 size=2 > == > > The

Re: [PATCH net] selftests/bpf: fix broken build due to types.h

2017-05-16 Thread Yonghong Song
On 5/16/17 12:18 PM, David Miller wrote: Please correct the address of the netdev list (it is just plain 'netdev' not 'linux-netdev'). Thanks. Shortly after my first email, I sent a corrected submit as well. Sorry for the spam. Secondly, __always_inline should not be defined by types.h

Re: running an eBPF program

2017-05-28 Thread Y Song
On Sun, May 28, 2017 at 12:38 AM, Adel Fuchs wrote: > Hi, > Is there any way to run this eBPF program without that patch? > Alternatively, is there any other eBPF sample that does run properly? I need > to run a program that filters packets according to IP address or port.

Re: More BPF verifier questions

2017-06-05 Thread Y Song
On Fri, Jun 2, 2017 at 7:42 AM, Edward Cree wrote: > A couple of the tests in tools/testing/selftests/bpf/test_verifier.c seem to > be bogus: Test "multiple registers share map_lookup_elem bad reg type" is > supposed to > error with "R3 invalid mem access 'inv'", but from

Re: [PATCH net-next 1/2] bpf: Fix test_bpf_obj_id() when the bpf_jit_enable sysctl is diabled

2017-06-09 Thread Yonghong Song
also removes the pwd.h header which I forgot to remove after making changes. Fixes: 95b9afd3987f ("bpf: Test for bpf ID") Reported-by: Yonghong Song <y...@fb.com> Signed-off-by: Martin KaFai Lau <ka...@fb.com> --- tools/testing/selftests/bpf/test_progs.c | 19 +++---

Re: [PATCH net-next 2/2] bpf: Fix test_obj_id.c for llvm 5.0

2017-06-09 Thread Yonghong Song
) clang version 5.0.0 (trunk 304326) (llvm/trunk 304329) This patch makes changes to the section name and the function name. Fixes: 95b9afd3987f ("bpf: Test for bpf ID") Reported-by: Alexei Starovoitov <a...@fb.com> Reported-by: Yonghong Song <y...@fb.com> Signed-off-by: Martin K

[PATCH 2/2] selftests/bpf: Add test cases to test narrower ctx field loads

2017-06-13 Thread Yonghong Song
Borkmann <dan...@iogearbox.net> Signed-off-by: Yonghong Song <y...@fb.com> --- tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_pkt_md_access.c | 35 + tools/testing/selftests/bpf/test_progs.c | 21 +++ tools/testing/selftests/bpf/tes

[PATCH 1/2] bpf: permits narrower load from bpf program context fields

2017-06-13 Thread Yonghong Song
onus, rename some out of bound __sk_buff->cb access to proper field name and remove two redundant "skb cb oob" tests. Acked-by: Daniel Borkmann <dan...@iogearbox.net> Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/bpf.h

[PATCH 0/2] bpf: permit bpf program narrower loads for ctx fields

2017-06-13 Thread Yonghong Song
Today, if users try to access a ctx field through a narrower load, e.g., __be16 prot = __sk_buff->protocol, verifier will fail. This set contains the verifier change to permit such loads for certain ctx fields as well as the new test cases in selftests/bpf. Yonghong Song (2): bpf: perm

[PATCH net-next v4 4/4] bpf: add a test case for helper bpf_perf_prog_read_value

2017-09-19 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/trace_event_kern.c| 10 ++ samples/bpf/trace_event_user.c| 13 - tools/include/uapi

[PATCH net-next v4 0/4] bpf: add two helpers to read perf event enabled/running time

2017-09-19 Thread Yonghong Song
o read enabled/running time. This is to prevent that counters and enabled/running time may be read separately. v1->v2: . reading enabled/running time should be together with reading counters which contains the logic to ensure the result is valid. Yonghong Song (4): bpf: a

[PATCH net-next v4 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-09-19 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 6 -- include/uapi/linux/bpf.h | 18 +- kernel/bpf/arraymap.c | 2 +- kernel/bpf/verifier.c | 4 +++- kernel/events/core.c

[PATCH net-next v4 2/4] bpf: add a test case for helper bpf_perf_event_read_value

2017-09-19 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 -

[PATCH net-next v4 3/4] bpf: add helper bpf_perf_prog_read_value

2017-09-19 Thread Yonghong Song
. In such cases, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.

[PATCH net-next v5 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-09-20 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 6 -- include/uapi/linux/bpf.h | 19 ++- kernel/bpf/arraymap.c | 2 +- kernel/bpf/verifier.c | 4 +++- kernel/events/core.c

[PATCH net-next v5 0/4] bpf: add two helpers to read perf event enabled/running time

2017-09-20 Thread Yonghong Song
time should be together with reading counters which contains the logic to ensure the result is valid. Yonghong Song (4): bpf: add helper bpf_perf_event_read_value for perf event array map bpf: add a test case for helper bpf_perf_event_read_value bpf: add helper bpf_perf_prog_read_value bpf

[PATCH net-next v5 3/4] bpf: add helper bpf_perf_prog_read_value

2017-09-20 Thread Yonghong Song
. In such cases, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.

[PATCH net-next v5 4/4] bpf: add a test case for helper bpf_perf_prog_read_value

2017-09-20 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/trace_event_kern.c| 10 ++ samples/bpf/trace_event_user.c| 13 - tools/include/uapi

[PATCH net-next v5 2/4] bpf: add a test case for helper bpf_perf_event_read_value

2017-09-20 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 -

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Y Song
On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree wrote: > On 21/09/17 20:44, Alexei Starovoitov wrote: >> On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: >>> More intuitive, but agree on the from_be/le. Maybe we should >>> just drop the "to_" prefix altogether,

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-22 Thread Y Song
On Fri, Sep 22, 2017 at 9:23 AM, Edward Cree wrote: > On 22/09/17 16:16, Alexei Starovoitov wrote: >> looks like we're converging on >> "be16/be32/be64/le16/le32/le64 #register" for BPF_END. >> I guess it can live with that. I would prefer more C like syntax >> to match the

Re: [PATCH net] bpf: one perf event close won't free bpf program attached by another perf event

2017-09-20 Thread Yonghong Song
On 9/20/17 10:17 PM, Yonghong Song wrote: On 9/20/17 6:41 PM, Steven Rostedt wrote: On Mon, 18 Sep 2017 16:38:36 -0700 Yonghong Song <y...@fb.com> wrote: This patch fixes a bug exhibited by the following scenario:    1. fd1 = perf_event_open with attr.config = ID1    2. attach bpf p

Re: [PATCH net] bpf: one perf event close won't free bpf program attached by another perf event

2017-09-20 Thread Yonghong Song
On 9/20/17 6:41 PM, Steven Rostedt wrote: On Mon, 18 Sep 2017 16:38:36 -0700 Yonghong Song <y...@fb.com> wrote: This patch fixes a bug exhibited by the following scenario: 1. fd1 = perf_event_open with attr.config = ID1 2. attach bpf program prog1 to fd1 3. fd2 = perf_even

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Y Song
On Thu, Sep 21, 2017 at 9:24 AM, Edward Cree wrote: > On 21/09/17 16:52, Alexei Starovoitov wrote: >> On Thu, Sep 21, 2017 at 04:09:34PM +0100, Edward Cree wrote: >>> print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a >>> different structure: it has a

Re: Bug with BPF_ALU64 | BPF_END?

2017-09-14 Thread Y Song
On Thu, Sep 14, 2017 at 11:14 AM, David Miller wrote: > From: Edward Cree > Date: Thu, 14 Sep 2017 18:53:17 +0100 > >> Is BPF_END supposed to only be used with BPF_ALU, never with BPF_ALU64? Yes, only BPF_ALU. The below is LLVM bpf swap insn encoding:

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-22 Thread Y Song
On Fri, Sep 22, 2017 at 6:46 AM, Edward Cree <ec...@solarflare.com> wrote: > On 22/09/17 00:11, Y Song wrote: >> On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree <ec...@solarflare.com> wrote: >>> On 21/09/17 20:44, Alexei Starovoitov wrote: >>>> On Thu

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-22 Thread Y Song
On Fri, Sep 22, 2017 at 7:11 AM, Y Song <ys114...@gmail.com> wrote: > On Fri, Sep 22, 2017 at 6:46 AM, Edward Cree <ec...@solarflare.com> wrote: >> On 22/09/17 00:11, Y Song wrote: >>> On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree <ec...@solarflare.com> w

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Y Song
On Thu, Sep 21, 2017 at 8:52 AM, Alexei Starovoitov wrote: > On Thu, Sep 21, 2017 at 04:09:34PM +0100, Edward Cree wrote: >> print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a >> different structure: it has a size in insn->imm (even if it's

[PATCH net-next v3 0/4] bpf: add two helpers to read perf event enabled/running time

2017-09-18 Thread Yonghong Song
ime. This is to prevent that counters and enabled/running time may be read separately. v1->v2: . reading enabled/running time should be together with reading counters which contains the logic to ensure the result is valid. Yonghong Song (4): bpf: add helper bpf_perf_event_read_value for perf

[PATCH net-next v3 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-09-18 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 3 ++- include/uapi/linux/bpf.h | 18 +- kernel/bpf/arraymap.c | 2 +- kernel/bpf/verifier.c | 4 +++- kernel/events/core.c

[PATCH net-next v3 3/4] bpf: add helper bpf_perf_prog_read_value

2017-09-18 Thread Yonghong Song
. In such cases, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.

[PATCH net-next v3 2/4] bpf: add a test case for helper bpf_perf_event_read_value

2017-09-18 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 -

[PATCH net-next v3 4/4] bpf: add a test case for helper bpf_perf_prog_read_value

2017-09-18 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/trace_event_kern.c| 10 ++ samples/bpf/trace_event_user.c| 13 - tools/include/uapi

[PATCH net] bpf: one perf event close won't free bpf program attached by another perf event

2017-09-18 Thread Yonghong Song
fix is to free tp_event->prog only when the closing fd corresponds to the one which registered the program. Signed-off-by: Yonghong Song <y...@fb.com> --- Additional context: discussed with Alexei internally but did not find a solution which can avoid introducing the additional field in trac

[PATCH net-next v6 0/4] bpf: add two helpers to read perf event enabled/running time

2017-10-02 Thread Yonghong Song
which contains the logic to ensure the result is valid. Yonghong Song (4): bpf: add helper bpf_perf_event_read_value for perf event array map bpf: add a test case for helper bpf_perf_event_read_value bpf: add helper bpf_perf_prog_read_value bpf: add a test case for helper bpf_perf_prog_read_

[PATCH net-next v6 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-10-02 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 6 -- include/uapi/linux/bpf.h | 20 ++-- kernel/bpf/arraymap.c | 2 +- kernel/bpf/verifier.c | 4 +++- kernel/events/core.c

[PATCH net-next v6 4/4] bpf: add a test case for helper bpf_perf_prog_read_value

2017-10-02 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/trace_event_kern.c| 10 ++ samples/bpf/trace_event_user.c| 13 - tools/include/uapi

[PATCH net-next v6 3/4] bpf: add helper bpf_perf_prog_read_value

2017-10-02 Thread Yonghong Song
. In such cases, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.

[PATCH net-next v6 2/4] bpf: add a test case for helper bpf_perf_event_read_value

2017-10-02 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 -

[PATCH net-next v7 5/5] bpf: add a test case for helper bpf_perf_prog_read_value

2017-10-05 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a...@fb.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net> --- samples/bpf/trace_event_kern

[PATCH net-next v7 4/5] bpf: add helper bpf_perf_prog_read_value

2017-10-05 Thread Yonghong Song
. In such cases, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a.

[PATCH net-next v7 3/5] bpf: add a test case for helper bpf_perf_event_read_value

2017-10-05 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a...@fb.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net> --- samples/bpf/tracex6_kern.c

[PATCH net-next v7 1/5] bpf: perf event change needed for subsequent bpf helpers

2017-10-05 Thread Yonghong Song
This patch does not impact existing functionalities. It contains the changes in perf event area needed for subsequent bpf_perf_event_read_value and bpf_perf_prog_read_value helpers. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 7 +-- kernel/bpf/arra

[PATCH net-next v7 2/5] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-10-05 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a...@fb.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net> --- include/uapi/linux/bpf.h | 21 +++-- kernel/bpf/verifier.c| 4 +++- kernel

[PATCH net-next v7 0/5] bpf: add two helpers to read perf event enabled/running time

2017-10-05 Thread Yonghong Song
he logic to ensure the result is valid. Yonghong Song (5): bpf: perf event change needed for subsequent bpf helpers bpf: add helper bpf_perf_event_read_value for perf event array map bpf: add a test case for helper bpf_perf_event_read_value bpf: add helper bpf_perf_prog_read_value bpf: add a te

[PATCH net] perf/bpf: fix a clang compilation issue

2017-09-07 Thread Yonghong Song
args[sys_data->nb_args]; ^ The fix is to use a fixed array length instead. Reported-by: Nick Desaulniers <ndesaulni...@google.com> Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/syscalls.h | 2 ++ kernel/trace/trace_syscalls.c | 2 +-

Re: [PATCH net-next v5 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-09-25 Thread Yonghong Song
On 9/21/17 8:15 AM, Alexei Starovoitov wrote: On 9/20/17 4:07 PM, David Miller wrote: From: Peter Zijlstra Date: Wed, 20 Sep 2017 19:26:51 +0200 Dave, could we have this in a topic tree of sorts, because I have a pending series to rework all the timekeeping and it

[PATCH net-next 2/4] bpf: add a test case for helper bpf_perf_read_counter_time

2017-09-01 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 - tools/t

[PATCH net-next 1/4] bpf: add helper bpf_perf_read_counter_time for perf event array map

2017-09-01 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 2 ++ include/uapi/linux/bpf.h | 21 +++- kernel/bpf/verifier.c | 4 +++- kernel/events/core.c | 2 +- kernel/trace/bpf_trace.c

[PATCH net-next 0/4] bpf: add two helpers to read perf event enabled/running time

2017-09-01 Thread Yonghong Song
functions. The helper bpf_perf_read_counter_time reads counter/time_enabled/time_running for perf event array map. The helper bpf_perf_prog_read_time read time_enabled/time_running for bpf prog with type BPF_PROG_TYPE_PERF_EVENT. Yonghong Song (4): bpf: add helper bpf_perf_read_counter_time for perf

[PATCH net-next 3/4] bpf: add helper bpf_perf_prog_read_time

2017-09-01 Thread Yonghong Song
, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 1 + include/uapi

[PATCH net-next 4/4] bpf: add a test case for helper bpf_perf_prog_read_time

2017-09-01 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/trace_event_kern.c| 5 + tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 2 files changed, 8 insertions(+)

Re: [PATCH net-next 1/4] bpf: add helper bpf_perf_read_counter_time for perf event array map

2017-09-01 Thread Yonghong Song
On 9/1/17 1:50 PM, Peter Zijlstra wrote: On Fri, Sep 01, 2017 at 01:29:17PM -0700, Alexei Starovoitov wrote: +BPF_CALL_4(bpf_perf_read_counter_time, struct bpf_map *, map, u64, flags, + struct bpf_perf_counter_time *, buf, u32, size) +{ + struct perf_event *pe; + u64 now; +

[PATCH v2 net-next 1/4] bpf: add helper bpf_perf_read_counter_time for perf event array map

2017-09-01 Thread Yonghong Song
and do the calculation inside the bpf program. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 3 ++- include/uapi/linux/bpf.h | 21 - kernel/bpf/arraymap.c | 2 +- kernel/bpf/verifier.c | 4 +++- kernel/events/core.c

[PATCH v2 net-next 0/4] bpf: add two helpers to read perf event enabled/running time

2017-09-01 Thread Yonghong Song
bpf_perf_read_counter_time reads counter/time_enabled/time_running for perf event array map. The helper bpf_perf_prog_read_time read time_enabled/time_running for bpf prog with type BPF_PROG_TYPE_PERF_EVENT. Yonghong Song (4): bpf: add helper bpf_perf_read_counter_time for perf event array map bpf: add

[PATCH v2 net-next 3/4] bpf: add helper bpf_perf_prog_read_time

2017-09-01 Thread Yonghong Song
, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song <y...@fb.com> --- include/linux/perf_event.h | 1 + include/uapi

[PATCH v2 net-next 2/4] bpf: add a test case to read enabled/running time for perf array

2017-09-01 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 -

[PATCH v2 net-next 4/4] bpf: add a test case for helper bpf_perf_prog_read_time

2017-09-01 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song <y...@fb.com> --- samples/bpf/trace_event_kern.c| 10 ++ samples/bpf/trace_event_user.c| 13 - tools/testing/sel

Re: [PATCH net-next] samples/bpf: Fix compilation issue in redirect dummy program

2017-08-31 Thread Y Song
On Thu, Aug 31, 2017 at 4:43 AM, Daniel Borkmann wrote: > On 08/31/2017 01:27 PM, Jesper Dangaard Brouer wrote: >> >> On Thu, 31 Aug 2017 14:16:39 +0300 >> Tariq Toukan wrote: >> >>> Fix compilation error below: >>> >>> $ make samples/bpf/ >>> >>> LLVM

Re: [PATCH v3 net-next] tcp: Remove use of daddr_cache in tracepoint

2017-10-17 Thread Song Liu
> > Remove use of ipv6_pinfo in favor of data in sock_common. > > > > Fixes: e086101b150a ("tcp: add a tracepoint for tcp retransmission") > > Signed-off-by: David Ahern <dsah...@gmail.com> > > --- > > Reviewed-by: Eric Dumazet <edum

Re: [PATCH net-next] tcp: Remove use of inet6_sk and add IPv6 checks to tracepoint

2017-10-18 Thread Song Liu
;> Signed-off-by: David Ahern <dsah...@gmail.com> >> --- > > Reviewed-by: Eric Dumazet <eduma...@google.com> > > Thanks ! > Tested-by: Song Liu <songliubrav...@fb.com>

Re: [PATCH net-next 2/3] bpf: permit multiple bpf attachments for a single perf event

2017-10-23 Thread Yonghong Song
On 10/23/17 1:52 PM, Daniel Borkmann wrote: On 10/23/2017 07:58 PM, Yonghong Song wrote: [...]   __this_cpu_dec(bpf_prog_active); @@ -741,3 +754,63 @@ const struct bpf_verifier_ops perf_event_verifier_ops = {   const struct bpf_prog_ops perf_event_prog_ops = {   }; + +static

[PATCH net-next v2 0/3] bpf: permit multiple bpf attachments for a single perf tracepoint event

2017-10-23 Thread Yonghong Song
v2: . fix a potential deadlock issue discovered by Daniel. . fix some coding style issues. Yonghong Song (3): bpf: use the same condition in perf event set/free bpf handler bpf: permit multiple bpf attachments for a single perf event bpf: add a test case to test single tp multiple

[PATCH net-next v2 1/3] bpf: use the same condition in perf event set/free bpf handler

2017-10-23 Thread Yonghong Song
This is a cleanup such that doing the same check in perf_event_free_bpf_prog as we already do in perf_event_set_bpf_prog step. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a...@kernel.org> Acked-by: Martin KaFai Lau <ka...@fb.com> --- kernel

[PATCH net-next v2 3/3] bpf: add a test case to test single tp multiple bpf attachment

2017-10-23 Thread Yonghong Song
The bpf sample program syscall_tp is modified to show attachment of more than bpf programs for a particular kernel tracepoint. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a...@kernel.org> Acked-by: Martin KaFai Lau <ka...@fb.com> --- samples/bpf

[PATCH net-next v2 2/3] bpf: permit multiple bpf attachments for a single perf event

2017-10-23 Thread Yonghong Song
, a dummy do-nothing program will replace to-be-detached program in-place. Signed-off-by: Yonghong Song <y...@fb.com> Acked-by: Alexei Starovoitov <a...@kernel.org> Acked-by: Martin KaFai Lau <ka...@fb.com> --- include/linux/bpf.h | 30 +--- include/linux/tr

  1   2   3   4   5   6   7   8   9   10   >