Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2242719pxb; Thu, 3 Feb 2022 02:29:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2ZUrkSTIFeptTFE3fiJNqEF/Z/SigMQH99XU6jBZq5K7BWVf8ZTB3VoI1aOEvW40ZF+K+ X-Received: by 2002:a63:5166:: with SMTP id r38mr27720151pgl.99.1643884180336; Thu, 03 Feb 2022 02:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643884180; cv=none; d=google.com; s=arc-20160816; b=kFAP8ibpqw/byo1wzc4XDWabeN3r9pDVhAy5JK5SrOoib+OoDI6ozdXzm66GI40Nt5 MlmtQqTF2t5Cs2GBlU7wp6NATHdeu65jIJAWXx8LyZRWmgdaTYKLBn6b491rLEz1u4Yn Jt/2VqSnaIFvqGS7Vv3j+FrzwD5zfCUCwHaxKPsJfrT9eMuTS/9M377Pz2GszwXkIg0R OodloC/Ej93MbPgc/8i7RAp498y61C9MQhmM8UYZeNhNQNOUKbaUmHwqf4SkbUVVqQGq jjzXxV3v4J40qmwZzSvjNk/Xa8lod9ck0537QTSVTVKpH45+Di4v2og03vBjvnGRyCDZ X3Og== 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=oAx4tea4gU+ph2qsMKy11PzCKAhCH3M6+a5vwHPvxF0=; b=cNLyG1SBBAGQFyabNIcRR/+VJBqN5tDK1S7b6kkbAoc7qgwm9uUURo1zauZr8eDqL3 rCei+lwFqujPsjtVjB9NGxphRfJLYKrD/wv+/ahnHd94dJ1mKgV7XP2JCSvnubp1dsGv UA7SteoWhFVPBwEYrUBGB+9aY3OrM/58HBQZKg8LO8NqRkpJeTQ50qNEr95hbTlvx7JX fc+8IlF71kYEKC5czfAy2faR8Hu0K7fPDlM4uA92HgQxTyswtUFTyfBHEUxytzCHeJiR nLn2uh4KtOVgxHXSyMlD9n0VO8U83Vrr+DUyODlZPzxjTEKD4K0aZp3Q7WIMBGetMq4q dFdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NWq3wHvl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2si23648339plg.192.2022.02.03.02.29.28; Thu, 03 Feb 2022 02:29:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NWq3wHvl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245142AbiBBIpZ (ORCPT + 99 others); Wed, 2 Feb 2022 03:45:25 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24131 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245111AbiBBIpX (ORCPT ); Wed, 2 Feb 2022 03:45:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643791523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oAx4tea4gU+ph2qsMKy11PzCKAhCH3M6+a5vwHPvxF0=; b=NWq3wHvlOsn6V6rPMrnqSM5OjCqr871pwLqBrLWcn9+ccvazWXYG4xYUa3vIV+lMBhhIsf OFN4QEJudyBvQzBfzOA/IUKdjrWwy+nBVHncTs/OD2IDz2DlUF6fhouESUvkYEsp1ic8we NigJsGna3YY+CzKBMITpADHGZJvy0Sk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-484-Ua6dXLfSOLKQ6kelMviBtw-1; Wed, 02 Feb 2022 03:45:17 -0500 X-MC-Unique: Ua6dXLfSOLKQ6kelMviBtw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2121B1898299; Wed, 2 Feb 2022 08:45:15 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9AE116A5A; Wed, 2 Feb 2022 08:45:14 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 107F51800397; Wed, 2 Feb 2022 09:45:13 +0100 (CET) Date: Wed, 2 Feb 2022 09:45:13 +0100 From: Gerd Hoffmann To: Dov Murik Cc: linux-efi@vger.kernel.org, Borislav Petkov , Ashish Kalra , Brijesh Singh , Tom Lendacky , Ard Biesheuvel , James Morris , "Serge E. Hallyn" , Andi Kleen , Greg KH , Andrew Scull , Dave Hansen , "Dr. David Alan Gilbert" , Lenny Szubowicz , Peter Gonda , James Bottomley , Tobin Feldman-Fitzthum , Jim Cadden , Daniele Buono , linux-coco@lists.linux.dev, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 3/5] virt: Add efi_secret module to expose confidential computing secrets Message-ID: <20220202084512.2errjezf7ugrhntr@sirius.home.kraxel.org> References: <20220201124413.1093099-1-dovmurik@linux.ibm.com> <20220201124413.1093099-4-dovmurik@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220201124413.1093099-4-dovmurik@linux.ibm.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > + s->coco_dir = NULL; > + s->fs_dir = NULL; > + memset(s->fs_files, 0, sizeof(s->fs_files)); > + > + dent = securityfs_create_dir("coco", NULL); > + if (IS_ERR(dent)) { > + pr_err("Error creating coco securityfs directory entry err=%ld\n", PTR_ERR(dent)); > + return PTR_ERR(dent); > + } > + s->coco_dir = dent; > + > + dent = securityfs_create_dir("efi_secret", s->coco_dir); > + if (IS_ERR(dent)) { > + pr_err("Error creating efi_secret securityfs directory entry err=%ld\n", > + PTR_ERR(dent)); > + return PTR_ERR(dent); > + } > + d_inode(dent)->i_op = &efi_secret_dir_inode_operations; > + s->fs_dir = dent; Why have two levels of subdirectories here? Do we expect more users for the coco/ directory? See also the naming discussion in the cover letter sub-thread. take care, Gerd