[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 0/2] MMIO emulation fixes



>>> On 29.08.18 at 13:09, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 29/08/18 12:00, Olaf Hering wrote:
>> On Wed, Aug 29, Andrew Cooper wrote:
>>
>>> Architecturally speaking, handing #MC back is probably the closest we
>>> can get to sensible behaviour, but it is still a bug that Linux is
>>> touching the ballooned out page in the first place.
>> Well, the issue is that a read crosses a page boundary. If that would be
>> forbidden, load_unaligned_zeropad() would not exist. It can not know
>> what is in the following page. And such page crossing happens also in
>> the unballooned case. Sadly I can not trigger the reported NFS bug
>> myself. But it can be enforced by ballooning enough pages so that an
>> allocated readdir reply eventually is right in front of a ballooned
>> page.
> 
> The Linux bug is not shooting the ballooned page out of the directmap. 
> Linux should be taking a fatal #PF for that read, because its a virtual
> mapping for a frame which Linux has voluntarily elected to make invalid.
> 
> As Xen can't prevent Linux from making/maintaining such an invalid
> mapping, throwing #MC back is the next best thing, because terminating
> the access with ~0 is just going to hide the bug, and run at a glacial
> pace while doing so.

I still do not understand why you think so: Handing back ~0 is far more
correct than raising #MC imo. The x86 architecture is bound to its
history, and in pre-Pentium days there was no #MC to be raised in the
first place. Furthermore, while I can see that _some other_ bug may
be hidden this way, there's no bug at all the be hidden in
load_unaligned_zeropad() (leaving aside the balloon driver behavior).

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.