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: <20221114211645.539397df@kernel.org>
Date:   Mon, 14 Nov 2022 21:16:45 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Hangbin Liu <liuhangbin@...il.com>
Cc:     netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jonathan Toppins <jtoppins@...hat.com>,
        Paolo Abeni <pabeni@...hat.com>,
        David Ahern <dsahern@...il.com>,
        Tom Herbert <tom@...bertland.com>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCHv2 net] net: use struct_group to copy addresses

On Mon, 14 Nov 2022 16:12:10 +0800 Hangbin Liu wrote:
> diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
> index 961ec16a26b8..6f7e833a00f7 100644
> --- a/include/uapi/linux/ip.h
> +++ b/include/uapi/linux/ip.h
> @@ -100,8 +100,10 @@ struct iphdr {
>  	__u8	ttl;
>  	__u8	protocol;
>  	__sum16	check;
> -	__be32	saddr;
> -	__be32	daddr;
> +	struct_group(addrs,
> +		__be32	saddr;
> +		__be32	daddr;
> +	);
>  	/*The options start here. */
>  };
>  
> diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
> index 03cdbe798fe3..3a3a80496c7c 100644
> --- a/include/uapi/linux/ipv6.h
> +++ b/include/uapi/linux/ipv6.h
> @@ -130,8 +130,10 @@ struct ipv6hdr {
>  	__u8			nexthdr;
>  	__u8			hop_limit;
>  
> -	struct	in6_addr	saddr;
> -	struct	in6_addr	daddr;
> +	struct_group(addrs,
> +		struct	in6_addr	saddr;
> +		struct	in6_addr	daddr;
> +	);
>  };
>  

Can you double check the build with clang? It seems to fail with an odd
message, maybe some includes missing?

In file included from ./usr/include/linux/if_tunnel.h:7:
usr/include/linux/ip.h:103:2: error: type name requires a specifier or qualifier
        struct_group(addrs,
        ^
usr/include/linux/ip.h:104:3: error: unexpected type name '__be32': expected identifier
                __be32  saddr;
                ^
usr/include/linux/ip.h:104:10: error: expected ')'
                __be32  saddr;
                        ^
usr/include/linux/ip.h:103:14: note: to match this '('
        struct_group(addrs,
                    ^
usr/include/linux/ip.h:103:15: error: a parameter list without types is only allowed in a function definition
        struct_group(addrs,
                     ^
usr/include/linux/ip.h:106:2: error: type name requires a specifier or qualifier
        );
        ^
usr/include/linux/ip.h:106:2: error: expected member name or ';' after declaration specifiers
usr/include/linux/ip.h:105:16: error: expected ';' at end of declaration list
                __be32  daddr;
                              ^
                              ;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ