On Thu, Sep 22, 2022 at 12:51:27PM -0700, Nathan Chancellor wrote: > [...] > To make everything work properly, adjust certain functions to match the > type of the ->show() and ->store() members in 'struct kobj_attribute'. > Add a macro to generate functions for that can be called via both > dev_attr_{show,store}() or kobj_attr_{show,store}() so that they can be > called through both kobject locations without violating kCFI and adjust > the attribute groups to account for this. This was quite a roller coaster! I think the solution looks good, even if I'm suspicious of the original design that has the same stuff available twice in different places. (I have a dim memory of rdma needing a refactoring like this too?) Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx> -Kees -- Kees Cook