• Johannes Berg's avatar
    netlink: add infrastructure to expose policies to userspace · d07dcf9a
    Johannes Berg authored
    Add, and use in generic netlink, helpers to dump out a netlink
    policy to userspace, including all the range validation data,
    nested policies etc.
    
    This lets userspace discover what the kernel understands.
    
    For families/commands other than generic netlink, the helpers
    need to be used directly in an appropriate command, or we can
    add some infrastructure (a new netlink family) that those can
    register their policies with for introspection. I'm not that
    familiar with non-generic netlink, so that's left out for now.
    
    The data exposed to userspace also includes min and max length
    for binary/string data, I've done that instead of letting the
    userspace tools figure out whether min/max is intended based
    on the type so that we can extend this later in the kernel, we
    might want to just use the range data for example.
    
    Because of this, I opted to not directly expose the NLA_*
    values, even if some of them are already exposed via BPF, as
    with min/max length we ...
    d07dcf9a
Makefile 201 Bytes