* [Patch] net: af_key: check encryption module availability consistency
@ 2022-05-16 12:57 Thomas Bartschies
2022-05-18 0:44 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Bartschies @ 2022-05-16 12:57 UTC (permalink / raw)
Cc: Thomas Bartschies
Since the recent introduction supporting the SM3 and SM4 hash algos for IPsec, the kernel
produces invalid pfkey acquire messages, when these encryption modules are disabled. This
happens because the availability of the algos wasn't checked in all necessary functions.
This patch adds these checks.
Signed-off-by: Thomas Bartschies <thomas.bartschies@cvk.de>
diff -uprN a/net/key/af_key.c b/net/key/af_key.c
--- a/net/key/af_key.c 2022-05-09 09:16:33.000000000 +0200
+++ b/net/key/af_key.c 2022-05-13 13:51:58.286250337 +0200
@@ -2898,7 +2898,7 @@ static int count_ah_combs(const struct x
break;
if (!aalg->pfkey_supported)
continue;
- if (aalg_tmpl_set(t, aalg))
+ if (aalg_tmpl_set(t, aalg) && aalg->available)
sz += sizeof(struct sadb_comb);
}
return sz + sizeof(struct sadb_prop);
@@ -2916,7 +2916,7 @@ static int count_esp_combs(const struct
if (!ealg->pfkey_supported)
continue;
- if (!(ealg_tmpl_set(t, ealg)))
+ if (!(ealg_tmpl_set(t, ealg) && ealg->available))
continue;
for (k = 1; ; k++) {
@@ -2927,7 +2927,7 @@ static int count_esp_combs(const struct
if (!aalg->pfkey_supported)
continue;
- if (aalg_tmpl_set(t, aalg))
+ if (aalg_tmpl_set(t, aalg) && aalg->available)
sz += sizeof(struct sadb_comb);
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] net: af_key: check encryption module availability consistency
2022-05-16 12:57 [Patch] net: af_key: check encryption module availability consistency Thomas Bartschies
@ 2022-05-18 0:44 ` Jakub Kicinski
2022-05-18 6:36 ` AW: " Bartschies, Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2022-05-18 0:44 UTC (permalink / raw)
To: Thomas Bartschies; +Cc: netdev
On Mon, 16 May 2022 14:57:30 +0200 (CEST) Thomas Bartschies wrote:
> Since the recent introduction supporting the SM3 and SM4 hash algos for IPsec, the kernel
> produces invalid pfkey acquire messages, when these encryption modules are disabled. This
> happens because the availability of the algos wasn't checked in all necessary functions.
> This patch adds these checks.
>
> Signed-off-by: Thomas Bartschies <thomas.bartschies@cvk.de>
This has not made it into patchwork.
Did you put the list on BCC or something? If so how would people
on the list see replies to this patch?
Please repost it with appropriate To: and CC: lists.
To: davem@davemloft.net
CC: everyone from scripts/get_maintainer
^ permalink raw reply [flat|nested] 3+ messages in thread
* AW: [Patch] net: af_key: check encryption module availability consistency
2022-05-18 0:44 ` Jakub Kicinski
@ 2022-05-18 6:36 ` Bartschies, Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Bartschies, Thomas @ 2022-05-18 6:36 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev
Hi,
thanks for the info. I've reposted it with the appropriate mail headers you've suggested. Although I saw my first post in
the LKML and netdev archives. It's my first own patch posting.
Best regards,
--
Thomas Bartschies
CVK IT Systeme
-----Ursprüngliche Nachricht-----
Von: Jakub Kicinski <kuba@kernel.org>
Gesendet: Mittwoch, 18. Mai 2022 02:45
An: Bartschies, Thomas <Thomas.Bartschies@cvk.de>
Cc: netdev@vger.kernel.org
Betreff: Re: [Patch] net: af_key: check encryption module availability consistency
On Mon, 16 May 2022 14:57:30 +0200 (CEST) Thomas Bartschies wrote:
> Since the recent introduction supporting the SM3 and SM4 hash algos for IPsec, the kernel
> produces invalid pfkey acquire messages, when these encryption modules are disabled. This
> happens because the availability of the algos wasn't checked in all necessary functions.
> This patch adds these checks.
>
> Signed-off-by: Thomas Bartschies <thomas.bartschies@cvk.de>
This has not made it into patchwork.
Did you put the list on BCC or something? If so how would people
on the list see replies to this patch?
Please repost it with appropriate To: and CC: lists.
To: davem@davemloft.net
CC: everyone from scripts/get_maintainer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-18 6:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 12:57 [Patch] net: af_key: check encryption module availability consistency Thomas Bartschies
2022-05-18 0:44 ` Jakub Kicinski
2022-05-18 6:36 ` AW: " Bartschies, Thomas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.