Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3125980lqo; Tue, 21 May 2024 07:36:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUsWiounjvaMxSASBS3OAaH8uVSU66rpmCE8GG9HBqg8sW+eC1WcTuEGZxqc+lApNzvKVWLR9cC7o94KprLOWSJ3H4KocV2KzzkQhlUQQ== X-Google-Smtp-Source: AGHT+IGYyCdXF+QS5UUK32a160kce5N9MSRE2roGuwqUFVKRFi9mVJU5eloXnXq2eTfrYnYT56c/ X-Received: by 2002:a17:902:e841:b0:1f3:14e7:8bb5 with SMTP id d9443c01a7336-1f314e78e0dmr6174565ad.62.1716302198548; Tue, 21 May 2024 07:36:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716302198; cv=pass; d=google.com; s=arc-20160816; b=gwaJ4Qr/agtj4cRcCpYG+IXSFA3TGnT2E5VES5eL4tXEX3hNUvS59ns6VpRNKqbMl9 62LpNRz1ceUQzJlCCrGXl/1a4cBjYYQP0D+JbsGABKKnYuCWZmCEQ8e/IoJkQ+7DZyWQ kQ5gaIPg+KrKEsD52BCX+Y5DRrC/ikjY5H5J27LbAXo4u8HnQ/5qc5ugJAcKDiarP7fe 1azeou4WHFAvP9O43AB1wBoS2/F3nVU8LWgPNdEz7g4Bh8wCPijl776M1BSwJFdRjxf5 Kfq6CDFRsnoPX+enkQGHBAWkRy5Czprx61NNovtgJJCkcqFFNzDTnq+XrOcqow/Bcer9 FHXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=tSHFN9MmOX4ZjtYYv5cTk6tn0za0bOxd2NNVNCnQru8=; fh=Cu9vQ7qt/4Y546Z1b+HIoM5QJbU8yAX2qnQgeBfbQjg=; b=y4AzhNcPB24GQNv+kqUGgCmWQQMyWkcQKMVb8mrGCInORVrcw654U1p9+4Noov6N9P E0Gi6i+kvMioJOnoWHkGCSeweMGn/PaXaRvnXd1NLW4suIOWm8GqB/RllKtIcbPo8Hwj o2gJunJH3FAAyiU7qCvUNzUCabUJ39R697o4CcCj4NcN6DePWcDTf06Ro8TFN4+raQ0d jl+oQW9uq+4XMCC4cLoIHvf7lRJeA947cbsY8FS9RW9lHu1iZffO0h/7zFvkh7Fku+L2 K3LyO/Fe45kLXgNgGtotKyECW5MPikpudOYqkSvTkN0Xc0noeC8RLVLnvg+8AI1dp95S jAFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qjteVsoZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185102-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185102-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 d9443c01a7336-1ef0b9cf5f9si255698285ad.52.2024.05.21.07.36.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:36:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185102-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=qjteVsoZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185102-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185102-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 8EAEA283F86 for ; Tue, 21 May 2024 14:36:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90F01142633; Tue, 21 May 2024 14:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qjteVsoZ" 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 A64C8770E3; Tue, 21 May 2024 14:36:03 +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=1716302163; cv=none; b=YG48pXGZ69eIRp7hJtNcxjn2EtyYe64uxVnL0ts81vc0z6kpzLASERRBW110bV65osgym2G9OmkuXM8fyaQmoJWrFLu/jCNhnElseDgSH2NEtB1gG9rSg+NhHb39WNKUsmdY/F7tRhmJ56rH9l501AhDgJOWXC39992lPyTbPkk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302163; c=relaxed/simple; bh=RlmedU54B/pEtKxQ1cWw542mGW2hc1W+zR6UyQwC5ZU=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=Lzw9NrfRDxdLr4kovZV2QFr/fofFWwpCq+5UrypnX2YPp46d0SuHxnBpbkvRj4GXIccnHKmUO8IrPZPOA0c3SADTItHF+I3c+we9tHpdb+ljSn3SiPUCla51UzPEGZjI4gMsh4LHiXvaC8ppbreBI7PuE/jniByygemyHvlmUpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qjteVsoZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 474EEC2BD11; Tue, 21 May 2024 14:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716302163; bh=RlmedU54B/pEtKxQ1cWw542mGW2hc1W+zR6UyQwC5ZU=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=qjteVsoZFJcw241JzJH/c4XWJ/hgPp/Kis2rrniY5zEcRlQ+PUoAt9/ar6fu26XUh Uefv0vC/HoFJ/d/mHMKwgYm9kg7bPEoDrjcFEgRVl1YOKqgmuC2iqYLyXjCgAl5zUJ MB/kdF/Ck0qVmHE13SGCUYf7kAqgKcXLVOrCTOrHqinTyPt/o2yFRoY+XNF7uUFUGc pdXEoRHMr/iCPOBFH4/Q/MRcj0T+D4U0yolkypMD66AUo1fOAy6DF/Sw89IayZXyU5 BvUwGoy/oUnoB7HZhs9MSCc3Dy37Y6cUSOJ+hFZ74AbJG2Xc61RhRBVblGRsPF6HDm QajseZDX5Wetw== 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 17:35:58 +0300 Message-Id: Subject: Re: [PATCH] tpm: enable HMAC encryption for only x86-64 and aarch64 From: "Jarkko Sakkinen" To: "Jarkko Sakkinen" , "James Bottomley" , Cc: , "Peter Huewe" , "Jason Gunthorpe" , "Mimi Zohar" , "David Howells" , "Paul Moore" , "James Morris" , "Serge E. Hallyn" , , 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: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. So > > > 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. BR, Jarkko