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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240906192926.GO2097826@kernel.org>
Date: Fri, 6 Sep 2024 20:29:26 +0100
From: Simon Horman <horms@...nel.org>
To: Antonio Quartulli <antonio@...nvpn.net>
Cc: netdev@...r.kernel.org, kuba@...nel.org, pabeni@...hat.com,
	ryazanov.s.a@...il.com, edumazet@...gle.com, andrew@...n.ch,
	sd@...asysnail.net
Subject: Re: [PATCH net-next v6 12/25] ovpn: implement packet processing

On Tue, Aug 27, 2024 at 02:07:52PM +0200, Antonio Quartulli wrote:
> This change implements encryption/decryption and
> encapsulation/decapsulation of OpenVPN packets.
> 
> Support for generic crypto state is added along with
> a wrapper for the AEAD crypto kernel API.
> 
> Signed-off-by: Antonio Quartulli <antonio@...nvpn.net>

...

> diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c

...

> @@ -54,39 +56,122 @@ static void ovpn_netdev_write(struct ovpn_peer *peer, struct sk_buff *skb)
>  		dev_sw_netstats_rx_add(peer->ovpn->dev, skb->len);
>  }
>  
> -static void ovpn_decrypt_post(struct sk_buff *skb, int ret)
> +void ovpn_decrypt_post(struct sk_buff *skb, int ret)
>  {
> -	struct ovpn_peer *peer = ovpn_skb_cb(skb)->peer;
> +	struct ovpn_crypto_key_slot *ks = ovpn_skb_cb(skb)->ctx->ks;
> +	struct ovpn_peer *peer = ovpn_skb_cb(skb)->ctx->peer;
> +	__be16 proto;
> +	__be32 *pid;
>  
> -	if (unlikely(ret < 0))
> +	/* crypto is happening asyncronously. this function will be called

nit: asynchronously

     Flagged by checkpatch.pl --codespell

> +	 * again later by the crypto callback with a proper return code
> +	 */
> +	if (unlikely(ret == -EINPROGRESS))
> +		return;

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ