On Mon, Sep 14, 2020 at 4:28 PM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > On Mon, Sep 14, 2020 at 11:37 AM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote: > > > > + if (!kernel_supports(FEAT_GLOBAL_DATA)) > > + return 0; > > TBH, I don't think this check is needed, and it's actually coupling > two independent features together. probe_prog_bind_map() probes > PROG_BIND_MAP, it has nothing to do with global data itself. It's all > cached now, so there is no problem with that, it just feels unclean. > If someone is using .rodata and the kernel doesn't support global > data, we'll fail way sooner. On the other hand, if there will be > another use case where PROG_BIND_MAP is needed for something else, why > would we care about global data support? I know that in the real world > it will be hard to find a kernel with PROG_BIND_MAP and no global data > support, due to the latter being so much older, but still, unnecessary > coupling. > > Would be nice to follow up and remove this, thanks. Agreed, will respin, thanks!