Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4950831img; Tue, 26 Mar 2019 21:59:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPNcaiDx7nSj4197rZMQEXKA54NNEh+dCriKBON+f4x6TowTrZ9ZBcjjsJT8bEAAE/mT8B X-Received: by 2002:a63:df4d:: with SMTP id h13mr32146045pgj.220.1553662756944; Tue, 26 Mar 2019 21:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553662756; cv=none; d=google.com; s=arc-20160816; b=ACyz9QCUD2lPSBSZ/syKKMRGy7Xqtvoq6upVRCl0dqX7mQfyMR6MBqT8cqIfl9TeCJ IdxP0WpM4VdSvx0qn067IlWnhUJofDq/tCP8n75Bwe5hhRYbb2auclvBvEGB9hogmnmz FJuzUj84ybhFUQPzPK7mVJPkjHHFDyYx9ODw4YG32BWzT8AaUsPkNr/cfK4Ua/NRMM7D K0lCeEXcVSGSZoXYfY2OIn3+lzLBliI5WQqffOiIK3Kbgi8bzih3oR9ynpEPtqECuHWf wGE0mXl0zXuPBWyWuCzMyhDibM7NArWVDBmLISF+zA2n+GT1Z/RlqudfNgvBrEPrcdYE k0iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=o2u5DZ4Zhns37A+wXlrbLLO+lp3pWnWjDKKUlg+mxTA=; b=ATPLJw/suwgZFmx5emktKvUwZzjHxYwFGDlEO0QXpiriKb56iuMBkrFpoFLfQ74/2v 6os0GhOW27THv/0evb/dplwbHO2mkTbUnlAzlA+DEGcPFaRQzUA+z8FRBMyOgzFwEkIB HoCfCvKlVPsfwvSt61zy17DEUT5q3z95AFgnUDN7OWWFsVkQuYKxxh4a1yxnhd7vbrzS RXeytB8pewW+twExTBQqJlQCQrmUi3FNqq1S++gcVpiNC3nzjRWisWhjfWgIw6EsdXbn Gkw+iDFu9XiEZ0iiRzOsVfhcQ6yJT0DU4VkYbYV1LxlPh51w54eSaFeUsSzAPPuHvfd5 eX6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si4662710pgv.302.2019.03.26.21.59.01; Tue, 26 Mar 2019 21:59:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732018AbfC0E6O (ORCPT + 99 others); Wed, 27 Mar 2019 00:58:14 -0400 Received: from mga02.intel.com ([134.134.136.20]:62793 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbfC0E6N (ORCPT ); Wed, 27 Mar 2019 00:58:13 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 21:58:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,275,1549958400"; d="scan'208";a="156135964" Received: from yannluen-mobl.ccr.corp.intel.com (HELO localhost) ([10.249.254.205]) by fmsmga004.fm.intel.com with ESMTP; 26 Mar 2019 21:58:07 -0700 Date: Wed, 27 Mar 2019 06:58:06 +0200 From: Jarkko Sakkinen To: Denis Kenzior Cc: James Bottomley , Mimi Zohar , Joe Perches , linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, Mimi Zohar , David Howells , James Morris , Marcel Holtmann , James Morris Subject: Re: Bad file pattern in MAINTAINERS section 'KEYS-TRUSTED' Message-ID: <20190327045806.GD15397@linux.intel.com> References: <7cd8d12f59bcacd18a78f599b46dac555f7f16c0.camel@perches.com> <20190325212705.26837-1-joe@perches.com> <20190326113725.GA10898@linux.intel.com> <1553602220.3960.29.camel@linux.ibm.com> <1553610317.2900.2.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 09:59:40AM -0500, Denis Kenzior wrote: > Hi James, > > On 03/26/2019 09:25 AM, James Bottomley wrote: > > Looking at the contents of linux/keys/trusted.h, it looks like the > > wrong decision to move it. The contents are way too improperly named > > and duplicative to be in a standard header. It's mostly actually TPM > > code including a redefinition of the tpm_buf structure, so it doesn't > > even seem to be necessary for trusted keys. > The reason this was done was because asym_tpm.c needed a bunch of the same > functionality already provided by trusted.c, e.g. TSS_authmac and friends. > > > > > If you want to fix this as a bug, I'd move it back again, but long term > > I think it should simply be combined with trusted.c because nothing > > else can include it sanely anyway. > > Ideally I'd like to see the TPM subsystem expose these functions using some > proper API / library abstraction. David Howells had an RFC patch set that > tried to address some of this a while back. Not sure if that went anywhere. I think it'd be best to expose tpm_buf API to outside and allow trusted keys code to construct the TPM commands. It is a single consumer use (e.g. not like PCR operations where it does make sense to consolidate to the TPM subsystem). /Jarkko