Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1950118pxb; Fri, 29 Jan 2021 09:07:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrEVVibdJ6GvbRXzjPZchUWKpkgq1IHNFNdvgnl/GwQWwjGbQwdCELsBPEKEJySIsMhwG7 X-Received: by 2002:a50:fc18:: with SMTP id i24mr6491936edr.308.1611940069957; Fri, 29 Jan 2021 09:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611940069; cv=none; d=google.com; s=arc-20160816; b=E9igv5ipvdLkFYE3HB+16beB7wBeN5sxITTNr1scSKcgEq5Q+Gw+CRObdWrGY6k1I1 5gedyK6vOADMT1atdwEHfADnEfc3NYxaa9Aa7O9umUeEK2xexYkWl1JJDI2R7A0U1aGi 4RGnCLqmAyNCUtYytweErSg8l4DFmJsGz3/0bmaNM6MZdOIwFoIJU7MhiDo3p7btepk1 k+yhL3xo/B+ikmjff2sr1QXI0xVOCc9DNFII56CQDioAarvlvjiro9IVRUPfn3E+JVOh m8PbtpnVAnfzDPgVYy3T0m71EIlJy30rJCWeuQLDRAei4iNxN9H8ew6Dh4xGyvrYwi6T uzNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SiOzMG034p5QbWP2fTdwm65PlfCrN2m47go7Lg3jSjc=; b=p658tQZS20F9WUPw6fuMbkf3PE//J4wPMEu9UjAngcJ3fMfMfk5Wu5JH4Kh9Vrb+Uu AnKRSRFeJV5AmH8dbsAE7dBLO0Ejut1YpPk8z4bKawRbruSFSiQkIfA0gedVi7qVJbfY 0SZ7nqBB/ZP0Cdjc/uFihb79H/7rji7obpPo85VTeFb2DtQFIPWlNGye06wFt+6ZT31R ZWt6usYIChm9bHmPRalAgCr8cuFtlijR9O1DSKKlZfah2UoPbGAYEbRyRDbgazMLU9BT NOMbvnFeNH+Vyd0Qa8y4cr7mufRnPigYTwvy+/X3rDaImlMXdoMQCE003OSAZR3LyZmY JcoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SvtZ9U8h; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si5043959eji.61.2021.01.29.09.07.24; Fri, 29 Jan 2021 09:07:49 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=SvtZ9U8h; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbhA2RFN (ORCPT + 99 others); Fri, 29 Jan 2021 12:05:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:25956 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231924AbhA2RFG (ORCPT ); Fri, 29 Jan 2021 12:05:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611939820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SiOzMG034p5QbWP2fTdwm65PlfCrN2m47go7Lg3jSjc=; b=SvtZ9U8hKH/JFJq7/8ma9wI9nRmTq+z+0+dQs/KPZMjscRFO9HtkNDydU628fspWS5wZVI Axzc5L2nt467G/hdo10J8c7ZxrowYLXxKOLqpiOlF/UbtSb5p6TWZNfNzRiqR8hXe6d3nj yiJQwU8O/I5r6jfTQrZPcROatSwHXCc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-268-N8wsyx1vNXWv0dfKR8MHXw-1; Fri, 29 Jan 2021 12:03:36 -0500 X-MC-Unique: N8wsyx1vNXWv0dfKR8MHXw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6178D192CC42; Fri, 29 Jan 2021 17:03:34 +0000 (UTC) Received: from treble (ovpn-120-118.rdu2.redhat.com [10.10.120.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1FB3860CD0; Fri, 29 Jan 2021 17:03:33 +0000 (UTC) Date: Fri, 29 Jan 2021 11:03:31 -0600 From: Josh Poimboeuf To: Nikolay Borisov Cc: Borislav Petkov , x86@kernel.org, Masami Hiramatsu , Masami Hiramatsu , Peter Zijlstra , LKML , Alexei Starovoitov , bpf@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH] x86: Disable CET instrumentation in the kernel Message-ID: <20210129170331.akmpnaqlwtfy4y6o@treble> References: <20210128123842.c9e33949e62f504b84bfadf5@gmail.com> <20210128165014.xc77qtun6fl2qfun@treble> <20210128215219.6kct3h2eiustncws@treble> <20210129102105.GA27841@zn.tnic> <20210129151034.iba4eaa2fuxsipqa@treble> <20210129163048.GD27841@zn.tnic> <20210129164932.qt7hhmb7x4ehomfr@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 06:54:08PM +0200, Nikolay Borisov wrote: > > > On 29.01.21 г. 18:49 ч., Josh Poimboeuf wrote: > > Agreed, stable is a good idea. I think Nikolay saw it with GCC 9. > > > Yes I did, with the default Ubuntu compiler as well as the default gcc-10 compiler: > > # gcc -v -Q -O2 --help=target | grep protection > > gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) > COLLECT_GCC_OPTIONS='-v' '-Q' '-O2' '--help=target' '-mtune=generic' '-march=x86-64' > /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -v -imultiarch x86_64-linux-gnu help-dummy -dumpbase help-dummy -mtune=generic -march=x86-64 -auxbase help-dummy -O2 -version --help=target -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccSecttk.s > GNU C17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu) > compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP > > > It has -fcf-protection turned on by default it seems. Yup, explains why I didn't see it: gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC) COLLECT_GCC_OPTIONS='-v' '-Q' '-O2' '--help=target' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-redhat-linux/10/cc1 -v help-dummy -dumpbase help-dummy -mtune=generic -march=x86-64 -auxbase help-dummy -O2 -version --help=target -o /tmp/cclBz55H.s -- Josh