Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp22740ybh; Tue, 14 Jul 2020 16:37:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCV7BFqkZPV2Us8L6Ls+tD2+dnRKhz83uE5ON9MW/PT7IbxD0UXVgEer4hCpLMQsN4kwtk X-Received: by 2002:a17:906:4b59:: with SMTP id j25mr6463165ejv.301.1594769868977; Tue, 14 Jul 2020 16:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594769868; cv=none; d=google.com; s=arc-20160816; b=Scqoywo43zC134ReF6/CrdwJxu70kt//dWi2U4eXhwaKyD3miQ96MtCiJnNJWsGdXM 9+ZYZdl65InKR2CSuCbltCTvsFwOafDtZYC/H2MwgRJ1wd73mSUBZvgc9PrVQdQvaUOO MV82PPP8ful6kT/BC8EJ1ZJx24S7OV5BFDMJbys0fpv/vsBgwd2etJ8oS4HjIDhMg+xw E3GObhx3uF6ac0a7bxOKO5DUG1oC+1R+QYItHgoN4MUayFEsCNkN4Td/Ri6xd16/QoNr 5JEbgdSFMdJb6nG44U3U0Ryg7ZkwwyJurJJuSw3w7VSLXfhZlDJn7eCMf7XDJk6mRDTq p1FA== 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 :message-id:date:subject:cc:from:dkim-signature; bh=fsTQrOCCM6yA1JojsplBwI6Qpm1eIbU6tWKRrhNq0L8=; b=McPmXLdReW9GkO2FfpaPlDNtdAMHGmSWK095LoITFec6sdyjquSPUWBb8xdSphqvYK +DovytOsnCl3HFu66ogccpHBJQSnOYhcXN9lNWt8IhBRV/7xzU9ZlEKPzgaJy22d3Add mrUIjPzMTWUFD+8SOgUxLKsimPuGSriEQjjfrs2qUOPg52LCG3ihrraRGONNvLpGQHXf cMHTIWIzTa7HHqixibDRijv/ga9I7qEWuP6ZcAsM9Upu8AH+4vJD36PeFfb0VQt+e6n6 LlYHsiiBE0SbCiKlAubLt4IZkVkQORs97t4fI7NK7o48rtEOZMplHweyZd/G0vpHdA0a 3G5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Xe+ngmM7; 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.37.25; Tue, 14 Jul 2020 16:37:48 -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=Xe+ngmM7; 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 S1727810AbgGNXeT (ORCPT + 99 others); Tue, 14 Jul 2020 19:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgGNXeS (ORCPT ); Tue, 14 Jul 2020 19:34:18 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A44B8C061755 for ; Tue, 14 Jul 2020 16:34:18 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id i4so239240iov.11 for ; Tue, 14 Jul 2020 16:34:18 -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:mime-version :content-transfer-encoding; bh=fsTQrOCCM6yA1JojsplBwI6Qpm1eIbU6tWKRrhNq0L8=; b=Xe+ngmM7jnpOaj9OqRhcN0gqzjId08uwAew0qwDF8WY7Et/Vkh2HgKSSjJLiwWTfGU j44JCNWvUx0MMNxLzAxoyDy/Dkz44TmYvxtqAe+VrwQnW4Vs45YQB426Z0aD3Ijc80R3 AXBUCjgwzGIUnmWqB3/V80leO43p/tqm4/ohdRdP+DHp8BJF/HYT2k9kyTpCl6dyi6le NGHVLwzENO6xA/QZEaE2O9/S/HDRv8ovdMyW+I6Ggsh4PJFyJ7+ZStCQt24Rxa6knbh2 xLeg4YyZMHrlq7uxg19+zlHUWDazKIDhxi1DsRSZhR55XjJe4JJwFLv0xU6jA/Pbh5JM zdTA== 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:mime-version :content-transfer-encoding; bh=fsTQrOCCM6yA1JojsplBwI6Qpm1eIbU6tWKRrhNq0L8=; b=DVYDzOwVE0fHilE/v1ax/RBsY0zgTrsXxUNzk8Xf2vBa86pWpOCxe1HpGIsxIERRGf VOUMjZkQ2WqKXicOI9qR4MKm9NKkIXhRE2XF6qAtsY7ONAJsHXbTVDmuxbQMasUJVIcd 9q0zPA09GU4br0dgsCqS52pJelwyiZjAVFW9I4luP3Hj5Tat1CQqEJN5YHIPcyJC44aX 4CRmDd9igSR9HisCt4nqeaKoY1IA5bmjfBPyQxDgYaRYpg/l5vKU+iHqZ8M7E3b0FSj6 2t4eYtJtpoU2S8fJC3qPZwqyp6DkwLn0SEx7DAHo3S0W5bZ/Rpwhabu9fm4iQrdVxcMF dDZQ== X-Gm-Message-State: AOAM530S1T5A48oJEjr/QZvUirb2ZCJ/A52qwWgeHmMOOOmbS9vlaGPx qZPj/tWSu9bt6cK/BQR7G2w= X-Received: by 2002:a05:6602:15c9:: with SMTP id f9mr7436588iow.35.1594769657817; Tue, 14 Jul 2020 16:34:17 -0700 (PDT) Received: from jiancai.svl.corp.google.com ([2620:15c:2ce:0:f693:9fff:fef4:238b]) by smtp.googlemail.com with ESMTPSA id x12sm223235ile.14.2020.07.14.16.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 16:34:17 -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:33:39 -0700 Message-Id: <20200714233342.1791530-1-caij2003@gmail.com> X-Mailer: git-send-email 2.27.0.389.gc38d7665816-goog 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