Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1319484ybh; Mon, 13 Jul 2020 15:41:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYzrzdOimfJ0oS/mkZLCQjAJiWN2UnuxR4RBO+rw33GYVYrariQ0FdRFnw0V9sGTf1Xegn X-Received: by 2002:aa7:d693:: with SMTP id d19mr1610572edr.317.1594680103206; Mon, 13 Jul 2020 15:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594680103; cv=none; d=google.com; s=arc-20160816; b=P0JjDjutfxTodtBUICGuE+oIsAyvF1u0gLzMJUFqeKyIMV/oUys8Tf0ZyyXjTQwOH3 gyYQBwgScIJ/In/lRM7iZE+AZ9Mdz7E2gjPXq20UPf2aRb++N6l3crVn9zVK5ABdAc4u D2qT6j5vbiy7rh+YnqU5mJbgi3IUq3wBju7nP+R3WJuClNBsyI2y3FTtFaLTjbOF1k5I E+wX5GY57h+WFxx8Ah7mGtroRb6w0A1nqBQKFhTgc18f3PbvZf0cI/PjThZdlDAXc+Jt Bp6FvGQ3LjJRBytiFexdYNxkL4wzzbv2DNuP/ezLRVUaURuyOkFG5xXTks9YhwoqCUYp Pncg== 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=FQ7NMKo03W54NhNsLDg4XkthULZUgCOASFezEvTt0gQ=; b=ZVHUiEXse0Yi+MAQvV11EgcgQKYynGiI+sRoTUtdxb884Lb9PCMG8146Wtw1S0zoTg DB8PGN/vDXmA6FWiWKpKb3sDoIzLAN5t74JO2tHHFa2XK4d3gXx5EFZuFJrJg18RdE+T lKCsQtEBg5fmsSkE6AYn97JMbLZtFB/kg9SJLLknTnz4/5wHxInJa9j80BVUJVECnF0Q vxTgLhplwcWPN7haG6IrevPFMkFbSpIuguc7KxDiB6qrwCohLvLef+W7cZsUPLPyTv3n nhDTsBbZVM6IB68quPrHhwI9O5FCpVYMqZlaT/UOcHY1ek0NFiy8t7vLp79VL//4cgn1 Og+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=r9kfI48Q; 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 b1si6212195edx.40.2020.07.13.15.41.20; Mon, 13 Jul 2020 15:41:43 -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=r9kfI48Q; 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 S1726630AbgGMWko (ORCPT + 99 others); Mon, 13 Jul 2020 18:40:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbgGMWko (ORCPT ); Mon, 13 Jul 2020 18:40:44 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECDA4C061755 for ; Mon, 13 Jul 2020 15:40:43 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id e18so12626605ilr.7 for ; Mon, 13 Jul 2020 15:40:43 -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=FQ7NMKo03W54NhNsLDg4XkthULZUgCOASFezEvTt0gQ=; b=r9kfI48QueoI2xnPKErUlFJe4TFAsoH/tgaYcs5PDdJNxT8sIIbsvppbdKtlNIlZ53 J3ZupCPqsJmvcmW4h3uCEq8he6qaks+5cWuq780V9Fk5TbioU6F8rgWCw4UxpT8Dl6l/ U31Fgto5J1dCJa7v6kN8xnTLvY1A8FdjGFJNiPD6eCA7MkHMQB9CY78Qobpr04rkjMCM WJQrjmgK6L3LqQEntQVd/j9Q2CPdLPaTuiY12ENiVERS1c0151T3xV91y0idhQsS840+ tkXAHNFF2AvC5/4dp5F7p2tJnCz0GBbY5KbhP1q/0uMmBjnqZjyGX5HSTL/Sskozrnuj w5GQ== 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=FQ7NMKo03W54NhNsLDg4XkthULZUgCOASFezEvTt0gQ=; b=AXpTL0hNp5Hj0QZZlvKPTn+8lKrZM+56mKw0qroAfFPaRkmmJd623ROfK4irjm1/45 YIHdpSezNPZyfPfpOUUKC8NNj82meWFLJPEMGC6bPsnEpVZe/ecyCtA/HCJL+YLxtFZa NNoSAZLvAi18gbH5RZAuAIvoo3hyAHF22PpaGAyl7Kh3wOKLNZPRbbtFlttKW4jnX1q4 0WCqAfnly5k1F2LBeMYlB/4KT4FKcB62WQDMNZOpZJv8hXO+LfxvhcRek/2a+DwWi31H 1UHzJsHkKXW7fuHGOgCKWte/fAL8FWNMy2FjaPuI2+nggLU3liFeGb31FBUBb4VWC5Vc nh9w== X-Gm-Message-State: AOAM5323JXqj9UoxyQPwqnWc5uITUrLvIhSw36kqCJIEIPClLl8e36Kp DluEsRYRISPNF64FuACE1jQ= X-Received: by 2002:a92:3311:: with SMTP id a17mr2059950ilf.210.1594680043340; Mon, 13 Jul 2020 15:40:43 -0700 (PDT) Received: from jiancai.svl.corp.google.com ([2620:15c:2ce:0:f693:9fff:fef4:238b]) by smtp.googlemail.com with ESMTPSA id i6sm9123152ilj.61.2020.07.13.15.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 15:40:42 -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] x86/entry: add compatibility with IAS Date: Mon, 13 Jul 2020 15:40:18 -0700 Message-Id: <20200713224020.1297154-1-caij2003@gmail.com> X-Mailer: git-send-email 2.27.0.383.g050319c2ae-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 Signed-off-by: Jian Cai --- 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.383.g050319c2ae-goog