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:   Thu, 11 Mar 2021 13:29:39 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     Oscar Salvador <osalvador@...e.de>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     David Hildenbrand <david@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>,
        Michal Hocko <mhocko@...nel.org>, Zi Yan <ziy@...dia.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/4] x86/vmemmap: Handle unpopulated sub-pmd ranges

On 3/9/21 1:40 PM, Oscar Salvador wrote:
> +static void __meminit vmemmap_use_new_sub_pmd(unsigned long start, unsigned long end)
> +{
> +	/*
> +	 * Could be our memmap page is filled with PAGE_UNUSED already from a
> +	 * previous remove. Make sure to reset it.
> +	 */
> +	vmemmap_use_sub_pmd(start);
> +
> +	/*
> +	 * Mark with PAGE_UNUSED the unused parts of the new memmap range
> +	 */
> +	if (!IS_ALIGNED(start, PMD_SIZE))
> +		memset((void *)start, PAGE_UNUSED,
> +		        start - ALIGN_DOWN(start, PMD_SIZE));
> +	if (!IS_ALIGNED(end, PMD_SIZE))
> +		memset((void *)end, PAGE_UNUSED,
> +		        ALIGN(end, PMD_SIZE) - end);
> +}
> +#endif

This is apparently under both CONFIG_SPARSEMEM_VMEMMAP and
CONFIG_MEMORY_HOTPLUG #ifdefs.  It errors out at compile-time with this
config: https://sr71.net/~dave/intel/config-mmotm-20210311

> linux.git/arch/x86/mm/init_64.c: In function 'vmemmap_populate_hugepages':
> linux.git/arch/x86/mm/init_64.c:1585:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' [-Werror=implicit-function-declaration]
>       vmemmap_use_new_sub_pmd(addr, next);
>       ^~~~~~~~~~~~~~~~~~~~~~~
> /home/davehans/linux.git/arch/x86/mm/init_64.c:1591:4: error: implicit declaration of function 'vmemmap_use_sub_pmd' [-Werror=implicit-function-declaration]
>     vmemmap_use_sub_pmd(addr, next);
>     ^~~~~~~~~~~~~~~~~~~

I didn't see a quick fix other than #ifdef'ing the call sites, which is
pretty ugly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ