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: <CAL_JsqKrrmMOQrV62L0QXAPiLGceMbvA7HZ=1U3PW0_MpqtC=w@mail.gmail.com>
Date:   Tue, 30 Oct 2018 10:10:59 -0500
From:   Rob Herring <robh+dt@...nel.org>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Frank Rowand <frowand.list@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Marc Zyngier <marc.zyngier@....com>,
        Russell King <rmk+kernel@...linux.org.uk>,
        aryabinin@...tuozzo.com, Andrey Konovalov <andreyknvl@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Robin Murphy <robin.murphy@....com>,
        Laura Abbott <labbott@...hat.com>,
        Stefan Agner <stefan@...er.ch>,
        Johannes Weiner <hannes@...xchg.org>, ghackmann@...roid.com,
        Kristina Martsenko <kristina.martsenko@....com>,
        chandan.vn@...sung.com,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>, devicetree@...r.kernel.org,
        rppt@...ux.ibm.com, Russell King <linux@...linux.org.uk>,
        Greentime Hu <green.hu@...il.com>, deanbo422@...il.com,
        gxt@....edu.cn, Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: Re: [PATCH 2/6] arch: Make phys_initrd_start and phys_initrd_size
 global variables

On Mon, Oct 29, 2018 at 6:52 PM Florian Fainelli <f.fainelli@...il.com> wrote:
>
> Make phys_initrd_start and phys_initrd_size global variables that will
> later be referenced by generic code under drivers/of/fdt.c.
>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  arch/arm/mm/init.c       | 4 ++--
>  arch/unicore32/mm/init.c | 4 ++--
>  include/linux/initrd.h   | 3 +++
>  3 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> index 0cc8e04295a4..8f364aa24172 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -51,8 +51,8 @@ unsigned long __init __clear_cr(unsigned long mask)
>  }
>  #endif
>
> -static phys_addr_t phys_initrd_start __initdata = 0;
> -static unsigned long phys_initrd_size __initdata = 0;
> +phys_addr_t phys_initrd_start __initdata = 0;
> +unsigned long phys_initrd_size __initdata = 0;

I would declare these in common initrd code instead. Then you don't
need a kconfig symbol.

>  static int __init early_initrd(char *p)
>  {
> diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c
> index 8f8699e62bd5..4dd26d6f02e5 100644
> --- a/arch/unicore32/mm/init.c
> +++ b/arch/unicore32/mm/init.c
> @@ -31,8 +31,8 @@
>
>  #include "mm.h"
>
> -static unsigned long phys_initrd_start __initdata = 0x01000000;
> -static unsigned long phys_initrd_size __initdata = SZ_8M;
> +phys_addr_t phys_initrd_start __initdata = 0x01000000;
> +unsigned long phys_initrd_size __initdata = SZ_8M;

You'll have to set these at runtime though. However, I seem to
remember that an exact size was needed for decompressing an initrd
which would make these defaults pointless. Maybe that was only certain
compression formats.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ