Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2046186ybh; Fri, 17 Jul 2020 08:04:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywwoh6kksRj3ccZd4rltpAcPBhnT9OhQflWDEfMO2G8QagN0+ezFNrmIiaFslOd6kWZ3DK X-Received: by 2002:a17:906:1f94:: with SMTP id t20mr8754560ejr.233.1594998243203; Fri, 17 Jul 2020 08:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594998243; cv=none; d=google.com; s=arc-20160816; b=cZFygLTUXvvIjQrMymD5Y4zC3O+SBMR2/Nx4e6GpT8oY5r58AMpxR5xmpLiqQM16jX jJ5b7XF7gPxc+DyK1C/ONvbchvAFhH1NGypcYvyKpeZZl5BpkUlDXlqX36hC9aV1vy4/ FRBNFdHQy5DPGzJkxrI0NzPi74ytwXDlLZelOPpU4Sgikmiwqtf6UbL3snCmxj1hLYKX euUT8yxDZY2p0n8Vs4vqFbuicmh0vkRUiGijCzzzByqKdZtwx1a9+dQcehf/BKtQf8w4 V1XU0VCap/P55FElP+4X5tPF7gFqG55fIMN0GI7URN2Hf4p6G2GYwkWBhdN7NTUhk5gy aOng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=AeXniOdIVLZ2etfpDXoLpqoWBfdfVUTCq11pYcT8ij0=; b=h43FQhArHXYdZLVn4CcgI10945fBR0k0+mi6Ee4J8DEQL8gm7OoQ23CEa+TmjoFS1X 6NCIOL7u4RMDj/eAOX1l8MGM260qgd5Lb7Mp7bswgu8Oc+r3LcID6sMxjDUZz0hEaBkl daEwVkHzqIXlmkZR1is+nOpEADcy+fi3gWsJnRL3JW1khuSohqadNQS5BISNclcfW/HH J37XmygxexDCLA2fcVO3UgfdePN+T+DHTgPPG3ElEnStjay3vapK0tGFiLvBS4wRhlAD CoGsxmQr1m7g7FYn3CNAeXuwhpPU1BmPDkWQN225kPcSl8tiN1/9Hr2os2vK0RinaK7+ 7oxw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si5704727edl.596.2020.07.17.08.03.39; Fri, 17 Jul 2020 08:04:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726856AbgGQPCm (ORCPT + 99 others); Fri, 17 Jul 2020 11:02:42 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:50375 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbgGQPCl (ORCPT ); Fri, 17 Jul 2020 11:02:41 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MGzDv-1k14aZ0OaR-00E6Xh for ; Fri, 17 Jul 2020 17:02:40 +0200 Received: by mail-qt1-f176.google.com with SMTP id e12so7815476qtr.9 for ; Fri, 17 Jul 2020 08:02:39 -0700 (PDT) X-Gm-Message-State: AOAM532iyuImKZX857atyFegtO1MrRtaHw6AA1Yr02pZ9N1IimyVfFCX B7Md45MnXNZMcmRIMTEoO+43oSqnkv8ezW70CM8= X-Received: by 2002:ac8:33d7:: with SMTP id d23mr10888281qtb.204.1594998158869; Fri, 17 Jul 2020 08:02:38 -0700 (PDT) MIME-Version: 1.0 References: <20200716223627.253936-1-daniel.gutson@eclypsium.com> <20200717062841.GA3238569@kroah.com> In-Reply-To: From: Arnd Bergmann Date: Fri, 17 Jul 2020 17:02:22 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [PATCH] Firmware security information in SYSFS To: Daniel Gutson Cc: Greg Kroah-Hartman , Derek Kiernan , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Mauro Carvalho Chehab , "linux-kernel@vger.kernel.org" , Richard Hughes , Alex Bazhaniuk Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:f/7ltY2DqhHT/+2nLnkzL9ERro1mcgzAf7S9QV6xnfMAG+iI34x E2bJQlUed347gH9W8fNQB4ddJ2SP8IifthdZjBS46WUlXlK+RDZWxh6xa4EDnupODaMB7pb pfLPXgqC8iKtCmr3wlUTz74nS20i/pVwGwY6b0NGQH7JbfN6pzcM8OXWMXr+8UCMFl9AXaV 9/yeH3d40t7W4EP3A1nTw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gQP+mDqQXCU=:1/WpNEMfS54zPvvWM4S21M zkwmmjCIkWNsF229L9wREIuDudwLRIsP+XWJf/tJLSdEGBK0G7DmiB8BJU8+yMjpM/c0OXx49 ZNsNC81MnMlBzZlSrR9o4vRbvkVgn8VzSa+nK94GTxAQRZJSK8EZfXHWIouSA/MEao66Dcrav 72iXgxzMAV6Xp5ut7ng7ctdZM8J5JCcIkPlT48mLMP7W7yanpd2ZIo1m7ll054Qzgqnxqr3tN VAB5fCQ26LG2IzsfhSHfiRMKQMSoXWakhdie4uxhuOOoi2hNvJ/rno/wFXZFvPa7lpJQXNII2 eLc3ViF84J+WC+eHDbZPq3p9GwYpikumr+maxYjSIkaLKl5UgPG8Q7/9HrXAqsICIBIeCu4Vw v8jcyTbxOhcfF3jvZ4omioEuwVOB10iqq8qtkCNRPAqRMHYtaCdwCde3XdQO8Rf0QVCwSKeuA h+kKmxW1hQTHSfxnuNefn9FDgcw56i5xW1a0c3mNNpt2gUVfoxKiV0hffOE6rjuW6IgQ11aA3 jowbMQ8ENqxf+gVflFBu4lHinaF/ceZOcmcwtglrUoAN7xzSux9xtiUtug2ggd63czZVYe9ql mU9gYZeTZQ7odFzlXkJbli5NRfYSPBXtEwqTixzoLEpDrKsoAMaNVrGQg8kOkhXCuIogfzwzT u7GGoEl51QiddgTgmK5mUCT0P9XMz7s1Is2K/kzmZipeYAyIF/+hjVUlAeVOHRMf674ea+i89 dNQNUN+w8lFT3JCjhgPRXTyopU/nwPlFB4sgjz3bvFm5yJQJPuP85hYm6dvm+nuGz6qv9xLsD IfMC8d6UlL1vvQs9l86Boat625xdvxi/65YfNMBcpFZOwxTi42HfF1YUrxhxRad1SLH5uV++9 PxWZN/tyOx97QhzPgHDeHWInnHIaiytNlaAGbqGLOkV18Es3YvbbL/Nm754BYoHR6QGWayiDi 1fj2zRn5SWc2VrOp2h3H2WoIMOsZ0eIHu0dwDKs2iqq6pwl2xPFRm Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 17, 2020 at 4:46 PM Daniel Gutson wrote: > On Fri, Jul 17, 2020 at 11:41 AM Arnd Bergmann wrote: > > >> > Also, this really is a _SPECIFIC_ type of firmware that supports these >> > features, right? Why not call that out too? This is not generic by any >> > means. >> >> As I suggested in my previous review, I wouldn't worry too much about >> the user interface at the start, but instead first work out how the hardware >> support fits in with the existing drivers and once that looks fine decide >> on how to export it to user space. >> >> I agree the /sys/kernel/firmware-security/bioswe sounds like the wrong >> place, but I'm not sure if adding any other new directory in sysfs is >> much better. I think the most promising would be to have it on the >> sysfs directory for the device it refers to, > > > My idea is to have all the firmware security information together in the same place; this information comes from many devices. > This initial patch involves the SPI Controller, and I don't want to add more stuff until there > is a consensus. > So, do you have a suggestion where to put this information? > /sys/devices/system/firmware-security? > /sys/firmware/security? > other? I think it needs to be more specific than this. On a many machines there may be a dozens of things described as "firmware" of some sort, and even more things that relate to "security". You may also have to consider the problem that there may be multiple devices that want to register to this interface to export similar bits of information. In the two drivers you have changed, there is a device node, so the natural concept would be to either have attributes in that node, or a child device under it with a fixed set of attributes, which can then be referenced as a class device like /sys/class/${NAME}/${NAME0} -> ../../devices/ci0000:00/0000:00:01.1/0000:01:00.2/${NAME} /sys/devices/ci0000:00/0000:00:01.1/0000:01:00.2/${NAME}/${ATTRIBUTE} This is easy to implement, and easy to access from user space, if this works for you, the hardest part may be to decide on what to call it ;-) Arnd