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]
Date:   Tue, 7 Jul 2020 09:26:43 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Anshuman Khandual <anshuman.khandual@....com>, linux-mm@...ck.org
Cc:     justin.he@....com, catalin.marinas@....com,
        akpm@...ux-foundation.org, Will Deacon <will@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Tony Luck <tony.luck@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Michal Hocko <mhocko@...e.com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        linux-arm-kernel@...ts.infradead.org, linux-ia64@...r.kernel.org,
        linux-riscv@...ts.infradead.org, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 1/3] mm/sparsemem: Enable vmem_altmap support in
 vmemmap_populate_basepages()

> Hmm, I assume these are some decisions that x86 platform will have to
> make going forward in a subsequent patch as the third patch does for
> the arm64 platform. But it is clearly beyond the scope of this patch
> which never intended to change existing behavior on a given platform.
> 

Yeah, I would be curious if my assumption is correct.

>>
>> [...]
>>
>>>  
>>> -pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node)
>>> +pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node,
>>> +				       struct vmem_altmap *altmap)
>>>  {
>>>  	pte_t *pte = pte_offset_kernel(pmd, addr);
>>>  	if (pte_none(*pte)) {
>>>  		pte_t entry;
>>> -		void *p = vmemmap_alloc_block_buf(PAGE_SIZE, node);
>>> +		void *p;
>>> +
>>> +		if (altmap)
>>> +			p = altmap_alloc_block_buf(PAGE_SIZE, altmap);
>>> +		else
>>> +			p = vmemmap_alloc_block_buf(PAGE_SIZE, node);
>>>  		if (!p)
>>>  			return NULL;
>>
>> I was wondering if
>>
>> if (altmap)
>> 	p = altmap_alloc_block_buf(PAGE_SIZE, altmap);
>> if (!p)
>> 	p = vmemmap_alloc_block_buf(PAGE_SIZE, node);
>> if (!p)
>> 	return NULL
>>
>> Would make sense. But I guess this isn't really relevant in practice,
>> because the altmap is usually sized properly.
>>
>> In general, LGTM.
> 
> Okay, I assume that no further changes are required here.
> 

Jep,

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ