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: <20240122172438.16196239@kernel.org>
Date: Mon, 22 Jan 2024 17:24:38 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Alessandro Marcolini <alessandromarcolini99@...il.com>
Cc: jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
 davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
 netdev@...r.kernel.org
Subject: Re: [PATCH net-next] taprio: validate TCA_TAPRIO_ATTR_FLAGS through
 policy instead of open-coding

On Mon, 22 Jan 2024 20:07:38 +0100 Alessandro Marcolini wrote:
> +	__u32 taprio_flags;

nit: s/__u32/u32/ the __u32 version is only for include/uapi/ files

> -	q->flags = err;
> +	/* txtime-assist and full offload are mutually exclusive */
> +	if ((taprio_flags & TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST) &&
> +	    (taprio_flags & TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD)) {
> +		NL_SET_ERR_MSG_MOD(extack, "TXTIME_ASSIST and FULL_OFFLOAD are mutually exclusive");

Maybe use NL_SET_ERR_MSG_ATTR()? There seems to be no
NL_SET_ERR_MSG_ATTR_MOD() which is probably for the best.
The _MOD() prefix is a crutch, IMHO, pointing to the erroneous
attributes is much better, now that we have YNL and can actually
interpret the offsets.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ