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] [thread-next>] [day] [month] [year] [list]
Message-ID: <25ae5315-0386-4709-ec73-d265ed342b58@mips.com>
Date:   Tue, 13 Feb 2018 11:30:53 +0000
From:   Matt Redfearn <matt.redfearn@...s.com>
To:     Serge Semin <fancer.lancer@...il.com>, <ralf@...ux-mips.org>,
        <miodrag.dinic@...s.com>, <jhogan@...nel.org>,
        <goran.ferenc@...s.com>, <david.daney@...ium.com>,
        <paul.gortmaker@...driver.com>, <paul.burton@...s.com>,
        <alex.belits@...ium.com>, <Steven.Hill@...ium.com>
CC:     <alexander.sverdlin@...ia.com>, <kumba@...too.org>,
        <marcin.nowakowski@...s.com>, <James.hogan@...s.com>,
        <Peter.Wotton@...s.com>, <Sergey.Semin@...latforms.ru>,
        <linux-mips@...ux-mips.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 05/15] MIPS: KASLR: Drop relocatable fixup from
 reservation_init

Hi Serge,

On 02/02/18 03:54, Serge Semin wrote:
> From: Matt Redfearn <matt.redfearn@...s.com>
> 
> A recent change ("MIPS: memblock: Discard bootmem initialization")
> removed the reservation of all memory below the kernel's _end symbol in
> bootmem. This makes the call to free_bootmem unnecessary, since the
> memory region is no longer marked reserved.
> 
> Additionally, ("MIPS: memblock: Print out kernel virtual mem
> layout") added a display of the kernel's virtual memory layout, so
> printing the relocation information at this point is redundant.
> 
> Remove this section of code.
> 
> Signed-off-by: Matt Redfearn <matt.redfearn@...s.com>

Missing your SoB.

I think this change should go after you introduce the new mechanism, 
i.e. after "MIPS: memblock: Print out kernel virtual mem layout", which 
should probably go nearer the start of the series.

Thanks,
Matt

> ---
>   arch/mips/kernel/setup.c | 23 -----------------------
>   1 file changed, 23 deletions(-)
> 
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index b5fcacf71b3f..cf3674977170 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -528,29 +528,6 @@ static void __init bootmem_init(void)
>   		memory_present(0, start, end);
>   	}
>   
> -#ifdef CONFIG_RELOCATABLE
> -	/*
> -	 * The kernel reserves all memory below its _end symbol as bootmem,
> -	 * but the kernel may now be at a much higher address. The memory
> -	 * between the original and new locations may be returned to the system.
> -	 */
> -	if (__pa_symbol(_text) > __pa_symbol(VMLINUX_LOAD_ADDRESS)) {
> -		unsigned long offset;
> -		extern void show_kernel_relocation(const char *level);
> -
> -		offset = __pa_symbol(_text) - __pa_symbol(VMLINUX_LOAD_ADDRESS);
> -		free_bootmem(__pa_symbol(VMLINUX_LOAD_ADDRESS), offset);
> -
> -#if defined(CONFIG_DEBUG_KERNEL) && defined(CONFIG_DEBUG_INFO)
> -		/*
> -		 * This information is necessary when debugging the kernel
> -		 * But is a security vulnerability otherwise!
> -		 */
> -		show_kernel_relocation(KERN_INFO);
> -#endif
> -	}
> -#endif
> -
>   	/*
>   	 * Reserve initrd memory if needed.
>   	 */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ