lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Mar 2008 10:48:33 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	schwidefsky@...ibm.com
CC:	linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
	virtualization@...ts.osdl.org, akpm@...l.org,
	nickpiggin@...oo.com.au, frankeh@...son.ibm.com, hugh@...itas.com
Subject: Re: [patch 6/6] Guest page hinting: s390 support.

Martin Schwidefsky wrote:
> On Wed, 2008-03-12 at 09:44 -0700, Jeremy Fitzhardinge wrote:
>   
>> Martin Schwidefsky wrote:
>>     
>>> That is the first block of state transitions: {Ur,Sr,Vr,Pr}
>>> You can go from any of the four states to any of the remaining three.
>>>   
>>>       
>> You only mention page_set_{unused,stable,volatile}.  Is 
>> page_set_stable_if_present() the fourth.  And shouldn't that be 
>> "stable_if_clean":
>>     
>
> page_set_volatile has a "writable" argument. For writable==0 you get a
> Vx page, for writable==1 you get a Px page.
>   

Hm.  But a Vx page is writable isn't it?  It's just that its contents 
can go away at any time.  Or does the kernel treat Vx pages as strictly 
RO cached copies of other things?

It also seems to me that given you talking about "potentially volatile" 
as a distinct state, it would would be best to have a distinct 
state-setting function associated with it, so there's a 1:1 
correspondence between the code and the description.


> With stable_if_clean you are refering to stable_if_present?

No.  I misunderstood and thought that stable_if_present sets the Px 
state.  I'd overlooked the writable flag on page_set_volatile().

>  If yes the
> answer is that this operation is used to get a page from Vx/Px back to
> Sx but only if the page has not been discarded.

So you mean it will change Vr/Pr to Sr but everything else will fail?  
Are there there any other non-discarded states for Vx/Px?

>  The operation will fail
> if the page state is Vz/Pz.

Do mean just Vz here?  You say that Pz is never used.

> Your understanding is good, but how can I make this less confusing? A Px
> page that is dirty may not be discarded which makes it basically stable.
> The guest state still is potential volatile though as it does not have a
> state of Sx.
>   

Mainly, use identical terminology in code and description so they can be 
easily compared.  I found the diagram was quite helpful in understanding 
what's going on; feel free to include it in your documentation.

Updated .dot attached; I've updated it to include the page_set_volatile 
writable argument and the stable_if_present transitions; commented it, 
removed the self-edges which were cluttering things up.

Also, does a page go from Vz->Vr on guest memory write?  If so, does a 
clean page which goes from Pr->Vz->Vr lose its Px state in the process?

    J

View attachment "gph.dot" of type "text/plain" (1274 bytes)

Download attachment "gph.pdf" of type "application/pdf" (16298 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ