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] [day] [month] [year] [list]
Message-ID: <20200409023035.GA27525@gondor.apana.org.au>
Date:   Thu, 9 Apr 2020 12:30:35 +1000
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Ayush Sawal <ayush.sawal@...lsio.com>,
        Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
        Rohit Maheshwari <rohitm@...lsio.com>,
        "David S. Miller" <davem@...emloft.net>,
        YueHaibing <yuehaibing@...wei.com>, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cxgb4/chcr: fix building without IPv6

On Wed, Apr 08, 2020 at 08:53:06PM +0200, Arnd Bergmann wrote:
> When IPv6 support is completely disabled, the chelsio driver fails
> to build with
> 
> drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_act_open_req6':
> include/net/sock.h:380:37: error: 'struct sock_common' has no member named 'skc_v6_rcv_saddr'; did you mean 'skc_rcv_saddr'?
>   380 | #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
>       |                                     ^~~~~~~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:258:37: note: in expansion of macro 'sk_v6_rcv_saddr'
>   258 |  cpl->local_ip_hi = *(__be64 *)&sk->sk_v6_rcv_saddr.in6_u.u6_addr8[0];
>       |                                     ^~~~~~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:260:36: note: in expansion of macro 'sk_v6_daddr'
>   260 |  cpl->peer_ip_hi = *(__be64 *)&sk->sk_v6_daddr.in6_u.u6_addr8[0];
>       |                                    ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:261:36: note: in expansion of macro 'sk_v6_daddr'
>   261 |  cpl->peer_ip_lo = *(__be64 *)&sk->sk_v6_daddr.in6_u.u6_addr8[8];
>       |                                    ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:296:27: note: in expansion of macro 'sk_v6_daddr'
>   296 |       ipv6_addr_type(&sk->sk_v6_daddr) == IPV6_ADDR_MAPPED)) {
>       |                           ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:303:29: note: in expansion of macro 'sk_v6_rcv_saddr'
>   303 |           (const u32 *)&sk->sk_v6_rcv_saddr.in6_u.u6_addr8,
>       |                             ^~~~~~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_dev_del':
> drivers/crypto/chelsio/chcr_ktls.c:401:26: note: in expansion of macro 'sk_v6_daddr'
>   401 |        (const u32 *)&sk->sk_v6_daddr.in6_u.u6_addr8,
>       |                          ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_dev_add':
> drivers/crypto/chelsio/chcr_ktls.c:495:27: note: in expansion of macro 'sk_v6_daddr'
>   495 |       ipv6_addr_type(&sk->sk_v6_daddr) == IPV6_ADDR_MAPPED)) {
>       |                           ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:498:22: note: in expansion of macro 'sk_v6_daddr'
>   498 |   memcpy(daaddr, sk->sk_v6_daddr.in6_u.u6_addr8, 16);
>       |                      ^~~~~~~~~~~
> 
> There is probably a good way to fix it, but this patch just adds a
> bunch of #if checks to get it to build again, which gets a bit
> ugly.
> 
> Fixes: 62370a4f346d ("cxgb4/chcr: Add ipv6 support and statistics")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> If you have a better idea to fix it, please send a different patch
> instead and treat this as a bug report. ;-)
> ---
>  drivers/crypto/chelsio/chcr_ktls.c | 26 ++++++++++++++++++++------
>  1 file changed, 20 insertions(+), 6 deletions(-)

Please send all chelsio patches via netdev.  Thanks!
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ