From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: David Gibson <david@gibson.dropbear.id.au>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface
Date: Thu, 8 Jul 2021 21:10:18 +1000 [thread overview]
Message-ID: <6a25eed6-22db-7d5c-6686-67322b70a83f@ozlabs.ru> (raw)
In-Reply-To: <4a903fde-4ea-a296-3132-bae249d261a@eik.bme.hu>
On 08/07/2021 20:39, BALATON Zoltan wrote:
> On Thu, 8 Jul 2021, Alexey Kardashevskiy wrote:
>> On 08/07/2021 20:18, BALATON Zoltan wrote:
>>> On Thu, 8 Jul 2021, Alexey Kardashevskiy wrote:
>>>> This addresses the comments from v22.
>>>>
>>>> The functional changes are (the VOF ones need retesting with Pegasos2):
>>>>
>>>> (VOF) setprop will start failing if the machine class callback
>>>> did not handle it;
>>>
>>> I'll try this later but I think I've seen guests using setprop (Linux
>>> also does that for some property). How should I allow that? Do I need
>>> a new callback for this? Could it be allower unless there's a
>>> callback that could deby it? But that was the previous way I think.
>>
>> A simple defined callback which always returns "true" should do.
>
> Yes but what's the point? That would just effectiverly disable this
> change so if we need that, we could just as well keep the previous
> behaviour which is to allow setprop unless there's a callback that can
> decide otherwise. The spapr machine has such a callback so it already
> does not allow all setprop and if I'll have a callback in pegasos2
> returning true that will allow what's allowed now so this part of this
> patch does nothing indeed.
>
> Since guests could do all kinds of things that we don't know without
> trying them restricting setprop is a good way to run into problems with
> guests that were not tested that could otherwise just work. Then we'll
> need another patch to enable that guest adding some more properties to
> the list of allowed ones. Why it it a problem to allow this by default
> in the first place and only reject changes for machines that have a
> callback? Then I would not need more empty callbacks in pegasos2.
From here:
https://patchwork.ozlabs.org/project/qemu-devel/patch/20210625055155.2252896-1-aik@ozlabs.ru/#2714158
===
>>> + if (vmo) {
>>> + VofMachineIfClass *vmc = VOF_MACHINE_GET_CLASS(vmo);
>>> +
>>> + if (vmc->setprop &&
>>> + !vmc->setprop(ms, nodepath, propname, val, vallen)) {
>>> + goto trace_exit;
>>
>> This defaults to allowing the setprop if the machine doesn't provide a
>> setprop callback. I think it would be safer to default to prohibiting
>> all setprops except those the machine explicitly allows.
>
>
> Mmmm... I can imagine the client using the device tree as a temporary
> storage. I'd rather add a trace for such cases.
If they do, I think that's something we'll need to consider and
account for that platform, rather than something we want to allow to
begin with.
===
--
Alexey
next prev parent reply other threads:[~2021-07-08 11:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 6:56 [PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface Alexey Kardashevskiy
2021-07-08 10:18 ` BALATON Zoltan
2021-07-08 10:25 ` Alexey Kardashevskiy
2021-07-08 10:39 ` BALATON Zoltan
2021-07-08 11:10 ` Alexey Kardashevskiy [this message]
2021-07-08 13:00 ` BALATON Zoltan
2021-07-09 0:54 ` David Gibson
2021-07-09 13:34 ` BALATON Zoltan
2021-07-08 22:34 ` BALATON Zoltan
2021-07-09 3:43 ` Alexey Kardashevskiy
2021-07-09 13:28 ` BALATON Zoltan
2021-07-09 13:46 ` Alexey Kardashevskiy
2021-07-09 15:35 ` BALATON Zoltan
2021-07-09 0:52 ` 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=6a25eed6-22db-7d5c-6686-67322b70a83f@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=balaton@eik.bme.hu \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--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).