pahole: BTF alignment inference improvements
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyIn review
- v12 patches 4 repliesSuperseded
Changes in v2 from the cover letter
- Added comments in both patches to help future readers.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btf_loader: infer alignment for zero-length arraysbtf_loader.c | +8 | 0 replies | |
| 2/2 | btf_loader: fix smallest offset in case of bitfieldsbtf_loader.c | +12 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Alan Maguire |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] pahole: BTF alignment inference improvements
Hello,
While generating C code using pahole we noticed alignment issues in rare
cases: when having variable size and 0-length arrays, and when a hole follows a bitfield. It's worth noticing alignment is inferred when using BTF as a source as the format does not contain such information. As such the logic is tricky.
The first patch fixes alignment inference for zero-length and variable length arrays. The second patch fixes alignment when a hole follows a bitfield.
I generated a full vmlinux.h using pahole --compile before and after the changes, the differences looked reasonable to me. I've also ran the project's tests using GH actions.
Thanks,
Antoine
Since v1:
- Added comments in both patches to help future readers.
Antoine Tenart (2):
btf_loader: infer alignment for zero-length arrays
btf_loader: fix smallest offset in case of bitfields
btf_loader.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)
Signature · 1 line
2.50.0