Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp991903pxb; Wed, 29 Sep 2021 14:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFZ0EdlRpM2je2Sq8W3Yg5apPFP5L2q4bYKYDPEiyVQvZJtMiiX3KBWnLXXhvqbFY4LEuX X-Received: by 2002:a17:90b:1c8f:: with SMTP id oo15mr8885027pjb.87.1632950462793; Wed, 29 Sep 2021 14:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632950462; cv=none; d=google.com; s=arc-20160816; b=lr+FoHvePy9Pk2CiGXTrIoe1FiCtWFWbijPoozbl2aPCN0knYFbT/olYan4KtMILdO sXKD8PWfQevrNp/Sb5Zakogrh+vTAbCEIB9YTAFvqboing45efAFRJo38nmDaFo+UKGM AyHIhwYyMH6JQBoviLd3+GwQcaZoxQf6QhohrvOzLRLLw8KRHaXqwtH6M6lAtWPah/zh REc1hUNmrbVTn+8A1OcrY7LBieJBFpl07sFZXGTrPR9+EkOQXuGEBtRHiHjb/cSVGKwO /ZV9jSNo0gy07DT3gxfmli/Ti0TWGJTU/Kt783jnmR0u84Q9hwHQpPRv47Ac85473M1n JuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+X1e0IkE1xycXJllhY8KH7nR5VMuinY4y1av7l1HO2E=; b=JHOWmMs2Kgf1KRx4LeqyihjxpvvmZ2PSqDU7kKeMqKiK3OZHWQqxAjh/edw/zijxOB 7CNc+EJtCOLClOFaDIx1AIRk0N/NJ0giVdtX83x0EduJ3r1IbyFRgxpxaiK5iStSbtnV 2U00JVz/fmhBXcDKMAUEgkDGkSViMrDLdSkrXa+iLphEcWmUSexKH7rtxiRhCFojun9a a0vNq2mpGRpFm7uE8aFgraSOhr1RAK4SwJyex7Mkd/lrs6naakwdvdUgrJDqKKosKGRb HDG7OHbS8tG5Ia2v01AfVk3g4sCjorV78fIDqas61HVuy06IIkxS5pXUL8HCEKGx7Naf aY1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=A6vTFI4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si1169396pgv.254.2021.09.29.14.20.49; Wed, 29 Sep 2021 14:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=A6vTFI4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346458AbhI2TMq (ORCPT + 99 others); Wed, 29 Sep 2021 15:12:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346211AbhI2TMo (ORCPT ); Wed, 29 Sep 2021 15:12:44 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4510C06161C for ; Wed, 29 Sep 2021 12:11:02 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id x27so14897507lfa.9 for ; Wed, 29 Sep 2021 12:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+X1e0IkE1xycXJllhY8KH7nR5VMuinY4y1av7l1HO2E=; b=A6vTFI4GI0ABykrmrvQxmVnV6LIcD2XbocmDVJPyqJqCCkhdVhgtV4RJpw5TUR6q7R ta4T11QBaFri6MrJzm/8mYHvcn+MSX8cNpzWJb3eGJ0GtAc1ZFDAOgk00ROI3AXZQ0Bz CRC9H5HNAeU4DtNL9R5ovr04qSAFh1kkBid0QPFf7vJz/m7oICWEx5OAxWhMc4HNWJ83 F7TfeMsEii0xY+t2PYhJcBBuv16Y8LWfbevubhHQ9pZ6bJIf31AVg4cqm/KVenTMdkB9 fn1DvLrGKBj2ntmJjjvY2EjrOlGeGjWe3v5uywCxa90OAtOduI3cCbjwHhFkhZMZhij5 hmWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+X1e0IkE1xycXJllhY8KH7nR5VMuinY4y1av7l1HO2E=; b=cvmDEC8B77U2u3Nux5oypFQK5NP0Sj3g1bTjeUwdPcMO4NThGHEzoZKw2niZIYVgQt jLP426EXEIbwVT7ng2THb8exFntjW8WJ+y01Rj2rXf57p+mASFJBtzWUQf/Ar0plVkJF jQrsZH5fi1BJWHeeObpfv++0lzDQMAKhuVIZIWp2QQJzq4JuqvMlcTqNMLwAK+STH4pw xo3WGY6K4r+Gqi7/Upn08eXcVXJ9pKEJ/dkqHCQNuhz1o5MB5q2e9nGU72J1cyGoFPDj leWNdaKsLi1ntZB70u5vPV9JOVXKVdBc8B0hqwkuxCSX38uzM7BJ+Xu3v5VQmr60+7YR uIQQ== X-Gm-Message-State: AOAM532Ty9BhMOr/v1eZooWsAOt3Q6BVYwh+kKP4gmdMP4gMUO81Dd79 QAmZVrpfuu+H+eAe0q5aU8frZwv0P6cmRLv1i6loBA== X-Received: by 2002:a05:6512:110a:: with SMTP id l10mr1328642lfg.550.1632942660850; Wed, 29 Sep 2021 12:11:00 -0700 (PDT) MIME-Version: 1.0 References: <20210929190810.1597399-1-ndesaulniers@google.com> In-Reply-To: <20210929190810.1597399-1-ndesaulniers@google.com> From: Nick Desaulniers Date: Wed, 29 Sep 2021 12:10:49 -0700 Message-ID: Subject: Re: [PATCH] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned To: linux-arm-kernel@lists.infradead.org Cc: Fangrui Song , Peter Smith , Ard Biesheuvel , Nathan Chancellor , Richard Henderson , Russell King , Arnd Bergmann , Geert Uytterhoeven , Linus Walleij , Andrew Morton , Anshuman Khandual , Mike Rapoport , YiFei Zhu , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Nicolas Pitre , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Dave Martin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + Dave (Dave, I got a bounceback on your linaro.org email address. Consider sending a patch updating the .mailmap) On Wed, Sep 29, 2021 at 12:08 PM 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 > Debugged-by: Nathan Chancellor > Debugged-by: Richard Henderson > Suggested-by: Ard Biesheuvel > Signed-off-by: Nick Desaulniers > --- > arch/arm/Kconfig | 1 + > arch/arm/mm/proc-macros.S | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index fc196421b2ce..b760dd45b734 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -92,6 +92,7 @@ config ARM > select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL > select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG > select HAVE_FUNCTION_TRACER if !XIP_KERNEL > + select HAVE_FUTEX_CMPXCHG if FUTEX > select HAVE_GCC_PLUGINS > select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7) > select HAVE_IRQ_TIME_ACCOUNTING > 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 > -- > 2.33.0.685.g46640cef36-goog > -- Thanks, ~Nick Desaulniers