From: Nathan Chancellor <nathan@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-arm-kernel@lists.infradead.org,
Fangrui Song <maskray@google.com>,
Peter Smith <peter.smith@arm.com>,
Ard Biesheuvel <ardb@kernel.org>,
Richard Henderson <richard.henderson@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Dave Martin <dave.martin@arm.com>,
Nicolas Pitre <nico@fluxnic.net>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v2] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned
Date: Wed, 29 Sep 2021 13:37:25 -0700 [thread overview]
Message-ID: <YVTOhRJ5Zx2kk/KN@archlinux-ax161> (raw)
In-Reply-To: <20210929192026.1604095-1-ndesaulniers@google.com>
On Wed, Sep 29, 2021 at 12:20:24PM -0700, Nick Desaulniers wrote:
> QEMU 6.1.0 is more correct about trapping on misaligned accesses. A
> kernel built with CONFIG_THUMB2_KERNEL=y and using clang as the
> assembler could generate non-naturally-aligned v7wbi_tlb_fns which
> results in a boot failure. The original commit adding the macro missed
> the .align directive on this data.
>
> Fixes: 66a625a88174 ("ARM: mm: proc-macros: Add generic proc/cache/tlb struct definition macros")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1447
> Link: https://lore.kernel.org/all/0699da7b-354f-aecc-a62f-e25693209af4@linaro.org/
> Debugged-by: Ard Biesheuvel <ardb@kernel.org>
> Debugged-by: Nathan Chancellor <nathan@kernel.org>
> Debugged-by: Richard Henderson <richard.henderson@linaro.org>
> Suggested-by: Ard Biesheuvel <ardb@kernel.org>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Changes V1 -> V2:
> * Drop accidentally committed Kconfig change.
> * Pick up Ard's AB tag.
>
> arch/arm/mm/proc-macros.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S
> index e2c743aa2eb2..d9f7dfe2a7ed 100644
> --- a/arch/arm/mm/proc-macros.S
> +++ b/arch/arm/mm/proc-macros.S
> @@ -340,6 +340,7 @@ ENTRY(\name\()_cache_fns)
>
> .macro define_tlb_functions name:req, flags_up:req, flags_smp
> .type \name\()_tlb_fns, #object
> + .align 2
> ENTRY(\name\()_tlb_fns)
> .long \name\()_flush_user_tlb_range
> .long \name\()_flush_kern_tlb_range
>
> base-commit: 02d5e016800d082058b3d3b7c3ede136cdc6ddcb
> prerequisite-patch-id: 3edbe4a8485c7a75a61dbbe299e8ce1985d87ee0
> --
> 2.33.0.685.g46640cef36-goog
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-arm-kernel@lists.infradead.org,
Fangrui Song <maskray@google.com>,
Peter Smith <peter.smith@arm.com>,
Ard Biesheuvel <ardb@kernel.org>,
Richard Henderson <richard.henderson@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Dave Martin <dave.martin@arm.com>,
Nicolas Pitre <nico@fluxnic.net>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v2] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned
Date: Wed, 29 Sep 2021 13:37:25 -0700 [thread overview]
Message-ID: <YVTOhRJ5Zx2kk/KN@archlinux-ax161> (raw)
In-Reply-To: <20210929192026.1604095-1-ndesaulniers@google.com>
On Wed, Sep 29, 2021 at 12:20:24PM -0700, Nick Desaulniers wrote:
> QEMU 6.1.0 is more correct about trapping on misaligned accesses. A
> kernel built with CONFIG_THUMB2_KERNEL=y and using clang as the
> assembler could generate non-naturally-aligned v7wbi_tlb_fns which
> results in a boot failure. The original commit adding the macro missed
> the .align directive on this data.
>
> Fixes: 66a625a88174 ("ARM: mm: proc-macros: Add generic proc/cache/tlb struct definition macros")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1447
> Link: https://lore.kernel.org/all/0699da7b-354f-aecc-a62f-e25693209af4@linaro.org/
> Debugged-by: Ard Biesheuvel <ardb@kernel.org>
> Debugged-by: Nathan Chancellor <nathan@kernel.org>
> Debugged-by: Richard Henderson <richard.henderson@linaro.org>
> Suggested-by: Ard Biesheuvel <ardb@kernel.org>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Changes V1 -> V2:
> * Drop accidentally committed Kconfig change.
> * Pick up Ard's AB tag.
>
> arch/arm/mm/proc-macros.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S
> index e2c743aa2eb2..d9f7dfe2a7ed 100644
> --- a/arch/arm/mm/proc-macros.S
> +++ b/arch/arm/mm/proc-macros.S
> @@ -340,6 +340,7 @@ ENTRY(\name\()_cache_fns)
>
> .macro define_tlb_functions name:req, flags_up:req, flags_smp
> .type \name\()_tlb_fns, #object
> + .align 2
> ENTRY(\name\()_tlb_fns)
> .long \name\()_flush_user_tlb_range
> .long \name\()_flush_kern_tlb_range
>
> base-commit: 02d5e016800d082058b3d3b7c3ede136cdc6ddcb
> prerequisite-patch-id: 3edbe4a8485c7a75a61dbbe299e8ce1985d87ee0
> --
> 2.33.0.685.g46640cef36-goog
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-09-29 20:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 19:08 [PATCH] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned Nick Desaulniers
2021-09-29 19:08 ` Nick Desaulniers
2021-09-29 19:10 ` Nick Desaulniers
2021-09-29 19:10 ` Nick Desaulniers
2021-09-29 19:14 ` Nick Desaulniers
2021-09-29 19:14 ` Nick Desaulniers
2021-09-29 19:20 ` [PATCH v2] " Nick Desaulniers
2021-09-29 19:20 ` Nick Desaulniers
2021-09-29 20:37 ` Nathan Chancellor [this message]
2021-09-29 20:37 ` Nathan Chancellor
2021-09-29 20:57 ` Ard Biesheuvel
2021-09-29 20:57 ` Ard Biesheuvel
2021-09-29 20:59 ` Nick Desaulniers
2021-09-29 20:59 ` Nick Desaulniers
2021-09-29 19:14 ` [PATCH] " Ard Biesheuvel
2021-09-29 19:14 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YVTOhRJ5Zx2kk/KN@archlinux-ax161 \
--to=nathan@kernel.org \
--cc=ardb@kernel.org \
--cc=dave.martin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=maskray@google.com \
--cc=ndesaulniers@google.com \
--cc=nico@fluxnic.net \
--cc=peter.smith@arm.com \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.