btf_encoder: do not encode functions consuming packed structs on stack
Get series with b4
b4 am [email protected] change-id 20250617-btf_skip_structs_on_stack-006adf457d50Versions newest first
- v3 Latest3 patches 12 repliesIn review
- v23 patches 8 repliesSuperseded
- v1 RFC1 patch 5 repliesSuperseded
Changes in v3 from the cover letter
- add uncertain param loc logic to saved_functions_combine to
deduplicate functions
- remove unneeded call to class__infer_holes
- bring a userspace binary instead of a OoT kernel module for testing
- consolidate paths used in the new test
- Link to v2: https://lore.kernel.org/r/[email protected]
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btf_encoder: skip functions consuming packed structs passed by value on stackbtf_encoder.c dwarves.h | +51 | 4 replies | |
| 2/3 | tests: add some tests validating skipped functions due to uncertain arg locationtests/ tests/ tests/ | +167 | 8 replies | |
| 3/3 | gitignore: ignore all the test kmod build-related files.gitignore | +3 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Ihor Solodrai | Jiri Olsa |
|---|---|---|
| 1/3 | A-b | A-b |
| 2/3 | ||
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] btf_encoder: do not encode functions consuming packed structs on stack
Hello,
this is the v3 of the packed-struct-passed-on-stack series. This revision follows on Ihor's comments on v2.
---
Changes in v3:
- add uncertain param loc logic to saved_functions_combine to
deduplicate functions
- remove unneeded call to class__infer_holes
- bring a userspace binary instead of a OoT kernel module for testing
- consolidate paths used in the new test
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- infer structs attributes
- skip function encoded if some consumed struct (passed on stack) is
marked as packed
- add some tests in btf_functions.sh
- drop RFC prefix
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Alexis Lothoré (eBPF Foundation) (3):
btf_encoder: skip functions consuming packed structs passed by value on stack
tests: add some tests validating skipped functions due to uncertain arg location
gitignore: ignore all the test kmod build-related files
.gitignore | 3 ++ btf_encoder.c | 53 +++++++++++++++++++++++++++-- dwarves.h | 1 + tests/bin/Makefile | 10 ++++++ tests/bin/test_bin.c | 66 ++++++++++++++++++++++++++++++++++++ tests/btf_functions.sh | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 221 insertions(+), 3 deletions(-)
---
base-commit: 042d73962d35fdd1466e056f1ea14590b1cdbb9b
change-id: 20250617-btf_skip_structs_on_stack-006adf457d50
Best regards,
Signature · 3 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com