[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5ae37ae75bac9af6d6a7c324acd4e3c97059d50.camel@sipsolutions.net>
Date: Wed, 19 Oct 2022 21:36:00 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, jiri@...nulli.us, razor@...ckwall.org,
nicolas.dichtel@...nd.com, gnault@...hat.com,
jacob.e.keller@...el.com, fw@...len.de, mareklindner@...mailbox.ch,
sw@...onwunderlich.de, a@...table.cc, sven@...fation.org,
jiri@...dia.com, nhorman@...driver.com, alex.aring@...il.com,
stefan@...enfreihafen.org
Subject: Re: [PATCH net-next 03/13] genetlink: introduce split op
representation
On Wed, 2022-10-19 at 12:14 -0700, Jakub Kicinski wrote:
>
> Yes, we have the space... I think I lost your thread of thought..
> Do you want to define more info for each group than just the pre/post?
Nah. I guess I was thinking why bother, but anyway we have the space,
it's easy, and it might simplify things. So yeah, makes sense. If we
didn't have the space anyway I might've argued against it I guess :)
> > > +static void
> > > +genl_cmd_full_to_split(struct genl_split_ops *op,
> > > + const struct genl_family *family,
> > > + const struct genl_ops *full, u8 flags)
> > > +{
> >
> > [...]
> >
> >
> > > + op->flags |= flags;
> >
> > why |= ?
>
> op->flags should already have all the existing flags (i.e. ADMIN_PERM)
> from the op, I'm adding the DO/DUMP to them.
OK, I guess I missed where that was being set.
> It's used as an output argument here, so that's what initializes it.
> genl_get_cmd* should always init the split command because in policy
> dumping we don't care about the errors, we just want the structure
> to be zeroed if do/dump is not implemented, and we'll skip accordingly.
> Wiping the 40B just to write all the fields felt... wrong.
> Let KASAN catch us if we fail to init something.
KASAN doesn't, I think, you'd need KMSAN?
johannes
Powered by blists - more mailing lists