lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Sep 2020 09:44:55 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Johannes Berg <johannes@...solutions.net>
Cc:     Jiri Pirko <jiri@...nulli.us>, Michal Kubecek <mkubecek@...e.cz>,
        dsahern@...nel.org, pablo@...filter.org, netdev@...r.kernel.org
Subject: Re: Genetlink per cmd policies

On Wed, 30 Sep 2020 18:17:47 +0200 Johannes Berg wrote:
> On Wed, 2020-09-30 at 18:06 +0200, Johannes Berg wrote:
> > 
> > That's the historic info I guess - I'll take a look at ethtool later and
> > see what it's doing there.  
> 
> Oh, ok, I see how that works ... you *do* have a sort of common/aliased
> attribute inside each per-op family that then carries common sub-
> attributes. That can be linked into the policy.
> 
> I guess that's not a bad idea. I'd still prefer not to add
> maxattr/policy into the ops struct because like I said, that's a large
> amount of wasted space?
> 
> Perhaps then a "struct nla_policy *get_policy(int cmd, int *maxattr)"
> function (method) could work, and fall back to just "->policy" and"-
> >maxattr" if unset, and then you'd just have to write a few lines of  
> code for this case? Seems like overall that'd still be smaller than
> putting the pointer/maxattr into each and every op struct.

I started with a get_policy() callback, but I didn't like it much.
Static data is much more pleasant for a client of the API IMHO.

What do you think about "ops light"? Insufficiently flexible?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ