Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4655150iob; Sun, 8 May 2022 20:48:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWlHfr9gYA2fHpYmaxbtklK+YEH9rpICOlUfnTqXySwNtaGyap3rBTS7kTkBUyJ8OpuzX5 X-Received: by 2002:a17:902:710c:b0:15e:e759:c907 with SMTP id a12-20020a170902710c00b0015ee759c907mr14449534pll.140.1652068080307; Sun, 08 May 2022 20:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652068080; cv=none; d=google.com; s=arc-20160816; b=lb5NlwvL0uy91XBHxIvTKRYR5DzIBoBOhKuiEPy6IRZ83jcTUs9bYP3VaoGP0SUVwx bp+en9WOUjQP99IYbHgptIj5bhyP7C4+UtLuaTbt7jHRkWLNyvU9XTm+8X+ViMvnkMh8 vsueu/nMBFJppTpBVu655MEJfFIyQrmCnsXbpod4JDSR7P3exFtE04EZbAvDJidAB03g VJjUoe6Mt2HmynyFkEzJWu8wHiL/Dt3kPzC0npfLfjK9B4Hn2tK61uBlfXj736Z1C15L 27miPt5zSaqOTJVJ5AbNdg2lySBqSjtJsKoFtFW6nDfJCOZms/IO8sFU08HtvJl2EX7h uEMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ZEcuwXpdhq25Soi5EEOlKzUhp6aFCum4R5WuiSa2xDo=; b=PS82vKH14ZjU9cK0gIKL1pTmt3uUvulwiyfhqUSdOPbPDfLV40oyU+O6xwDwF2Yuoq z9bWEtlLCw4xX1szEQZhdVOWjTQNNfEmez46JOHL54WqIp6YbeoIRoD6aWD5uJff+pNJ qhuOcUzWCmjehgsaxrgwdLEuXjH9s4U5iuvxMr/fSw14FePVcMYksvLhl4uEEM+PUGpu tFzcE4uoDQU+0XXHAo5FNfHMqX7CG5LEgENWbjLE2g5hA0331Fs8iAEHNzRYGu2Gp42f wigbfygMDvNgI3rf24trkKQQCuvvOFWKhS3Sb39u1dichWAatcl1oRJNEeuLpFp9xzKj iZKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nuuatEu5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id lp1-20020a17090b4a8100b001dc7ea3e1dasi21396864pjb.122.2022.05.08.20.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:48:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nuuatEu5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 646192C5; Sun, 8 May 2022 20:45:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381622AbiEEQIT (ORCPT + 99 others); Thu, 5 May 2022 12:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233041AbiEEQIQ (ORCPT ); Thu, 5 May 2022 12:08:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14EED515A3; Thu, 5 May 2022 09:04:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BB227B82DBE; Thu, 5 May 2022 16:04:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19C73C385A4; Thu, 5 May 2022 16:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651766674; bh=HAVCUwKRzzzGViCcf2QhsPvIC0F6WRsXgFuVQn2MY9w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nuuatEu5lMst9s45JGhFoVMYbDXrcZTeHgSmbpsW8EzqskUyskFg9sJAhdxfPeFlP HaKSPGtZNW4mWv5oIsypnLqzTgeKX6/wwnfO8dpeSeH5xKJfiDI7C9dnCHFv/5attR gKTETkGyfeMJr+Z8qzwWqhbCg65soALoeeo4m4/nq2f+eGtJ2bpMT5dGwBnnjJ4jWq M2KOVV4o2MdHoJTyJwbm49vJbP44M8Hl3YuCh0ZWPX4CGl7LGqPWPm2J65VusdKCyE TjojtlmOUlL3rTOMqrR66ox7su6Jgd+FFWYyYJsdOD6oF7Vf0Nvs9pwkD5T8zRCqG7 HrsB88hBaCfJg== Date: Thu, 5 May 2022 09:04:32 -0700 From: Jakub Kicinski To: Carlos Fernandez Cc: Paolo Abeni , Carlos Fernansez , "carlos.fernandez@technica-enineering.de" , "David S. Miller" , Eric Dumazet , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] net/macsec copy salt to MACSec ctx for XPN Message-ID: <20220505090432.544ce339@kernel.org> In-Reply-To: References: <20220502121837.22794-1-carlos.escuin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > drivers/net/macsec.c | 30 ++++++++++++++++-------------- > 1 file changed, 16 insertions(+), 14 deletions(-) [snip] > rtnl_unlock(); > -- > 2.25.1 > > ________________________________________ > From: Paolo Abeni > Sent: Tuesday, May 3, 2022 1:42 PM > To: Carlos Fernansez > Cc: carlos.fernandez@technica-enineering.de; Carlos Fernandez; David S. Miller; Eric Dumazet; Jakub Kicinski; netdev@vger.kernel.org; linux-kernel@vger.kernel.org > 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 > > > > Salt and KeyId copied to offloading context. > > > > If not, offloaded phys cannot work with XPN > > > > Signed-off-by: Carlos Fernandez > > This looks like a bugfix, could you please provide a relevant 'Fixes' > tag? (in a v2).