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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3dabe052337a85e1f54d6119bda0c6414325edc.camel@sipsolutions.net>
Date:   Wed, 24 Aug 2022 10:09:55 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
        mkubecek@...e.cz
Subject: Re: [PATCH net-next 1/6] netlink: add support for ext_ack missing
 attributes

On Tue, 2022-08-23 at 21:50 -0700, Jakub Kicinski wrote:
> The @offset points to the
> nest which should have contained the attribute

I find this a bit tedious, tbh. You already kernel-side have patch 2 and
patch 3 that pass different things here.

Maybe it would be better to have this point to the _end_ of the {nest,
message} header, which - if there are any - would be equivalent to the
first sibling attribute?

Though I guess one way or the other userspace has to have an if that
asks whether or not it's in a nest or the top-level namespace.

Hmm.

How about we just _remove_ the NLMSGERR_ATTR_MISS_NEST attribute if it's
not missing in a nested attribute? That would make sense from the naming
too:
 * NLMSGERR_ATTR_MISS_TYPE - which attribute type you missed
 * NLMSGERR_ATTR_MISS_NEST - which nesting you missed it in, _if any_


And that way the if simplifies down to something like

	if (tb[NLMSGERR_ATTR_MISS_NEST])

in the consumer too, and you don't need GENL_REQ_ATTR_CHECK() at all,
you just pass NULL to the second argument of NL_REQ_ATTR_CHECK().


Sounds better to me, but YMMV.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ