Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp21351ybh; Tue, 14 Jul 2020 16:34:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw95lOAfmldd6WyqEJfQoPBx35v8aNcOi9pYNd7za0bMZicL1uRT6lhYgIN76G+ctVDPQ0L X-Received: by 2002:a17:906:dbe5:: with SMTP id yd5mr6792523ejb.328.1594769691439; Tue, 14 Jul 2020 16:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594769691; cv=none; d=google.com; s=arc-20160816; b=IeQ8iiHPNQvGHp8leoEMndbixHmp+aGqBHm7pUBIBC7YELasaQX5ak7vL4KCt7UIdd 6pbeety5y3pTJdNEB5BOeWdtWfC+0T/vHPrIVl6WaZNLfdb70H4eUphLMQtM8TwQRvtD TL+jxoX4cvxeKZoJYHM5NZpkMWrpax3ZfOdzfMTwR77yfmh0p5w84unkDVetcRjg5ncj k7E0BfbqGDznqPhGdYPEejBlj4JSJHqXI9V+TiwFUcL/C8GOhAFlHflCFfj735EJ/fzb lzHE3p56fIjyAnBBnHQG9x99ZPp3+aCDEyFgGDN+KeGHYmxgcOH03VbczlewGwk5Xsce NZUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=fsTQrOCCM6yA1JojsplBwI6Qpm1eIbU6tWKRrhNq0L8=; b=Xprk3YZ+KUzEvW9F0OU7ej/ykV1eAL4fNH9M044BxI//9MmodQB6iV0bHCjLaklcxV FhluEIUEvBLEntc+Lbqos6RJs+vBlsvV+ssFFpkHyHBa/GoRzMrhn7Y7gvfBvzgLylU1 uvWf52ET6d/o9+2SfxFnAGjpj0RsoUv0M+t4wfqGUwaLpeOXTFYK70D9iVG3QMFdTVUA DNKChgCGNncmp8Hay6U7VAnlpxA6T9BBT2l5yKz/e5mtwkOfv6rxnfudBTcweyWMXdDh KroALoesMzsqAXEw2xjgJVkAH8F6tz8iX4RAKPSGlbp/b+m4cwm/mqQJa5hG7vpTjAsy xs+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=taP7IgzG; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si120291edw.582.2020.07.14.16.34.21; Tue, 14 Jul 2020 16: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=fail header.i=@gmail.com header.s=20161025 header.b=taP7IgzG; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbgGNXbd (ORCPT + 99 others); Tue, 14 Jul 2020 19:31:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgGNXbd (ORCPT ); Tue, 14 Jul 2020 19:31:33 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC035C061755 for ; Tue, 14 Jul 2020 16:31:32 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id l1so265644ioh.5 for ; Tue, 14 Jul 2020 16:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fsTQrOCCM6yA1JojsplBwI6Qpm1eIbU6tWKRrhNq0L8=; b=taP7IgzG4BYus1NgdIBE1yrJBe+KkPGgzDe0onIKQ2TgeCt481cFEDv1cJgiG7ERVb klIoHxnj2lTam4rLH7kA4JD9XcRczUsB4mha4gWLCjSx+0crHiS7lO9C4ZzBqERpolNm g+Q2HzeJZsX+t1Pr43gUaEvuqduiTnB69mGfa7k/w34eIhf4B/pN9P5Wp0VgVej9nkGF mXJETelYvOy+Dy13YX9m5iBytgkVTpXsu58ZhruRbv+RAC4WWmQdh2+DbUErc/rTyL4v DocBBcqIO5tpHulD8LRUM8HOFqAoDIRHJlUsUZaLWRY/VaEGOxZYuWrxuV375FidavLL j/1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fsTQrOCCM6yA1JojsplBwI6Qpm1eIbU6tWKRrhNq0L8=; b=WYguMxoAesYZRChq5aZTXam2c7Efwo7Nr7HMAanC0itXjHM8gxO7ADhH0Yfb+YNWDB 6JBVtkeii2J6+/coXuYHP69stlPQjheAdoGgoHcxv8+u5TWQ5Wv2BrRYv05qOuwUZ0fO 6XczPbWNXfpq+NXpT+bKebuu4xBJDUdICOzOvSgwZgetGepcuHFSB40zsA37zueZfL1R onxsynNA+TuzMqy+3ec8XYuboCHaQT62wx+Bp8tj8CuV9rJX/VZS+Fm3sR1dXn06ufRL tXzcb26VO7Nysc0inTbg/QU41+qz3VHGJ4pEmgrBeX1wPQdXaHsKPkrkx7D1D2x8HZrj Ulug== X-Gm-Message-State: AOAM532MLmqyDIMb87ef2CkxGZhXC2F7nR+p7fr96wIMW+6bY6SJC9dh J9XxrvfZzY6FyFzaEkuCJUI= X-Received: by 2002:a05:6638:2601:: with SMTP id m1mr7526051jat.141.1594769491880; Tue, 14 Jul 2020 16:31:31 -0700 (PDT) Received: from jiancai.svl.corp.google.com ([2620:15c:2ce:0:f693:9fff:fef4:238b]) by smtp.googlemail.com with ESMTPSA id l13sm252256iob.28.2020.07.14.16.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 16:31:31 -0700 (PDT) From: Jian Cai Cc: caij2003@gmail.com, jiancai@google.com, ndesaulniers@google.com, manojgupta@google.com, sedat.dilek@gmail.com, Brian Gerst , Arvind Sankar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Alexandre Chartre , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH v2] x86/entry: add compatibility with IAS Date: Tue, 14 Jul 2020 16:30:21 -0700 Message-Id: <20200714233024.1789985-1-caij2003@gmail.com> X-Mailer: git-send-email 2.27.0.389.gc38d7665816-goog In-Reply-To: <20200713012428.1039487-1-caij2003@gmail.com> References: <20200713012428.1039487-1-caij2003@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang's integrated assembler does not allow symbols with non-absolute values to be reassigned. This patch allows the affected code to be compatible with IAS. Link: https://github.com/ClangBuiltLinux/linux/issues/1043 Reported-by: Nick Desaulniers Reported-by: Sedat Dilek Suggested-by: Nick Desaulniers Suggested-by: Brian Gerst Suggested-by: Arvind Sankar Tested-by: Sedat Dilek # Compile-/Assemble-tested against Linux v5.8-rc5 with LLVM/Clang v11.0.0-git Signed-off-by: Jian Cai --- Thanks Nick and Sedat for explaining the process of submitting patches. Include the changelog as follows, Changes v1 -> v2: Update the patch based on Arvind Sankar 's comments. Also include addtional information in the Tested-by tag. arch/x86/include/asm/idtentry.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h index f3d70830bf2a..5efaaed34eda 100644 --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -469,16 +469,15 @@ __visible noinstr void func(struct pt_regs *regs, \ .align 8 SYM_CODE_START(irq_entries_start) vector=FIRST_EXTERNAL_VECTOR - pos = . .rept (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR) UNWIND_HINT_IRET_REGS +0 : .byte 0x6a, vector jmp asm_common_interrupt nop /* Ensure that the above is 8 bytes max */ - . = pos + 8 - pos=pos+8 - vector=vector+1 + . = 0b + 8 + vector = vector+1 .endr SYM_CODE_END(irq_entries_start) @@ -486,16 +485,15 @@ SYM_CODE_END(irq_entries_start) .align 8 SYM_CODE_START(spurious_entries_start) vector=FIRST_SYSTEM_VECTOR - pos = . .rept (NR_VECTORS - FIRST_SYSTEM_VECTOR) UNWIND_HINT_IRET_REGS +0 : .byte 0x6a, vector jmp asm_spurious_interrupt nop /* Ensure that the above is 8 bytes max */ - . = pos + 8 - pos=pos+8 - vector=vector+1 + . = 0b + 8 + vector = vector+1 .endr SYM_CODE_END(spurious_entries_start) #endif -- 2.27.0.389.gc38d7665816-goog