On Tue, Nov 15, 2022 at 3:20 PM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > > index b444b1118c4f..71e3bc7ad839 100644 > > --- a/include/uapi/linux/bpf.h > > +++ b/include/uapi/linux/bpf.h > > @@ -6116,6 +6116,12 @@ enum xdp_action { > > XDP_REDIRECT, > > }; > > > > +/* Subset of XDP metadata exported to skb context. > > + */ > > +struct xdp_skb_metadata { > > + __u64 rx_timestamp; > > +}; > > Okay, so given Alexei's comment about __randomize_struct not actually > working, I think we need to come up with something else for this. Just > sticking this in a regular UAPI header seems like a bad idea; we'd just > be inviting people to use it as-is. > > Do we actually need the full definition here? It's just a pointer > declaration below, so is an opaque forward-definition enough? Then we > could have the full definition in an internal header, moving the full > definition back to being in vmlinux.h only? Looks like having a uapi-declaration only (and moving the definition into the kernel headers) might work. At least it does in my limited testing :-) So let's go with that for now. Alexei, thanks for the context on __randomize_struct!