From: Greg KH <greg@kroah.com>
To: Mike Waychison <mikew@google.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Tim Hockin <thockin@google.com>,
Robert Lippert <rlippert@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: SMBIOS / DMI Event Logs in Linux?
Date: Thu, 10 Feb 2011 19:19:27 -0800 [thread overview]
Message-ID: <20110211031927.GA884@kroah.com> (raw)
In-Reply-To: <4D549CC3.4050902@google.com>
On Thu, Feb 10, 2011 at 06:19:47PM -0800, Mike Waychison wrote:
> On 02/10/11 17:25, Greg KH wrote:
> >On Thu, Feb 10, 2011 at 03:18:14PM -0800, Mike Waychison wrote:
> >>Hey guys,
> >>
> >>I need some guidance. Do either of you know of any attempts to have
> >>the kernel decode and display/interact with DMI type 15: System
> >>Event Log?
> >
> >I don't have any experience in this area, but I do have one comment on
> >your proposal below:
> >
> >>The event log I'm dealing with while cleaning up the "gsmi" driver
> >>interacts with a log that is modeled after the System Event Log.
> >>I'm wondering if there is any precedent for a clean way to expose
> >>the event log, I'd like to use it (replacing the ioctls from my
> >>earlier patch series send-out).
> >>
> >>FYI, we use OEM specific headers and descriptors, which probably
> >>doesn't help.
> >>
> >>Do most folks that need access to this data rely on /dev/mem and
> >>dmidecode? I'd like to avoid going that route if possible.
> >>
> >>Lacking any better ideas though, I was thinking of something along
> >>the lines of the following:
> >>
> >>
> >>$ cat /sys/firmware/gsmi/eventlog
> >><offset> <boot number> <recorded time> <quoted reason> <optional data>
> >>...
> >>
> >>with a single event log entry per line.
> >> <offset> would be the record number,
> >> <boot number> is the recorded boot number
> >> <recorded time> comes from each record,
> >> <quoted reason> is the English translation of Event Log Types from
> >>the DMTF standard + vendor extended types we use.
> >> <optional data> is space separated values associated with<quoted reason>
> >
> >Ick, no, remember, sysfs is "one value per file". doing even a single
> >line like you describe here isn't ok, not to mention a huge buffer of
> >these lines.
> >
> >And no, a "binary" sysfs file is not ok either.
>
> Works fine for the /sys/firmware/efi stuff.
Do any of those files have multiple lines? I don't have a system here
that has that directory.
> Works well enough for /sys/firmware/acpi too.
Those all look to be "one value per file" as well.
I don't see any long logs in these firmware types, or am I missing
something?
> >Now your idea for such a log file is fine, I'm not saying that's not ok,
> >or acceptable, just don't put it in sysfs, sorry. Try using the ring
> >buffer framework from the tracing code perhaps?
> >
> >Or use debugfs? Or make a 'firmwarefs'? I can easily knock that
> >together if you need it.
>
> Are you seriously asking for another filesystem?
What's to be afraid of another filesystem? It's only 250 lines of code,
and trivial to create.
Remember, sysfs almost was a filesystem-per-device implementation, as
our superblock and mounting logic is very nice and easy to handle all
race conditions. I objected to that as it would be a bit unwieldy for
some filesystem mount lists, but the idea is still quite sane and
reasonable.
And also, a filesystem-per-type is just fine. It uniquely keeps things
separate, and defines interfaces properly.
> I don't get why you're holding me to these standards that that are
> totally missed by these same subsystems that you maintain.
I do not see any files in the subsystems I maintain that have multiple
values per lines, and have multiple lines, in sysfs files. What have I
missed that you are noticing?
thanks,
greg k-h
next prev parent reply other threads:[~2011-02-11 3:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 23:18 SMBIOS / DMI Event Logs in Linux? Mike Waychison
2011-02-11 1:25 ` Greg KH
2011-02-11 2:19 ` Mike Waychison
2011-02-11 3:19 ` Greg KH [this message]
2011-02-11 2:20 ` Tim Hockin
2011-02-11 3:20 ` Greg KH
[not found] ` <AANLkTin3tu-NiotpzWaQ_ubV0jumb_WsjEK5QGi5w56o@mail.gmail.com>
2011-02-11 18:00 ` Mike Waychison
2011-02-11 18:32 ` Greg KH
2011-02-11 18:56 ` Mike Waychison
2011-02-11 19:12 ` Greg KH
2011-02-11 9:54 ` Alan Cox
2011-02-11 2:04 ` Rob Lippert
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=20110211031927.GA884@kroah.com \
--to=greg@kroah.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mikew@google.com \
--cc=rlippert@google.com \
--cc=thockin@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