Commit 25fa915
libbpf-cargo: Restrict visibility of skeleton's BPF object
It seems a bit unnecessary to expose the skeleton's BPF object publicly:
we already provide accessors that basically don't impose any limits on
what accesses are possible.
Restrict the visibility of the actual object reference in order to more
easily change this detail of the implementation in the future. On top of
that, by funneling everything through an accessor method we basically
prevent somewhat dodgy-seeming accesses to Object::maps_mut() (or
similar) while we have mutable Maps objects around in the skeleton
itself. Given that direct Object access is meant as an escape-hatch
only, this seems like a sensible restriction to have in place.
Signed-off-by: Daniel Müller <[email protected]>1 parent aa060c0 commit 25fa915
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | | - | |
| 1127 | + | |
1128 | 1128 | | |
1129 | 1129 | | |
1130 | 1130 | | |
| |||
0 commit comments