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: <83CDD55A-703B-4A61-837A-C98F1A28BE17@oracle.com>
Date:   Sat, 4 Mar 2023 17:44:34 +0000
From:   Chuck Lever III <chuck.lever@...cle.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     Chuck Lever <cel@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        "kernel-tls-handshake@...ts.linux.dev" 
        <kernel-tls-handshake@...ts.linux.dev>,
        John Haxby <john.haxby@...cle.com>
Subject: Re: [PATCH v6 1/2] net/handshake: Create a NETLINK service for
 handling handshake requests



> On Mar 4, 2023, at 12:25 PM, Chuck Lever III <chuck.lever@...cle.com> wrote:
> 
> 
> 
>> On Mar 3, 2023, at 9:21 PM, Jakub Kicinski <kuba@...nel.org> wrote:
>> 
>> On Fri, 03 Mar 2023 13:51:31 -0500 Chuck Lever wrote:
>> 
>>> +static const struct genl_split_ops handshake_nl_ops[] = {
>>> +	{
>>> +		.cmd		= HANDSHAKE_CMD_ACCEPT,
>>> +		.doit		= handshake_nl_accept_doit,
>>> +		.policy		= handshake_accept_nl_policy,
>>> +		.maxattr	= HANDSHAKE_A_ACCEPT_HANDLER_CLASS,
>>> +		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>>> +	},
>>> +	{
>>> +		.cmd		= HANDSHAKE_CMD_DONE,
>>> +		.doit		= handshake_nl_done_doit,
>>> +		.policy		= handshake_done_nl_policy,
>>> +		.maxattr	= HANDSHAKE_A_DONE_MAX,
>>> +		.flags		= GENL_CMD_CAP_DO,
>>> +	},
>>> +};
>>> +
>>> +static const struct genl_multicast_group handshake_nl_mcgrps[] = {
>>> +	[HANDSHAKE_HANDLER_CLASS_NONE] = { .name = HANDSHAKE_MCGRP_NONE, },
>>> +};
>>> +
>>> +static struct genl_family __ro_after_init handshake_genl_family = {
>>> +	.hdrsize		= 0,
>>> +	.name			= HANDSHAKE_FAMILY_NAME,
>>> +	.version		= HANDSHAKE_FAMILY_VERSION,
>>> +	.netnsok		= true,
>>> +	.parallel_ops		= true,
>>> +	.n_mcgrps		= ARRAY_SIZE(handshake_nl_mcgrps),
>>> +	.n_split_ops		= ARRAY_SIZE(handshake_nl_ops),
>>> +	.split_ops		= handshake_nl_ops,
>>> +	.mcgrps			= handshake_nl_mcgrps,
>>> +	.module			= THIS_MODULE,
>>> +};
>> 
>> You're not auto-generating the family, ops, and policies?
>> Any reason?
> 
> I couldn't find a way to have the generated source appear
> in the middle of a source file. But I see that's not the
> way others are doing it, so I have added separate files
> under net/handshake for the generated source and header
> material. Two things, though:
> 
> 1. I don't see a generated struct genl_family.

Some experimentation revealed that this is because the spec
was a "genetlink-c" spec which prevents the generation of
"struct genl_family".

But switching it to a "genetlink" spec means it wants my
main header to be linux/handshake.h, and it won't allow the
use of "uapi-header" to put that header somewhere else (in
my case, I thought linux/net/handshake.h was more appropriate).


> 2. The SPDX tags in the generated source files is "BSD
>   3-clause", but the tag in my spec is "GPL-2.0 with
>   syscall note". Oddly, the generated uapi header still
>   has the latter (correct) tag.
> 
> --
> Chuck Lever
> 
> 

--
Chuck Lever


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ