[PATCH bpf-next] tools headers: Sync struct bpf_perf_event_data

2021-01-23 Thread Florian Lehner
Update struct bpf_perf_event_data with the addr field to match the tools headers with the kernel headers. Signed-off-by: Florian Lehner --- tools/include/uapi/linux/bpf_perf_event.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/linux/bpf_perf_event.h b/tools/include

[PATCH 1/2] selftests/bpf: Print reason when a tester could not run a program

2020-12-04 Thread Florian Lehner
ad. Fixes: 8184d44c9a57 ("selftests/bpf: skip verifier tests for unsupported program types") Cc: Stanislav Fomichev Cc: Krzesimir Nowak Signed-off-by: Florian Lehner Acked-by: Andrii Nakryiko --- tools/testing/selftests/bpf/test_verifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 delet

[PATCH 0/2 v3] Improve error handling of verifier tests

2020-12-04 Thread Florian Lehner
d explicit fallthrough v2: - Add unpriv check in error validation Florian Lehner (2): selftests/bpf: Print reason when a tester could not run a program selftests/bpf: Avoid errno clobbering tools/testing/selftests/bpf/test_verifier.c | 31 + 1 file changed, 25 insert

[PATCH 2/2] selftests/bpf: Avoid errno clobbering

2020-12-04 Thread Florian Lehner
Print a message when the returned error is about a program type being not supported or because of permission problems. These messages are expected if the program to test was actually executed. Cc: Krzesimir Nowak Signed-off-by: Florian Lehner --- tools/testing/selftests/bpf/test_verifier.c

[PATCH 0/2 v2] Improve error handling of verifier tests

2020-12-02 Thread Florian Lehner
priv check in error validation Florian Lehner (2): selftests/bpf: Print reason when a tester could not run a program selftests/bpf: Avoid errno clobbering tools/testing/selftests/bpf/test_verifier.c | 30 - 1 file changed, 24 insertions(+), 6 deletions(-) -- 2.28.0

[PATCH 2/2] selftests/bpf: Avoid errno clobbering

2020-12-02 Thread Florian Lehner
Print a message when the returned error is about a program type being not supported or because of permission problems. These messages are expected if the program to test was actually executed. Cc: Krzesimir Nowak Signed-off-by: Florian Lehner --- tools/testing/selftests/bpf/test_verifier.c

[PATCH 1/2] selftests/bpf: Print reason when a tester could not run a program

2020-12-02 Thread Florian Lehner
ad. Fixes: 8184d44c9a57 ("selftests/bpf: skip verifier tests for unsupported program types") Cc: Stanislav Fomichev Cc: Krzesimir Nowak Signed-off-by: Florian Lehner Acked-by: Andrii Nakryiko --- tools/testing/selftests/bpf/test_verifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 delet

[PATCH 1/2] selftests/bpf: Avoid errno clobbering

2020-11-28 Thread Florian Lehner
ad. Fixes: 8184d44c9a57 ("selftests/bpf: skip verifier tests for unsupported program types") Cc: Stanislav Fomichev Cc: Krzesimir Nowak Signed-off-by: Florian Lehner --- tools/testing/selftests/bpf/test_verifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/t

[PATCH 2/2] selftests/bpf: Print reason when a tester could not run a program

2020-11-28 Thread Florian Lehner
Print a message when the returned error is about a program type being not supported or because of permission problems. These messages are expected if the program to test was actually executed. Cc: Krzesimir Nowak Signed-off-by: Florian Lehner --- tools/testing/selftests/bpf/test_verifier.c

[PATCH 0/2] Improve error handling of verifier tests

2020-11-28 Thread Florian Lehner
These patches improve the error handling for verifier tests. With "Test the 32bit narrow read" Krzesimir Nowak provided these patches first, but they were never merged. The improved error handling helps to implement and test BPF program types that are not supported yet. Florian

Re: [FIX bpf,perf] bpf,perf: return EOPNOTSUPP for bpf handler on PERF_COUNT_SW_DUMMY

2020-11-17 Thread Florian Lehner
On Tue, Nov 17, 2020 at 08:53:34AM +0100, Peter Zijlstra wrote: > On Mon, Nov 16, 2020 at 01:02:09PM -0800, Martin KaFai Lau wrote: > > On Mon, Nov 16, 2020 at 07:37:52PM +0100, Florian Lehner wrote: > > > bpf handlers for perf events other than tracepoints, kprobes or uprobes

[FIX bpf,perf] bpf,perf: return EOPNOTSUPP for bpf handler on PERF_COUNT_SW_DUMMY

2020-11-16 Thread Florian Lehner
. This fix returns the error EOPNOTSUPP to indicate that attaching a bpf handler to a perf event of type software/dummy is not supported. Signed-off-by: Florian Lehner --- kernel/events/core.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/events/core.c b/kernel/events/core.c

Re: [PATCH bpf,perf]] bpf,perf: return EOPNOTSUPP for attaching bpf handler on PERF_COUNT_SW_DUMMY

2020-11-14 Thread Florian Lehner
On Sat, Nov 14, 2020 at 08:07:29AM -0800, Alexei Starovoitov wrote: > On Sat, Nov 14, 2020 at 5:53 AM Florian Lehner wrote: > > > > At the moment it is not possible to attach a bpf handler to a perf event > > of type PERF_TYPE_SOFTWARE with a configuration of PERF_COUNT

[PATCH bpf,perf]] bpf,perf: return EOPNOTSUPP for attaching bpf handler on PERF_COUNT_SW_DUMMY

2020-11-14 Thread Florian Lehner
At the moment it is not possible to attach a bpf handler to a perf event of type PERF_TYPE_SOFTWARE with a configuration of PERF_COUNT_SW_DUMMY. Signed-off-by: Florian Lehner --- kernel/events/core.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/events/core.c b/kernel/events

[PATCH bpf-next v5] bpf: Lift hashtab key_size limit

2020-10-29 Thread Florian Lehner
defined by PATH_MAX with 4096 chars including nul. This limit exceeds MAX_BPF_STACK. Changelog: v5: - Fix cast overflow v4: - Utilize BPF skeleton in tests - Rebase v3: - Rebase v2: - Add a test for bpf side Signed-off-by: Florian Lehner Acked-by: John Fastabend --- kernel/bpf/hashtab.c

[PATCH bpf-next v4] bpf: Lift hashtab key_size limit

2020-10-28 Thread Florian Lehner
defined by PATH_MAX with 4096 chars including nul. This limit exceeds MAX_BPF_STACK. Changelog: v4: - Utilize BPF skeleton in tests - Rebase v3: - Rebase v2: - Add a test for bpf side Signed-off-by: Florian Lehner Acked-by: John Fastabend --- kernel/bpf/hashtab.c | 16

Re: [PATCH bpf-next v3] bpf: Lift hashtab key_size limit

2020-10-27 Thread Florian Lehner
On Mon, Oct 26, 2020 at 04:07:58PM -0700, Andrii Nakryiko wrote: > > > > Signed-off-by: Florian Lehner > > --- > > You dropped the ack from John, btw. I was not sure if it is ok to keep the ACK for an updated patch. So I did not include it. &

[PATCH bpf-next v3] bpf: Lift hashtab key_size limit

2020-10-24 Thread Florian Lehner
defined by PATH_MAX with 4096 chars including nul. This limit exceeds MAX_BPF_STACK. Changelog: v3: - Rebase v2: - Add a test for bpf side Signed-off-by: Florian Lehner --- kernel/bpf/hashtab.c | 16 +++ .../selftests/bpf/prog_tests/hash_large_key.c | 28

[PATCH v5] ss: Enclose IPv6 address in brackets

2017-08-04 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. Now checking the complete IPv6 address if it is IN6ADDR_ANY. Signed-off-by: Lehner Florian --- misc/ss.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/misc/ss.c

[PATCH v4] ss: Enclose IPv6 address in brackets

2017-08-01 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. Following the advice by David Laight I used strchr(). Also, IN6ADDR_ANY and INADDR_ANY will return "*". Signed-off-by: Lehner Florian --- misc/ss.c | 28 +--- 1 file changed,

Re: [PATCH v3] ss: Enclose IPv6 address in brackets

2017-08-01 Thread Florian Lehner
On 08/01/2017 04:11 PM, Phil Sutter wrote: > On Tue, Aug 01, 2017 at 12:05:13PM +0200, Florian Lehner wrote: > [...] >> @@ -114,9 +114,13 @@ int addr64_n2a(__u64 addr, char *buff, size_t len); >> int af_bit_len(int af); >> int af_byte_len(int af); >> >> -c

[PATCH v3] ss: Enclose IPv6 address in brackets

2017-08-01 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. It implements the suggestion by Phil Sutter to use a further value, whether an address was resolved to a hostname. Signed-off-by: Lehner Florian --- include/utils.h | 10 +++--- lib/utils.c | 1

[PATCH v2] ss: Enclose IPv6 address in brackets

2017-07-31 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. Resolved hostnames will not be enclosed in brackets, therefore the global variable resolve_hosts is initialized and checked. Signed-off-by: Lehner Florian --- misc/ss.c | 8 ++-- 1 file changed, 6

Re: [PATCH] ss: Enclose IPv6 address in brackets

2017-07-31 Thread Florian Lehner
On 07/31/2017 12:30 PM, Phil Sutter wrote: > On Sat, Jul 29, 2017 at 02:29:10PM +0200, Florian Lehner wrote: >> This patch adds support for RFC2732 IPv6 address format with brackets >> for the tool ss. So output for ss changes from >> 2a00:1450:400a:804::200e:443 to [2a00:145

[PATCH] ss: Enclose IPv6 address in brackets

2017-07-29 Thread Florian Lehner
This patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. So output for ss changes from 2a00:1450:400a:804::200e:443 to [2a00:1450:400a:804::200e]:443 for IPv6 addresses with attached port number. Signed-off-by: Lehner Florian --- misc/ss.c | 6 +- 1 file changed