Skip to content

bpf: btf: Fix endianness of bitfields

Okash Khawaja lkml netdev 2 versions – Applied

Status from this message: Applied to bpf, thanks Okash!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 2 repliesApplied
  2. v11 patch 8 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/1bpf: btf: Fix bitfield extraction for big endiankernel/bpf/btf.c+13 -172 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchMartin KaFai Lau
1/1A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf v2 0/1] bpf: btf: Fix endianness of bitfields

Hi,

Following are the changes from v1:

- use compile time check for endianness
- factor out right_shift_bits from the check as it is same in both
- change size of bit shift variables to match length of bit offset in BTF specification

Please note that I have considered non-big endians to be little endians for our purposes. Let me know if you think that's a problem. We need to then decide what to do in case neither of macros are defined.

Thanks,
Okash