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]
Date: Mon, 5 Jun 2023 10:32:20 -0400
From: Jamal Hadi Salim <hadi@...atatu.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>, netdev@...r.kernel.org, deb.chatterjee@...el.com, 
	tom@...anda.io, p4tc-discussions@...devconf.info, Mahesh.Shirshyad@....com, 
	Vipin.Jain@....com, tomasz.osinski@...el.com, xiyou.wangcong@...il.com, 
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	khalidm@...dia.com, toke@...hat.com
Subject: Re: [p4tc-discussions] Re: [PATCH RFC v2 net-next 10/28] p4tc: add
 pipeline create, get, update, delete

On Mon, Jun 5, 2023 at 6:12 AM Simon Horman via p4tc-discussions
<p4tc-discussions@...devconf.info> wrote:
>
> 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.
>

We debated this one - the justification was we wanted to see more
details of what exactly failed since this is invoked earlier in the
loading. Thoughts?

> > +             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.

We'll fix in next update.

cheers,
jamal

> ...
> _______________________________________________
> p4tc-discussions mailing list -- p4tc-discussions@...devconf.info
> To unsubscribe send an email to p4tc-discussions-leave@...devconf.info

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ