Re: [PATCH bpf-next v5 8/8] selftests/bpf: Support cross-endian building

2024-09-03 Thread Yonghong Song
On 9/3/24 12:33 AM, Tony Ambardar wrote: Update Makefile build rules to compile BPF programs with target endianness rather than host byte-order. With recent changes, this allows building the full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb for example. Signed-off-by: T

kselftest/next kselftest-seccomp: 2 runs, 1 regressions (v6.11-rc1-17-gb4bcdff7e839)

2024-09-03 Thread kernelci.org bot
kselftest/next kselftest-seccomp: 2 runs, 1 regressions (v6.11-rc1-17-gb4bcdff7e839) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+-+--+

kselftest/next kselftest-lkdtm: 1 runs, 1 regressions (v6.11-rc1-17-gb4bcdff7e839)

2024-09-03 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 1 runs, 1 regressions (v6.11-rc1-17-gb4bcdff7e839) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+-+--+--

kselftest/next build: 7 builds: 2 failed, 5 passed, 1 warning (v6.11-rc1-17-gb4bcdff7e839)

2024-09-03 Thread kernelci.org bot
kselftest/next build: 7 builds: 2 failed, 5 passed, 1 warning (v6.11-rc1-17-gb4bcdff7e839) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.11-rc1-17-gb4bcdff7e839/ Tree: kselftest Branch: next Git Describe: v6.11-rc1-17-gb4bcdff7e839 Git Commit: b4bcdff7e839237d89

Re: [PATCH bpf-next v5 7/8] libbpf: Support creating light skeleton of either endianness

2024-09-03 Thread Tony Ambardar
On Tue, Sep 03, 2024 at 12:57:51PM -0700, Alexei Starovoitov wrote: > On Tue, Sep 3, 2024 at 12:34 AM Tony Ambardar wrote: > > > > @@ -1040,10 +1121,11 @@ void bpf_gen__map_update_elem(struct bpf_gen *gen, > > int map_idx, void *pvalue, > > int zero = 0; > > > > memset(&attr, 0, a

Re: [PATCH bpf-next v5 7/8] libbpf: Support creating light skeleton of either endianness

2024-09-03 Thread Alexei Starovoitov
On Tue, Sep 3, 2024 at 12:34 AM Tony Ambardar wrote: > > @@ -1040,10 +1121,11 @@ void bpf_gen__map_update_elem(struct bpf_gen *gen, > int map_idx, void *pvalue, > int zero = 0; > > memset(&attr, 0, attr_size); > - pr_debug("gen: map_update_elem: idx %d\n", map_idx); > >

Re: [PATCH v5 16/30] arm64: handle PKEY/POE faults

2024-09-03 Thread Joey Gouly
On Tue, Sep 03, 2024 at 03:50:46PM +0100, Joey Gouly wrote: > On Thu, Aug 29, 2024 at 06:55:07PM +0100, Mark Brown wrote: > > On Thu, Aug 22, 2024 at 04:10:59PM +0100, Joey Gouly wrote: > > > > > +static bool fault_from_pkey(unsigned long esr, struct vm_area_struct > > > *vma, > > > +

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-03 Thread Joey Gouly
On Mon, Sep 02, 2024 at 08:08:08PM +0100, Catalin Marinas wrote: > On Tue, Aug 27, 2024 at 12:38:04PM +0100, Will Deacon wrote: > > On Fri, Aug 23, 2024 at 07:40:52PM +0100, Catalin Marinas wrote: > > > On Fri, Aug 23, 2024 at 06:08:36PM +0100, Will Deacon wrote: > > > > On Fri, Aug 23, 2024 at 05:

Re: [PATCH v5 16/30] arm64: handle PKEY/POE faults

2024-09-03 Thread Joey Gouly
On Thu, Aug 29, 2024 at 06:55:07PM +0100, Mark Brown wrote: > On Thu, Aug 22, 2024 at 04:10:59PM +0100, Joey Gouly wrote: > > > +static bool fault_from_pkey(unsigned long esr, struct vm_area_struct *vma, > > + unsigned int mm_flags) > > +{ > > + unsigned long iss2 = ESR_ELx_ISS

[PATCH bpf-next v5 8/8] selftests/bpf: Support cross-endian building

2024-09-03 Thread Tony Ambardar
Update Makefile build rules to compile BPF programs with target endianness rather than host byte-order. With recent changes, this allows building the full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb for example. Signed-off-by: Tony Ambardar --- tools/testing/selftests/bp

[PATCH bpf-next v5 7/8] libbpf: Support creating light skeleton of either endianness

2024-09-03 Thread Tony Ambardar
Track target endianness in 'struct bpf_gen' and process in-memory data in native byte-order, but on finalization convert the embedded loader BPF insns to target endianness. The light skeleton also includes a target-accessed data blob which is heterogeneous and thus difficult to convert to target b

[PATCH bpf-next v5 6/8] libbpf: Support linking bpf objects of either endianness

2024-09-03 Thread Tony Ambardar
Allow static linking object files of either endianness, checking that input files have consistent byte-order, and setting output endianness from input. Linking requires in-memory processing of programs, relocations, sections, etc. in native endianness, and output conversion to target byte-order. T

[PATCH bpf-next v5 5/8] libbpf: Support opening bpf objects of either endianness

2024-09-03 Thread Tony Ambardar
Allow bpf_object__open() to access files of either endianness, and convert included BPF programs to native byte-order in-memory for introspection. Loading BPF objects of non-native byte-order is still disallowed however. Signed-off-by: Tony Ambardar --- tools/lib/bpf/libbpf.c | 52 +

[PATCH bpf-next v5 4/8] libbpf: Support BTF.ext loading and output in either endianness

2024-09-03 Thread Tony Ambardar
Support for handling BTF data of either endianness was added in [1], but did not include BTF.ext data for lack of use cases. Later, support for static linking [2] provided a use case, but this feature and later ones were restricted to native-endian usage. Add support for BTF.ext handling in either

[PATCH bpf-next v5 3/8] libbpf: Fix output .symtab byte-order during linking

2024-09-03 Thread Tony Ambardar
Object linking output data uses the default ELF_T_BYTE type for '.symtab' section data, which disables any libelf-based translation. Explicitly set the ELF_T_SYM type for output to restore libelf's byte-order conversion, noting that input '.symtab' data is already correctly translated. Fixes: faf6

[PATCH bpf-next v5 2/8] libbpf: Fix header comment typos for BTF.ext

2024-09-03 Thread Tony Ambardar
Mention struct btf_ext_info_sec rather than non-existent btf_sec_func_info in BTF.ext struct documentation. Signed-off-by: Tony Ambardar --- tools/lib/bpf/libbpf_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/lib

[PATCH bpf-next v5 1/8] libbpf: Improve log message formatting

2024-09-03 Thread Tony Ambardar
Fix missing newlines and extraneous terminal spaces in messages. Signed-off-by: Tony Ambardar --- tools/lib/bpf/btf.c | 6 +++--- tools/lib/bpf/btf_dump.c | 2 +- tools/lib/bpf/btf_relocate.c | 2 +- tools/lib/bpf/libbpf.c | 4 ++-- tools/lib/bpf/relo_core.c| 2 +- 5 files

[PATCH bpf-next v5 0/8] libbpf, selftests/bpf: Support cross-endian usage

2024-09-03 Thread Tony Ambardar
Hello all, This patch series targets a long-standing BPF usability issue - the lack of general cross-compilation support - by enabling cross-endian usage of libbpf and bpftool, as well as supporting cross-endian build targets for selftests/bpf. Benefits include improved BPF development and testin