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 X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA48DC433DF for ; Thu, 30 Jul 2020 17:26:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9A39A2072A for ; Thu, 30 Jul 2020 17:26:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iTsFloj3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A39A2072A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=qHJmh0G1l6rGMv1csZbqTuZtAVTEiLlTtSZXgT1tXrQ=; b=iTsFloj3ZjlXSpPfdGuaXuPP1 8pOLIyp0yvAerlIT0P8j2D1P7ZvYatYGxV5kOt+mmy76AGVFTSdiEXWN4n5SWj87jdjcS6Arv0qTQ 5sY3n0lYApuALufUs0Pm0M58uu2oOkG6WZ7f5IrTia9d+wS1Skn9lSx+rJUwtOiqcizTq5Vzarcin In+gr2cI3OBf98f2d4MSd5pIMkP28XPF8yZBM8DHbEnXVSM239b/uqjNrdtpYDoXxqRVWyINY9c6J JeHGmSkO2aZ2P7HhsdLwpFE0UZMHvzJRyYZrRZHg7aL0zCRKxEZN/6aS+1/3rZex6S5vO8O1LzWl6 bZS5csSng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1CIK-0002vC-V8; Thu, 30 Jul 2020 17:24:40 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1CIH-0002ub-GI for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 17:24:39 +0000 Received: from gaia (unknown [95.146.230.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F144020809; Thu, 30 Jul 2020 17:24:33 +0000 (UTC) Date: Thu, 30 Jul 2020 18:24:31 +0100 From: Catalin Marinas To: Sami Tolvanen Subject: Re: [PATCH v2] arm64/alternatives: move length validation inside the subsection Message-ID: <20200730172430.GC3128@gaia> References: <20200729215152.662225-1-samitolvanen@google.com> <20200730153701.3892953-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200730153701.3892953-1-samitolvanen@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_132438_437146_8B8E1D47 X-CRM114-Status: GOOD ( 20.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kees Cook , Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Will Deacon , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org 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 Thu, Jul 30, 2020 at 08:37:01AM -0700, Sami Tolvanen wrote: > Commit f7b93d42945c ("arm64/alternatives: use subsections for replacement > sequences") breaks LLVM's integrated assembler, because due to its > one-pass design, it cannot compute instruction sequence lengths before the > layout for the subsection has been finalized. This change fixes the build > by moving the .org directives inside the subsection, so they are processed > after the subsection layout is known. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1078 > Fixes: f7b93d42945c ("arm64/alternatives: use subsections for replacement sequences") > Signed-off-by: Sami Tolvanen > --- > v1 -> v2: > - Added the missing Fixes tag and dropped CC: stable@. > > --- > arch/arm64/include/asm/alternative.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h > index 12f0eb56a1cc..619db9b4c9d5 100644 > --- a/arch/arm64/include/asm/alternative.h > +++ b/arch/arm64/include/asm/alternative.h > @@ -77,9 +77,9 @@ static inline void apply_alternatives_module(void *start, size_t length) { } > "663:\n\t" \ > newinstr "\n" \ > "664:\n\t" \ > - ".previous\n\t" \ > ".org . - (664b-663b) + (662b-661b)\n\t" \ > - ".org . - (662b-661b) + (664b-663b)\n" \ > + ".org . - (662b-661b) + (664b-663b)\n\t" \ > + ".previous\n" \ > ".endif\n" Acked-by: Catalin Marinas There are a few instances of the .org test outside the subsection, though using in .S files. Are those ok? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel