Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1614671ybh; Tue, 14 Jul 2020 02:36:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7Y0yZaj+FhqP2tnkEnYCijLA28mulayfanN6Eexi9M5GmTDx6cl8CcN70X5d6dza7UIz9 X-Received: by 2002:a05:6402:359:: with SMTP id r25mr3496961edw.177.1594719368822; Tue, 14 Jul 2020 02:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594719368; cv=none; d=google.com; s=arc-20160816; b=NNiIGZ2K5Nrt8z5uDftSEPR6a6TzTEcOcY2ru/2GjvNSkBfTgzuuRu0n0GPaMK9jsJ GoCDQ8SRUS+XxGbpE3AxbSyGnG6W8vut0Sk5325cvUBdNhEHfUCUosvQ+Todc21IqZP6 PaCLW9rlYfatRjWP7cUicU/RyJ0VbdQF8gVup0uKPa0fURoa/7THv8vNO/lR+MlNWqho TeDYHi7CRpzl3B+R7ABwDWgmO5+QTweoC7uyxWAozJUkw78r0iOt2muu23g1OLoE9sSb IoCnK5CWYdh1dt+Pz1WtDI0QTu8nFtYz8q9jcHWiUjSwchYPPfELn6MC8PI05hqH7Nki T7xw== 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=lRrq57w397KEjj99F1eu0ePTuse9TMJvNbmNZttcxV4=; b=EWQ8w159q2Ukjq/wOs+HEdn4AT0p9lUPYvzjZG26fqKiU0S+cdcbYMP2NWKv+wzqJv Od9yrv2/X6hXYVAvQ3JwAt58n70AXJ6CerCS4LalsB6LjqgqGhTovfNXpOvJ14brZae4 mv/l6cdxkdUeG1GthBcxAAz0ETZn5Gt8YjFl2Z+bZo6r++wemF+YbGGCG4t7h+rcyZ6F dX2XUIQ5pV0qYqrWiYXCmwXDRkLGJwO4vQHvKi1GYhjHqA1g9uvZHiNNH8xPDF4/0Onf HUoN6oE1ZcZDOrvwcip7409xxGsaKSSz2aMd/xUnRc8qU8MgLuRferf1g0emB58KLoYv B2jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rLwNFfEA; 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 cb9si10138631ejb.176.2020.07.14.02.35.45; Tue, 14 Jul 2020 02:36:08 -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=rLwNFfEA; 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 S1727032AbgGNJeY (ORCPT + 99 others); Tue, 14 Jul 2020 05:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbgGNJeX (ORCPT ); Tue, 14 Jul 2020 05:34:23 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAE57C061755 for ; Tue, 14 Jul 2020 02:34:23 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id k23so16546142iom.10 for ; Tue, 14 Jul 2020 02:34:23 -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=lRrq57w397KEjj99F1eu0ePTuse9TMJvNbmNZttcxV4=; b=rLwNFfEAV7GLFEiTgkQgQk2b/z2xQrGaqrzARHdrOTEe13DqUx2PnFjkH77qxGjF/R Fv3Q/3LbdjlAOGVznWQD4x9CcjBK7ihwBu705cJa7lwQP5/i+R+Xy+uTDbXvnrypexbU 2963CHA/XU+KsPE8PtqjDVSuHgC3MFJQu7v0fViYQW3QNJrhhbsJsj/0pTad1RDrM0Tt Mqz91jZcI6T+Y+fNZtwDE1Ik6+ZeguJtcYkeDQ+A+BATo3zTpAXOS+iRP/fDsoFWFoey pdEQTxm6R7ihnqSaNzBjg91MQznybOp3M+TPrKnL3Fq+1S/HhIApGOyVGyZoPAUqrMD3 76Wg== 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=lRrq57w397KEjj99F1eu0ePTuse9TMJvNbmNZttcxV4=; b=U3CGI58KELR5APONPct2PYbHqATaf1Kr+S7UPwL09LMKZ0hImimDmlGCUcIO+t/few Dkjp8NxJNTvdSUJpdMiWe7ZP5gZaqXjP+dW2bsqqzZbOXgpB7xpLhlU4o9ovY7opLNqw Ph++052Zrc0hLogWQSxKTRkwI6M3PeKcGtV9VK/OOKQu/mZin0dYeNVwvsj22pNRoOp1 O3/Ty1sKavwjttU+uW8bHKSs9HyKCxYThbxCAx1ACFwBr0MwPaFIq4GnIYfv7meuyulp UQkJ180gGc0cg6i03Em5H1d+hnBlhMhJTejqrOWFhVmzlgUHMmyGXRNr176Oi1stvvwi e9tw== X-Gm-Message-State: AOAM530l7G7InEHbXKI3T7W8/XG/DPr+sdq7M/RjdTY7MzZKPPdGfSxn 84/PgKZC4C+Q6Y552ORxsdPuIGfnYx9wEEjqtw5H8wKep7Q= X-Received: by 2002:a5e:9309:: with SMTP id k9mr3962748iom.135.1594719262995; Tue, 14 Jul 2020 02:34:22 -0700 (PDT) MIME-Version: 1.0 References: <20200713012428.1039487-1-caij2003@gmail.com> <20200713224020.1297154-1-caij2003@gmail.com> In-Reply-To: <20200713224020.1297154-1-caij2003@gmail.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 14 Jul 2020 11:34:12 +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 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 >