From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D349C433EF for ; Wed, 29 Sep 2021 20:39:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D856261247 for ; Wed, 29 Sep 2021 20:39:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D856261247 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AWg+wjPQZP24GYZUMB7wvk6tP598XNi9fMSwSVIMBiI=; b=NKKGVvAaodTPvg ufDjozW2+yDJImuE991758hemQl3x8G7z2kO+OF4B9W1f3m63HjSNhEfpZaNOHWXxAj+y3vzIUjcu 7qD0uCXXBiPIAHuZ4B6Y0kJs3Wbj25y/RSxg0GlIov2DqhGuKu+WvprsNqLrBEqmJ0Wg4jJLpEDPX o68gSev2aowyGU0TFjwMOq3yH9574YmRPj0zCcSCJm4f6md4fRYCJF/cb0UJniOvHm2ysJ7pHvuIv 1gQBP4KZwiXyZTXkJD0Yk1vwUFfkWGQyfVUCqU9IIW9D9ixbOX1z66kMl56zud4w0iDo0Hk6+Q7DH 4GU6Gy94A0jGDfu0G6yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVgKe-00CHks-B9; Wed, 29 Sep 2021 20:37:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVgKZ-00CHjA-Dq for linux-arm-kernel@lists.infradead.org; Wed, 29 Sep 2021 20:37:32 +0000 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-Disposition: inline In-Reply-To: <20210929192026.1604095-1-ndesaulniers@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210929_133731_504660_927A968E X-CRM114-Status: GOOD ( 15.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel