linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Daniel Gutson <daniel@eclypsium.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Derek Kiernan <derek.kiernan@xilinx.com>,
	Tudor Ambarus <tudor.ambarus@microchip.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Richard Hughes <hughsient@gmail.com>,
	Alex Bazhaniuk <alex@eclypsium.com>
Subject: Re: [PATCH] [PATCH] Firmware security information in SYSFS
Date: Fri, 17 Jul 2020 16:57:46 +0200	[thread overview]
Message-ID: <20200717145746.GB3008378@kroah.com> (raw)
In-Reply-To: <CAFmMkTFLm9mw5-8Dj_7rhP2KBcLUoJ1WcQCJv5_k+QRsmJPxjg@mail.gmail.com>

On Fri, Jul 17, 2020 at 11:46:39AM -0300, Daniel Gutson wrote:
> On Fri, Jul 17, 2020 at 11:41 AM Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > On Fri, Jul 17, 2020 at 8:28 AM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> 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?

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?

But worry about the other part first please.  And if you ever find
yourself using a "raw" kobject, you know you have done something wrong
:)

thanks,

greg k-h

  parent reply	other threads:[~2020-07-17 14:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 22:36 [PATCH] [PATCH] Firmware security information in SYSFS Daniel Gutson
2020-07-17  6:28 ` Greg Kroah-Hartman
2020-07-17 14:40   ` Arnd Bergmann
2020-07-17 14:54     ` Greg Kroah-Hartman
     [not found]     ` <CAFmMkTFLm9mw5-8Dj_7rhP2KBcLUoJ1WcQCJv5_k+QRsmJPxjg@mail.gmail.com>
2020-07-17 14:57       ` Greg Kroah-Hartman [this message]
     [not found]         ` <CAFmMkTEsm7CRBzEJSCjkhCT7NHvRUXzcgchExbnfFbwPjT0YFg@mail.gmail.com>
2020-07-21 10:52           ` Greg Kroah-Hartman
     [not found]             ` <CAFmMkTGtG6p48o9qSzYqQs8mJXiGAMw7b5wp2LLAmwcdhn2u4A@mail.gmail.com>
2020-07-21 18:26               ` Greg Kroah-Hartman
2020-07-21 20:44                 ` Arnd Bergmann
2020-07-17 15:02       ` Arnd Bergmann
2020-07-17 14:48 ` Arnd Bergmann
     [not found]   ` <CAFmMkTG3rMtmNxYf0jXgGN7zJgK2U8Ogtrd4yH0Ee1rC7pf9Mg@mail.gmail.com>
2020-07-17 15:39     ` Arnd Bergmann
     [not found]       ` <CAFmMkTF23JVfCe-ynBzbYQ_eF=z6fKCPdA6DbTrJ9OFYxGBWkQ@mail.gmail.com>
2020-07-21 20:50         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200717145746.GB3008378@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alex@eclypsium.com \
    --cc=arnd@arndb.de \
    --cc=daniel@eclypsium.com \
    --cc=derek.kiernan@xilinx.com \
    --cc=hughsient@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@microchip.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).