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] [day] [month] [year] [list]
Date:   Thu, 27 Oct 2022 20:49:07 +0800
From:   Huacai Chen <chenhuacai@...nel.org>
To:     Philippe Mathieu-Daudé <philmd@...aro.org>
Cc:     Guo Ren <guoren@...nel.org>, Huacai Chen <chenhuacai@...ngson.cn>,
        Arnd Bergmann <arnd@...db.de>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Dinh Nguyen <dinguyen@...nel.org>, loongarch@...ts.linux.dev,
        linux-arch@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>,
        Xuerui Wang <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Feiyang Chen <chenfeiyang@...ngson.cn>
Subject: Re: [PATCH V13 4/4] LoongArch: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP

On Wed, Oct 26, 2022 at 9:44 PM Philippe Mathieu-Daudé
<philmd@...aro.org> wrote:
>
> On 26/10/22 14:59, Huacai Chen wrote:
> > On Mon, Oct 24, 2022 at 4:04 PM Guo Ren <guoren@...nel.org> wrote:
> >> On Mon, Oct 24, 2022 at 3:05 PM Huacai Chen <chenhuacai@...ngson.cn> wrote:
> >>>
> >>> From: Feiyang Chen <chenfeiyang@...ngson.cn>
> >>>
> >>> The feature of minimizing overhead of struct page associated with each
> >>> HugeTLB page is implemented on x86_64. However, the infrastructure of
> >>> this feature is already there, so just select ARCH_WANT_HUGETLB_PAGE_
> >>> OPTIMIZE_VMEMMAP is enough to enable this feature for LoongArch.
> >>>
> >>> To avoid the following build error on LoongArch we should include linux/
> >>> static_key.h in page-flags.h. This is straightforward but the build
> >>> error is implicitly a LoongArch-specific problem, because ARM64 and X86
> >>> have already include static_key.h from their arch-specific core headers.
>
> >>> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> >>> index 0b0ae5084e60..1aafdc73e399 100644
> >>> --- a/include/linux/page-flags.h
> >>> +++ b/include/linux/page-flags.h
> >>> @@ -9,6 +9,7 @@
> >>>   #include <linux/types.h>
> >>>   #include <linux/bug.h>
> >>>   #include <linux/mmdebug.h>
> >>> +#include <linux/static_key.h>
> >> Em... riscv needn't this.
>
> Would guarding the header suffice and make riscv OK with this patch?
Emm, since LoongArch has no build errors due to an accident now, I
will send a new version without static_key.h inclusion. If one day the
build error comes back, we can send a separate patch to fix it.

Huacai
>
>   #ifdef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
>   #include <linux/static_key.h>
>   #endif
>
> > I found that after 36d4b36b69590fed99356a4426c940a25 (" lib/nodemask:
> > inline next_node_in() and node_random()"), build errors have gone. But
> > I think this is just an accident. Because that commit adds random.h
> > inclusion in nodemask.h, then asm-offsets.c --> sched.h --> nodemask.h
> > --> random.h --> once.h --> jump_label.h. If one day this chain is
> > adjusted, then build errors come again.
> >
> > On the other hand, page-flags.h is obviously using some static_key
> > macros, including static_key.h is straightforward for building.
> >
> > Huacai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ