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: <20121030072558.GB4537@gmail.com>
Date:	Tue, 30 Oct 2012 08:25:58 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Gerald Schaefer <gerald.schaefer@...ibm.com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Ralf Baechle <ralf@...ux-mips.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()


* Gerald Schaefer <gerald.schaefer@...ibm.com> wrote:

> On Sun, 28 Oct 2012 14:10:14 +0100
> Ingo Molnar <mingo@...nel.org> wrote:
> 
> > 
> > There's a related problem on s390: other THP implementations 
> > have pmd_mknotpresent() while s390 not, resulting in:
> > 
> >   mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
> > 
> > The (untested!) patch below adds the s390 version of this 
> > method.
> > 
> > Gerald, Martin, did I get the S390 details right?
> 
> The upstream thp patches for s390 fixed that by adding pmdp_invalidate() and
> replacing the pmd_mknotpresent() in mm/huge_memory.c, see git commit 46dcde73.
> The pmdp_invalidate() is already included linux-next, so it should be ok to
> just change mm/huge_memory.c similar to upstream:
> 
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index f1c2679..842b6df 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -1537,8 +1537,7 @@ static int __split_huge_page_map(struct page *page,
>  	 * complete. The ptl also protects against concurrent faults due to
>  	 * making the pmd not-present.
>  	 */
> -	set_pmd_at(mm, address, pmd, pmd_mknotpresent(*pmd));
> -	flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
> +	pmdp_invalidate(vma, address, pmd);
>  	pmd_populate(mm, pmd, pgtable);
>  	ret = 1;
> 
> With this, s390 does not need a pmd_mknotpresent(), and using 
> set_pmd_at(..., pmd_mknotpresent()) would be wrong on s390 
> anyway because we need a flushing operation to change a valid 
> pmd.

Ok, great - so to me it seems that once the two trees are merged 
there's no extra change needed for s390 - so I dropped the 
patch.

Thanks,

	Ingo
--
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