Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3137718lqo; Tue, 21 May 2024 07:56:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSPH5j2RZOG8smp5p9mZMY4BIQS2LuZdgq95g0XZ1+QOyS6vVA1gDpBNZMpsBgZ6yQpKAnkV/1RBI+D88OTbWivq5xCVRVM5HKaFtVkw== X-Google-Smtp-Source: AGHT+IGteoPvElusDTFiDVuf5pIoZyTlQjv0RU04ARdcHKkoUGHve9gIQ+UuppGroVp0aiIpxDqM X-Received: by 2002:ac8:7d45:0:b0:43c:7840:52fa with SMTP id d75a77b69052e-43dfdcd7c74mr328295991cf.48.1716303402156; Tue, 21 May 2024 07:56:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716303402; cv=pass; d=google.com; s=arc-20160816; b=i2EU397uH//sZzWw1HQ+/yaTbAhs07SAvNcktm0BNNYwa3BM6XjVOOfvVKFhYWXglM 5hVqJxKhPrd8Jj9CLjkJY4ByJsNjmLKeHa9TnxoElAkudRK6DjcR1I9G3UCcgsWgkGKC 95tzUJnlG2d/83a85VcnjysNSgOGPBlgejaL1TX4hLbyrVZ5kNWQ+hD7NMZvD8KBShGd P6rwJV/XISeuDGH54UV82keebOGnBqk4tG23nT3qv4p17A8c4Mr99c2IyvBMIJglLBDk tNlTXVc+ldS2hn0Z65tKIizOK3acCRQbWYLN7Mf3s+ds3gNq1Aj3NV4Kuo19V2FdYCo4 m1+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id:dkim-signature:dkim-signature; bh=i/0+6qdvlGy1O3YftsUrgIuAOSwb7QCIt/GojupWGdc=; fh=YzsT43EHd9HD5A6MxMXlZoLdWI4jcz6fjLfMiv4JsoA=; b=G3lcxzpHgZncudnmA+yqRQNb03KiEK1KjmRdM/9/mpJgvBUE/5qg5AVsaoIW9CcJHl VbRuSLpZ4AY7HY5fzGRQitICyLqoAdf+ngFLofl0duWenEsjWyZEiYZYaFNMO//k2EKb /q1rhvI0dU66CfHcj/vCcslqFRD3ok8EBEw0SjJzFEsIWPm0PjvWQ/GKme4LL14Dq7D1 D4ayNAt85oetWln1iTAUZ4FtXzU+rR555hxBf8VgEMdS7f4fjdMqalCy0ktqfjIQKE5Q 6rcg/iFMzrxWbDNSU16kXiXHId7aOBUaH4+oG4lyslapI3ziP5LY8MwiHwbSACd74O9f A5Wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=BkLcEJQC; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=BkLcEJQC; arc=pass (i=1 spf=pass spfdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dmarc=pass fromdomain=hansenpartnership.com); spf=pass (google.com: domain of linux-kernel+bounces-185124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185124-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43dfe705bd6si11692501cf.466.2024.05.21.07.56.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=BkLcEJQC; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=BkLcEJQC; arc=pass (i=1 spf=pass spfdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dmarc=pass fromdomain=hansenpartnership.com); spf=pass (google.com: domain of linux-kernel+bounces-185124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185124-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DB8221C21C8A for ; Tue, 21 May 2024 14:56:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1509142E6C; Tue, 21 May 2024 14:56:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="BkLcEJQC"; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="BkLcEJQC" Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [96.44.175.130]) (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 9FFA81E87C; Tue, 21 May 2024 14:56:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.44.175.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716303394; cv=none; b=nDuDVjZPn5Gzc9/Z6pPqsL0VQ1nGlT6Vh92NprsyKuvrkV9d778uiiDfQLbJ5z7xllPZXjqPYHu4ROXJKt859icKZaxSYqPIeGFLqLLMAPnz5Mc2WNZHlY3u1tt2SbBspCiYalFzOSsQVRrGpw3gaU0XQzM6rTMnkQ+bS7HQpA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716303394; c=relaxed/simple; bh=Sm/mlcq4N0CjbXbXms+PR2JhxxOwu8RQ4iQWhN0v6DE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=rQSh1bYxH+o4DDe1/8W2qbwk53tEuGILq1ufjYEsGpoXDuud4Gi367PAWZnN7TjCZe/7ygIIYxSE7FexuoGgBlTZ0DXgbZpHn916Ac+6nDn17d0iQ3pxrZtmKS9OCRFjw21ojkfkdHFhe4Ef4P6RuHb3FlBnH1E3bRruJ7qEtLU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=HansenPartnership.com; spf=pass smtp.mailfrom=HansenPartnership.com; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b=BkLcEJQC; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b=BkLcEJQC; arc=none smtp.client-ip=96.44.175.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=HansenPartnership.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=HansenPartnership.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1716303389; bh=Sm/mlcq4N0CjbXbXms+PR2JhxxOwu8RQ4iQWhN0v6DE=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=BkLcEJQCjQ/Tn8vfiRNAYOFowecqJtj5cpfdt5HhDPQW3fuYzexbBWDc/9e9lrDgW XE8/4mjeIc+DDEGe8Pav9v+Q5XzXPFmyb7wbKanJ2ARuzaEKCV1SzptbRYr3Be3MRt fWFykveWPfa6fGAq1a1J9+92QH3fjeozhsVnBQao= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id DDFC712813BC; Tue, 21 May 2024 10:56:29 -0400 (EDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavis, port 10024) with ESMTP id R_nsAii9qvM6; Tue, 21 May 2024 10:56:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1716303389; bh=Sm/mlcq4N0CjbXbXms+PR2JhxxOwu8RQ4iQWhN0v6DE=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=BkLcEJQCjQ/Tn8vfiRNAYOFowecqJtj5cpfdt5HhDPQW3fuYzexbBWDc/9e9lrDgW XE8/4mjeIc+DDEGe8Pav9v+Q5XzXPFmyb7wbKanJ2ARuzaEKCV1SzptbRYr3Be3MRt fWFykveWPfa6fGAq1a1J9+92QH3fjeozhsVnBQao= Received: from lingrow.int.hansenpartnership.com (unknown [IPv6:2601:5c4:4302:c21::a774]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 4880F1280728; Tue, 21 May 2024 10:56:28 -0400 (EDT) Message-ID: <0da89df455617f4dc1c7fdb8890e3219cfce4f7b.camel@HansenPartnership.com> Subject: Re: [PATCH] tpm: enable HMAC encryption for only x86-64 and aarch64 From: James Bottomley To: Jarkko Sakkinen , linux-integrity@vger.kernel.org Cc: keyrings@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Mimi Zohar , David Howells , Paul Moore , James Morris , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Date: Tue, 21 May 2024 10:56:26 -0400 In-Reply-To: References: <20240521130921.15028-1-jarkko@kernel.org> <236606947b691049c650bdf82c37324084662147.camel@HansenPartnership.com> <854fa2e1634eb116b979dab499243e40917c637c.camel@HansenPartnership.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 2024-05-21 at 17:35 +0300, 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. 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. OK, as long as this gets documented, I'm OK with it > > 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 beobvious 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. You can absolutely have null derived parent keys (I use them for testing as well). However, the spec says the parent handle in that case should be TPM_RH_NULL (i.e. 0x40000007) not zero: https://www.hansenpartnership.com/draft-bottomley-tpm2-keys.html#name-parent James