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]
Message-ID: <20240118191811.50271-2-rrameshbabu@nvidia.com>
Date: Thu, 18 Jan 2024 11:18:07 -0800
From: Rahul Rameshbabu <rrameshbabu@...dia.com>
To: netdev@...r.kernel.org
Cc: Gal Pressman <gal@...dia.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Rahul Rameshbabu <rrameshbabu@...dia.com>,
	Radu Pirea <radu-nicolae.pirea@....nxp.com>,
	"David S . Miller" <davem@...emloft.net>,
	Sabrina Dubroca <sd@...asysnail.net>
Subject: [PATCH net v2 2/2] net: macsec: Only require headroom/tailroom from offload implementer if .mdo_insert_tx_tag is implemented

A number of MACsec offload implementers do not implement
.mdo_insert_tx_tag. These implementers also do not specify the needed
headroom/tailroom and depend on the default in the core MACsec stack.

Fixes: a73d8779d61a ("net: macsec: introduce mdo_insert_tx_tag")
Cc: Radu Pirea (NXP OSS) <radu-nicolae.pirea@....nxp.com>
Cc: David S. Miller <davem@...emloft.net>
Cc: Sabrina Dubroca <sd@...asysnail.net>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
---

Notes:
    Changes:
    
      v1->v2:
        * Introduce new commit
        * Fix headroom/tailroom calculation when MACsec offload implementer
          does not implement .mdo_insert_tx_tag

 drivers/net/macsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 7f5426285c61..907c15f0fb14 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -2601,7 +2601,7 @@ static void macsec_set_head_tail_room(struct net_device *dev)
 	const struct macsec_ops *ops;
 
 	ops = macsec_get_ops(macsec, NULL);
-	if (ops) {
+	if (ops && ops->mdo_insert_tx_tag) {
 		needed_headroom = ops->needed_headroom;
 		needed_tailroom = ops->needed_tailroom;
 	} else {
-- 
2.42.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ