Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp4109pxb; Thu, 2 Sep 2021 17:41:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzqsayzrQpq11nBwRC1sYcUhLzAEYzhUw6pSjcJB5SrsTm8Rkbqn+nKvrat+PSK9N3FMZI X-Received: by 2002:a02:bb14:: with SMTP id y20mr433615jan.130.1630629662680; Thu, 02 Sep 2021 17:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630629662; cv=none; d=google.com; s=arc-20160816; b=PHtEZ/UKx3PfMbhvfmOCqBbZnQPbpD9q3wEnG46t+kA82kwQvkGSP9pfFAyndVy20u wv2qfcMWsR3P2rEd8N8nJ7n6NQm0wHDlMIkwGgdXRrAPavl8Q6+oh/mIayVkD5S1IYbG fjNsJr97SUZLKo7TDclO1DwPhFGBIVnPH5cNcZOdJC1xNfD5czao3rSZnAZDf258zU3U ks6ikKTjMC/UcGkf1OGGR/Ofa3aB8iPPtV+NKTkgaD+zMrzsDDw1CoyPFAj4gmpYdzbp JwbLprDIL1yJvFu6TRq0JDywwRxHE3oVEyzUA8ac2pVRz1sA+wOQiWPFhHkTmI2oX+iv Fq+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gOotsDMeLtXCPmS2rPy5ur44v/otffxT4MMMsT0RtEQ=; b=vtKcK8HHoG0yeMBiQSTH1gAB0lwF9LHeMaDItXP2lT0YgXe6+gWmk8cONq9/njgg1e tXcBBKoJv83j7Yv3AtEXLXBGQk7RewsMvIZ5bEcLD7LwjGevmY2Wv8QBcGc8HSO9UaMx 1f0HAflNXYBBHA1uEjqKOmNrcCvxNZ2kkyXLL5Qg3mANETkbPZ0c0zDEUnCr/fIfqujm RYWf3Q20sLtsS5JWrq5BW1Q0fbJfbpcBX/x+ms36yI2Xj1Qgw7xbWVU09PEWdowMfNsG 3YItQI/dKvoVmXWN7FKj3BNM7jiDpIshckU3BkAU7Soc9uBDDgq40jLZlJs0TebVSzB/ TnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Phjx5hB2; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si4124854ilo.4.2021.09.02.17.40.51; Thu, 02 Sep 2021 17:41:02 -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=@google.com header.s=20161025 header.b=Phjx5hB2; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346546AbhIBRYj (ORCPT + 99 others); Thu, 2 Sep 2021 13:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346582AbhIBRYi (ORCPT ); Thu, 2 Sep 2021 13:24:38 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6B27C061575 for ; Thu, 2 Sep 2021 10:23:39 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id s10so5909999lfr.11 for ; Thu, 02 Sep 2021 10:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gOotsDMeLtXCPmS2rPy5ur44v/otffxT4MMMsT0RtEQ=; b=Phjx5hB2D3ogRbLkacxeviaM+E9cJCzn9UYv426hI5lv5Uq5/rd0E/V/H9RCzWbWNP ghmZ9zz8rXdUaliKNzBA3WzVry0tIyHH7i5/BHVv3SmMYwRKW1LM8sJj9s96GnApyn9C TFwQc3xR8Uc5d82GA3ar4SycARwSXs1C787uUkuzeRI6jK/9O+g4J1aLSOXOjsU6V/Oa 8uU8/T63NfS+kqkRftvpMCNiiT7NO8aik6EI5RGcf6P02ue8i53u0ABVtUtuKajkDq3A PsxR0kjxdibULtUZOntAty5PpooeFMZk1tXUcRjxwoOl/TBR2ySSiWGJLSjwHvoT2JMR 7fvg== 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:from:date :message-id:subject:to:cc; bh=gOotsDMeLtXCPmS2rPy5ur44v/otffxT4MMMsT0RtEQ=; b=Q+MVlZdcKj/2NWlgOZyKLoagKRo1ApIjdb1i5rslMuzCLPfany8lW71ftKC6gcnlgP wNDy9EQjPNOKllQSd10pypOp+HFjhjBolWaR/f8wkBHcnWE+FuI851omnrnYCoKxnWNF gODz5bKk3bDOmTQLISzide19tdhQF3CPTpOynQVZ4A1FgyPqXe7PHbsio8A/nKjzz6sh vIgPlYepBwoduQ7GdfSFOI87qoVJdaKhHdAI1Bfmdle0zOsN921+P3ISAYfs57nxhljI zC5HzLxp41uKzA8NZgtzMaZjOwLr41+9t4QgJQGmaQ/63cd74GwcgYmxRA9U4P48TA0W dTqg== X-Gm-Message-State: AOAM532F5LcbzYvVPoXAdqsoBufYq6nBkjwBtjLFNo0/qk9Rt6dJbuj4 6w/3AajwqaaxcshadZz1dV1MvTHz3RMyaGDSZTgzmw== X-Received: by 2002:a05:6512:ad3:: with SMTP id n19mr3360083lfu.297.1630603417930; Thu, 02 Sep 2021 10:23:37 -0700 (PDT) MIME-Version: 1.0 References: <20210831175025.27570-1-jiangshanlai@gmail.com> <20210831175025.27570-3-jiangshanlai@gmail.com> <1f327579-e62a-df65-0763-e88243829db3@linux.alibaba.com> <4c589fef-8c98-a6fc-693f-b205a7710e42@linux.alibaba.com> In-Reply-To: From: Nick Desaulniers Date: Thu, 2 Sep 2021 10:23:27 -0700 Message-ID: Subject: Re: [PATCH 02/24] x86/traps: Move arch/x86/kernel/traps.c to arch/x86/entry/ To: Miguel Ojeda Cc: Peter Zijlstra , Miguel Ojeda , =?UTF-8?Q?Martin_Li=C5=A1ka?= , Lai Jiangshan , Joerg Roedel , Lai Jiangshan , linux-kernel , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Daniel Bristot de Oliveira , Brijesh Singh , Andy Shevchenko , Arvind Sankar , Chester Lin , Juergen Gross , Andrew Cooper , linux-toolchains@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 2, 2021 at 10:19 AM Miguel Ojeda wrote: > > On Thu, Sep 2, 2021 at 7:05 PM Nick Desaulniers wrote: > > > > The above 2 hunks should go in include/linux/compiler_attributes.h, > > but yes. I'd been meaning to send such a patch; it's nice to have > > Note that `compiler_attributes.h` does not keep attributes that depend > on config options. Sure, I'd drop the config check and define it conditionally on the __has_attribute check alone. Does it hurt to mark functions as __attribute__((no_stack_protector)) when we're not building with -fstack-protector*? Nope! > On one hand, I feel we should put them there. On the other hand, I > want to avoid making a mess again since the purpose of the file is to > keep things clean for the majority of attributes. > > Perhaps we should do a middle-ground, and only allow those that depend > on a single config option, i.e. no nesting `#if`s or complex > conditions. -- Thanks, ~Nick Desaulniers