Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1652699ybh; Tue, 14 Jul 2020 03:49:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMehAnwZERxvkzHi/S/GrUUDBf4IaUnK4WYy/a3xvWgk1k7Or/OrlqAM+7F+2eOVVotU+F X-Received: by 2002:a17:906:140e:: with SMTP id p14mr3903042ejc.430.1594723741319; Tue, 14 Jul 2020 03:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594723741; cv=none; d=google.com; s=arc-20160816; b=Wi/dllvpMyyTtViTisMGia/SZ4ilx0GX5C3U0WjAX35ttognwdPeK/p039eDh3CHg3 ZLRFXPpjrgvxHHTaIZA2A8aYKSqmLjHnYfFomqR+gGlkZg56Fzwu+mwZ/5oZAwwBJftU Y1vhGDLpDsy3zAVwfC4LCZE/X26ovIVOHgBvHBy4zdO+D+q+JzvpFW+urzWkOp9MooBi YApCfGJSQfae/lw3bxYN+qAXDN37YKJ5PkfaDBjvp7mdq+iy18VHWTSSKkpjp7FVZaGi c5jNJ6i6b3xRfRNasBg6rwvTKzavFP0PhnuBuOowvYlj3pjDB90H0b3E55gXSkjwzqnd DfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=j480OKWckVZikzkVrQF0UpbXQk/7Ivom1NgwihHXWGM=; b=XCerhSGRKSE0EIG2VxuwGYWVXQVAsztDdT0i6ipVI4ejDx6b/k9GVICejPSieDz7pd MmGHeBTVJLy756DEa9AlavmBx+9Bndt3CgOuGoypBK40F5S88PkSjNxdpYdtsJGCC08n s3Mo+tJ8PgCGYLGO88Jh66OcGVId2kNFBTbWxY+q0DuaKoJJ9PVZVfgoqFUuj9T7SI+7 /hoLKbfA6IJp8JQ/MZFmbjq2e8QKx5PL0xJl4DSijKggSlgjbGIf/7ZXFnmgZenVN54z IWVZQ+2bYQWih/nSWn6bHeCBZa6jgn/noE0FExiPtolyvTwhpuYifBiC2U5o15lFa2gG FUew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LhvDXOLX; 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=pass (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 k5si11279714ejr.359.2020.07.14.03.48.37; Tue, 14 Jul 2020 03:49:01 -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=pass header.i=@gmail.com header.s=20161025 header.b=LhvDXOLX; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726936AbgGNKsX (ORCPT + 99 others); Tue, 14 Jul 2020 06:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbgGNKsW (ORCPT ); Tue, 14 Jul 2020 06:48:22 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF86FC061755 for ; Tue, 14 Jul 2020 03:48:22 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id t4so13821911iln.1 for ; Tue, 14 Jul 2020 03:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=j480OKWckVZikzkVrQF0UpbXQk/7Ivom1NgwihHXWGM=; b=LhvDXOLXaVDHVU8ajuzmqlL9SoxGOPLslqB0pbwYs60rzpWn7nw6/gElog4dUe6S9m 1/tujllMZZxlam6WnKSPBgv26+uvqLi0TxYSKGfh6Z0kOdEnUx1jb08Md5ydY9tVSjVj 6SwwJ5pLJMqZn9Yv25nfiWDYtPUl1Nm5Q93uXMT6ctPS/LXuCmcb0DXW2/KLa+U3BGUg uSz8NK+m5b5RojkzQitGq8UZd0bWxSeWsOm9EFJzq69ozx2WJImdq0HzyppBoOpnIGyM +Gc3ekX55Dd4zjqafS4aXnjVvuPuXvn/E7FZfRgcdjfuDfxLcDb65ffAPskv0KBUAurN 3BFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=j480OKWckVZikzkVrQF0UpbXQk/7Ivom1NgwihHXWGM=; b=cZpsisSNHw1U689R/TwpkQ4fa9gzqbA9mN9wFqywGnU+UACxZxqrWc4/H+EnYjnnX+ CWCsu/ceyqDwMKNvZkEqFqslgA0ZoiCQ0m6xspMZKlDC22RaUzD57bo/3zdmZZ3N3Eep EEym5IoLpMGZcxai2PuovF5AZurMCx9nn9OByav3GS6WGgpZrPXAKttuSJvtu1YQ64Us Dxi/NlHsBlmHn031n56aRmSwVv/ONtS8V2a7+IyMSPrSwyJVNWlTvpzxtWqn04gzTEWP f8HuaR/5u2vJtunK/Ke3hgDx5OlGf9ZgIHy6TeJtzb+eAmDTtddvctZHsQ437oB9Uhcy WCjw== X-Gm-Message-State: AOAM532+hp9yKksDnecMXrCAfSb6wgsH4uKzszy401HVUEr0Q+/mPJEj nnVMEX+QwlNooXBwS1tho9a3vTejrCW1vRHn3tE= X-Received: by 2002:a92:dc09:: with SMTP id t9mr4281512iln.226.1594723702039; Tue, 14 Jul 2020 03:48:22 -0700 (PDT) MIME-Version: 1.0 References: <20200713012428.1039487-1-caij2003@gmail.com> <20200713224020.1297154-1-caij2003@gmail.com> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 14 Jul 2020 12:48:10 +0200 Message-ID: Subject: Re: [PATCH] x86/entry: add compatibility with IAS To: Jian Cai Cc: jiancai@google.com, Nick Desaulniers , manojgupta@google.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 ML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 11:34 AM Sedat Dilek wrote: > > On Tue, Jul 14, 2020 at 12:40 AM Jian Cai wrote: > > > > 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 > > Hi Jian, > > thanks for the update! > > I am glad to see that some Linux/x86 assembler "monsters" jumped on the train. > > So, your patch with reviewer's comment got several iterations? > Not sure if you are aware of the process of submitting patches (see [1])? > > It is common to add a ChangeLog below commit-message-body and diffstat > means add below "--". > Something like: > -- > Changes v1 -> v2: > - I did some cool stuff to improve this > > While at it... Please add your version-of-patch to the subject-line: > You can do this via "git format-patch --signoff --subject-prefix="PATCH v2". > There might be other cool git tricks I do not know. > > Hope I was no "Uberlehrer". > > - Sedat - > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst > > > --- > > 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 > > Stolen the patch from [1]. Tested-by: Sedat Dilek # Compile-/Assemble-tested against Linux v5.8-rc5 with LLVM/Clang v11.0.0-git - Sedat - [1] https://lore.kernel.org/patchwork/patch/1272115/