mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Michal Kubecek <mkubecek@suse.cz>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	netdev@vger.kernel.org
Cc: Jiasheng Jiang <jiasheng@iscas.ac.cn>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH ipsec] Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
Date: Mon, 23 May 2022 10:23:22 -0700	[thread overview]
Message-ID: <772f9381-1180-319e-3afa-cca900291c94@gmail.com> (raw)
In-Reply-To: <fbb31dc72fb38a69a2aca6c25f1be71d6a8bcc96.1653321424.git.mkubecek@suse.cz>

On 5/23/22 09:01, Michal Kubecek wrote:
> This reverts commit 4dc2a5a8f6754492180741facf2a8787f2c415d7.
> 
> A non-zero return value from pfkey_broadcast() does not necessarily mean
> an error occurred as this function returns -ESRCH when no registered
> listener received the message. In particular, a call with
> BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
> zero so that this commit in fact prevents processing any PF_KEY message.
> One visible effect is that racoon daemon fails to find encryption
> algorithms like aes and refuses to start.
> 
> Excluding -ESRCH return value would fix this but it's not obvious that
> we really want to bail out here and most other callers of
> pfkey_broadcast() also ignore the return value. Also, as pointed out by
> Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
> should use netlink instead so that we should only disturb the code for
> really important fixes.
> 
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Maybe you can add a comment above the call such that future tool-based 
patches submissions to give the author a chance to read the comment 
above and ask oneself twice whether this is relevant or not?
-- 
Florian

  reply	other threads:[~2022-05-23 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 16:01 Michal Kubecek
2022-05-23 17:23 ` Florian Fainelli [this message]
2022-05-23 19:50   ` Michal Kubecek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=772f9381-1180-319e-3afa-cca900291c94@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jiasheng@iscas.ac.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®