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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <878t3lu6zs.fsf@concordia.ellerman.id.au>
Date:   Fri, 28 Sep 2018 22:44:07 +1000
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Christophe LEROY <christophe.leroy@....fr>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc: wire up memtest

Christophe LEROY <christophe.leroy@....fr> writes:
> Le 28/09/2018 à 05:41, Michael Ellerman a écrit :
>> Christophe Leroy <christophe.leroy@....fr> writes:
>>> Add call to early_memtest() so that kernel compiled with
>>> CONFIG_MEMTEST really perform memtest at startup when requested
>>> via 'memtest' boot parameter.
>>>
>>> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
>>> ---
>>>   arch/powerpc/kernel/setup-common.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
>>> index 93fa0c99681e..904b728eb20d 100644
>>> --- a/arch/powerpc/kernel/setup-common.c
>>> +++ b/arch/powerpc/kernel/setup-common.c
>>> @@ -33,6 +33,7 @@
>>>   #include <linux/serial_8250.h>
>>>   #include <linux/percpu.h>
>>>   #include <linux/memblock.h>
>>> +#include <linux/bootmem.h>
>>>   #include <linux/of_platform.h>
>>>   #include <linux/hugetlb.h>
>>>   #include <asm/debugfs.h>
>>> @@ -917,6 +918,8 @@ void __init setup_arch(char **cmdline_p)
>>>   	/* Parse memory topology */
>>>   	mem_topology_setup();
>>>   
>>> +	early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
>> 
>> On a ppc64le VM this boils down to early_memtest(0, 0) for me.
>> 
>> I think it's too early, we don't set up max_low_pfn until
>> initmem_init().
>> 
>> If I move it after initmem_init() then it does something more useful:
>
> Ok. On my 8xx max_low_pfn is set in mem_topology_setup().
>
> Moving the test afte initmem_init() still works on the 8xx so I'll do that.

Great, thanks.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ