Re: [PATCH] net/macsec copy salt to MACSec ctx for XPN

From: Jakub Kicinski
Date: Thu May 05 2022 - 12:04:41 EST


On Thu, 5 May 2022 12:32:33 +0000 Carlos Fernandez wrote:
> When macsec offloading is used with XPN, before mdo_add_rxsa
> and mdo_add_txsa functions are called, the key salt is not
> copied to the macsec context struct.


So that it can be read out later by user space, but kernel
doesn't need it. Is that correct?

Please also see below.

> Fix by copying salt to context struct before calling the
> offloading functions.
>
> Fixes: 48ef50fa866a ("macsec: Netlink support of XPN cipher suites")
> Signed-off-by: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/net/macsec.c | 30 ++++++++++++++++--------------
> 1 file changed, 16 insertions(+), 14 deletions(-)

[snip]

> rtnl_unlock();
> --
> 2.25.1
>
> ________________________________________
> From: Paolo Abeni <pabeni@xxxxxxxxxx>
> Sent: Tuesday, May 3, 2022 1:42 PM
> To: Carlos Fernansez
> Cc: carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxx; Carlos Fernandez; David S. Miller; Eric Dumazet; Jakub Kicinski; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] net/macsec copy salt to MACSec ctx for XPN
>
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

You'll need to make a fresh posting without this quote and the legal
footer. Posting as a new thread is encouraged, you don't need to try
to make it a reply to the previous posting.

> Hello,
>
> On Mon, 2022-05-02 at 14:18 +0200, Carlos Fernansez wrote:
> > From: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
> >
> > Salt and KeyId copied to offloading context.
> >
> > If not, offloaded phys cannot work with XPN
> >
> > Signed-off-by: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
>
> This looks like a bugfix, could you please provide a relevant 'Fixes'
> tag? (in a v2).