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: <93ef8d6a-c86a-956b-5f06-5f2e67b6fd04@arm.com>
Date:   Tue, 8 Sep 2020 15:55:32 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Ralph Campbell <rcampbell@...dia.com>,
        Catalin Marinas <catalin.marinas@....com>
Cc:     linux-mm@...ck.org, linux-arm-kernel@...ts.infradead.org,
        will@...nel.org, akpm@...ux-foundation.org,
        Mark Rutland <mark.rutland@....com>,
        Marc Zyngier <maz@...nel.org>,
        Suzuki Poulose <suzuki.poulose@....com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] arm64/mm: Change THP helpers to comply with generic
 MM semantics



On 09/03/2020 11:01 PM, Ralph Campbell wrote:
> 
> On 9/3/20 9:56 AM, Catalin Marinas wrote:
>> On Mon, Aug 17, 2020 at 02:49:43PM +0530, Anshuman Khandual wrote:
>>> pmd_present() and pmd_trans_huge() are expected to behave in the following
>>> manner during various phases of a given PMD. It is derived from a previous
>>> detailed discussion on this topic [1] and present THP documentation [2].
>>>
>>> pmd_present(pmd):
>>>
>>> - Returns true if pmd refers to system RAM with a valid pmd_page(pmd)
>>> - Returns false if pmd does not refer to system RAM - Invalid pmd_page(pmd)
>>
>> The second bullet doesn't make much sense. If you have a pmd mapping of
>> some I/O memory, pmd_present() still returns true (as does
>> pte_present()).
>>
>>> diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h
>>> index 4d867c6446c4..28792fdd9627 100644
>>> --- a/arch/arm64/include/asm/pgtable-prot.h
>>> +++ b/arch/arm64/include/asm/pgtable-prot.h
>>> @@ -19,6 +19,13 @@
>>>   #define PTE_DEVMAP        (_AT(pteval_t, 1) << 57)
>>>   #define PTE_PROT_NONE        (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */
>>>   +/*
>>> + * This help indicate that the entry is present i.e pmd_page()
>>
>> Nit: add another . after i.e
> 
> Another nit: "This help indicate" => "This helper indicates"
> 
> Maybe I should look at the series more. :-)

It is talking about the new PTE bit being used here not any
helper. Though the following replacement might be better.

s/This help indicate/This bit indicates/

/*
 * This help indicate that the entry is present i.e pmd_page()
 * still points to a valid huge page in memory even if the pmd
 * has been invalidated.
 */
#define PMD_PRESENT_INVALID	(_AT(pteval_t, 1) << 59) /* only when !PMD_SECT_VALID */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ