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] [day] [month] [year] [list]
Message-ID: <Y3OU6z1PnKiRwzfK@Laptop-X1>
Date:   Tue, 15 Nov 2022 21:32:27 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
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, Nov 14, 2022 at 09:16:45PM -0800, Jakub Kicinski wrote:
> 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,
>         ^

Ah, because this is a UAPI header, we need to use __struct_group() here.
I will fix it. Thanks for the info.

Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ