From: Simon Horman <simon.horman@corigine.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, Nikolay Aleksandrov <razor@blackwall.org>,
bridge@lists.linux-foundation.org,
Eric Dumazet <edumazet@google.com>,
Vladimir Oltean <olteanv@gmail.com>,
Roopa Prabhu <roopa@nvidia.com>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [Bridge] [PATCH net-next v2] netlink: provide an ability to set default extack message
Date: Sun, 29 Jan 2023 19:39:41 +0100 [thread overview]
Message-ID: <Y9a9bTU3edwDRW6N@corigine.com> (raw)
In-Reply-To: <c1a88f471a8aa6d780dde690e76b73ba15618b6d.1675010984.git.leon@kernel.org>
On Sun, Jan 29, 2023 at 06:51:37PM +0200, Leon Romanovsky wrote:
> In netdev common pattern, extack pointer is forwarded to the drivers
> to be filled with error message. However, the caller can easily
> overwrite the filled message.
>
> Instead of adding multiple "if (!extack->_msg)" checks before any
> NL_SET_ERR_MSG() call, which appears after call to the driver, let's
> add new macro to common code.
>
> [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm@unreal
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <simon.horman@corigine.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
bridge@lists.linux-foundation.org,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, Nikolay Aleksandrov <razor@blackwall.org>,
Paolo Abeni <pabeni@redhat.com>, Roopa Prabhu <roopa@nvidia.com>,
Steffen Klassert <steffen.klassert@secunet.com>,
Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH net-next v2] netlink: provide an ability to set default extack message
Date: Sun, 29 Jan 2023 19:39:41 +0100 [thread overview]
Message-ID: <Y9a9bTU3edwDRW6N@corigine.com> (raw)
In-Reply-To: <c1a88f471a8aa6d780dde690e76b73ba15618b6d.1675010984.git.leon@kernel.org>
On Sun, Jan 29, 2023 at 06:51:37PM +0200, Leon Romanovsky wrote:
> In netdev common pattern, extack pointer is forwarded to the drivers
> to be filled with error message. However, the caller can easily
> overwrite the filled message.
>
> Instead of adding multiple "if (!extack->_msg)" checks before any
> NL_SET_ERR_MSG() call, which appears after call to the driver, let's
> add new macro to common code.
>
> [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm@unreal
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-01-29 18:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 16:51 [Bridge] [PATCH net-next v2] netlink: provide an ability to set default extack message Leon Romanovsky
2023-01-29 16:51 ` Leon Romanovsky
2023-01-29 18:39 ` Simon Horman [this message]
2023-01-29 18:39 ` Simon Horman
2023-01-29 18:44 ` [Bridge] " Nikolay Aleksandrov
2023-01-29 18:44 ` Nikolay Aleksandrov
2023-01-31 11:47 ` [Bridge] " Paolo Abeni
2023-01-31 11:47 ` Paolo Abeni
2023-01-31 13:32 ` [Bridge] " Leon Romanovsky
2023-01-31 13:32 ` Leon Romanovsky
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=Y9a9bTU3edwDRW6N@corigine.com \
--to=simon.horman@corigine.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.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 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.