Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp966177pxb; Wed, 29 Sep 2021 13:41:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEc7IkYzCOI+kHy9Bht6GuIbeJ2tlio6ywKd7Lyeh8X9pZbqFUYitBHO7LpgDGO66FFZ5U X-Received: by 2002:a17:90a:1942:: with SMTP id 2mr8640801pjh.195.1632948115013; Wed, 29 Sep 2021 13:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632948115; cv=none; d=google.com; s=arc-20160816; b=Y8OhyE4O9Chy5VNpDA1gR1DYZLzypjBZqfahHHBOquSKTE6Z/UA8lejkEdIRbFYPdX sj/y3X5PDXhHCwShFQ2CgXTLm19WS1FXb9rwkUFV0dAk2aNkitsNSp1k/sLYp9B3aoR8 UXQe3LL0GuSAvruruy750PKKjCjMgdNkbLNapU+ElCvAMHYsqy5ser7zav1c3UtTuCmK defawu/YfBZB5hUkwPjBOcVzKcytiJb2ECxAEheri2O1RJXcTATryFHZSo4bOoSqRDb6 eqUqV5h9be96bioM1niRCberwqxWBbU44M5tZotHcWAIUMtiom3XRVKVaXLbyh4eT3ap OSvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Kc8+S5dd76X5Hr5wJSKkV5hGb8+6ANX1EyL0AcZpJmU=; b=HOsyYI670UANULaNy8qg7xbVMZrltMPLnwuqMKvxSaWpJCmx8pLXDgmT6x7ObJy7Lw H3MUM6pl689FY7HAZZIW2bLGo3yph9OyzWM0RgaPesQ8k6iK2/8CWh7xQ50q3vx/E5nz 1vopd9+twbqdGSoVyTLCpcvcwr7V5qnWfK0SucDRKAXVTYxi39J+gfFWgCzR2n9mLarW t2nn1WLYcQ3wKoVZpYRnKMuwLL08ci7AIA8FlVZV122cFCOnEKQc2ic4YuLcPs8xuSv0 FsFKu2LTd2WmvekGkAjgASY3LQ7jLs/dH39kJF8VAZbofe6CaXoHfN4G6EC8QtRUI3Lu NSFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JuCF6D5g; 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 p1si938696pgb.425.2021.09.29.13.41.40; Wed, 29 Sep 2021 13:41:55 -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=JuCF6D5g; 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 S1346741AbhI2UjN (ORCPT + 99 others); Wed, 29 Sep 2021 16:39:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:33236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345611AbhI2UjM (ORCPT ); Wed, 29 Sep 2021 16:39:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 028276136A; Wed, 29 Sep 2021 20:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632947851; bh=k0jUlGJBK5TZDgDEi1+aE6n+zqLLo17WSv6MatuQbi0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JuCF6D5ggy+fGhjTto+szT/BmUu6aecT3jeMLUu6NPvD+7Mg9IPH+/mnc6HdXfaKn neDh28MFdhU495Kh2Qfpti0uaDv6HP0Q/yzPWNiMC2XQiF9pvvALKeUWYvdnnaICzx t9V5guNuqASSMGOuxC64WbKzZQLZrDdpoLt+s/YWxPLQm5TPpL3gANhCFYdBkF9tRP 1LYeOeZXhJQhjZmzanBzrS/UQwOQfWTrSG5UYMs8iTcFkYbtCWRWvQ2fMRyohQ7c8O 8qUq6XhXQg6svWgQcCzRdsnwXw1L6S+taZNHwJWhyEgQobTi4XllQAgMyzgMQAEcVT qZTtgEJSCY7qg== Date: Wed, 29 Sep 2021 13:37:25 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: linux-arm-kernel@lists.infradead.org, Fangrui Song , Peter Smith , Ard Biesheuvel , Richard Henderson , Russell King , Dave Martin , Nicolas Pitre , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v2] ARM: mm: proc-macros: ensure *_tlb_fns are 4B aligned Message-ID: References: <20210929192026.1604095-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210929192026.1604095-1-ndesaulniers@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Debugged-by: Nathan Chancellor > Debugged-by: Richard Henderson > Suggested-by: Ard Biesheuvel > Acked-by: Ard Biesheuvel > Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor > --- > 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 > >