Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp618089ybh; Tue, 21 Jul 2020 03:53:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvoDu+aqkG6KVwbnFzwWHiMREo/X85uKOQQxowT6yGwdF1a43lT1LQ/q3i9/kq8SN3jSM8 X-Received: by 2002:a17:906:4f82:: with SMTP id o2mr25494571eju.424.1595328827689; Tue, 21 Jul 2020 03:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595328827; cv=none; d=google.com; s=arc-20160816; b=nIrnYhB5ugIwDjWsXRn25yo0gdQoJNg/N4L4OnyFDljBoI7spcgMflcMcBE5+IO7R3 Y6GDhYb68iz3qLlNw3O2v/EN12RRKR7Usu/eXBKSmVB74EhcBnQWRjgPBrIGum3+6lIm ln/WWg0dEO4YyuRkLSucoFYDl50BsbSClvrmSJADs8ka7uOwZoeEKoOv0U7+JPdbfPyc WbBNhZIVr/wt4W5tdQxD1UyhglU/MBqnYC9SsIvMI8KP/w7GJmisv7KStzNbMSIxkLp9 rsJpYWn/MgVdaSeTlIE+vG7/s2opvDMQ32Oj50OAxNfMhIm50H3xcr/VHUXXU3o+e+dJ ZoAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XrvIIeBAA6Ex8mAsLsR77L0J7zZjY0jAHljxy87Z52A=; b=SgKBi1hLO/L69TRsORTiztCDrvp1RE1C9Eied2YQ9QrvfmB00E5oEktuCEcXe362Dn 7rr86olsul97zoJK7PNQQ/VEnlQMgBSxOoTG+hhWd6WuzyYqDzP4CaeUXNd0BRRsohh/ DKLsh5XybDsxhCPoVnO8VNOvmVsZHjKbGNZC/rTC7KtCBWKB0y+febMSUyBrgjZ2uWkq BTtaPufoxPS5ylM0qrb4TANyqh88rhaTIXWyZXrEAlD7XNeXqyaCLnsKUE6TdvXpTG6l gwFYN7h4UgB7a0xXloJ0nfCoXW5e7C41uUx3AYFjdrQaG58pQsU3gqWPggfdrUqpDCgG Ur/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S4qfj7so; 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 j12si11546408ejc.99.2020.07.21.03.53.24; Tue, 21 Jul 2020 03:53:47 -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=@kernel.org header.s=default header.b=S4qfj7so; 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 S1728037AbgGUKwt (ORCPT + 99 others); Tue, 21 Jul 2020 06:52:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:36640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgGUKws (ORCPT ); Tue, 21 Jul 2020 06:52:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9187E2073A; Tue, 21 Jul 2020 10:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595328768; bh=tP/j9SYV2Wc096FLcNTJNBdxAa7a73U6cx63i0V4ty8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S4qfj7soch1wyIflz540mPLAPLtJYuO8SK3jkGX5d8cfohn9NypIIsxLTvlIV9/Lg mKJt6wmfQzoHA0dd4UmP36gtZWE4h6n6gU8AlBp4M1v+Eo3Z6qD0RcHbNXdIDRssUw wZWsV11dbBed35NXhsGXy9Lleq3eRK2u8dAwJ0yQ= Date: Tue, 21 Jul 2020 12:52:56 +0200 From: Greg Kroah-Hartman To: Daniel Gutson Cc: Arnd Bergmann , Derek Kiernan , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Mauro Carvalho Chehab , "linux-kernel@vger.kernel.org" , Richard Hughes , Alex Bazhaniuk Subject: Re: [PATCH] [PATCH] Firmware security information in SYSFS Message-ID: <20200721105256.GC1678476@kroah.com> References: <20200716223627.253936-1-daniel.gutson@eclypsium.com> <20200717062841.GA3238569@kroah.com> <20200717145746.GB3008378@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 05:58:47PM -0300, Daniel Gutson wrote: > On Fri, Jul 17, 2020 at 11:57 AM Greg Kroah-Hartman < > gregkh@linuxfoundation.org> wrote: > > > On Fri, Jul 17, 2020 at 11:46:39AM -0300, Daniel Gutson wrote: > > > On Fri, Jul 17, 2020 at 11:41 AM Arnd Bergmann wrote: > > > > > > > On Fri, Jul 17, 2020 at 8:28 AM Greg Kroah-Hartman > > > > wrote: > > > > > > > > > > On Thu, Jul 16, 2020 at 07:36:27PM -0300, Daniel Gutson wrote: > > > > > > +What: /sys/kernel/firmware-security/bioswe > > > > > > > > > > Ick, I stopped reading right here. > > > > > > > > > > No, this is not where this belongs. > > > > > > > > > > We already have /sys/firmware/, right? And firmware-specific > > > > > subdirectories below that. > > > > > > > > > > We also have /sys/devices/system/ and I think that would be a much > > > > > better place for this, as it is easier to work with a real 'struct > > > > > device' than a "raw" kobject any day. Bonus is you get full support > > of > > > > > userspace libraries when you do that, unlike when dealing with > > kobjects. > > > > > > > > > > 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? > > > > > > Please advise. > > > > It's fun to focus on things like this, as it's the most visible part, > > but are you sure the "talk to the hardware" part is working properly? > > > > Yes. > > > > > > > If so, great, it should be a "class", as that way it is independent of > > any hardware type, right? Classes show how devices talk to userspace in > > a common way (input, tty, led, block, etc.) So why is this any > > different from that? > > > > Are you suggesting to create a new class, or use an existing one? Probably a new one, unless you can find an existing one that would fit? thanks, greg k-h