linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Mike Waychison <mikew@google.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Purpose of dmi-sysfs kernel module
Date: Wed, 14 May 2014 21:23:47 +0200	[thread overview]
Message-ID: <20140514212347.083a57f9@endymion.delvare> (raw)
In-Reply-To: <CAGTjWtAjfzr=7K_0k=MKRXTxiWDSGOOYrzY0tA-7z=BpLVM-gA@mail.gmail.com>

Hi Mike,

On Wed, 14 May 2014 08:52:36 -0700, Mike Waychison wrote:
> On Wed, May 14, 2014 at 2:23 AM, Jean Delvare <jdelvare@suse.de> wrote:
> > Sorry for joining the party a little late but I am just discovering the
> > dmi-sysfs kernel module. I have to admit that I am very curious about
> > why it was needed. What does it let you achieve that you couldn't
> > already do with dmidecode [1]?
> 
> The downside to using dmidecode is that (at least at the time), it
> involved requiring giving access to /dev/mem to the binary so that it
> could grub around in raw memory looking for the records.

This is still the case indeed.

> dmi-sysfs
> provides an alternative that allows for kernel-parsed entries to be
> exposed to userland without having to expose /dev/mem and raw IO which
> is insecure.

Thanks for the explanation. But if access to /dev/mem was your only
concern, your solution seems somewhat overkill. You could have just
exposed the raw SMBIOS entry point and DMI table through sysfs, pretty
much like ACPI does, and leave the rest to dmidecode (or libsmbios.)
That would have avoided reimplementing part of dmidecode and creating
yet another interface to DMI data.

I'm not maintaining dmi-sysfs, I'm not even using it so far, so I don't
really care, but to be honest I am quite surprised that it was accepted
into the kernel.

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2014-05-14 19:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  9:23 Purpose of dmi-sysfs kernel module Jean Delvare
2014-05-14 15:52 ` Mike Waychison
2014-05-14 19:23   ` Jean Delvare [this message]
2014-05-14 22:51     ` Mike Waychison
2014-05-15  8:48       ` Jean Delvare

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=20140514212347.083a57f9@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.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).