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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13073a85-24c1-6efa-578b-54218d21f49d@amd.com>
Date:   Tue, 10 Nov 2020 17:31:06 -0600
From:   Tom Lendacky <thomas.lendacky@....com>
To:     Arvind Sankar <nivedita@...m.mit.edu>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/mm/sme: Fix definition of PMD_FLAGS_DEC_WP

On 11/9/20 3:42 PM, Arvind Sankar wrote:
> On Mon, Nov 09, 2020 at 02:41:48PM -0600, Tom Lendacky wrote:
>> On 11/9/20 11:35 AM, Arvind Sankar wrote:
>>> The PAT bit is in different locations for 4k and 2M/1G page table
>>> entries.
>>>
>>> Add a definition for _PAGE_LARGE_CACHE_MASK to represent the three
>>> caching bits (PWT, PCD, PAT), similar to _PAGE_CACHE_MASK for 4k pages,
>>> and use it in the definition of PMD_FLAGS_DEC_WP to get the correct PAT
>>> index for write-protected pages.
>>>
>>> Remove a duplication definition of _PAGE_PAT_LARGE.
>>>
>>> Signed-off-by: Arvind Sankar <nivedita@...m.mit.edu>
>>
>> Fixes: tag?
> 
> It's been broken since it was added in
> 
>   6ebcb060713f ("x86/mm: Add support to encrypt the kernel in-place")
> 
> but the code has been restructured since then. I think it should be
> backportable to 4.19.x if you want, except for that "duplication
> definition"[sic] I removed, which was only added in v5.6. Do I need to
> split that out into a separate patch?

For backporting it would probably be best if the patches were split. For
the PMD flags, I think you can target the original release and the stable
maintainers are pretty good about finding the right file. If not, they'll
ping you.

Thanks,
Tom

> 
>>
>> Tested-by: Tom Lendacky <thomas.lendacky@....com>
>>
>>> ---
>>>  arch/x86/include/asm/pgtable_types.h | 3 +--
>>>  arch/x86/mm/mem_encrypt_identity.c   | 4 ++--
>>>  2 files changed, 3 insertions(+), 4 deletions(-)
>>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ