Thread (62 messages) 62 messages, 2 authors, 2021-05-27

Re: [PATCH Part1 RFC v2 11/20] x86/compressed: Add helper for validating pages in the decompression stage

From: Borislav Petkov <bp@alien8.de>
Date: 2021-05-25 10:20:37
Also in: lkml

On Thu, May 20, 2021 at 01:05:15PM -0500, Brijesh Singh wrote:
Maybe I am missing something, the statement above was executed for
either set or clr but the page shared need to happen only for clr. So,
from code readability point I kept it outside of that if().

Otherwise we may have to do something like.

...

if ((set | clr) & _PAGE_EN) {

   if (clr)

    snp_set_page_shared(pte_pfn(*ptep) << PAGE_SHIFT);

  }

I am okay with above is the preferred approach.
Yes pls, because it keeps the _PAGE_ENC handling together in one
statement.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help