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] [day] [month] [year] [list]
Message-ID: <b90a8935-ab4b-48e2-a21d-1efc528b2788@gmail.com>
Date: Tue, 23 Jan 2024 12:51:50 +0100
From: Alessandro Marcolini <alessandromarcolini99@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
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 1/23/24 02:24, Jakub Kicinski wrote:

> 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
Oh ok, didn't know that, thanks.
>
>> -	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.

Yes, I think that this is better, I'll change it to NL_SET_ERR_MSG_ATTR and resend the patch.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ