[PATCH v4 00/13] mm/debug_vm_pgtable fixes
Anshuman Khandual
anshuman.khandual at arm.com
Thu Oct 15 13:59:25 AEDT 2020
On 10/15/2020 02:06 AM, Andrew Morton wrote:
> On Wed, 14 Oct 2020 08:45:16 +0530 "Aneesh Kumar K.V" <aneesh.kumar at linux.ibm.com> wrote:
>
>>> Against mm-debug_vm_pgtable-avoid-none-pte-in-pte_clear_test.patch:
>>>
>>> https://lkml.kernel.org/r/87zh5wx51b.fsf@linux.ibm.com
>>
>>
>> yes this one we should get fixed. I was hoping someone familiar with
>> Riscv pte updates rules would pitch in. IIUC we need to update
>> RANDON_ORVALUE similar to how we updated it for s390 and ppc64.
>>
>>
>> Alternatively we can do this
>>
>> modified mm/debug_vm_pgtable.c
>> @@ -548,7 +548,7 @@ static void __init pte_clear_tests(struct mm_struct
>> *mm, pte_t *ptep,
>> pte_t pte = pfn_pte(pfn, prot);
>>
>> pr_debug("Validating PTE clear\n");
>> - pte = __pte(pte_val(pte) | RANDOM_ORVALUE);
>> +// pte = __pte(pte_val(pte) | RANDOM_ORVALUE);
>> set_pte_at(mm, vaddr, ptep, pte);
>> barrier();
>> pte_clear(mm, vaddr, ptep);
>>
>> till we get that feedback from RiscV team?
>
> Would it be better to do
>
> #ifdef CONFIG_S390
> pte = __pte(pte_val(pte) | RANDOM_ORVALUE);
> #endif
I would suggest just dropping RANDOM_ORVALUE from pte_clear_tests()
possibly with a comment saying it needs to be fixed on RISCV before
being added back later.
pte = __pte(pte_val(pte));
OR
Disable RANDOM_ORVALUE only for RISCV.
#ifndef CONFIG_RISCV
pte = __pte(pte_val(pte) | RANDOM_ORVALUE);
#endif
More information about the Linuxppc-dev
mailing list