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: <20240829190912.6f9055d2@kernel.org>
Date: Thu, 29 Aug 2024 19:09:12 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Jiri Pirko <jiri@...nulli.us>, Madhu Chittim
 <madhu.chittim@...el.com>, Sridhar Samudrala <sridhar.samudrala@...el.com>,
 Simon Horman <horms@...nel.org>, John Fastabend <john.fastabend@...il.com>,
 Sunil Kovvuri Goutham <sgoutham@...vell.com>, Jamal Hadi Salim
 <jhs@...atatu.com>, Donald Hunter <donald.hunter@...il.com>,
 anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
 intel-wired-lan@...ts.osuosl.org, edumazet@...gle.com
Subject: Re: [PATCH v5 net-next 11/12] iavf: Add net_shaper_ops support

On Thu, 29 Aug 2024 17:17:04 +0200 Paolo Abeni wrote:
> +static int iavf_verify_handle(struct net_shaper_binding *binding,
> +			      const struct net_shaper_handle *handle,
> +			      struct netlink_ext_ack *extack)
> +{
> +	struct iavf_adapter *adapter = netdev_priv(binding->netdev);
> +	enum net_shaper_scope scope = handle->scope;
> +	int qid = handle->id;
> +
> +	if (scope != NET_SHAPER_SCOPE_QUEUE) {

should be checked by the core. add "mask of supported scopes" to caps

> +		NL_SET_ERR_MSG_FMT(extack, "Invalid shaper handle, unsupported scope %d",
> +				   scope);
> +		return -EOPNOTSUPP;
> +	}
> +
> +	if (qid >= adapter->num_active_queues) {

should be checked by the core..
we prolly want to trim the queue shapers on channel reconfig, 
then, too? :(

> +		NL_SET_ERR_MSG_FMT(extack, "Invalid shaper handle, queued id %d max %d",
> +				   qid, adapter->num_active_queues);
> +		return -EINVAL;
> +	}
> +	return 0;
> +}

> +static int iavf_shaper_group(struct net_shaper_binding *binding,
> +			     int leaves_count,
> +			     const struct net_shaper_handle *leaves_handles,
> +			     const struct net_shaper_info *leaves,
> +			     const struct net_shaper_handle *root_handle,
> +			     const struct net_shaper_info *root,
> +			     struct netlink_ext_ack *extack)
> +{
> +	return -EOPNOTSUPP;

Core should check if op is defined.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ