public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Gabriel L. Somlo" <somlo@cmu.edu>
Cc: ralf@linux-mips.org, zajec5@gmail.com, paul@pwsan.com,
	galak@codeaurora.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, matt.fleming@intel.com,
	x86@kernel.org, linux-efi@vger.kernel.org, qemu-devel@nongnu.org,
	lersek@redhat.com, jordan.l.justen@intel.com,
	gleb@cloudius-systems.com, pbonzini@redhat.com,
	kraxel@redhat.com, eblake@redhat.com, rjones@redhat.com,
	kernelnewbies@kernelnewbies.org
Subject: Re: [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names
Date: Mon, 10 Aug 2015 11:32:45 -0700	[thread overview]
Message-ID: <20150810183245.GB18817@kroah.com> (raw)
In-Reply-To: <1cadfcda3c31d7470f677656f9c914e9c4b7c0cd.1439220623.git.somlo@cmu.edu>

On Mon, Aug 10, 2015 at 12:31:20PM -0400, Gabriel L. Somlo wrote:
> From: "Gabriel Somlo" <somlo@cmu.edu>
> 
> Each fw_cfg entry of type "file" has an associated 56-char,
> nul-terminated ASCII string which represents its name. While
> the fw_cfg device doesn't itself impose any specific naming
> convention, QEMU developers have traditionally used path name
> semantics (i.e. "etc/acpi/rsdp") to descriptively name the
> various fw_cfg "blobs" passed into the guest.
> 
> This patch attempts, on a best effort basis, to create a
> directory hierarchy representing the content of fw_cfg file
> names, under /sys/firmware/fw_cfg/by_name.
> 
> Upon successful creation of all directories representing the
> "dirname" portion of a fw_cfg file, a symlink will be created
> to represent the "basename", pointing at the appropriate
> /sys/firmware/fw_cfg/by_select entry. If a file name is not
> suitable for this procedure (e.g., if its basename or dirname
> components collide with an already existing dirname component
> or basename, respectively) the corresponding fw_cfg blob is
> skipped and will remain available in sysfs only by its selector
> key value.

Shouldn't all of this be done in userspace with the symlinks and all?
It seems like you are trying to duplicate the /dev/block/by-name and
such.  Policy decisions like symlinks and naming should be done there,
in userspace, and not directly in sysfs if at all possible.

Again, why can't this be a bunch of character device nodes?  It seems
like you want to access them that way (read/write, ioctl, etc.)

thanks,

greg k-h

      reply	other threads:[~2015-08-10 18:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 16:31 [PATCH 0/3] SysFS driver for QEMU firmware config device (fw_cfg) Gabriel L. Somlo
2015-08-10 16:31 ` [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device Gabriel L. Somlo
2015-08-10 18:30   ` Greg KH
2015-08-10 19:02     ` Gabriel L. Somlo
2015-08-10 19:15       ` Greg KH
2015-08-10 16:31 ` [PATCH 2/3] kobject: export kset_find_obj() to be used from modules Gabriel L. Somlo
2015-08-10 18:33   ` Greg KH
2015-08-10 18:43     ` Gabriel L. Somlo
2015-08-10 18:54       ` Greg KH
2015-08-10 19:04         ` Gabriel L. Somlo
2015-08-10 16:31 ` [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names Gabriel L. Somlo
2015-08-10 18:32   ` Greg KH [this message]

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=20150810183245.GB18817@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=eblake@redhat.com \
    --cc=galak@codeaurora.org \
    --cc=gleb@cloudius-systems.com \
    --cc=jordan.l.justen@intel.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=paul@pwsan.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ralf@linux-mips.org \
    --cc=rjones@redhat.com \
    --cc=somlo@cmu.edu \
    --cc=x86@kernel.org \
    --cc=zajec5@gmail.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