Re: [PATCH v2] powerpc/tm: Save and restore AMR on treclaim and trechkpt

2020-09-19 Thread Aneesh Kumar K.V
o the stack before treclaim and > before trechkpt, restoring it later, just before returning from tm_reclaim > and __tm_recheckpoint. > > Is also fixes two nonrelated comments about CR and MSR. > Tested-by: Aneesh Kumar K.V > Signed-off-by: Gustavo Romero > --- > arch/pow

Re: [PATCH] powerpc/tm: Save and restore AMR on treclaim and trechkpt

2020-09-17 Thread Aneesh Kumar K.V
On 9/18/20 9:35 AM, Gustavo Romero wrote: Althought AMR is stashed on the checkpoint area, currently we don't save it to the per thread checkpoint struct after a treclaim and so we don't restore it either from that struct when we trechkpt. As a consequence when the transaction is later rolled

[PATCH] mm/debug_vm_pgtable: Avoid doing memory allocation with pgtable_t mapped.

2020-09-13 Thread Aneesh Kumar K.V
] ? kernel_init_freeable+0x72/0xa3 [9.423539] ? rest_init+0x134/0x134 [9.424055] ? kernel_init+0x5/0x12c [9.424574] ? ret_from_fork+0x19/0x30 Reported-by: kernel test robot Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

Re: [PATCH v4 13/13] mm/debug_vm_pgtable: Avoid none pte in pte_clear_test

2020-09-10 Thread Aneesh Kumar K.V
Nathan Chancellor writes: > On Wed, Sep 02, 2020 at 05:12:22PM +0530, Aneesh Kumar K.V wrote: >> pte_clear_tests operate on an existing pte entry. Make sure that >> is not a none pte entry. >> >> Signed-off-by: Aneesh Kumar K.V >> --- >> mm/debug_vm_pgta

Re: Flushing transparent hugepages

2020-09-09 Thread Aneesh Kumar K.V
Matthew Wilcox writes: > PowerPC has special handling of hugetlbfs pages. Well, that's what > the config option says, but actually it handles THP as well. If > the config option is enabled. > > #ifdef CONFIG_HUGETLB_PAGE > if (PageCompound(page)) { >

Re: [PATCH v4 00/13] mm/debug_vm_pgtable fixes

2020-09-09 Thread Aneesh Kumar K.V
Gerald Schaefer writes: > On Fri, 4 Sep 2020 18:01:15 +0200 > Gerald Schaefer wrote: > > [...] >> >> BTW2, a quick test with this change (so far) made the issues on s390 >> go away: >> >> @@ -1069,7 +1074,7 @@ static int __init debug_vm_pgtable(void) >> spin_unlock(ptl); >> >>

Re: [PATCH v1 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-09-09 Thread Aneesh Kumar K.V
Christophe Leroy writes: > search_exception_tables() is an heavy operation, we have to avoid it. > When KUAP is selected, we'll know the fault has been blocked by KUAP. > Otherwise, it behaves just as if the address was already in the TLBs > and no fault was generated. > > Signed-off-by:

[PATCH] powerepc/book3s64/hash: Align start/end address correctly with bolt mapping

2020-09-07 Thread Aneesh Kumar K.V
ping pages that are not aligned. This helps to catch access to these partially mapped pages early. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/hash_utils.c| 12 +--- arch/powerpc/mm/book3s64/radix_pgtable.c | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/

Re: [PATCH v3 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-09-02 Thread Aneesh Kumar K.V
Anshuman Khandual writes: > On 09/01/2020 12:00 PM, Aneesh Kumar K.V wrote: >> On 9/1/20 9:33 AM, Anshuman Khandual wrote: >>> >>> >>> On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: >>>> The seems to be missing quite a lot of details

Re: [PATCH v4 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support.

2020-09-02 Thread Aneesh Kumar K.V
On 9/2/20 6:10 PM, Christophe Leroy wrote: Le 02/09/2020 à 13:42, Aneesh Kumar K.V a écrit : ppc64 supports huge vmap only with radix translation. Hence use arch helper to determine the huge vmap support. Signed-off-by: Aneesh Kumar K.V ---   mm/debug_vm_pgtable.c | 14 --   1

[PATCH v4 13/13] mm/debug_vm_pgtable: Avoid none pte in pte_clear_test

2020-09-02 Thread Aneesh Kumar K.V
pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 9afa1354326b

[PATCH v4 13/13] mm/debug_vm_pgtable: Avoid none pte in pte_clear_test

2020-09-02 Thread Aneesh Kumar K.V
pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 9afa1354326b

[PATCH v4 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-09-02 Thread Aneesh Kumar K.V
on ppc64. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 4 1 file changed, 4 insertions(+) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index b53903fdee85..9afa1354326b 100644 --- a/mm/debug_vm_pgtable.c +++ b/mm/debug_vm_pgtable.c @@ -811,6 +811,7 @@ static void

[PATCH v4 11/13] mm/debug_vm_pgtable/pmd_clear: Don't use pmd/pud_clear on pte entries

2020-09-02 Thread Aneesh Kumar K.V
pmd_clear() should not be used to clear pmd level pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 26023d990bd0..b53903fdee85 100644 --- a/mm

[PATCH v4 10/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-09-02 Thread Aneesh Kumar K.V
Architectures like ppc64 use deposited page table while updating the huge pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 2bc1952e5f83

[PATCH v4 09/13] mm/debug_vm_pgtable/locks: Take correct page table lock

2020-09-02 Thread Aneesh Kumar K.V
Make sure we call pte accessors with correct lock held. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index f59cf6a9b05e

[PATCH v4 08/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-09-02 Thread Aneesh Kumar K.V
This will help in adding proper locks in a later patch Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 51 --- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index de333871f407

[PATCH v4 07/13] mm/debug_vm_pgtable/set_pte/pmd/pud: Don't use set_*_at to update an existing pte entry

2020-09-02 Thread Aneesh Kumar K.V
set_pte_at() should not be used to set a pte entry at locations that already holds a valid pte entry. Architectures like ppc64 don't do TLB invalidate in set_pte_at() and hence expect it to be used to set locations that are not a valid PTE. Signed-off-by: Aneesh Kumar K.V --- mm

[PATCH v4 06/13] mm/debug_vm_pgtable/THP: Mark the pte entry huge before using set_pmd/pud_at

2020-09-02 Thread Aneesh Kumar K.V
kernel expects entries to be marked huge before we use set_pmd_at()/set_pud_at(). Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 8704901f6bd8

[PATCH v4 05/13] mm/debug_vm_pgtable/savedwrite: Enable savedwrite test with CONFIG_NUMA_BALANCING

2020-09-02 Thread Aneesh Kumar K.V
enable the test only when CONFIG_NUMA_BALANCING is enabled and use protnone protflags. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 4c73e63b4ceb

[PATCH v4 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support.

2020-09-02 Thread Aneesh Kumar K.V
ppc64 supports huge vmap only with radix translation. Hence use arch helper to determine the huge vmap support. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm

[PATCH v4 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-09-02 Thread Aneesh Kumar K.V
ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index

[PATCH v4 01/13] powerpc/mm: Add DEBUG_VM WARN for pmd_clear

2020-09-02 Thread Aneesh Kumar K.V
With the hash page table, the kernel should not use pmd_clear for clearing huge pte entries. Add a DEBUG_VM WARN to catch the wrong usage. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pgtable.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch

[PATCH v4 02/13] powerpc/mm: Move setting pte specific flags to pfn_pte

2020-09-02 Thread Aneesh Kumar K.V
setting _PAGE_PTE bit. We will remove that after a few releases. With respect to huge pmd entries, pmd_mkhuge() takes care of adding the _PAGE_PTE bit. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pgtable.h | 15 +-- arch/powerpc/include/asm/nohash/pgtable.h

[PATCH v4 00/13] mm/debug_vm_pgtable fixes

2020-09-02 Thread Aneesh Kumar K.V
bisect failure. Changes from v2: * Fix build failure with different configs and architecture. Changes from v1: * Address review feedback * drop test specific pfn_pte and pfn_pmd. * Update ppc64 page table helper to add _PAGE_PTE Aneesh Kumar K.V (13): powerpc/mm: Add DEBUG_VM WARN for pmd_clear

Re: [PATCH] powerpc: Fix random segfault when freeing hugetlb range

2020-09-02 Thread Aneesh Kumar K.V
On 9/2/20 1:41 PM, Christophe Leroy wrote: Le 02/09/2020 à 05:23, Aneesh Kumar K.V a écrit : Christophe Leroy writes: The following random segfault is observed from time to time with map_hugetlb selftest: root@localhost:~# ./map_hugetlb 1 19 524288 kB hugepages Mapping 1 Mbytes

[PATCH v3] powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc

2020-09-01 Thread Aneesh Kumar K.V
+0x4dc/0x5a4 [c00c6d19fdb0] c0012474 kernel_init+0x24/0x160 [c00c6d19fe20] c000cbd0 ret_from_kernel_thread+0x5c/0x6c 33:mon> Signed-off-by: Aneesh Kumar K.V --- Documentation/features/debug/debug-vm-pgtable/arch-support.txt | 2 +- arch/powerpc/Kcon

Re: [PATCH v3 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-09-01 Thread Aneesh Kumar K.V
On 9/2/20 9:19 AM, Anshuman Khandual wrote: On 09/01/2020 03:28 PM, Aneesh Kumar K.V wrote: On 9/1/20 1:08 PM, Anshuman Khandual wrote: On 09/01/2020 12:07 PM, Aneesh Kumar K.V wrote: On 9/1/20 8:55 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote

Re: [PATCH] powerpc: Fix random segfault when freeing hugetlb range

2020-09-01 Thread Aneesh Kumar K.V
not be done in hugetlb_free_pgd_range(), it > must be done in hugetlb_free_pte_range(). > Reviewed-by: Aneesh Kumar K.V > Fixes: b250c8c08c79 ("powerpc/8xx: Manage 512k huge pages as standard pages.") > Cc: sta...@vger.kernel.org > Signed-off-by: Christophe Leroy &g

Re: [PATCH v3 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 1:08 PM, Anshuman Khandual wrote: On 09/01/2020 12:07 PM, Aneesh Kumar K.V wrote: On 9/1/20 8:55 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off

[PATCH v2] powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc

2020-09-01 Thread Aneesh Kumar K.V
+0x4dc/0x5a4 [c00c6d19fdb0] c0012474 kernel_init+0x24/0x160 [c00c6d19fe20] c000cbd0 ret_from_kernel_thread+0x5c/0x6c 33:mon> Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powe

Re: [PATCH v3 09/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-09-01 Thread Aneesh Kumar K.V
[   17.080644] [ cut here ] [   17.081342] kernel BUG at mm/pgtable-generic.c:164! [   17.082091] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [   17.082977] Modules linked in: [   17.083481] CPU: 79 PID: 1 Comm: swapper/0 Tainted: G    W

Re: [PATCH] powerpc/mm: Remove DEBUG_VM_PGTABLE support on ppc64

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 2:40 PM, Christophe Leroy wrote: Le 01/09/2020 à 10:15, Christophe Leroy a écrit : Le 01/09/2020 à 10:12, Aneesh Kumar K.V a écrit : On 9/1/20 1:40 PM, Christophe Leroy wrote: Le 01/09/2020 à 10:02, Aneesh Kumar K.V a écrit : The test is broken w.r.t page table update rules

Re: [PATCH] powerpc/mm: Remove DEBUG_VM_PGTABLE support on ppc64

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 1:40 PM, Christophe Leroy wrote: Le 01/09/2020 à 10:02, Aneesh Kumar K.V a écrit : The test is broken w.r.t page table update rules and results in kernel crash as below. Disable the support untill we get the tests updated. Signed-off-by: Aneesh Kumar K.V Any Fixes: tag

[PATCH] powerpc/mm: Remove DEBUG_VM_PGTABLE support on ppc64

2020-09-01 Thread Aneesh Kumar K.V
> Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 65bed1fdeaad..787e829b6f25 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -116,7 +116,6 @@ config

Re: [PATCH v3 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 1:16 PM, Anshuman Khandual wrote: On 09/01/2020 01:06 PM, Aneesh Kumar K.V wrote: On 9/1/20 1:02 PM, Anshuman Khandual wrote: On 09/01/2020 11:51 AM, Aneesh Kumar K.V wrote: On 9/1/20 8:45 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: ppc64 use

Re: [PATCH v3 08/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 12:20 PM, Christophe Leroy wrote: Le 01/09/2020 à 08:25, Aneesh Kumar K.V a écrit : On 9/1/20 8:52 AM, Anshuman Khandual wrote: There is a checkpatch.pl warning here. WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7: Architectures like

Re: [PATCH v3 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 1:02 PM, Anshuman Khandual wrote: On 09/01/2020 11:51 AM, Aneesh Kumar K.V wrote: On 9/1/20 8:45 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off

Re: [PATCH v3 09/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 9:11 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: This will help in adding proper locks in a later patch It really makes sense to classify these tests here as static and dynamic. Static are the ones that test via page table entry values modification

Re: [PATCH v3 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 8:55 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH v3 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 9:33 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: The seems to be missing quite a lot of details w.r.t allocating the correct pgtable_t page (huge_pte_alloc()), holding the right lock (huge_pte_lock()) etc. The vma used is also not a hugetlb VMA

Re: [PATCH v3 08/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 8:52 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: Architectures like ppc64 use deposited page table while updating the huge pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 10 +++--- 1 file changed, 7 insertions(+), 3

Re: [PATCH v3 06/13] mm/debug_vm_pgtable/THP: Mark the pte entry huge before using set_pmd/pud_at

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 8:51 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: kernel expects entries to be marked huge before we use set_pmd_at()/set_pud_at(). Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 21 - 1 file changed, 12

Re: [PATCH v3 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-09-01 Thread Aneesh Kumar K.V
On 9/1/20 8:45 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 13 ++--- 1 file changed, 10

[PATCH v2] powerpc/book3s64/radix: Fix boot failure with large amount of guest memory

2020-08-28 Thread Aneesh Kumar K.V
-by: Shirisha Ganta Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/mmu.h | 10 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 15 --- arch/powerpc/mm/init_64.c| 11 +-- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/a

[PATCH v3 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-08-27 Thread Aneesh Kumar K.V
pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 21329c7d672f

[PATCH v3 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-08-27 Thread Aneesh Kumar K.V
on ppc64. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 4 1 file changed, 4 insertions(+) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index a188b6e4e37e..21329c7d672f 100644 --- a/mm/debug_vm_pgtable.c +++ b/mm/debug_vm_pgtable.c @@ -813,6 +813,7 @@ static void

[PATCH v3 11/13] mm/debug_vm_pgtable/pmd_clear: Don't use pmd/pud_clear on pte entries

2020-08-27 Thread Aneesh Kumar K.V
pmd_clear() should not be used to clear pmd level pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 0a6e771ebd13..a188b6e4e37e 100644 --- a/mm

[PATCH v3 09/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-08-27 Thread Aneesh Kumar K.V
This will help in adding proper locks in a later patch Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 52 --- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 0ce5c6a24c5b

[PATCH v3 10/13] mm/debug_vm_pgtable/locks: Take correct page table lock

2020-08-27 Thread Aneesh Kumar K.V
Make sure we call pte accessors with correct lock held. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 78c8af3445ac

[PATCH v3 08/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-08-27 Thread Aneesh Kumar K.V
Architectures like ppc64 use deposited page table while updating the huge pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index f9f6358899a8

[PATCH v3 07/13] mm/debug_vm_pgtable/set_pte/pmd/pud: Don't use set_*_at to update an existing pte entry

2020-08-27 Thread Aneesh Kumar K.V
set_pte_at() should not be used to set a pte entry at locations that already holds a valid pte entry. Architectures like ppc64 don't do TLB invalidate in set_pte_at() and hence expect it to be used to set locations that are not a valid PTE. Signed-off-by: Aneesh Kumar K.V --- mm

[PATCH v3 06/13] mm/debug_vm_pgtable/THP: Mark the pte entry huge before using set_pmd/pud_at

2020-08-27 Thread Aneesh Kumar K.V
kernel expects entries to be marked huge before we use set_pmd_at()/set_pud_at(). Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index

[PATCH v3 05/13] mm/debug_vm_pgtable/savedwrite: Enable savedwrite test with CONFIG_NUMA_BALANCING

2020-08-27 Thread Aneesh Kumar K.V
enable the test only when CONFIG_NUMA_BALANCING is enabled and use protnone protflags. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 28f9d0558c20

[PATCH v3 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support.

2020-08-27 Thread Aneesh Kumar K.V
ppc64 supports huge vmap only with radix translation. Hence use arch helper to determine the huge vmap support. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm

[PATCH v3 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-08-27 Thread Aneesh Kumar K.V
ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index

[PATCH v3 02/13] powerpc/mm: Move setting pte specific flags to pfn_pte

2020-08-27 Thread Aneesh Kumar K.V
setting _PAGE_PTE bit. We will remove that after a few releases. With respect to huge pmd entries, pmd_mkhuge() takes care of adding the _PAGE_PTE bit. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pgtable.h | 15 +-- arch/powerpc/include/asm/nohash/pgtable.h

[PATCH v3 01/13] powerpc/mm: Add DEBUG_VM WARN for pmd_clear

2020-08-27 Thread Aneesh Kumar K.V
With the hash page table, the kernel should not use pmd_clear for clearing huge pte entries. Add a DEBUG_VM WARN to catch the wrong usage. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pgtable.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch

[PATCH v3 00/13] mm/debug_vm_pgtable fixes

2020-08-27 Thread Aneesh Kumar K.V
test specific pfn_pte and pfn_pmd. * Update ppc64 page table helper to add _PAGE_PTE Aneesh Kumar K.V (13): powerpc/mm: Add DEBUG_VM WARN for pmd_clear powerpc/mm: Move setting pte specific flags to pfn_pte mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value mm

[PATCH v5 23/23] powerpc/book3s64/pkeys: Optimize FTR_KUAP and FTR_KUEP disabled case

2020-08-26 Thread Aneesh Kumar K.V
cycles With smap/smep enabled: Without patch: 1017.26 ns2950.36 cycles With patch: 1021.51 ns2962.44 cycles Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 61 +--- arch/powerpc/kernel/entry_64.S | 2 +- arch

[PATCH v5 22/23] powerpc/book3s64/hash/kup: Don't hardcode kup key

2020-08-26 Thread Aneesh Kumar K.V
Make KUAP/KUEP key a variable and also check whether the platform limit the max key such that we can't use the key for KUAP/KEUP. Signed-off-by: Aneesh Kumar K.V --- .../powerpc/include/asm/book3s/64/hash-pkey.h | 22 +--- arch/powerpc/include/asm/book3s/64/pkeys.h| 1 + arch/powerpc

[PATCH v5 21/23] powerpc/book3s64/hash/kuep: Enable KUEP on hash

2020-08-26 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 16ea0b2f0ea5..b862d5cd78ff 100644 --- a/arch/powerpc/mm/book3s64/pkeys.c +++ b

[PATCH v5 20/23] powerpc/book3s64/hash/kuap: Enable kuap on hash

2020-08-26 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 391230f93da2..16ea0b2f0ea5 100644 --- a/arch/powerpc/mm/book3s64/pkeys.c +++ b

[PATCH v5 19/23] powerpc/book3s64/kuep: Use Key 3 to implement KUEP with hash translation.

2020-08-26 Thread Aneesh Kumar K.V
Radix use IAMR Key 0 and hash translation use IAMR key 3. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/64/kup.h b/arch/powerpc/include/asm/book3s/64/kup.h index

[PATCH v5 18/23] powerpc/book3s64/kuap: Use Key 3 to implement KUAP with hash translation.

2020-08-26 Thread Aneesh Kumar K.V
Radix use AMR Key 0 and hash translation use AMR key 3. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/kup.h b/arch/powerpc/include/asm/book3s/64/kup.h

[PATCH v5 16/23] powerpc/book3s64/kuap: Restrict access to userspace based on userspace AMR

2020-08-26 Thread Aneesh Kumar K.V
If an application has configured address protection such that read/write is denied using pkey even the kernel should receive a FAULT on accessing the same. This patch use user AMR value stored in pt_regs.kuap to achieve the same. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm

[PATCH v5 17/23] powerpc/book3s64/kuap: Improve error reporting with KUAP

2020-08-26 Thread Aneesh Kumar K.V
With hash translation use DSISR_KEYFAULT to identify a wrong access. With Radix we look at the AMR value and type of fault. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/kup.h | 4 +-- arch/powerpc/include/asm/book3s/64/kup.h | 27 arch

[PATCH v5 15/23] powerpc/book3s64/pkeys: Don't update SPRN_AMR when in kernel mode.

2020-08-26 Thread Aneesh Kumar K.V
Now that kernel correctly store/restore userspace AMR/IAMR values, avoid manipulating AMR and IAMR from the kernel on behalf of userspace. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 18 arch/powerpc/include/asm/processor.h | 4 -- arch/powerpc

[PATCH v5 14/23] powerpc/ptrace-view: Use pt_regs values instead of thread_struct based one.

2020-08-26 Thread Aneesh Kumar K.V
We will remove thread.amr/iamr/uamor in a later patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/ptrace/ptrace-view.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-view.c b/arch/powerpc/kernel/ptrace/ptrace-view.c

[PATCH v5 13/23] powerpc/book3s64/pkeys: Reset userspace AMR correctly on exec

2020-08-26 Thread Aneesh Kumar K.V
On fork, we inherit from the parent and on exec, we should switch to default_amr values. Also, avoid changing the AMR register value within the kernel. The kernel now runs with different AMR values. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pkeys.h | 2 ++ arch

[PATCH v5 12/23] powerpc/book3s64/pkeys: Inherit correctly on fork.

2020-08-26 Thread Aneesh Kumar K.V
Child thread.kuap value is inherited from the parent in copy_thread_tls. We still need to make sure when the child returns from a fork in the kernel we start with the kernel default AMR value. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/process.c | 9 + 1 file changed, 9

[PATCH v5 11/23] powerpc/book3s64/pkeys: Store/restore userspace AMR/IAMR correctly on entry and exit from kernel

2020-08-26 Thread Aneesh Kumar K.V
. This is required so that if we get interrupted within copy_to/from_user we continue with the right AMR value. If we hae MMU_FTR_KUEP enabled we need to restore IAMR on return to userspace beause kernel will be running with a different IAMR value. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc

[PATCH v5 10/23] powerpc/exec: Set thread.regs early during exec

2020-08-26 Thread Aneesh Kumar K.V
In later patches during exec, we would like to access default regs.kuap to control access to the user mapping. Having thread.regs set early makes the code changes simpler. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/thread_info.h | 2 -- arch/powerpc/kernel/process.c

[PATCH v5 08/23] powerpc/book3s64/kuap: Rename MMU_FTR_RADIX_KUAP to MMU_FTR_KUAP

2020-08-26 Thread Aneesh Kumar K.V
This is in preparate to adding support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also move the feature bit closer to MMU_FTR_KUEP. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 18

[PATCH v5 09/23] powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation

2020-08-26 Thread Aneesh Kumar K.V
. Signed-off-by: Aneesh Kumar K.V --- .../powerpc/include/asm/book3s/64/hash-pkey.h | 24 ++- arch/powerpc/include/asm/book3s/64/hash.h | 2 +- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/include/asm/mmu_context.h| 2 +- arch/powerpc/mm/book3s64

[PATCH v5 07/23] powerpc/book3s64/kuep: Move KUEP related function outside radix

2020-08-26 Thread Aneesh Kumar K.V
The next set of patches adds support for kuep with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also set MMU_FTR_KUEP and add the missing isync(). Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 1 + arch

[PATCH v5 06/23] powerpc/book3s64/kup: Use the correct #ifdef when including headers

2020-08-26 Thread Aneesh Kumar K.V
Use CONFIG_PPC_BOOK3S_64 instead of CONFIG_PPC64. This avoid wrong inclusion with other 64bit platforms. To fix booke 64 build error add macro kuap_check_amr. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kup.h | 8 1 file changed, 8 insertions(+) diff --git a/arch

[PATCH v5 05/23] powerpc/book3s64/kuap: Move KUAP related function outside radix

2020-08-26 Thread Aneesh Kumar K.V
The next set of patches adds support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Signed-off-by: Aneesh Kumar K.V --- .../asm/book3s/64/{kup-radix.h => kup.h} | 6 ++--- arch/powerpc/include/asm/kup.h|

[PATCH v5 04/23] powerpc/book3s64/kuap/kuep: Move uamor setup to pkey init

2020-08-26 Thread Aneesh Kumar K.V
CPUs supporting radix translation. The old code was not updating UAMOR if we had smap disabled and smep enabled. This change handles that case. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_pgtable.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH v5 03/23] powerpc/book3s64/kuap/kuep: Make KUAP and KUEP a subfeature of PPC_MEM_KEYS

2020-08-26 Thread Aneesh Kumar K.V
of the initialization code to pkeys.c Signed-off-by: Aneesh Kumar K.V --- .../powerpc/include/asm/book3s/64/kup-radix.h | 33 +++ arch/powerpc/include/asm/book3s/64/mmu.h | 2 +- arch/powerpc/include/asm/ptrace.h | 2 +- arch/powerpc/kernel/asm-offsets.c | 2

[PATCH v5 02/23] KVM: PPC: BOOK3S: PR: Ignore UAMOR SPR

2020-08-26 Thread Aneesh Kumar K.V
ignore access to them and for mfstpr return 0 indicating no AMR/IAMR update is no allowed. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kvm/book3s_emulate.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c index

[PATCH v5 01/23] powerpc: Add new macro to handle NESTED_IFCLR

2020-08-26 Thread Aneesh Kumar K.V
This will be used by the following patches Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/feature-fixups.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h index b0af97add751..122c22161268

[PATCH v5 00/23] Kernel userspace access/execution prevention with hash translation

2020-08-26 Thread Aneesh Kumar K.V
from v2: * Rebase to the latest kernel. * Fixed a bug with disabling KUEP/KUAP on kernel command line * Added a patch to make kup key dynamic. Changes from V1: * Rebased on latest kernel Aneesh Kumar K.V (23): powerpc: Add new macro to handle NESTED_IFCLR KVM: PPC: BOOK3S: PR: Ignore UAMOR SPR

Re: [PATCH v2 00/13] mm/debug_vm_pgtable fixes

2020-08-21 Thread Aneesh Kumar K.V
Sure. I am hoping kernel test robot will pick this up. I did an x86 and about 19 different ppc config build with the series. The git tree above was pushed with that. Considering you authored the change i am wondering if you could help with checking other architecture (may be atleast arm

Re: [PATCH v2 00/13] mm/debug_vm_pgtable fixes

2020-08-21 Thread Aneesh Kumar K.V
On 8/21/20 1:31 PM, Anshuman Khandual wrote: On 08/21/2020 12:23 PM, Aneesh Kumar K.V wrote: On 8/21/20 9:03 AM, Anshuman Khandual wrote: On 08/19/2020 07:15 PM, Aneesh Kumar K.V wrote: "Aneesh Kumar K.V" writes: This patch series includes fixes for debug_vm_pgtable te

Re: [PATCH v2 10/13] mm/debug_vm_pgtable/locks: Take correct page table lock

2020-08-21 Thread Aneesh Kumar K.V
On 8/21/20 1:33 PM, Anshuman Khandual wrote: On 08/19/2020 06:31 PM, Aneesh Kumar K.V wrote: Make sure we call pte accessors with correct lock held. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 34 -- 1 file changed, 20 insertions(+), 14

Re: [PATCH v2 07/13] mm/debug_vm_pgtable/set_pte/pmd/pud: Don't use set_*_at to update an existing pte entry

2020-08-21 Thread Aneesh Kumar K.V
On 8/20/20 8:02 PM, Christophe Leroy wrote: Le 19/08/2020 à 15:01, Aneesh Kumar K.V a écrit : set_pte_at() should not be used to set a pte entry at locations that already holds a valid pte entry. Architectures like ppc64 don't do TLB invalidate in set_pte_at() and hence expect it to be used

Re: [PATCH v2 00/13] mm/debug_vm_pgtable fixes

2020-08-21 Thread Aneesh Kumar K.V
On 8/21/20 9:03 AM, Anshuman Khandual wrote: On 08/19/2020 07:15 PM, Aneesh Kumar K.V wrote: "Aneesh Kumar K.V" writes: This patch series includes fixes for debug_vm_pgtable test code so that they follow page table updates rules correctly. The first two patches introduce cha

Re: [PATCH v2 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support.

2020-08-19 Thread Aneesh Kumar K.V
kernel test robot writes: > Hi "Aneesh, > > I love your patch! Yet something to improve: > > [auto build test ERROR on hnaz-linux-mm/master] > [also build test ERROR on powerpc/next linus/master v5.9-rc1 next-20200819] > [cannot apply to mmotm/master] > [If your patch is applied to the wrong git

Re: [PATCH v2 00/13] mm/debug_vm_pgtable fixes

2020-08-19 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > This patch series includes fixes for debug_vm_pgtable test code so that > they follow page table updates rules correctly. The first two patches > introduce > changes w.r.t ppc64. The patches are included in this series for > completeness

[PATCH v2 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support.

2020-08-19 Thread Aneesh Kumar K.V
ppc64 supports huge vmap only with radix translation. Hence use arch helper to determine the huge vmap support. Signed-off-by: Aneesh Kumar K.V --- include/linux/io.h| 12 mm/debug_vm_pgtable.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include

[PATCH v2 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-08-19 Thread Aneesh Kumar K.V
pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 09ce9974c187

[PATCH v2 05/13] mm/debug_vm_pgtable/savedwrite: Enable savedwrite test with CONFIG_NUMA_BALANCING

2020-08-19 Thread Aneesh Kumar K.V
enable the test only when CONFIG_NUMA_BALANCING is enabled and use protnone protflags. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index cf3c4792b4a2

[PATCH v2 09/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-08-19 Thread Aneesh Kumar K.V
This will help in adding proper locks in a later patch Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 52 --- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 6dcac2b40fef

[PATCH v2 06/13] mm/debug_vm_pgtable/THP: Mark the pte entry huge before using set_pmd/pud_at

2020-08-19 Thread Aneesh Kumar K.V
kernel expects entries to be marked huge before we use set_pmd_at()/set_pud_at(). Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index ffa10ede6842

[PATCH v2 07/13] mm/debug_vm_pgtable/set_pte/pmd/pud: Don't use set_*_at to update an existing pte entry

2020-08-19 Thread Aneesh Kumar K.V
set_pte_at() should not be used to set a pte entry at locations that already holds a valid pte entry. Architectures like ppc64 don't do TLB invalidate in set_pte_at() and hence expect it to be used to set locations that are not a valid PTE. Signed-off-by: Aneesh Kumar K.V --- mm

[PATCH v2 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-08-19 Thread Aneesh Kumar K.V
on ppc64. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 63576fe767a2..09ce9974c187 100644 --- a/mm/debug_vm_pgtable.c +++ b/mm/debug_vm_pgtable.c @@ -798,6 +798,7

[PATCH v2 11/13] mm/debug_vm_pgtable/pmd_clear: Don't use pmd/pud_clear on pte entries

2020-08-19 Thread Aneesh Kumar K.V
pmd_clear() should not be used to clear pmd level pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 8f7a8ccb5a54..63576fe767a2 100644 --- a/mm

[PATCH v2 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-08-19 Thread Aneesh Kumar K.V
ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 086309fb9b6f

[PATCH v2 10/13] mm/debug_vm_pgtable/locks: Take correct page table lock

2020-08-19 Thread Aneesh Kumar K.V
Make sure we call pte accessors with correct lock held. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index 69fe3cd8126c

  1   2   3   4   5   6   7   8   9   10   >