Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp271686pxx; Thu, 29 Oct 2020 02:08:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCakhCCtSYPzKgNjSRCx4sgkllWKwKX90N8hGjbcnN763BijQB1ReIYnY9N26gqzBPEVJ0 X-Received: by 2002:a17:906:1a57:: with SMTP id j23mr3136747ejf.291.1603962486805; Thu, 29 Oct 2020 02:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603962486; cv=none; d=google.com; s=arc-20160816; b=ylD+s/Jjm/1eXUBpvnYyRWm/ajvzaPmG2IJcQ+E0CMpmEJe2KYqAkHhInEdBxRibtZ 477sWMMEGV6Z9tw2++ubEyKUmXnyjMP7TyWw0oyfhJsEKIoGoXr/WgNECzxYlKzcwaWc jEjQjPIHc7w7vZRhhEXXeLRpQoKMoPdPSxwoJqNMA+sX3kwFtEblclv7VcscMurfAFXf PisH/FXA+TSryoWrq7/u0VTkumUtGi1sblgcGVdErK1SLiX2k5hTgM77UCMCO6qlSyKx Cief2Hy6jfIvaDR5o1kVLJsXRkRNH8v5B9+vW8LuaTXLxa5g1l2eE1WuVd50lgFs5P/p AoXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=7Olb9Vc85v3AzNUYsyIXx+Gfta0NhuQoTlTnCTFyYdY=; b=cRcghhcGVdwgLW8rZt4jLSK87gjHRcAh1mRxFMT6izpinMJ8Zmlxns3ZNdVlhAjKjz K156qye0w8aoC138V0KyPvYIm/a9/dXeVqzbBuSzIMLJa74Lf2z5b2kP5sPdQhaU3us1 w8oTtAUuL/zxEKoijtajDOv89p0e6MrwtVALH+Jn3psQlVnV/f2jX2EQLW0PTAFuuK6j e+LzGEaYHkMp99VoUyc7iOCyAo1Z4boZkfFRi01ZhIuE4Q7nqrXe7KU8I+0e7Abzmvdq cwaSS12NCp6Z1AyXKvFvw7wxw32LXs7eyWHXTgm14SST9UtXfp8/T4bA+c60uQtK2Os0 ozuQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c13si1481799edt.355.2020.10.29.02.07.44; Thu, 29 Oct 2020 02:08:06 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbgJ2Iim convert rfc822-to-8bit (ORCPT + 99 others); Thu, 29 Oct 2020 04:38:42 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:29059 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728023AbgJ2IiK (ORCPT ); Thu, 29 Oct 2020 04:38:10 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-247-dYC2eZsSM0WAyDgWmp-OkA-1; Thu, 29 Oct 2020 08:38:03 +0000 X-MC-Unique: dYC2eZsSM0WAyDgWmp-OkA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 29 Oct 2020 08:38:02 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 29 Oct 2020 08:38:02 +0000 From: David Laight To: 'Ard Biesheuvel' , "linux-kernel@vger.kernel.org" CC: "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "arnd@arndb.de" , Nick Desaulniers , Arvind Sankar , "Randy Dunlap" , Josh Poimboeuf , Thomas Gleixner , Alexei Starovoitov , Daniel Borkmann , Peter Zijlstra , Geert Uytterhoeven , "Kees Cook" Subject: RE: [PATCH] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE Thread-Topic: [PATCH] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE Thread-Index: AQHWrKPSU+gpkC9Xc0CadVq4xP4+/6muQ+gQ Date: Thu, 29 Oct 2020 08:38:02 +0000 Message-ID: <445378db7beb4d588b95709251eeb00b@AcuMS.aculab.com> References: <20201027205723.12514-1-ardb@kernel.org> In-Reply-To: <20201027205723.12514-1-ardb@kernel.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel > Sent: 27 October 2020 20:57 > > Commit 3193c0836f203 ("bpf: Disable GCC -fgcse optimization for > ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a > function scope __attribute__((optimize("-fno-gcse"))), to disable a > GCC specific optimization that was causing trouble on x86 builds, and > was not expected to have any positive effect in the first place. Surely it is possibly to 'adjust' the bpf code so that gcc doesn't apply (and can't apply) the gcse optimisation? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)