Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3142454lqo; Tue, 21 May 2024 08:03:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvW5liEoocHH3huW5x055sWjNsT8dAmo4/80AWvcz1fAK13L17la0JsdUG2l7oSDg/aZq9NeyffF84Zfi/zORjhUk8gUeJ8cWPswfbkA== X-Google-Smtp-Source: AGHT+IGk2O+ZiQjXOXwBlEYjY4d8N13Lb1n04mcrHpcncjB6aVJU+/FMeUeyLjTaqjfUIbUXBVWm X-Received: by 2002:a05:6a00:188d:b0:6ea:afd2:b1dc with SMTP id d2e1a72fcca58-6f4e037e8acmr31342341b3a.29.1716303790201; Tue, 21 May 2024 08:03:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716303790; cv=pass; d=google.com; s=arc-20160816; b=PEQZcYFYZJ7y0uYHZdX6srE7XeIGCmN3rZyI1z6Jfa8zR9y5Sp0ZKSEqcSGrXRpKLS KpJxUjQGDFpifhY67PDBtbbXIGD1mhovp8fJGNY/CboVrskfyl79bDTOMeGpGpNgfc6E R5SQExF5UytPOyhN7b5GAFdXMGq8EuCSlciuOspvbCmJrkUxI6jSzlqh7NbcKjb6kVdt 4giwHltx3pQRytmeP39CuQ0MHSIjs84QhItMIu0MCEbJtr4n77IUejFpqQyTcL1MG2bo vRapuLYpU6DWhXOnWdJVI9nJ70OulL1nIeeiG8aoVrkO9tkVGeFbK52W++NpOfe+NYNj MdUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=7CX4e5kECR8obzUfr6au+s7GLvTIXta/GoTdohRTkp8=; fh=Cu9vQ7qt/4Y546Z1b+HIoM5QJbU8yAX2qnQgeBfbQjg=; b=bsCipu8OeX+ybZwW/Ob8OKrx+HgMx5Uylp0B7jKjRMP9UtUrF1CXZ3dZwIkFU5d87P 7hecXXlhNu3LBKEATUOVtTsY0jlYiHLMoiqabMp9EJQmM2JzY/ie4V0U8nJmim1BpqtT CbF339j44T1fiUYAEXdOYKmjQbpRTsasHdYqm8ixvinNKrr0Nuz0p0s1qfpdaFGzGZCV b3YVItWinv8xMfO+zpO6H4yfkqcWPla3iouTRjQRCIqHXcQZ4zoC2pDJO57is3K/PMWp fmLnkbVhYZXAiy6/xsAVnWVcFaYctdCW8M+BGg17d4u8qBegiFIf4prkeNT5GRnKQIpz 769w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G/Awd0Bh"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185129-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b1bb4fsi22296323b3a.278.2024.05.21.08.03.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 08:03:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185129-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G/Awd0Bh"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185129-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 53836282F91 for ; Tue, 21 May 2024 15:01:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 378C87F7C1; Tue, 21 May 2024 15:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G/Awd0Bh" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FFC814A8E; Tue, 21 May 2024 15:01:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716303679; cv=none; b=rc+7Ma09vlBG94GqnGgRzubIOnSqIe7qU+bJG5DM93vn39YCiL9rJi4MzWOQdsW0dpiHNQiitq83MxmcFFKKspR/Af2Me37AkcoCICFp6BfGiBwpYcy60Om8n4Mpa4PID7IXfLHT3CJNSMv/SIVk3skASaQTMOHdW5tg26HUYWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716303679; c=relaxed/simple; bh=yGL1b5jDn2L0XbTPDWxQIH214UessiBnvjxazrUzlj4=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=eUm+zR60Gpd7W9E6gZFPcDJxeBQvcrPu+Er20xhUqWKZXlP5AGNOTdSHgXA0Xb7Nx7nINhaSbeJKMCE/xFlhBnyCRs183MbI9dx8rtDPn1WUPyIHqNE5lIXEcX38rbCqUnN+SIhmYJdvepaBcQjekntXMn/4kPug6uYO8f+v5vQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G/Awd0Bh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A618C32786; Tue, 21 May 2024 15:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716303678; bh=yGL1b5jDn2L0XbTPDWxQIH214UessiBnvjxazrUzlj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G/Awd0BhJdtU2Yi4LJvaYBBW6Ua1Yvtvc3AWUhHGrRs/dOMJAXA8/GhdqMxyDEawl AWC8JG0wtbbxB8j8YvHjV9wD6uVTMh82oQ/CpPoUKTdWoms9oxaKNOcb7IgUomrFbl NPfgWGgppkzVudXAHnyX9xno43pga2E5vxG9zQn4bia8lqVrmXa0luHbF0bisZl/cy sUjJHQhb9HATp9Jsm2LuffcWwk40aCWgH0syWicGBwL2xitfnt//g/5jleXYPGA4c8 U3Hvw6CLiM8LmsWofVFA3A9GcCLiHNGY5C/Gpu4WyhLVW8zWA4oMOIgOGknSoLHAwc lHwF4lvQ2bB2g== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 21 May 2024 18:01:14 +0300 Message-Id: From: "Jarkko Sakkinen" To: "Jarkko Sakkinen" , "James Bottomley" , Cc: , "Peter Huewe" , "Jason Gunthorpe" , "Mimi Zohar" , "David Howells" , "Paul Moore" , "James Morris" , "Serge E. Hallyn" , , Subject: Re: [PATCH] tpm: enable HMAC encryption for only x86-64 and aarch64 X-Mailer: aerc 0.17.0 References: <20240521130921.15028-1-jarkko@kernel.org> <236606947b691049c650bdf82c37324084662147.camel@HansenPartnership.com> <854fa2e1634eb116b979dab499243e40917c637c.camel@HansenPartnership.com> In-Reply-To: On Tue May 21, 2024 at 5:35 PM EEST, Jarkko Sakkinen wrote: > On Tue May 21, 2024 at 5:26 PM EEST, Jarkko Sakkinen wrote: > > On Tue May 21, 2024 at 5:13 PM EEST, James Bottomley wrote: > > > On Tue, 2024-05-21 at 17:02 +0300, Jarkko Sakkinen wrote: > > > > Secondly, it also roots to the null key if a parent is not given. S= o > > > > it covers all the basic features of the HMAC patch set. > > > > > > I don't think that can work. The key file would be wrapped to the > > > parent and the null seed (and hence the wrapping) changes with every > > > reboot. If you want a permanent key, it has to be in one of the > > > accessible permanent hierarchies (storage ideally or endorsement). > > > > I'm fully aware that null seed is randomized per power cycle. > > > > The fallback was inherited from James Prestwood's original code and I > > decided to keep it as a testing feature, and also to test HMAC changes. > > > > If you look at the testing transcript in the cover letter, it should be > > obvious that a primary key is created in my basic test. > > I think what could be done to it in v3 would be to return -EOPNOTSUPP > if parent is not defined. I.e. rationale here is that this way the > empty option is still usable for something in future kernel releases. It was actually like this: if you explicitly set handle to RH_NULL. Have not used it a lot so did not recall this. That said I'd actually just take away any special substitution logic and use any handle given by the user space as it is. BR, Jarkko