Commit Graph

3 Commits (157493579f54540c02abaec844c474e9a4e6105d)

Author SHA1 Message Date
Dave Tucker 157493579f aya-bpf-macros: Remove pop_required_string_args
I got a little carried away with refactoring the macros and started
making some macro arguments required when they previously were not.
While I'm all for doing this eventually, for stronger type guarantees
and de-duplicating information from BPF and userspace, it's premature
to do that now.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker 8f4b609a36 aya-bpf-macros: Add sleepable for sleepable programs
This extends args.rs to permit boolean arguments, where a value
is true if an ident is present in the macro attributes.

This approach is used to implement sleepable for all sleepable
program types. For LSM, this was previously implemented as
`sleepable = true`.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker c72aab5f7b aya-bpf-macros: Refactor for ease of testing
The aya-bpf-macros needed refactoring for:

1. Ease of testing
2. To be consistent with when we use K/V args vs. idents
3. To deprecate the use of `name` to change the exported name of a
   function - we now use the symbol table.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago