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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 24 Jan 2018 11:28:26 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     James Hogan <jhogan@...nel.org>
Cc:     ralf@...ux-mips.org, miodrag.dinic@...s.com, goran.ferenc@...s.com,
        david.daney@...ium.com, paul.gortmaker@...driver.com,
        paul.burton@...s.com, alex.belits@...ium.com,
        Steven.Hill@...ium.com, alexander.sverdlin@...ia.com,
        matt.redfearn@...s.com, kumba@...too.org,
        marcin.nowakowski@...s.com, Peter.Wotton@...s.com,
        Sergey.Semin@...latforms.ru, linux-mips@...ux-mips.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/14] MIPS: memblock: Deactivate bootmem allocator

On Tue, Jan 23, 2018 at 11:59:35PM +0000, James Hogan <jhogan@...nel.org> wrote:
> On Thu, Jan 18, 2018 at 01:23:12AM +0300, Serge Semin wrote:
> > Memblock allocator can be successfully used from now for early
> > memory management
> > 
> > Signed-off-by: Serge Semin <fancer.lancer@...il.com>
> 
> Am I correct that intermediate commits in this patchset (i.e. bisection)
> may not work correctly, since bootmem will have been stripped out but
> NO_BOOTMEM=n and memblock may not be properly operational yet?
> 

Yes. You're absolutely right. The kernel will be buildable, but most
likely isn't operable until the PATCH 14 deactivates bootmem allocator.

> If so, is there a way to switch without breaking bisection that doesn't
> involve squashing most of the series into a single atomic commit?
> 

I don't think so. There is no way to switch without squashing at all,
at least since the alteration involves arch and platforms code, which
all relied on the bootmem allocator. Here is the list of patches, which
need to be combined to have the bisection unbroken:
[PATCH 03/14] MIPS: memblock: Reserve initrd memory in memblock
[PATCH 04/14] MIPS: memblock: Discard bootmem initialization
[PATCH 05/14] MIPS: memblock: Add reserved memory regions to memblock
[PATCH 06/14] MIPS: memblock: Reserve kdump/crash regions in memblock
[PATCH 07/14] MIPS: memblock: Mark present sparsemem sections
[PATCH 08/14] MIPS: memblock: Simplify DMA contiguous reservation
[PATCH 09/14] MIPS: memblock: Allow memblock regions resize
[PATCH 12/14] MIPS: memblock: Discard bootmem from Loongson3 code
[PATCH 13/14] MIPS: memblock: Discard bootmem from SGI IP27 code
[PATCH 14/14] MIPS: memblock: Deactivate bootmem allocator

So the patches 03-09 imply the functional alterations so the arch code
would work correctly with memblock, the patches 13-14 alter the
platforms code of the specific NUMA devices like Loongson and
SGI IP27. After it's done the bootmem can be finally deactivated.

Regards,
-Sergey

> Cheers
> James
> 
> > ---
> >  arch/mips/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > index 725b5ece7..a6c4fb6b6 100644
> > --- a/arch/mips/Kconfig
> > +++ b/arch/mips/Kconfig
> > @@ -4,7 +4,6 @@ config MIPS
> >  	default y
> >  	select ARCH_BINFMT_ELF_STATE
> >  	select ARCH_CLOCKSOURCE_DATA
> > -	select ARCH_DISCARD_MEMBLOCK
> >  	select ARCH_HAS_ELF_RANDOMIZE
> >  	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
> >  	select ARCH_MIGHT_HAVE_PC_PARPORT
> > @@ -57,6 +57,7 @@ config MIPS
> >  	select HAVE_IRQ_TIME_ACCOUNTING
> >  	select HAVE_KPROBES
> >  	select HAVE_KRETPROBES
> > +	select NO_BOOTMEM
> >  	select HAVE_MEMBLOCK
> >  	select HAVE_MEMBLOCK_NODE_MAP
> >  	select HAVE_MOD_ARCH_SPECIFIC
> > -- 
> > 2.12.0
> > 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ