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)
Regressions Summary
---
platform| arch | lab | compiler | defconfig
| regressions
+--+-+--+
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)
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
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
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);
>
>
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,
> > > +
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:
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
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
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
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
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 +
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
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
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
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
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
18 matches
Mail list logo