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: <20190123155638.13852-5-antoine.tenart@bootlin.com>
Date:   Wed, 23 Jan 2019 16:56:32 +0100
From:   Antoine Tenart <antoine.tenart@...tlin.com>
To:     davem@...emloft.net, sd@...asysnail.net, andrew@...n.ch,
        f.fainelli@...il.com, hkallweit1@...il.com
Cc:     Antoine Tenart <antoine.tenart@...tlin.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        thomas.petazzoni@...tlin.com, alexandre.belloni@...tlin.com,
        quentin.schulz@...tlin.com, allan.nielsen@...rochip.com
Subject: [PATCH net-next 04/10] net: macsec: introduce the netdev_macsec structure

This patch introduces the netdev_macsec structure. It will be used
in the kernel to exchange information between the common MACsec
implementation (macsec.c) and the MACsec hardware offloading
implementations. This structure contains a command (struct
netdev_macsec_command) and pointers to MACsec specific structures which
contain the actual MACsec configuration.

Signed-off-by: Antoine Tenart <antoine.tenart@...tlin.com>
---
 include/net/macsec.h | 45 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/include/net/macsec.h b/include/net/macsec.h
index 15ff331dd670..1e4d37c190ed 100644
--- a/include/net/macsec.h
+++ b/include/net/macsec.h
@@ -175,4 +175,49 @@ struct macsec_secy {
 	struct macsec_rx_sc __rcu *rx_sc;
 };
 
+enum netdev_macsec_command {
+	/* Device wide */
+	MACSEC_DEV_OPEN,
+	MACSEC_DEV_STOP,
+
+	/* SecY */
+	MACSEC_ADD_SECY,
+	MACSEC_UPD_SECY,
+	MACSEC_DEL_SECY,
+
+	/* Security channels */
+	MACSEC_ADD_RXSC,
+	MACSEC_UPD_RXSC,
+	MACSEC_DEL_RXSC,
+
+	/* Security associations */
+	MACSEC_ADD_RXSA,
+	MACSEC_UPD_RXSA,
+	MACSEC_DEL_RXSA,
+	MACSEC_ADD_TXSA,
+	MACSEC_UPD_TXSA,
+	MACSEC_DEL_TXSA,
+};
+
+struct netdev_macsec {
+	enum netdev_macsec_command command;
+	u8 prepare:1;
+
+	union {
+		/* MACSEC_*_SECY */
+		const struct macsec_secy *secy;
+		/* MACSEC_*_RXSC */
+		const struct macsec_rx_sc *rx_sc;
+		/* MACSEC_*_RXSA/TXSA */
+		struct {
+			unsigned char assoc_num;
+			u8 key[MACSEC_KEYID_LEN];
+			union {
+				const struct macsec_rx_sa *rx_sa;
+				const struct macsec_tx_sa *tx_sa;
+			};
+		} sa;
+	};
+};
+
 #endif /* _NET_MACSEC_H_ */
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ