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: <20121002225803.GT4763@redhat.com>
Date:	Wed, 3 Oct 2012 00:58:03 +0200
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	David Miller <davem@...emloft.net>
Cc:	linux-mm@...ck.org, sparclinux@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	akpm@...ux-foundation.org, hannes@...xchg.org
Subject: Re: [PATCH 7/8] mm: thp: Use more portable PMD clearing sequenece in
 zap_huge_pmd().

On Tue, Oct 02, 2012 at 06:27:41PM -0400, David Miller wrote:
> 
> Invalidation sequences are handled in various ways on various
> architectures.
> 
> One way, which sparc64 uses, is to let the set_*_at() functions
> accumulate pending flushes into a per-cpu array.  Then the
> flush_tlb_range() et al. calls process the pending TLB flushes.
> 
> In this regime, the __tlb_remove_*tlb_entry() implementations are
> essentially NOPs.
> 
> The canonical PTE zap in mm/memory.c is:
> 
> 			ptent = ptep_get_and_clear_full(mm, addr, pte,
> 							tlb->fullmm);
> 			tlb_remove_tlb_entry(tlb, pte, addr);
> 
> With a subsequent tlb_flush_mmu() if needed.
> 
> Mirror this in the THP PMD zapping using:
> 
> 		orig_pmd = pmdp_get_and_clear(tlb->mm, addr, pmd);
> 		page = pmd_page(orig_pmd);
> 		tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
> 
> And we properly accomodate TLB flush mechanims like the one described
> above.

Thanks for the explanation.

Reviewed-by: Andrea Arcangeli <aarcange@...hat.com>
--
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