netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC ipsec-next] pfkey: Deprecate pfkey
@ 2025-07-04  6:55 Steffen Klassert
  2025-07-04  8:26 ` Florian Westphal
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Steffen Klassert @ 2025-07-04  6:55 UTC (permalink / raw)
  To: Herbert Xu, Paul Wouters, Andreas Steffen, Tobias Brunner,
	Antony Antony, Tuomo Soini, David S. Miller
  Cc: netdev, devel

The pfkey user configuration interface was replaced by the netlink
user configuration interface more than a decade ago. In between
all maintained IKE implementations moved to the netlink interface.
So let 'config NET_KEY' default to no in Kconfig. The pfkey code
will be removed in a second step.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/Kconfig | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
index f0157702718f..aedea7a892db 100644
--- a/net/xfrm/Kconfig
+++ b/net/xfrm/Kconfig
@@ -110,14 +110,17 @@ config XFRM_IPCOMP
 	select CRYPTO_DEFLATE
 
 config NET_KEY
-	tristate "PF_KEY sockets"
+	tristate "PF_KEY sockets (deprecated)"
 	select XFRM_ALGO
+	default n
 	help
 	  PF_KEYv2 socket family, compatible to KAME ones.
-	  They are required if you are going to use IPsec tools ported
-	  from KAME.
 
-	  Say Y unless you know what you are doing.
+	  The PF_KEYv2 socket interface is deprecated and
+	  scheduled for removal. Please use the netlink
+	  interface (XFRM_USER) to configure IPsec.
+
+	  If unsure, say N.
 
 config NET_KEY_MIGRATE
 	bool "PF_KEY MIGRATE"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH RFC ipsec-next] pfkey: Deprecate pfkey
  2025-07-04  6:55 [PATCH RFC ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
@ 2025-07-04  8:26 ` Florian Westphal
  2025-07-04  9:32 ` Herbert Xu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Florian Westphal @ 2025-07-04  8:26 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Herbert Xu, Paul Wouters, Andreas Steffen, Tobias Brunner,
	Antony Antony, Tuomo Soini, David S. Miller, netdev, devel

Steffen Klassert <steffen.klassert@secunet.com> wrote:
> The pfkey user configuration interface was replaced by the netlink
> user configuration interface more than a decade ago. In between
> all maintained IKE implementations moved to the netlink interface.
> So let 'config NET_KEY' default to no in Kconfig. The pfkey code
> will be removed in a second step.

I'd suggest to also do something like
b144fcaf46d4 ("dccp: Print deprecation notice.")

> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> ---
>  net/xfrm/Kconfig | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
> index f0157702718f..aedea7a892db 100644
> --- a/net/xfrm/Kconfig
> +++ b/net/xfrm/Kconfig
> @@ -110,14 +110,17 @@ config XFRM_IPCOMP
>  	select CRYPTO_DEFLATE
>  
>  config NET_KEY
> -	tristate "PF_KEY sockets"
> +	tristate "PF_KEY sockets (deprecated)"
>  	select XFRM_ALGO
> +	default n
>  	help
>  	  PF_KEYv2 socket family, compatible to KAME ones.
> -	  They are required if you are going to use IPsec tools ported
> -	  from KAME.
>  
> -	  Say Y unless you know what you are doing.
> +	  The PF_KEYv2 socket interface is deprecated and
> +	  scheduled for removal. Please use the netlink
> +	  interface (XFRM_USER) to configure IPsec.

Perhaps this should mention that all existing IKE daemons
no longer need this resp. that this is only required for
ancient/unmaintained KAME tools?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH RFC ipsec-next] pfkey: Deprecate pfkey
  2025-07-04  6:55 [PATCH RFC ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
  2025-07-04  8:26 ` Florian Westphal
@ 2025-07-04  9:32 ` Herbert Xu
  2025-07-09  5:42 ` [devel-ipsec] " Antony Antony
  2025-07-09  5:56 ` Tobias Brunner
  3 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2025-07-04  9:32 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Paul Wouters, Andreas Steffen, Tobias Brunner, Antony Antony,
	Tuomo Soini, David S. Miller, netdev, devel

On Fri, Jul 04, 2025 at 08:55:14AM +0200, Steffen Klassert wrote:
>
>  config NET_KEY
> -	tristate "PF_KEY sockets"
> +	tristate "PF_KEY sockets (deprecated)"
>  	select XFRM_ALGO
> +	default n

The default is always n so this is redundant.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [devel-ipsec] [PATCH RFC ipsec-next] pfkey: Deprecate pfkey
  2025-07-04  6:55 [PATCH RFC ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
  2025-07-04  8:26 ` Florian Westphal
  2025-07-04  9:32 ` Herbert Xu
@ 2025-07-09  5:42 ` Antony Antony
  2025-07-09  5:56 ` Tobias Brunner
  3 siblings, 0 replies; 5+ messages in thread
From: Antony Antony @ 2025-07-09  5:42 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Herbert Xu, Paul Wouters, Andreas Steffen, Tobias Brunner,
	Antony Antony, Tuomo Soini, David S. Miller, netdev, devel,
	Leon Romanovsky

On Fri, Jul 04, 2025 at 08:55:14 +0200, Steffen Klassert via Devel wrote:
> The pfkey user configuration interface was replaced by the netlink
> user configuration interface more than a decade ago. In between
> all maintained IKE implementations moved to the netlink interface.
> So let 'config NET_KEY' default to no in Kconfig. The pfkey code
> will be removed in a second step.
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Acked-by: Antony Antony <antony.antony@secunet.com>

I have tested libreswan and strongSwan CONFIG_NET_KEY=n; without HW offload.

And I would also like to get a confirmation Hardware offload, crypt
offload and packet offload works with CONFIG_NET_KEY n.

I undderstand this patch is independent of HW offload.

However, IMHO it is good to confirm now.  Otherwise I imagine
distributions will flip CONFIG_NET_KEY=y to get HW offload working,
which will make it harder to depreciate PF_KEY/NET_KEY

Paul or Leon - would you like to confirm with
CONFIG_NET_KEY=n XFRM HW offload still works?

-antony

> ---
>  net/xfrm/Kconfig | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
> index f0157702718f..aedea7a892db 100644
> --- a/net/xfrm/Kconfig
> +++ b/net/xfrm/Kconfig
> @@ -110,14 +110,17 @@ config XFRM_IPCOMP
>  	select CRYPTO_DEFLATE
>  
>  config NET_KEY
> -	tristate "PF_KEY sockets"
> +	tristate "PF_KEY sockets (deprecated)"
>  	select XFRM_ALGO
> +	default n
>  	help
>  	  PF_KEYv2 socket family, compatible to KAME ones.
> -	  They are required if you are going to use IPsec tools ported
> -	  from KAME.
>  
> -	  Say Y unless you know what you are doing.
> +	  The PF_KEYv2 socket interface is deprecated and
> +	  scheduled for removal. Please use the netlink
> +	  interface (XFRM_USER) to configure IPsec.
> +
> +	  If unsure, say N.
>  
>  config NET_KEY_MIGRATE
>  	bool "PF_KEY MIGRATE"
> -- 
> 2.43.0
> 
> -- 
> Devel mailing list -- devel@lists.linux-ipsec.org
> To unsubscribe send an email to devel-leave@lists.linux-ipsec.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH RFC ipsec-next] pfkey: Deprecate pfkey
  2025-07-04  6:55 [PATCH RFC ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
                   ` (2 preceding siblings ...)
  2025-07-09  5:42 ` [devel-ipsec] " Antony Antony
@ 2025-07-09  5:56 ` Tobias Brunner
  3 siblings, 0 replies; 5+ messages in thread
From: Tobias Brunner @ 2025-07-09  5:56 UTC (permalink / raw)
  To: Steffen Klassert, Herbert Xu, Paul Wouters, Andreas Steffen,
	Antony Antony, Tuomo Soini, David S. Miller
  Cc: netdev, devel

On 04.07.25 08:55, Steffen Klassert wrote:
> The pfkey user configuration interface was replaced by the netlink
> user configuration interface more than a decade ago. In between
> all maintained IKE implementations moved to the netlink interface.
> So let 'config NET_KEY' default to no in Kconfig. The pfkey code
> will be removed in a second step.
> 
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> ---
>  net/xfrm/Kconfig | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
> index f0157702718f..aedea7a892db 100644
> --- a/net/xfrm/Kconfig
> +++ b/net/xfrm/Kconfig
> @@ -110,14 +110,17 @@ config XFRM_IPCOMP
>  	select CRYPTO_DEFLATE
>  
>  config NET_KEY
> -	tristate "PF_KEY sockets"
> +	tristate "PF_KEY sockets (deprecated)"
>  	select XFRM_ALGO
> +	default n
>  	help
>  	  PF_KEYv2 socket family, compatible to KAME ones.
> -	  They are required if you are going to use IPsec tools ported
> -	  from KAME.
>  
> -	  Say Y unless you know what you are doing.
> +	  The PF_KEYv2 socket interface is deprecated and
> +	  scheduled for removal. Please use the netlink
> +	  interface (XFRM_USER) to configure IPsec.
> +
> +	  If unsure, say N.
>  
>  config NET_KEY_MIGRATE
>  	bool "PF_KEY MIGRATE"

While we currently use this in our regression tests to test our PF_KEY
implementation (which is used on FreeBSD/macOS), I'm fine with
deprecating and eventually removing it.

Acked-by: Tobias Brunner <tobias@strongswan.org>

Regards,
Tobias


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-09  6:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-04  6:55 [PATCH RFC ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
2025-07-04  8:26 ` Florian Westphal
2025-07-04  9:32 ` Herbert Xu
2025-07-09  5:42 ` [devel-ipsec] " Antony Antony
2025-07-09  5:56 ` Tobias Brunner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).