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]
Message-ID: <20250708173038.46d25979@kernel.org>
Date: Tue, 8 Jul 2025 17:30:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: "Chia-Yu Chang (Nokia)" <chia-yu.chang@...ia-bell-labs.com>
Cc: Paolo Abeni <pabeni@...hat.com>, "alok.a.tiwari@...cle.com"
 <alok.a.tiwari@...cle.com>, "pctammela@...atatu.com"
 <pctammela@...atatu.com>, "horms@...nel.org" <horms@...nel.org>,
 "donald.hunter@...il.com" <donald.hunter@...il.com>, "xandfury@...il.com"
 <xandfury@...il.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
 "dave.taht@...il.com" <dave.taht@...il.com>, "jhs@...atatu.com"
 <jhs@...atatu.com>, "stephen@...workplumber.org"
 <stephen@...workplumber.org>, "xiyou.wangcong@...il.com"
 <xiyou.wangcong@...il.com>, "jiri@...nulli.us" <jiri@...nulli.us>,
 "davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
 <edumazet@...gle.com>, "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
 "ast@...erby.net" <ast@...erby.net>, "liuhangbin@...il.com"
 <liuhangbin@...il.com>, "shuah@...nel.org" <shuah@...nel.org>,
 "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
 "ij@...nel.org" <ij@...nel.org>, "ncardwell@...gle.com"
 <ncardwell@...gle.com>, "Koen De Schepper (Nokia)"
 <koen.de_schepper@...ia-bell-labs.com>, "g.white@...lelabs.com"
 <g.white@...lelabs.com>, "ingemar.s.johansson@...csson.com"
 <ingemar.s.johansson@...csson.com>, "mirja.kuehlewind@...csson.com"
 <mirja.kuehlewind@...csson.com>, "cheshire@...le.com" <cheshire@...le.com>,
 "rs.ietf@....at" <rs.ietf@....at>, "Jason_Livingood@...cast.com"
 <Jason_Livingood@...cast.com>, "vidhi_goel@...le.com"
 <vidhi_goel@...le.com>
Subject: Re: [PATCH v21 net-next 1/6] sched: Struct definition and parsing
 of dualpi2 qdisc

On Tue, 8 Jul 2025 20:22:23 +0000 Chia-Yu Chang (Nokia) wrote:
> The original patch looks like below, and I see the option is
> mandatory otherwise it will return -EINVAL.
> 
> Is this what you mean in your comments or you mean other things?
> 
> +       if (!opt) {
> +               NL_SET_ERR_MSG_MOD(extack, "Dualpi2 options are reuqired");
> +               return -EINVAL;
> +       }

To speed this up a bit across timezones -- I'm pretty sure what Paolo
means is that you reject the situation where user provides no
[TCA_OPTIONS] at the netlink level. But if the user provides an empty 
one its fine.

So normal config looks something like eg (indent means nesting):

[TCA_KIND]
[TCA_OPTIONS]
  [TCA_DUALPI2_LIMIT]
  [TCA_DUALPI2_TARGET]

If there is no TCA_OPTIONS you'd error out:

[TCA_KIND]

But if TCA_OPTIONS is empty you dont:

[TCA_KIND]
[TCA_OPTIONS]

Just return 0 instead of an error if TCA_OPTIONS is not there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ