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:   Wed, 19 Oct 2022 14:21:34 -0700
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>,
        <johannes@...solutions.net>
CC:     <netdev@...r.kernel.org>, <edumazet@...gle.com>,
        <pabeni@...hat.com>, <jiri@...nulli.us>, <razor@...ckwall.org>,
        <nicolas.dichtel@...nd.com>, <gnault@...hat.com>, <fw@...len.de>
Subject: Re: [PATCH net-next 02/13] genetlink: move the private fields in
 struct genl_family



On 10/18/2022 4:07 PM, Jakub Kicinski wrote:
> Move the private fields down to form a "private section".
> Use the kdoc "private:" label comment thing to hide them
> from the main kdoc comment.
> 

Neat, I didn't know about this.

> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> I did this cleanup to add more private fields but ended up
> not needing them. Still I think the commit makes sense?
> ---

Yea it makes sense to me.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

>  include/net/genetlink.h | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/include/net/genetlink.h b/include/net/genetlink.h
> index 8f780170e2f8..f2366b463597 100644
> --- a/include/net/genetlink.h
> +++ b/include/net/genetlink.h
> @@ -23,7 +23,6 @@ struct genl_info;
>  
>  /**
>   * struct genl_family - generic netlink family
> - * @id: protocol family identifier (private)
>   * @hdrsize: length of user specific header in bytes
>   * @name: name of family
>   * @version: protocol version
> @@ -41,20 +40,16 @@ struct genl_info;
>   * @n_mcgrps: number of multicast groups
>   * @resv_start_op: first operation for which reserved fields of the header
>   *	can be validated, new families should leave this field at zero
> - * @mcgrp_offset: starting number of multicast group IDs in this family
> - *	(private)
>   * @ops: the operations supported by this family
>   * @n_ops: number of operations supported by this family
>   * @small_ops: the small-struct operations supported by this family
>   * @n_small_ops: number of small-struct operations supported by this family
>   */
>  struct genl_family {
> -	int			id;		/* private */
>  	unsigned int		hdrsize;
>  	char			name[GENL_NAMSIZ];
>  	unsigned int		version;
>  	unsigned int		maxattr;
> -	unsigned int		mcgrp_offset;	/* private */
>  	u8			netnsok:1;
>  	u8			parallel_ops:1;
>  	u8			n_ops;
> @@ -72,6 +67,12 @@ struct genl_family {
>  	const struct genl_small_ops *small_ops;
>  	const struct genl_multicast_group *mcgrps;
>  	struct module		*module;
> +
> +/* private: internal use only */
> +	/* protocol family identifier */
> +	int			id;
> +	/* starting number of multicast group IDs in this family */
> +	unsigned int		mcgrp_offset;
>  };
>  
>  /**

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ