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]
Message-ID: <CAK7LNAQoDES7yFmjHzBTMBgJ+Mg_B9t3U3QR2zC0Xs+cn6mEFw@mail.gmail.com>
Date:   Wed, 12 May 2021 16:14:47 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Feng Tang <feng.tang@...el.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] Makefile: extend 32B aligned debug option to 64B aligned

On Thu, May 6, 2021 at 4:35 PM Feng Tang <feng.tang@...el.com> wrote:
>
> commit 09c60546f04f ("./Makefile: add debug option to enable
> function aligned on 32 bytes") was introduced to help debugging
> strange kernel performance changes caused by code alignment
> change.
>
> Recently we found 2 similar cases [1][2] caused by code-alignment
> changes, which can only be identified by forcing 64 bytes aligned
> for all functions.
>
> Originally, 32 bytes was used mainly for not wasting too much
> text space, but this option is only for debug anyway where text
> space is not a big concern. So extend the alignment to 64 bytes
> to cover more similar cases.
>
> [1].https://lore.kernel.org/lkml/20210427090013.GG32408@xsang-OptiPlex-9020/
> [2].https://lore.kernel.org/lkml/20210420030837.GB31773@xsang-OptiPlex-9020/
> Signed-off-by: Feng Tang <feng.tang@...el.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Andi Kleen <ak@...ux.intel.com>


Applied to linux-kbuild.
Thanks.



> ---
>  Makefile          | 4 ++--
>  lib/Kconfig.debug | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 72af8e4..a9f6715 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -958,8 +958,8 @@ KBUILD_CFLAGS       += $(CC_FLAGS_CFI)
>  export CC_FLAGS_CFI
>  endif
>
> -ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B
> -KBUILD_CFLAGS += -falign-functions=32
> +ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B
> +KBUILD_CFLAGS += -falign-functions=64
>  endif
>
>  # arch Makefile may override CC so keep this after arch Makefile is included
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 678c1396..6ce26b8 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -400,8 +400,8 @@ config SECTION_MISMATCH_WARN_ONLY
>
>           If unsure, say Y.
>
> -config DEBUG_FORCE_FUNCTION_ALIGN_32B
> -       bool "Force all function address 32B aligned" if EXPERT
> +config DEBUG_FORCE_FUNCTION_ALIGN_64B
> +       bool "Force all function address 64B aligned" if EXPERT
>         help
>           There are cases that a commit from one domain changes the function
>           address alignment of other domains, and cause magic performance
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ