All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] arm64: hugetlb cleanup + break-before-make fixes
@ 2017-03-21 18:04 Punit Agrawal
  2017-03-21 18:04 ` [PATCH 1/7] arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present Punit Agrawal
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Punit Agrawal @ 2017-03-21 18:04 UTC (permalink / raw)
  To: linux-arm-kernel

[ Posting this series on behalf of Steve ]

It has become apparent that one has to take special care when
modifying attributes of memory mappings that employ the contiguous
bit.

Both the requirement and the architecturally correct
"Break-Before-Make" technique of updating contiguous entries can be
found described in: ARM DDI 0487A.k_iss10775, "Misprogramming of the
Contiguous bit", page D4-1762.

The huge pte accessors currently replace the attributes of contiguous
pte entries in place thus can, on certain platforms, lead to TLB
conflict aborts or even erroneous results returned from TLB lookups.

This patch series adds the required break-before-make logic to the
contiguous bit hugetlb accessors.

In order to simplify the break-before-make logic (and the patch
review), we first simplify the existing code.

During the course of this simplification I have found a bug whereby
spurious calls were being made to huge_ptep_offset by other accessors.
Also, a pre-emptive, WARN_ON is added to set_huge_pte_at in case it is
supplied with swp/migration entries unexpectedly (from
MEMORY_FAILURE).

Steve Capper (7):
  arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present
  arm64: hugetlb: Cleanup setup_hugepagesz
  arm64: hugetlb: Refactor find_num_contig
  arm64: hugetlb: Introduce pte_pgprot helper
  arm64: hugetlb: Remove spurious calls to huge_ptep_offset
  arm64: hugetlb: Spring clean huge pte accessors
  arm64: hugetlb: Add break-before-make logic for contiguous entries

 arch/arm64/mm/hugetlbpage.c | 228 +++++++++++++++++++++++++-------------------
 1 file changed, 130 insertions(+), 98 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-03-22 18:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 18:04 [PATCH 0/7] arm64: hugetlb cleanup + break-before-make fixes Punit Agrawal
2017-03-21 18:04 ` [PATCH 1/7] arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present Punit Agrawal
2017-03-21 18:04 ` [PATCH 2/7] arm64: hugetlb: Cleanup setup_hugepagesz Punit Agrawal
2017-03-22 14:01   ` Mark Rutland
2017-03-21 18:04 ` [PATCH 3/7] arm64: hugetlb: Refactor find_num_contig Punit Agrawal
2017-03-22 14:14   ` Mark Rutland
2017-03-21 18:04 ` [PATCH 4/7] arm64: hugetlb: Introduce pte_pgprot helper Punit Agrawal
2017-03-22 14:16   ` Mark Rutland
2017-03-21 18:04 ` [PATCH 5/7] arm64: hugetlb: Remove spurious calls to huge_ptep_offset Punit Agrawal
2017-03-22 14:18   ` Mark Rutland
2017-03-21 18:04 ` [PATCH 6/7] arm64: hugetlb: Spring clean huge pte accessors Punit Agrawal
2017-03-22 14:24   ` Mark Rutland
2017-03-21 18:04 ` [PATCH 7/7] arm64: hugetlb: Add break-before-make logic for contiguous entries Punit Agrawal
2017-03-22 14:38   ` Mark Rutland
2017-03-22 18:14     ` Punit Agrawal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.