Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp86868ybk; Thu, 14 May 2020 17:05:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD3TMs3c6vewZX/NvkAjb4LycVkxDKvWyKdQatFRk0niclqLtPIGNnqINyLlcyzGJ9U3IK X-Received: by 2002:a50:ea87:: with SMTP id d7mr528355edo.48.1589501126068; Thu, 14 May 2020 17:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589501126; cv=none; d=google.com; s=arc-20160816; b=dvwyTtM0qHrO1wRiAtbja64jMQY9MaLIFHDUmxfJiRXN6dEoBtfvbq4ehkVLtUW12A xJWNTwMPbFIVbhIKJB7xZpLDBFkNA0IRbwpIVuWY9yitMI1ZgFoB2c61J098Xb9wnxb+ 5yI00aeP+eyWVNCzGTp2KrIAABhkX14oGXXHWK8uS9QBZlrhx8F7Nh9AoC86///wgUA5 ADTNDvKMvV58wAT+sAzIZGymyMOzVulhJhWWFaCiaXhmWG9CSmFsX93RNsO8qAmDH9Qr sPAQaS3YqwRYMW6Koii2mqZSCZp3ydKjKOCHUYoztF8H7sib6u9XZu0b8HtHQoqtlwJD 3lTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:ironport-sdr:ironport-sdr; bh=28KhTaV9hS/DTXH9GHdnL0vXrHooo1CF8q/ka6Tt87w=; b=FZjn/2EFcWqaYaUtdsdGOYLLiEd47lVYrmK2OIHVTr0MU83meF7FkPo0HPzQldjU7O ThF+MY/xAavsVZN+96G1s9PrGpw015HzZ+PQNMFm0Vqeqmh60S9RsJTfjcYEid/5zyaV jjae0HnfFK3w5d/cVSaOb5/sGCJqpRt+f+D7/NNFl4ahDOHCUvMpt873bu+5zVuIJCsD e3grTXVSGHesfIdTlDA9nI/ApDCcNXfWKroUg1Xk6uOjaQdF4jSsmveEM8bagf8Pw2TH sy1nCd1qqKH38ypJcfWH8GcdkdnXbtFv4HDnJAQdSU66/vWGTsJVsT282fJOVlt4d/ML vs4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l20si237764eji.236.2020.05.14.17.04.51; Thu, 14 May 2020 17:05:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728068AbgEOAAs (ORCPT + 99 others); Thu, 14 May 2020 20:00:48 -0400 Received: from mga07.intel.com ([134.134.136.100]:17357 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbgEOAAr (ORCPT ); Thu, 14 May 2020 20:00:47 -0400 IronPort-SDR: qid2dEkSCvK+pyM55tMfjpyqTHN9m5Sqx+mMxHdlRszjyYJxVsFjxkCoU9OJrs4T/UrAm0WAw1 ZgQr/rp0a4Ew== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 17:00:46 -0700 IronPort-SDR: ca6NGik9rwL5TfUuopCMa37yfmw6w+5tfFEmLEcDsO+j+WiMzKp0s+BHsnCUEhu0AryC6eHS/K TorQLC+Wgq5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,392,1583222400"; d="scan'208";a="266421400" Received: from ashadrin-mobl1.ccr.corp.intel.com ([10.249.38.112]) by orsmga006.jf.intel.com with ESMTP; 14 May 2020 17:00:37 -0700 Message-ID: <956b284c2b144313fd158de75cba510eb98f71bf.camel@linux.intel.com> Subject: Re: [PATCH v4 1/4] KEYS: trusted: Add generic trusted keys framework From: Jarkko Sakkinen To: Sumit Garg Cc: Mimi Zohar , James Bottomley , dhowells@redhat.com, Jens Wiklander , Jonathan Corbet , James Morris , "Serge E. Hallyn" , Casey Schaufler , Janne Karhunen , Daniel Thompson , Markus Wamser , "open list:ASYMMETRIC KEYS" , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Linux Doc Mailing List , Linux Kernel Mailing List , linux-arm-kernel , op-tee@lists.trustedfirmware.org, "tee-dev @ lists . linaro . org" Date: Fri, 15 May 2020 03:00:25 +0300 In-Reply-To: References: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> <1588758017-30426-2-git-send-email-sumit.garg@linaro.org> <07bb6080f8be9f6613f460e2d6e19f3d456e219c.camel@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-05-14 at 16:53 +0530, Sumit Garg wrote: > On Thu, 14 May 2020 at 05:55, Jarkko Sakkinen > wrote: > > On Wed, 2020-05-06 at 15:10 +0530, Sumit Garg wrote: > > > Current trusted keys framework is tightly coupled to use TPM device as > > > an underlying implementation which makes it difficult for implementations > > > like Trusted Execution Environment (TEE) etc. to provide trusked keys > > > support in case platform doesn't posses a TPM device. > > > > > > So this patch tries to add generic trusted keys framework where underlying > > > implemtations like TPM, TEE etc. could be easily plugged-in. > > > > > > Suggested-by: Jarkko Sakkinen > > > Signed-off-by: Sumit Garg > > > > I tend to agree how this is implemented and could merge it as such. > > > > I'm just thinking if we could refine this patch in a way that instead of > > copying TRUSTED_DEBUG macro we could just replace pr_info() statements > > with pr_debug()? > > AFAIU, TRUSTED_DEBUG being a security sensitive operation is only > meant to be used in development environments and should be strictly > disabled in production environments. But it may not always be true > with pr_debug() with CONFIG_DYNAMIC_DEBUG=y which allows the debug > paths to be compiled into the kernel which can be enabled/disabled at > runtime. > > IMO we should keep this TRUSTED_DEBUG macro, so that users are aware > of its security sensitive nature and need to explicitly enable it to > debug. You are absolutely correct. /Jarkko