Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp930625pxb; Wed, 29 Sep 2021 12:48:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYRleTVeThaZdXXTUB3CFF91MizYV507YhztGlp5To14gzVLMh6McWjowDd38bd3c3vWsd X-Received: by 2002:a17:906:1706:: with SMTP id c6mr1963164eje.343.1632944885939; Wed, 29 Sep 2021 12:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632944885; cv=none; d=google.com; s=arc-20160816; b=QfIGCrs8GftxlooUiBN1ys7WQRUe9cGUv5ZpIF6j1uB9o5BeOrL4+yI/ja4bFaUrzQ TE6tXz96WseCf1ClgRKCsGNMSJWynMOqrTWj8bscb9R9B01KMsyPXQ4qoF9iTu5T90+E fadC3pTaNg5Nj/HkA1k+NM0wTraPP1O7Br5ZEe/ZqgphNx+FOFLqp7jDFvMz1uvSSzRc +1ogCGoU2CJtWonf016+++Dt+BsewaXZjnW49EjDdDI3Po/d/o8vNOSXbCyYQ8O3Cgcm CDA8Qk9xhWvpyifRM4aRWrNBVRd8KtZ+wGHdhJ7KGKooi9yTea71MNoXzVfWRpoH0lhU pVqQ== 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=yWmtNdEuYYzMeSIZS5jfmsQ1I5dGCZZxS/hC0YgZ2TQ=; b=v21ApvCdLwRzzEwKhqUpU0Cxfy/1l/izd5O2aNu+Ve9VNSdaPKiIhyKBrcD+VqLSeZ lnpzxWC80kcobRejTqlnoU2R0hxIG9K53L5tojIlBiwHqEg3K9IF1+H+4wZc9tfNZ3Du aHd03cQBgXSxCgY0kDQ23EKKujgZTq9AEDKfe0P7akThq5dyk6okd/vf78nsAYD4/hix K+hb7Hh51opW2YkeerFVpi/x5zmSJQbhpzsuGpgf4UbO0IecGV8VW3IB7T5ZEVmnHZ+S EQotYFJBGEBxdJVg4XDgOo9Zv/5u+EAr30Q9QJAcUwZWIJDfnrN9pvESkpX0ifXrL/Mk GMxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jg7Lp/Oj"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z18si1233666edc.11.2021.09.29.12.47.30; Wed, 29 Sep 2021 12:48:05 -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=@kernel.org header.s=k20201202 header.b="jg7Lp/Oj"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346516AbhI2TQy (ORCPT + 99 others); Wed, 29 Sep 2021 15:16:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:48950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344094AbhI2TQw (ORCPT ); Wed, 29 Sep 2021 15:16:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 70BFB615E0 for ; Wed, 29 Sep 2021 19:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632942911; bh=ETVIBJCdRN1TfYcKQkNnuueGnEcX3D8IrbH/5L0TcAI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jg7Lp/OjdNIIv5yzuSGNnO4EL3fe+4lgbjVhXv4JAt7F9PXVtSDaEBUX35F+DfOu1 yucHsjVP/Ibtk1ZDLO+6iNLN3Xq1Gvnzml87A7uNMQokVS8roM/XcX50ISGjmYzqDy LcsPlqUkSWDyQ/2z3Ili1m5Dwjs0LMWWFxXudkJiQzyb4KGhXAb+WTT5BdTUlgyazX CmTV2FDMMiWemMpTZYeFG+C5DQ5x4SX3DMazQGsStGsFFmYG7lmNlLUQnmOvdsKqOR EIK3lbRedJOTmJX5IBgCSuzq2nopjiUJcXJDWa4lCzxa9XbY/Pmm4jAlFjKmc52OZz hqFuL4Iprz3Zw== Received: by mail-oi1-f176.google.com with SMTP id y201so4228940oie.3 for ; Wed, 29 Sep 2021 12:15:11 -0700 (PDT) X-Gm-Message-State: AOAM531z6H3C3ybwOuco49HTZ1hhu6bfWBe/ZrFxjqyTnvIXhJQ7hGCA /LQvAJNpz4GP8bE3p/dQeU+vnmzk3g/wuB7jDEM= X-Received: by 2002:a05:6808:1148:: with SMTP id u8mr1233825oiu.33.1632942910767; Wed, 29 Sep 2021 12:15:10 -0700 (PDT) MIME-Version: 1.0 References: <20210929190810.1597399-1-ndesaulniers@google.com> In-Reply-To: <20210929190810.1597399-1-ndesaulniers@google.com> From: Ard Biesheuvel Date: Wed, 29 Sep 2021 21:14:59 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned To: Nick Desaulniers Cc: Linux ARM , Fangrui Song , Peter Smith , 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?= , Dave Martin , Nicolas Pitre , Linux Kernel Mailing List , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Sept 2021 at 21:08, 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 I take it this hunk got included by accident? > 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 > For this part, Acked-by: Ard Biesheuvel