Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp4115660pxb; Tue, 7 Sep 2021 15:25:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWPKBpKsLTxFm+Vu0SITIJhp0jU78soLo3nzl6bqJlzTxhPjhJe21RS+gqmvB0y5ocQOQw X-Received: by 2002:a02:85c2:: with SMTP id d60mr539620jai.85.1631053531424; Tue, 07 Sep 2021 15:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631053531; cv=none; d=google.com; s=arc-20160816; b=ZMe+V2BZZ6HfsrvLbMAA+4WakCmA+oFyM9CiJkJOYXdLMDta3I9SRiirk6pM7POWHb fYt91MQs4MRV+l+aYlgXQochAc9lpXdueKBzTHiEf6X5FF0wEFEJ1VS8F5vZJz0GJKki XGUtfkyfYMZ7l/i14VTWqkG2GEtCIZNLM+ifL+Cc4Q1/pZQ1CdmbYePngnefGWdvBUpt wVgP4eFi5ppLEEEmUu1854LOhTHjP6/hZV2Y6eNK+iOv5aCzEiIMmkAyRxdY6S5yhSjW uplbSvy5P4cnQnAYXL6o6c2mDBn4CVEWzvzzB28JEoSxXP5Pt+vNhmhzGwjT4nuf/yCP hNsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ok/njKfAvMbY2bs8maF3NrOkKRGpfJfru97+63nEmx0=; b=P3KqHIYMgmmj7kRan+v6kPbKcCTkYXsKsgPBiJsqHCrn8vsPJnAIYyzBO467p4uVSw UwLY9K4yIiQEGUo8vyPQXZ54AyWlyvsBQLZ7RPKwHUj9DnuughDyfnE4txMhl5Vdxcnk cKllLSrQ4dQJOnjUrLYevMYgIWfA6dOkwJuaTs71KmPHDU9rzNJSQUMJTbiSsaZuKfXA 9OiAkZDaZIyRrCmRfl3l0OQQgtDYxtUGEOsUC0t4v/NjoFrBM2en+A/FZoYYeAjx8fSH jlRFGpBfQtgWr2a25qvRzk2nnzJWWCJvfjqmUo6NKHOi3QVfS6m2Ia5874XtXkZba+lC Rg6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s5GWSDpW; 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 h25si238716ioj.39.2021.09.07.15.25.18; Tue, 07 Sep 2021 15:25:31 -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=20210112 header.b=s5GWSDpW; 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 S1344715AbhIGVNW (ORCPT + 99 others); Tue, 7 Sep 2021 17:13:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346913AbhIGVNV (ORCPT ); Tue, 7 Sep 2021 17:13:21 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DFF2C061757 for ; Tue, 7 Sep 2021 14:12:14 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id g14so737823ljk.5 for ; Tue, 07 Sep 2021 14:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ok/njKfAvMbY2bs8maF3NrOkKRGpfJfru97+63nEmx0=; b=s5GWSDpWu58oD3yAVhObs6Mh+1cMdtz92XNa1zuBbI6zNg77xE/cZQtEPx1dvWyUAE O5nW526vH9R9SLJW3hMzS8RvqeQP05lD05Iiv/rjMguHynIjSNik9ORM1WIu2zVHOgT1 w4wXkZb2qvOBAhfjNips1c4HyGBCS7lNmJRXfbPIQr7u2ca+BWXUuu2ZWY3TnTpYitm/ SKOD8y0ZzXnofhBCV1apS89d5XBbxSfEzN/aManxLp+cnEZHVIiujBmIZ6mEbKAs6Seo 6mzixEwWA6e/qxVkSk5YGnfjRnaVThBhzKyiOjDN+EGikwGVVEjb7bN6bArv9lo5wOMT mBzw== 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:content-transfer-encoding; bh=ok/njKfAvMbY2bs8maF3NrOkKRGpfJfru97+63nEmx0=; b=e7NMkodB65wc4rtaOEYVYbvMVYKEJXRAG8Ltvs7Jek7JrsvcE9UgmLmlq/Hm1gX55r +ysJU2TVnTor9FGxX93AAo0MDuzKnekf3ppAOe1sKV7J8XJi6am2dRX8z+1hke4h9e07 ZDbOlyqGKQsQfwKz+ifbdOybPaNBM2s1k0gAQJh0Id86s4sd7vhdiPVvNUaAhiNtK8IV AJNwjL6JOhp+Q5YKen3O8rV3a8QDt+vXOfmo5smpJaz9oaUlFMhgnmDaCDbhhsVOZiHp Ad+nBKQD7wemf79jC8z5Z0fyaG85pbJOqwJNJTuVW6xDqye9iO50vNkqTUEss/X5eaan eIog== X-Gm-Message-State: AOAM5311AZXnvxELgTk2eyxGv72Sb+ZFRUVVJ7tJMqSL0s+YRWCIxc3E 8XOGOIUh3kKbDaXDKXSNGzCfRI1aeM8B7eU4qkfF7Q== X-Received: by 2002:a05:651c:1305:: with SMTP id u5mr184279lja.198.1631049132456; Tue, 07 Sep 2021 14:12:12 -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> <36cf9869-4e4d-e0c6-bf71-981285bd8041@suse.cz> In-Reply-To: <36cf9869-4e4d-e0c6-bf71-981285bd8041@suse.cz> From: Nick Desaulniers Date: Tue, 7 Sep 2021 14:12:01 -0700 Message-ID: Subject: Re: [PATCH 02/24] x86/traps: Move arch/x86/kernel/traps.c to arch/x86/entry/ To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: Peter Zijlstra , Miguel Ojeda , Lai Jiangshan , Joerg Roedel , Lai Jiangshan , linux-kernel@vger.kernel.org, Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Daniel Bristot de Oliveira , Brijesh Singh , Andy Shevchenko , Arvind Sankar , Chester Lin , Juergen Gross , andrew.cooper3@citrix.com, linux-toolchains@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 3, 2021 at 12:36 AM Martin Li=C5=A1ka wrote: > > On 9/2/21 19:05, Nick Desaulniers wrote: > > IIRC GCC only > > added the attribute recently in the 10.X release, so it might be too > > new to rely on quite yet. > > The no_stack_protector attribute was actually added in the GCC 11.x relea= se: > https://gcc.gnu.org/gcc-11/changes.html Ah right, that lays more weight though that this feature is still too new to rely on quite yet. Martin, do you know if what happens with regards to inlining when the callee and caller mismatch on this function attribute in GCC? This is very much a problem for the kernel. > Note the compiler is definitely used by Fedora, openSUSE Tumbleweed > and other cutting edge distributions. Kernel supports GCC 4.9+ currently. This feature can only be emulated with the coarse grain -fno-stack-protector (or gnu_inline with out of line assembler definition...:( ). --=20 Thanks, ~Nick Desaulniers