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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZH21GzZ6HATUuNyX@corigine.com>
Date: Mon, 5 Jun 2023 12:12:43 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Jamal Hadi Salim <jhs@...atatu.com>
Cc: netdev@...r.kernel.org, deb.chatterjee@...el.com,
	anjali.singhai@...el.com, namrata.limaye@...el.com, tom@...anda.io,
	p4tc-discussions@...devconf.info, mleitner@...hat.com,
	Mahesh.Shirshyad@....com, Vipin.Jain@....com,
	tomasz.osinski@...el.com, jiri@...nulli.us,
	xiyou.wangcong@...il.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, vladbu@...dia.com,
	khalidm@...dia.com, toke@...hat.com
Subject: Re: [PATCH RFC v2 net-next 10/28] p4tc: add pipeline create, get,
 update, delete

On Wed, May 17, 2023 at 07:02:14AM -0400, Jamal Hadi Salim wrote:

> +static void __tcf_pipeline_init(void)
> +{
> +	int pipeid = P4TC_KERNEL_PIPEID;
> +
> +	root_pipeline = kzalloc(sizeof(*root_pipeline), GFP_ATOMIC);
> +	if (!root_pipeline) {
> +		pr_err("Unable to register kernel pipeline\n");

Hi Victor, Pedro, and Jamal,

a minor nit from my side: in general it is preferred not to to log messages
for allocation failures, as the mm core does this already.

> +		return;
> +	}
> +
> +	strscpy(root_pipeline->common.name, "kernel", PIPELINENAMSIZ);
> +
> +	root_pipeline->common.ops =
> +		(struct p4tc_template_ops *)&p4tc_pipeline_ops;
> +
> +	root_pipeline->common.p_id = pipeid;
> +
> +	root_pipeline->p_state = P4TC_STATE_READY;
> +}

...

> diff --git a/net/sched/p4tc/p4tc_tmpl_api.c b/net/sched/p4tc/p4tc_tmpl_api.c

...

> +const struct nla_policy p4tc_root_policy[P4TC_ROOT_MAX + 1] = {
> +	[P4TC_ROOT] = { .type = NLA_NESTED },
> +	[P4TC_ROOT_PNAME] = { .type = NLA_STRING, .len = PIPELINENAMSIZ },
> +};
> +
> +const struct nla_policy p4tc_policy[P4TC_MAX + 1] = {
> +	[P4TC_PATH] = { .type = NLA_BINARY,
> +			.len = P4TC_PATH_MAX * sizeof(u32) },
> +	[P4TC_PARAMS] = { .type = NLA_NESTED },
> +};

Sparse tells me that p4tc_root_policy and p4tc_policy should be
static.

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ