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] [day] [month] [year] [list]
Message-ID: <4FA38495.1020207@intel.com>
Date:	Fri, 04 May 2012 15:26:13 +0800
From:	Alex Shi <alex.shi@...el.com>
To:	Andrea Arcangeli <aarcange@...hat.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>, riel@...hat.com,
	mgorman@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] THP: need is_vma_temporary_stack() when reference transparent_hugepage_enabled

On 05/03/2012 07:25 PM, Andrea Arcangeli wrote:

> Hi,
> 
> On Thu, May 03, 2012 at 08:56:57AM +0800, Alex Shi wrote:
>>
>>> My preference would still be to remove the is_vma_temporary_stack and
>>> use two vmas during mremap of execve, that would remove the "vma"
>>> parameter from transparent_hugepage_enabled() but others prefers to
>>> skip a vma allocation in execve and stick to is_vma_temporary_stack,
>>> which is fair enough argument.
>>
>>
>> Actually, current transparent_hugepage_enabled just means the vma is in
>> THP enable ENV, the vma is just possibly has some large page, no grantee
>> really has.  But in lots situations, user wants to know if a vma or a
>> part of memory really include a large page. not the possibility.
>>
>> So, it will be great to see a real large page checking function appearing.
> 
> Well, to know if a VMA (or a memory range) really includes a THP, it'd
> require to hold the page_table_lock and a loop on all pmds in the
> range, but by the time you relase the lock things may have already
> changed as split_huge_page can run at any time, madvise(MADV_DONTNEED)
> too if you only hold the mmap_sem in read mode and the THP page
> fault. In fact while holding the mmap_sem in read mode (the usual read
> lock you need to take to lookup and stabilize the vma) a THP can be
> freed and reallocated under it, and that's what pmd_trans_unstable is
> about.


Appreciate for explanation!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ