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-next>] [day] [month] [year] [list]
Date:   Sun, 15 Nov 2020 20:31:40 -0600
From:   Tom Seewald <tseewald@...il.com>
To:     netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Tom Seewald <tseewald@...il.com>,
        Vishal Kulkarni <vishal@...lsio.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rohit Maheshwari <rohitm@...lsio.com>
Subject: [PATCH] cxbgb4: Fix build failure when CHELSIO_TLS_DEVICE=n

After commit 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough")
building the kernel with CHELSIO_T4=y and CHELSIO_TLS_DEVICE=n results
in the following error:

ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in function
`cxgb_select_queue':
cxgb4_main.c:(.text+0x2dac): undefined reference to `tls_validate_xmit_skb'

This is caused by cxgb_select_queue() calling cxgb4_is_ktls_skb() without
checking if CHELSIO_TLS_DEVICE=y. Fix this by calling cxgb4_is_ktls_skb()
only when this config option is enabled.

Fixes: 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough")
Signed-off-by: Tom Seewald <tseewald@...il.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 7fd264a6d085..8e8783afd6df 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -1176,7 +1176,9 @@ static u16 cxgb_select_queue(struct net_device *dev, struct sk_buff *skb,
 		txq = netdev_pick_tx(dev, skb, sb_dev);
 		if (xfrm_offload(skb) || is_ptp_enabled(skb, dev) ||
 		    skb->encapsulation ||
-		    cxgb4_is_ktls_skb(skb) ||
+#if IS_ENABLED(CONFIG_CHELSIO_TLS_DEVICE)
+		cxgb4_is_ktls_skb(skb) ||
+#endif /* CHELSIO_TLS_DEVICE */
 		    (proto != IPPROTO_TCP && proto != IPPROTO_UDP))
 			txq = txq % pi->nqsets;
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ