From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [patch 0/4] kernel salinfo changes
Date: Thu, 30 Oct 2003 22:50:48 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106755440714961@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106750258117748@msgid-missing>
On Thu, 30 Oct 2003 15:16:23 -0700,
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>On Thursday 30 October 2003 1:28 am, Keith Owens wrote:
>> patch 1 - Print the header from INIT records, correct typo in sal.h.
>> patch 2 - Clean up kernel salinfo state checking.
>> patch 3 - Add the ability for user space salinfo to ask kernel salinfo
>> and/or the prom to decode the oem data sections of SAL records.
>
>As for patch 3, that's an interesting concept. My initial reaction
>is that it seems sort of backwards to put this sort of "binary ->
>ASCII" decoding mechanism into the kernel or the prom.
>
>I can see that it might be convenient to be able to stash all
>that secret IP in the prom, and it certainly does address the
>problem of version skew, but it just seems wrong to get the
>kernel in the middle, ferrying data back and forth.
Up until 2.4.21 we had the ability to call SAL to assist with decoding
the oemdata and that feature was being used by modifying
platform_mem_dev_err_print and friends. Moving salinfo to user space
removed that ability, patch 3 just reinstates it.
The SAL record is already in the kernel. User space reads the raw
record and, before clearing the record from SAL, asks the kernel/prom
to decode the oem data. Then user space clears the record. The data
is not being fed from user space back into the kernel; think of it as
the kernel delivering existing data in a different format.
>HP has the same problem, of course, with wanting to protect
>the meaning of the OEM data, so I had imagined some sort
>of binary-only user-level decoder, or perhaps a generic
>open-source decoder to which one could add proprietary
>plugins.
That is skating close to a GPL violation. Any binary only user level
decoder would have to be written from scratch, not using any of the GPL
headers or code. A plugin might work, but it still has the problem of
version skew between user space and the kernel.
>If you really want the decoding in the prom, what about a
>module that allowed you to make arbitrary SAL calls from
>user-land?
The raw record would have to be fed back from user space into the
kernel. Security and the integrity of the record is a worry, even with
programs that can only be called by root. The module would have to
support its own interface to user space, requiring another /proc or
/dev entry. It would end up duplicating the code that is already in
kernel salinfo.c and would require additional checks to verify the
record format before passing it to SAL. A big advantage of patch 3 is
that the record never leaves the kernel so SAL knows the record is
valid.
Security, code reuse and minimum overhead all say to extend the
existing interface rather than add a new interface.
prev parent reply other threads:[~2003-10-30 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-30 8:28 [patch 0/4] kernel salinfo changes Keith Owens
2003-10-30 22:16 ` Bjorn Helgaas
2003-10-30 22:50 ` Keith Owens [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=marc-linux-ia64-106755440714961@msgid-missing \
--to=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/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