Fwd: [PATCH] arm/arm64: KVM: Enforce Break-Before-Make on Stage-2 page tables

11 views
Skip to first unread message

Jan Kiszka

unread,
Apr 29, 2016, 12:46:51 PM4/29/16
to Antonios Motakis, Jailhouse
Tony,

are we affected in the same way (during cell reconfigurations), or is v7
and upcoming v8 code already safe?

Jan

--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
[PATCH] arm/arm64: KVM: Enforce Break-Before-Make on Stage-2 page tables.eml

Antonios Motakis

unread,
May 2, 2016, 5:08:28 AM5/2/16
to Jan Kiszka, Jailhouse
Good question, I need to investigate :)
It wouldn't be the first mistake we share with KVM...

Thanks for the tip.

On 29-Apr-16 18:46, Jan Kiszka wrote:
> Tony,
>
> are we affected in the same way (during cell reconfigurations), or is v7
> and upcoming v8 code already safe?
>
> Jan
>

--
Antonios Motakis
Virtualization Engineer
Huawei Technologies Duesseldorf GmbH
European Research Center
Riesstrasse 25, 80992 München

Antonios Motakis

unread,
May 10, 2016, 5:04:01 AM5/10/16
to Jan Kiszka, Jailhouse
Hello,

I don't think we are always following the break-before-make strategy, if we do sometimes by coincidence. There are some cases that look suspect to me. To fix this, I think some changes will probably be needed in the core as well (calls to arch flush functions are inserted after creating new entries, not always when 'breaking' them).

One example would be calling a paging_create that overlaps already existing mappings that are being changed; no flush would be inserted before breaking the old mappings. split_hugepage doesn't seem to take this requirement into account either.

Then there are even more tricky situations I am thinking about. Flushes are inserted when starting a cell, what if we destroy a cell without using it? I am still reviewing cases like that. Probably I will prepare a new version of the preparatory patches first before I can post a fix for this issue.

On 29-Apr-16 18:46, Jan Kiszka wrote:
> Tony,
>
> are we affected in the same way (during cell reconfigurations), or is v7
> and upcoming v8 code already safe?
>
> Jan
>

--
Reply all
Reply to author
Forward
0 new messages