From: David Gibson <david@gibson.dropbear.id.au>
To: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Cc: "Maxiwell S. Garcia" <maxiwell@linux.ibm.com>,
"open list:sPAPR" <qemu-ppc@nongnu.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] spapr-rtas: add ibm, get-vpd RTAS interface
Date: Thu, 28 Feb 2019 11:33:09 +1100 [thread overview]
Message-ID: <20190228003309.GB7734@umbus.fritz.box> (raw)
In-Reply-To: <20190227150449.GA9614@kermit.br.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 5072 bytes --]
On Wed, Feb 27, 2019 at 12:04:49PM -0300, Murilo Opsfelder Araujo wrote:
> Hi, David.
>
> On Wed, Feb 27, 2019 at 10:19:20AM +1100, David Gibson wrote:
> > On Tue, Feb 26, 2019 at 04:11:40PM -0300, Murilo Opsfelder Araujo wrote:
> > > On Tue, Feb 26, 2019 at 02:08:30PM -0300, Murilo Opsfelder Araujo wrote:
> > > > Hi, Maxiwell.
> > > >
> > > > On Tue, Feb 26, 2019 at 11:21:26AM -0300, Maxiwell S. Garcia wrote:
> > > > > On Tue, Feb 26, 2019 at 02:21:03PM +1100, David Gibson wrote:
> > > > > > On Mon, Feb 25, 2019 at 08:20:09PM -0300, Murilo Opsfelder Araujo wrote:
> > > > > > > Hi, Maxiwell.
> > > > > > >
> > > > > > > On Mon, Feb 25, 2019 at 01:23:25PM -0300, Maxiwell S. Garcia wrote:
> > > > > > > > This adds a handler for ibm,get-vpd RTAS calls, allowing pseries
> > > > > > > > guest to collect host information. It is disabled by default to
> > > > > > > > avoid unwanted information leakage. To enable it, use:
> > > > > > > > ‘-M pseries,vpd-export=on’
> > > > > > >
> > > > > > > The patch for setting host-serial and host-model already landed Gibson's
> > > > > > > ppc-for-4.0 branch:
> > > > > > >
> > > > > > > commit 9e584f45868f6945c1282c938278038cba0e4af2
> > > > > > > Author: Prasad J Pandit <pjp@fedoraproject.org>
> > > > > > > Date: Mon Feb 18 23:43:49 2019 +0530
> > > > > > >
> > > > > > > ppc: add host-serial and host-model machine attributes (CVE-2019-8934)
> > > > > > >
> > > > > > >
> > > > > > > QEMU should only return host-serial and host-model from the host if the
> > > > > > > following combination of parameters are provided:
> > > > > > >
> > > > > > > -M host-serial=passthrough,host-model=passthrough,vpd-export=on
> > > > > > >
> > > > > > > If host-serial or host-model are set with a user-string, ibm,get-vpd should
> > > > > > > honor these values and return them, not exposing host information by accident.
> > > > > > >
> > > > > > > I'm not even sure if we need vpd-export=<bool> setting. Its logic could be
> > > > > > > derived from the presence of host-serial=passthrough and host-model=passthrough
> > > > > > > options.
> > > > > > >
> > > > > > > What do you think?
> > > > > >
> > > > > > That's an excellent point - I hadn't thought through the fact that
> > > > > > this is the same information exposed by those properties. I do indeed
> > > > > > think that exposing the same information set in those properties - and
> > > > > > thereby avoiding the new machine option - would be a better plan.
> > > > > >
> > > > >
> > > > > I saw that the patch was applied. So I will work in another patch
> > > > > to use these properties and remove the export-vpd option.
> > > > >
> > > > > Another thing that I thought the fact that 'host-serial' and 'host-model'
> > > > > nodes in Device Tree are not in accordance with LoPAPR document. What
> > > > > you think in use only get-vpd to get these information and remove
> > > > > nodes from device tree?
> > > >
> > > > Both "system-id" and "model" properties are described in the section "3.3.2.1
> > > > Root Node Properties" of the "Device Tree Bindings: Linux on Power Architecture
> > > > Reference" document:
> > > >
> > > > https://members.openpowerfoundation.org/wg/SYSSW/document/1455
> > >
> > > I replied too early. As Maxiwell explained to me (thanks Max!), guest can end up
> > > having the following entries under /proc/device-tree/ (among other entries):
> > >
> > > $ cat host-serial
> > > 12A3B4C
> > >
> > > $ cat host-model
> > > 1234-56A
> > >
> > > $ cat system-id
> > > c7b62da9-3d0c-44f9-8edb-2318271f3c1a
> > >
> > > $ cat model
> > > IBM pSeries (emulated by qemu)
> > >
> > > Where:
> > >
> > > - host-serial/host-model: depend on "-M host-serial" and "-M host-model"
> > > machine options.
> > >
> > > - system-id: created when "-uuid <val>" exists in qemu command line options.
> > >
> > > - model: hard-coded.
> > >
> > > With this patch, RTAS ibm,get-vpd call will return "system-id" and "model" from
> > > the host, not from the guest. I found this confusing.
> >
> > Hrm. I found the bit in LoPAPR describing how ibm,get-vpd operates,
> > but not something describing the actual data that appears within it.
> > Where's that described? It'd be nice to check if those values are
> > supposed to be describing the host or the guest.
>
> Are you asking about the fields of the ibm,vpd property? They are described in
> Table 11.2 "LoPAPR VPD Fields" of this LoPAPR document:
>
> https://members.openpowerfoundation.org/wg/SYSSW/document/1461
That document appears to be only available to openpower members, which
I'm not.
I found Table 160 in my copy of LoPAPR (1.1) though, which looks like
it has the same stuff. I wonder if I should be trying to get a more
recent LoPAPR.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-02-28 0:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 16:23 [Qemu-devel] [PATCH v2] spapr-rtas: add ibm, get-vpd RTAS interface Maxiwell S. Garcia
2019-02-25 23:10 ` David Gibson
2019-02-25 23:20 ` [Qemu-devel] [Qemu-ppc] " Murilo Opsfelder Araujo
2019-02-26 3:21 ` David Gibson
2019-02-26 14:21 ` Maxiwell S. Garcia
2019-02-26 17:08 ` Murilo Opsfelder Araujo
2019-02-26 19:11 ` Murilo Opsfelder Araujo
2019-02-26 23:19 ` David Gibson
2019-02-27 15:04 ` Murilo Opsfelder Araujo
2019-02-28 0:33 ` David Gibson [this message]
2019-02-26 22:50 ` David Gibson
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=20190228003309.GB7734@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=maxiwell@linux.ibm.com \
--cc=muriloo@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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;
as well as URLs for NNTP newsgroup(s).