Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1000925pxb; Wed, 29 Sep 2021 14:34:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziXpdZTuU5a+pTRj+GqP0X/Wpj2J5zSUJUzoM2pTB6q4grQkM8pTjy2IhZi/l0Qv0ZkKTj X-Received: by 2002:aa7:dcc4:: with SMTP id w4mr2704507edu.286.1632951291844; Wed, 29 Sep 2021 14:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632951291; cv=none; d=google.com; s=arc-20160816; b=YisbVW66/nkE/tXmtUt9YychhenZOVLaNx4hMAKLXpjAQApEiKSXSm9RYcagFAj1zO Gkos3lwehO8yZdFlggqcwsYxRC/EU7M09VEzkUDC/N4qtvpEI9b7TOF7/dpDfS4hyZ2F 7vQm+oiZ7niy3c9lDNM0NF9VoKva4gXLNl/9mdjZirgOmEywuoiIHOCxLgl5zJ3h4MNj 5pkQekA+5CsUJxSOyFIRZED3QAba/bvKDbC+8b6DtkYYCr2HnNNmBbLtrV4f6l/uz8hR 2xiY34T64FE9bdgOPZ2qUAIXTLiINg2ZKv4A5Y1SH1I8olDgNtoLIY7HkyB/sKXhb6zL vDQQ== 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=7BFsGoidX5xySatTjL6O1Rs262c5AIgIlOFlxvgUuvk=; b=OkIWEG/lszSWoBJJUL5HREOGKG3i3EVXjsuhPFt1i6UkBGjvMqf+0TGe0X8WOXwBc+ +20QDPqa/XvWQ1yn+RWokZjieuZEzEJ4pt3vO2EXYu/SG8wgOZBO91/NfgfpW/CGVfOE 7qdvifC6u4LXdIhTAMo9/EEwhBXpK5wD86uJbFubYXuYOh5GG8+Hh49bg39LQQg3olT/ 7B4vc3ncQd9zZDfHEEjepyzasqSaSeZXB3Hjv7iOF7rjvspOxs8pjr9pnyGTRB9hihbh EWDEA/hLBnAF9kvS6+Dk9Oej89DUHDRyO0Qabk5TsIo2RhPDdfbvQxwr75bg8TIsLMSr dXpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=SneNZlIa; 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 d16si1246048ejm.114.2021.09.29.14.34.23; Wed, 29 Sep 2021 14:34:51 -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=SneNZlIa; 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 S1344103AbhI2VB7 (ORCPT + 99 others); Wed, 29 Sep 2021 17:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343911AbhI2VBx (ORCPT ); Wed, 29 Sep 2021 17:01:53 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91D9EC06161C for ; Wed, 29 Sep 2021 14:00:10 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id x27so16256394lfu.5 for ; Wed, 29 Sep 2021 14:00:10 -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=7BFsGoidX5xySatTjL6O1Rs262c5AIgIlOFlxvgUuvk=; b=SneNZlIax4nr4ZEGc5l2fDkaEHCvlPaNVr54DBErWz531ImoNTTv4yv4LSWd/cEuWN +LjfoMkqSL31WQy8KPDor/xko/H+HICy229+RzM67ajM2FF+qE7ioqGeuLTts3APho1s h+Xmo4pmNdp1QU1Ddjq1WQKjiiobT0/AJ3wU8BprS98FnY7k9OO0qcyJC7nY+hgOvamj ZmMjW0FyLoCcBWwrHidIp7iOSvM9yO7EiHkAtpFA39UYst7nJcToVWg2o6L7W4snPmS/ CqD77cdpNSxGl6kFtfQeyELHgIvdgpRaE1Zrh6zjG7Rdb3SszlQFopMmn3J0YCgsw+sb n47A== 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=7BFsGoidX5xySatTjL6O1Rs262c5AIgIlOFlxvgUuvk=; b=uw3tJ6tBjT5TyLyRSh6/dLW+7kh+WKey/bAlgZdqglmjp5zD6//RmlE53Ju0rExkpO LGKwEFFVbHW/XEvLOCZ3j3PaEJuWOfcVqvkpDfjVwZPT6pwjIn4MV3WelXU35TQ2sZML oTfGeEKZO2EPogM/75/1NO6IMY1Sii7fJDUeej3VcBw15Ac3l33G0C5/SL8ws1K1IS1H hXi0nzeE3pd5BtaMhtgjPG0wVIVVFJ0LMMUihWJgX9L9kmko+lNfh8fml6ijwJkJo8aU WZVzpDqCdFrnoNa+MqUqt3fHcT4fznnze9yuF2OTAYckTtOqOLaGE6SsiNIOVJmB9Ni0 jEhg== X-Gm-Message-State: AOAM533XLRvLfA5iYHuaw0qBOfYconf2784QZj6v7BHbwz1xLNTMopjD pRaCiqmFjtHgG0Q1hAWQjMbATUMPP9KEI+4BL+5WGQ== X-Received: by 2002:a05:6512:b0c:: with SMTP id w12mr1910694lfu.240.1632949208202; Wed, 29 Sep 2021 14:00:08 -0700 (PDT) MIME-Version: 1.0 References: <20210929192026.1604095-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Wed, 29 Sep 2021 13:59:56 -0700 Message-ID: Subject: Re: [PATCH v2] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned To: Ard Biesheuvel Cc: Linux ARM , Fangrui Song , Peter Smith , Nathan Chancellor , Richard Henderson , Russell King , 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, Sep 29, 2021 at 1:57 PM Ard Biesheuvel wrote: > > On Wed, 29 Sept 2021 at 21:20, Nick Desaulniers wrote: > > > > QEMU 6.1.0 is more correct about trapping on misaligned accesses. > > Btw, this is not entirely relevant. QEMU now behaves like every single > hardware implementation does, and reports an alignment fault when > using a load-multiple instruction on an address that is not 32-bit > aligned, as the architecture requires. Sure, I can drop that line from the commit message when submitting to RMK's queue. > > > > 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 > > Acked-by: Ard Biesheuvel > > Signed-off-by: Nick Desaulniers > > --- > > 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 > > -- Thanks, ~Nick Desaulniers