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: <a7ad5c03-025a-4cf8-e4b1-2d150bfe3066@windriver.com>
Date:   Wed, 19 May 2021 12:41:10 +0800
From:   "Xu, Yanfei" <yanfei.xu@...driver.com>
To:     "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc:     rppt@...nel.org, ardb@...nel.org, linus.walleij@...aro.org,
        akpm@...ux-foundation.org, carver4lio@....com,
        tiantao6@...ilicon.com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] ARM: change vmalloc_min to vmalloc_start



On 5/18/21 8:15 PM, Russell King (Oracle) wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
> 
> Change the current vmalloc_min, which is supposed to be the lowest
> address of vmalloc space including the VMALLOC_OFFSET, to vmalloc_start
> which does not include VMALLOC_OFFSET.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
>   arch/arm/mm/mmu.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index d932c46a02e0..457203b41ceb 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -1123,8 +1123,7 @@ void __init debug_ll_io_init(void)
>   }
>   #endif
> 
> -static unsigned long __initdata vmalloc_min =
> -       VMALLOC_END - (240 << 20) - VMALLOC_OFFSET;
> +static unsigned long __initdata vmalloc_start = VMALLOC_END - (240 << 20);
> 
>   /*
>    * vmalloc=size forces the vmalloc area to be exactly 'size'
> @@ -1142,14 +1141,14 @@ static int __init early_vmalloc(char *arg)
>                          vmalloc_reserve >> 20);
>          }
> 
> -       vmalloc_max = VMALLOC_END - (PAGE_OFFSET + SZ_32M);
> +       vmalloc_max = VMALLOC_END - (PAGE_OFFSET + SZ_32M + VMALLOC_OFFSET);
>          if (vmalloc_reserve > vmalloc_max) {
>                  vmalloc_reserve = vmalloc_max;
>                  pr_warn("vmalloc area is too big, limiting to %luMB\n",
>                          vmalloc_reserve >> 20);
>          }
> 
> -       vmalloc_min = VMALLOC_END - vmalloc_reserve;
> +       vmalloc_start = VMALLOC_END - vmalloc_reserve;
>          return 0;
>   }
>   early_param("vmalloc", early_vmalloc);
> @@ -1169,7 +1168,8 @@ void __init adjust_lowmem_bounds(void)
>           * and may itself be outside the valid range for which phys_addr_t
>           * and therefore __pa() is defined.
>           */
> -       vmalloc_limit = (u64)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;
> +       vmalloc_limit = (u64)vmalloc_start -
> +                       (PAGE_OFFSET + PHYS_OFFSET + VMALLOC_OFFSET);
> 
Here is bug, it should be

        vmalloc_limit = (u64)vmalloc_start -
                        (PAGE_OFFSET + VMALLOC_OFFSET) + PHYS_OFFSET;

>          /*
>           * The first usable region must be PMD aligned. Mark its start
> --
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ