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: <2231b74a-8a90-4a83-8530-4a9bba26ce54@iogearbox.net>
Date: Fri, 4 Oct 2024 11:24:59 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: martin.lau@...ux.dev, razor@...ckwall.org, jrife@...gle.com,
 tangchen.1@...edance.com, bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next 1/4] netkit: Add option for scrubbing skb meta
 data

On 10/4/24 12:16 AM, Jakub Kicinski wrote:
> On Thu,  3 Oct 2024 20:03:17 +0200 Daniel Borkmann wrote:
>> +static int netkit_check_scrub(int scrub, struct nlattr *tb,
>> +			      struct netlink_ext_ack *extack)
>> +{
>> +	switch (scrub) {
>> +	case NETKIT_SCRUB_DEFAULT:
>> +	case NETKIT_SCRUB_NONE:
>> +		return 0;
>> +	default:
>> +		NL_SET_ERR_MSG_ATTR(extack, tb,
>> +				    "Provided device scrub setting can only be default/none");
>> +		return -EINVAL;
>> +	}
>> +}
> 
> Set the parsing policy to NLA_POLICY_MAX(NLA_U32, NETKIT_SCRUB_NONE)
> and delete this open coded checking, please.

Ok, if this is preferred I can also convert the IFLA_NETKIT_MODE over
to use NLA_POLICY_MAX() instead of open-coding.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ