Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp524872pxb; Thu, 2 Sep 2021 09:15:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykcupTSybJcgeP3AoktQoXTCXUNqq20pBsjlJ89nZPEl7xuKCVSLR6IB5G0AT23iscA0/8 X-Received: by 2002:a17:906:4acd:: with SMTP id u13mr4520481ejt.255.1630599306113; Thu, 02 Sep 2021 09:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630599306; cv=none; d=google.com; s=arc-20160816; b=Y56C0veq4MgKnifwoFbzDK8U56xPHfep9DXfA8fE/cUdccvvm9QJ3ekfRD4SsxxfWa zz8Zs274sFfzLzE87wGqsKKY2ngKD5sm3PBW2u9942OTxiZM9leUsx2dGnbvFtl+GSth hiewM+Gh+lGUIAfMHED9C01fYXDVKF84efTBLW/gA1DZUu3mVpGwJtGZybCVIhzlYo6q uYLZqsJdUqtYp/0GNvirAyV1Et/bHSO8PbZfQ3BML0b+69TvUvkxUPJdTQABWA7xzS20 65u08tEc4yffBy9RMpGqp1o1yoxFsu/CXz4LcK1pkI5i0/u5XhVOSaGcd1/aRMCjrAxm zuhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WGrbnOdQAgGCacUavYA4nZBGpnjCumoUL8fnbOOxqTg=; b=rAJa7+CidBmiPA4K5D2SB/1ISuhqG91QCNekvssfGzaEEHkaDiHlOp5HJh7aMOnZ2n aV3Qwv4hKRe12iUFWYZLE46KSuoiF1sW3msgR1Xg4E4CihQWau5O+606BQRJsLpPzbHG Ks7aGSO0UHRvEnIf0In70bkPznawLWjN1DYVCI05zEYCoClYgB2peUudMj3H0/h5WdH8 UKDZ1cUVQ7xTfZ4yoZJiQVpRHRgbTz7Z33dBSVMxKPxmswROERlX8dCyo9toqNwVL6IB u1GQCVfYsPXZqoCd5rf0vRTZ08X7t54SyGGdfnkqw1faiSvVe2jdvyC4XNr6FrqHeDHJ Kp2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H3huLCLO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si2508667eds.281.2021.09.02.09.14.12; Thu, 02 Sep 2021 09:15:06 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H3huLCLO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346143AbhIBQK5 (ORCPT + 99 others); Thu, 2 Sep 2021 12:10:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:47946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346141AbhIBQK4 (ORCPT ); Thu, 2 Sep 2021 12:10:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B9FD611C9; Thu, 2 Sep 2021 16:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630598997; bh=/5UEuLAytnt5h7xW3EIC33ctR6wPCwVOZCQqcgqkvJg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H3huLCLOSmazG/5QL6tOukwBzqhEhmvrvweD5QX7WpGSb80FZTVji9JsXvpP/KJSM 27OHF5mWoJasjVO2lZXS5uK9+29vt9/0xHr7AwvYTVGNbUkHpONqeyausOkUWezMT9 ufKX6+ofNkXG5ymMspm81ZMB/qb9/U8PiQfJDAYU= Date: Thu, 2 Sep 2021 18:09:55 +0200 From: Greg KH To: James Bottomley Cc: Dov Murik , linux-efi@vger.kernel.org, Borislav Petkov , Ashish Kalra , Brijesh Singh , Tom Lendacky , Ard Biesheuvel , James Morris , "Serge E. Hallyn" , Andi Kleen , "Dr. David Alan Gilbert" , Tobin Feldman-Fitzthum , Jim Cadden , linux-coco@lists.linux.dev, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] Allow access to confidential computing secret area in SEV guests Message-ID: References: <20210809190157.279332-1-dovmurik@linux.ibm.com> <6cb65cb3bd69ae69bde044f809525e478bdb8512.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cb65cb3bd69ae69bde044f809525e478bdb8512.camel@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 02, 2021 at 08:19:51AM -0700, James Bottomley wrote: > On Thu, 2021-09-02 at 17:05 +0200, Greg KH wrote: > > On Thu, Sep 02, 2021 at 07:35:10AM -0700, James Bottomley wrote: > > > On Thu, 2021-09-02 at 14:57 +0200, Greg KH wrote: > > > [...] > > > > Wait, why are you using securityfs for this? > > > > > > > > securityfs is for LSMs to use. > > > > > > No it isn't ... at least not exclusively; we use it for non LSM > > > security purposes as well, like for the TPM BIOS log and for > > > IMA. What makes you think we should start restricting securityfs > > > to LSMs only? That's not been the policy up to now. > > > > Well that was the original intent of the filesystem when it was > > created, but I guess it's really up to the LSM maintainers now what > > they want it for. > > > > > > If you want your own filesystem to play around with stuff like > > > > this, great, write your own, it's only 200 lines or less these > > > > days. We used to do it all the time until people realized they > > > > should just use sysfs for driver stuff. > > > > > > This is a security purpose (injected key retrieval), so securityfs > > > seems to be the best choice. It's certainly possible to create a > > > new filesystem, but I really think things with a security purpose > > > should use securityfs so people know where to look for them. > > > > knowing where to look should not be an issue, as that should be > > documented in Documentation/ABI/ anyway, right? > > > > It's just the overlap / overreach of using an existing filesystem for > > things that don't seem to be LSM-related that feels odd to me. > > > > Why not just make a cocofs if those people want a filesystem > > interface? > > It's 200 lines or so these days, if not less, and that way you only > > mount what you actually need for the system. > > Secrets transfer is actually broader than confidential computing, > although confidential computing is a first proposed use, so I think > cocofs would be too narrow. > > > Why force this into securityfs if it doesn't have to be? > > It's not being forced. Secrets transfer is a security function in the > same way the bios log is. Is the bios log in securityfs today? Anyway, it's up to the securityfs maintainer (i.e. not me), but personally, I think this should be a separate filesystem as that would probably make things easier in the long run... good luck! greg k-h