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]
Message-ID: <07838e5e-de03-8caf-6599-e516c35cc3c8@huawei.com>
Date:   Sun, 17 Jan 2021 12:58:52 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
        Russell King <rmk+kernel@...linux.org.uk>,
        <palmerdabbelt@...gle.com>, Atish Patra <atish.patra@....com>
CC:     Palmer Dabbelt <palmer@...belt.com>, <guoren@...nel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>
Subject: Re: [PATCH v3 3/4] ARM: Covert to reserve_initrd_mem()

update Russell's mail address.


On 2021/1/15 13:46, Kefeng Wang wrote:
> Covert to the generic reserve_initrd_mem() function.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>   arch/arm/mm/init.c | 43 +------------------------------------------
>   1 file changed, 1 insertion(+), 42 deletions(-)
>
> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> index 828a2561b229..a29e14cd626c 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -153,47 +153,6 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
>   	return phys;
>   }
>   
> -static void __init arm_initrd_init(void)
> -{
> -#ifdef CONFIG_BLK_DEV_INITRD
> -	phys_addr_t start;
> -	unsigned long size;
> -
> -	initrd_start = initrd_end = 0;
> -
> -	if (!phys_initrd_size)
> -		return;
> -
> -	/*
> -	 * Round the memory region to page boundaries as per free_initrd_mem()
> -	 * This allows us to detect whether the pages overlapping the initrd
> -	 * are in use, but more importantly, reserves the entire set of pages
> -	 * as we don't want these pages allocated for other purposes.
> -	 */
> -	start = round_down(phys_initrd_start, PAGE_SIZE);
> -	size = phys_initrd_size + (phys_initrd_start - start);
> -	size = round_up(size, PAGE_SIZE);
> -
> -	if (!memblock_is_region_memory(start, size)) {
> -		pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
> -		       (u64)start, size);
> -		return;
> -	}
> -
> -	if (memblock_is_region_reserved(start, size)) {
> -		pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n",
> -		       (u64)start, size);
> -		return;
> -	}
> -
> -	memblock_reserve(start, size);
> -
> -	/* Now convert initrd to virtual addresses */
> -	initrd_start = __phys_to_virt(phys_initrd_start);
> -	initrd_end = initrd_start + phys_initrd_size;
> -#endif
> -}
> -
>   #ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
>   void check_cpu_icache_size(int cpuid)
>   {
> @@ -215,7 +174,7 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
>   	/* Register the kernel text, kernel data and initrd with memblock. */
>   	memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
>   
> -	arm_initrd_init();
> +	reserve_initrd_mem();
>   
>   	arm_mm_memblock_reserve();
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ