diff mbox series

powerpc/mm: Remove DEBUG_VM_PGTABLE support on ppc64

Message ID 20200901080245.67950-1-aneesh.kumar@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series powerpc/mm: Remove DEBUG_VM_PGTABLE support on ppc64 | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (f5d3660ab83be7c3dc2c8a5d662bbac7bc1b092f)
snowpatch_ozlabs/build-ppc64le warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64be warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64e warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-pmac32 warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/checkpatch warning total: 0 errors, 1 warnings, 0 checks, 7 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Aneesh Kumar K V Sept. 1, 2020, 8:02 a.m. UTC
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.

[   21.083506] ------------[ cut here ]------------
[   21.083519] kernel BUG at arch/powerpc/mm/pgtable.c:304!
cpu 0x0: Vector: 700 (Program Check) at [c000000c6d1e76c0]
    pc: c00000000009a5ec: assert_pte_locked+0x14c/0x380
    lr: c0000000005eeeec: pte_update+0x11c/0x190
    sp: c000000c6d1e7950
   msr: 8000000002029033
  current = 0xc000000c6d172c80
  paca    = 0xc000000003ba0000   irqmask: 0x03   irq_happened: 0x01
    pid   = 1, comm = swapper/0
kernel BUG at arch/powerpc/mm/pgtable.c:304!
Linux version 5.9.0-rc2-34902-g4da73871507c (kvaneesh@ltczz75-lp2) (gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #301 SMP Tue Sep 1 02:28:29 CDT 2020
enter ? for help
[link register   ] c0000000005eeeec pte_update+0x11c/0x190
[c000000c6d1e7950] 0000000000000001 (unreliable)
[c000000c6d1e79b0] c0000000005eee14 pte_update+0x44/0x190
[c000000c6d1e7a10] c000000001a2ca9c pte_advanced_tests+0x160/0x3d8
[c000000c6d1e7ab0] c000000001a2d4fc debug_vm_pgtable+0x7e8/0x1338
[c000000c6d1e7ba0] c0000000000116ec do_one_initcall+0xac/0x5f0
[c000000c6d1e7c80] c0000000019e4fac kernel_init_freeable+0x4dc/0x5a4
[c000000c6d1e7db0] c000000000012474 kernel_init+0x24/0x160
[c000000c6d1e7e20] c00000000000cbd0 ret_from_kernel_thread+0x5c/0x6c

With DEBUG_VM disabled

[   20.530152] BUG: Kernel NULL pointer dereference on read at 0x00000000
[   20.530183] Faulting instruction address: 0xc0000000000df330
cpu 0x33: Vector: 380 (Data SLB Access) at [c000000c6d19f700]
    pc: c0000000000df330: memset+0x68/0x104
    lr: c00000000009f6d8: hash__pmdp_huge_get_and_clear+0xe8/0x1b0
    sp: c000000c6d19f990
   msr: 8000000002009033
   dar: 0
  current = 0xc000000c6d177480
  paca    = 0xc00000001ec4f400   irqmask: 0x03   irq_happened: 0x01
    pid   = 1, comm = swapper/0
Linux version 5.9.0-rc2-34902-g4da73871507c (kvaneesh@ltczz75-lp2) (gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #302 SMP Tue Sep 1 02:56:02 CDT 2020
enter ? for help
[link register   ] c00000000009f6d8 hash__pmdp_huge_get_and_clear+0xe8/0x1b0
[c000000c6d19f990] c00000000009f748 hash__pmdp_huge_get_and_clear+0x158/0x1b0 (unreliable)
[c000000c6d19fa10] c0000000019ebf30 pmd_advanced_tests+0x1f0/0x378
[c000000c6d19fab0] c0000000019ed088 debug_vm_pgtable+0x79c/0x1244
[c000000c6d19fba0] c0000000000116ec do_one_initcall+0xac/0x5f0
[c000000c6d19fc80] c0000000019a4fac kernel_init_freeable+0x4dc/0x5a4
[c000000c6d19fdb0] c000000000012474 kernel_init+0x24/0x160
[c000000c6d19fe20] c00000000000cbd0 ret_from_kernel_thread+0x5c/0x6c
33:mon>

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Comments

Christophe Leroy Sept. 1, 2020, 8:10 a.m. UTC | #1
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 <aneesh.kumar@linux.ibm.com>

Any Fixes: tag ?

> ---
>   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 PPC
>   	#
>   	select ARCH_32BIT_OFF_T if PPC32
>   	select ARCH_HAS_DEBUG_VIRTUAL
> -	select ARCH_HAS_DEBUG_VM_PGTABLE


You say you remove support for ppc64 but you are removing it for both 
PPC64 and PPC32. Should you replace the line by:

	select ARCH_HAS_DEBUG_VM_PGTABLE if PPC32

>   	select ARCH_HAS_DEVMEM_IS_ALLOWED
>   	select ARCH_HAS_ELF_RANDOMIZE
>   	select ARCH_HAS_FORTIFY_SOURCE
> 

What about Documentation/features/debug/debug-vm-pgtable/arch-support.txt ?

Christophe
Aneesh Kumar K V Sept. 1, 2020, 8:12 a.m. UTC | #2
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 <aneesh.kumar@linux.ibm.com>
> 
> Any Fixes: tag ?
> 
>> ---
>>   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 PPC
>>       #
>>       select ARCH_32BIT_OFF_T if PPC32
>>       select ARCH_HAS_DEBUG_VIRTUAL
>> -    select ARCH_HAS_DEBUG_VM_PGTABLE
> 
> 
> You say you remove support for ppc64 but you are removing it for both 
> PPC64 and PPC32. Should you replace the line by:

Does it work on PPC32 with DEBUG_VM enabled? I was expecting it will be 
broken there too.

> 
>      select ARCH_HAS_DEBUG_VM_PGTABLE if PPC32
> 
>>       select ARCH_HAS_DEVMEM_IS_ALLOWED
>>       select ARCH_HAS_ELF_RANDOMIZE
>>       select ARCH_HAS_FORTIFY_SOURCE
>>
> 
> What about Documentation/features/debug/debug-vm-pgtable/arch-support.txt ?
> 

I am hoping we can enable the config once we resolve the test issues. 
may be in next merge window.

-aneesh
Christophe Leroy Sept. 1, 2020, 8:15 a.m. UTC | #3
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 and results in kernel
>>> crash as below. Disable the support untill we get the tests updated.
>>>
>>>
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>>
>> Any Fixes: tag ?
>>
>>> ---
>>>   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 PPC
>>>       #
>>>       select ARCH_32BIT_OFF_T if PPC32
>>>       select ARCH_HAS_DEBUG_VIRTUAL
>>> -    select ARCH_HAS_DEBUG_VM_PGTABLE
>>
>>
>> You say you remove support for ppc64 but you are removing it for both 
>> PPC64 and PPC32. Should you replace the line by:
> 
> Does it work on PPC32 with DEBUG_VM enabled? I was expecting it will be 
> broken there too.

I was wondering. I have just started a build to test that on my 8xx. 
I'll tell you before noon (Paris).

Christophe

> 
>>
>>      select ARCH_HAS_DEBUG_VM_PGTABLE if PPC32
>>
>>>       select ARCH_HAS_DEVMEM_IS_ALLOWED
>>>       select ARCH_HAS_ELF_RANDOMIZE
>>>       select ARCH_HAS_FORTIFY_SOURCE
>>>
>>
>> What about 
>> Documentation/features/debug/debug-vm-pgtable/arch-support.txt ?
>>
> 
> I am hoping we can enable the config once we resolve the test issues. 
> may be in next merge window.
> 
> -aneesh
> 
> 
>
Christophe Leroy Sept. 1, 2020, 9:10 a.m. UTC | #4
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 and results in kernel
>>>> crash as below. Disable the support untill we get the tests updated.
>>>>
>>>>
>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>>>
>>> Any Fixes: tag ?
>>>
>>>> ---
>>>>   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 PPC
>>>>       #
>>>>       select ARCH_32BIT_OFF_T if PPC32
>>>>       select ARCH_HAS_DEBUG_VIRTUAL
>>>> -    select ARCH_HAS_DEBUG_VM_PGTABLE
>>>
>>>
>>> You say you remove support for ppc64 but you are removing it for both 
>>> PPC64 and PPC32. Should you replace the line by:
>>
>> Does it work on PPC32 with DEBUG_VM enabled? I was expecting it will 
>> be broken there too.
> 
> I was wondering. I have just started a build to test that on my 8xx. 
> I'll tell you before noon (Paris).
> 

There are warnings but it boots OK. So up to you, but if you deactivate 
it for both PPC32 and PPC64, say so in the subject like.

[    7.065399] debug_vm_pgtable: [debug_vm_pgtable         ]: Validating 
architecture page table helpers
[    7.075155] ------------[ cut here ]------------
[    7.079590] WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/pgtable.c:185 
set_pte_at+0x20/0xf4
[    7.087542] CPU: 0 PID: 1 Comm: swapper Not tainted 
5.9.0-rc2-s3k-dev-01348-g283e890ee4ad #3933
[    7.096122] NIP:  c000f634 LR: c07440f8 CTR: 00000000
[    7.101124] REGS: c9023c50 TRAP: 0700   Not tainted 
(5.9.0-rc2-s3k-dev-01348-g283e890ee4ad)
[    7.109445] MSR:  00029032 <EE,ME,IR,DR,RI>  CR: 53000339  XER: 80006100
[    7.116072]
[    7.116072] GPR00: c07440f8 c9023d08 c60e4000 c6ba4000 1efac000 
c6ba8eb0 c9023da8 00000001
[    7.116072] GPR08: 00000004 007346c9 c6ba8ebc 00000000 93000333 
00000000 c000390c 00000000
[    7.116072] GPR16: c0840000 00000ec9 000001ec 00734000 06ba8000 
c6bb0000 c05f43e8 1efac000
[    7.116072] GPR24: fffffff0 c6b96d08 c6ba8eac c6ba4000 1efac000 
007346c9 c6ba8eb0 007346c9
[    7.150796] NIP [c000f634] set_pte_at+0x20/0xf4
[    7.155274] LR [c07440f8] pte_advanced_tests+0xec/0x2bc
[    7.160401] Call Trace:
[    7.162831] [c9023d08] [c080db94] 0xc080db94 (unreliable)
[    7.168183] [c9023d28] [c07440f8] pte_advanced_tests+0xec/0x2bc
[    7.174036] [c9023dd8] [c0744498] debug_vm_pgtable+0x1d0/0x668
[    7.179827] [c9023e98] [c0734cd4] do_one_initcall+0x8c/0x1cc
[    7.185405] [c9023ef8] [c0735008] kernel_init_freeable+0x178/0x1d0
[    7.191511] [c9023f28] [c0003920] kernel_init+0x14/0x114
[    7.196763] [c9023f38] [c000e184] ret_from_kernel_thread+0x14/0x1c
[    7.202818] Instruction dump:
[    7.205754] bba10014 7c0803a6 38210020 4e800020 7c0802a6 9421ffe0 
bfc10018 90010024
[    7.213412] 83e60000 81250000 71270001 41820008 <0fe00000> 73e90040 
41820080 73ea0001
[    7.221249] ---[ end trace 95bbebcafa22d0f7 ]---
[    7.226049] ------------[ cut here ]------------
[    7.230438] WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/pgtable.c:185 
set_pte_at+0x20/0xf4
[    7.238410] CPU: 0 PID: 1 Comm: swapper Tainted: G        W 
5.9.0-rc2-s3k-dev-01348-g283e890ee4ad #3933
[    7.248363] NIP:  c000f634 LR: c0744218 CTR: 00000000
[    7.253368] REGS: c9023c50 TRAP: 0700   Tainted: G        W 
(5.9.0-rc2-s3k-dev-01348-g283e890ee4ad)
[    7.263064] MSR:  00029032 <EE,ME,IR,DR,RI>  CR: 53000335  XER: a0006100
[    7.269690]
[    7.269690] GPR00: c0744218 c9023d08 c60e4000 c6ba4000 1efac000 
c6ba8eb0 c9023da8 00000001
[    7.269690] GPR08: 00000000 007341c9 00000000 007341c9 93000333 
00000000 c000390c 00000000
[    7.269690] GPR16: c0840000 00000ec9 000001ec 00734000 06ba8000 
c6bb0000 c05f43e8 1efac000
[    7.269690] GPR24: fffffff0 c6b96d08 c6ba8eac c6ba4000 1efac000 
007346c9 c6ba8eb0 007346c9
[    7.304418] NIP [c000f634] set_pte_at+0x20/0xf4
[    7.308892] LR [c0744218] pte_advanced_tests+0x20c/0x2bc
[    7.314105] Call Trace:
[    7.316535] [c9023d08] [c080db94] 0xc080db94 (unreliable)
[    7.321888] [c9023d28] [c0744218] pte_advanced_tests+0x20c/0x2bc
[    7.327826] [c9023dd8] [c0744498] debug_vm_pgtable+0x1d0/0x668
[    7.333613] [c9023e98] [c0734cd4] do_one_initcall+0x8c/0x1cc
[    7.339196] [c9023ef8] [c0735008] kernel_init_freeable+0x178/0x1d0
[    7.345300] [c9023f28] [c0003920] kernel_init+0x14/0x114
[    7.350551] [c9023f38] [c000e184] ret_from_kernel_thread+0x14/0x1c
[    7.356609] Instruction dump:
[    7.359545] bba10014 7c0803a6 38210020 4e800020 7c0802a6 9421ffe0 
bfc10018 90010024
[    7.367203] 83e60000 81250000 71270001 41820008 <0fe00000> 73e90040 
41820080 73ea0001
[    7.375039] ---[ end trace 95bbebcafa22d0f8 ]---
[    7.379783] ------------[ cut here ]------------
[    7.384228] WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/pgtable.c:276 
set_huge_pte_at+0x104/0x134
[    7.392803] CPU: 0 PID: 1 Comm: swapper Tainted: G        W 
5.9.0-rc2-s3k-dev-01348-g283e890ee4ad #3933
[    7.402756] NIP:  c000f8fc LR: c074465c CTR: 00000000
[    7.407761] REGS: c9023d00 TRAP: 0700   Tainted: G        W 
(5.9.0-rc2-s3k-dev-01348-g283e890ee4ad)
[    7.417456] MSR:  00029032 <EE,ME,IR,DR,RI>  CR: 53000339  XER: a0006100
[    7.424082]
[    7.424082] GPR00: c074465c c9023db8 c60e4000 c6ba4000 000001ec 
c6ba8eb0 c9023e48 00000001
[    7.424082] GPR08: c6ba90ac 0000000b 007346c9 007341c9 93000333 
00000000 c000390c 00000000
[    7.424082] GPR16: c0840000 c6ba8eac 000001ec 00734000 06ba8000 
c6bb0000 c05f43e8 1efac000
[    7.424082] GPR24: c7fb39a0 c6ba8000 c6b96d08 000001cd 000006c9 
c0840000 007346c9 00000080
[    7.458810] NIP [c000f8fc] set_huge_pte_at+0x104/0x134
[    7.463885] LR [c074465c] debug_vm_pgtable+0x394/0x668
[    7.468928] Call Trace:
[    7.471358] [c9023db8] [c6ba8000] 0xc6ba8000 (unreliable)
[    7.476709] [c9023dd8] [c074465c] debug_vm_pgtable+0x394/0x668
[    7.482497] [c9023e98] [c0734cd4] do_one_initcall+0x8c/0x1cc
[    7.488081] [c9023ef8] [c0735008] kernel_init_freeable+0x178/0x1d0
[    7.494182] [c9023f28] [c0003920] kernel_init+0x14/0x114
[    7.499436] [c9023f38] [c000e184] ret_from_kernel_thread+0x14/0x1c
[    7.505494] Instruction dump:
[    7.508429] 7d2a482e 712a0800 40a2ff78 812204b4 2f890000 419e0014 
812900a0 55290034
[    7.516088] 2b890400 419e0014 57de06b0 4bffff54 <0fe00000> 4bffff3c 
7fa3eb78 90a10008
[    7.523925] ---[ end trace 95bbebcafa22d0f9 ]---


Christophe
Aneesh Kumar K V Sept. 1, 2020, 9:13 a.m. UTC | #5
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 and results in kernel
>>>>> crash as below. Disable the support untill we get the tests updated.
>>>>>
>>>>>
>>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>>>>
>>>> Any Fixes: tag ?
>>>>
>>>>> ---
>>>>>   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 PPC
>>>>>       #
>>>>>       select ARCH_32BIT_OFF_T if PPC32
>>>>>       select ARCH_HAS_DEBUG_VIRTUAL
>>>>> -    select ARCH_HAS_DEBUG_VM_PGTABLE
>>>>
>>>>
>>>> You say you remove support for ppc64 but you are removing it for 
>>>> both PPC64 and PPC32. Should you replace the line by:
>>>
>>> Does it work on PPC32 with DEBUG_VM enabled? I was expecting it will 
>>> be broken there too.
>>
>> I was wondering. I have just started a build to test that on my 8xx. 
>> I'll tell you before noon (Paris).
>>
> 
> There are warnings but it boots OK. So up to you, but if you deactivate 
> it for both PPC32 and PPC64, say so in the subject like.
> 

I will update the subject line to indicate powerpc instead of ppc64

-aneesh
diff mbox series

Patch

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 PPC
 	#
 	select ARCH_32BIT_OFF_T if PPC32
 	select ARCH_HAS_DEBUG_VIRTUAL
-	select ARCH_HAS_DEBUG_VM_PGTABLE
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
 	select ARCH_HAS_ELF_RANDOMIZE
 	select ARCH_HAS_FORTIFY_SOURCE