Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp692639pxx; Wed, 28 Oct 2020 14:40:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmeQM43HIXIui+tA0QxebkPIu98u8nACnRmj+wr6Zxe5eLo0hf5eubXfRvUavus2RdeH2W X-Received: by 2002:a17:906:1a07:: with SMTP id i7mr1019637ejf.473.1603921251516; Wed, 28 Oct 2020 14:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603921251; cv=none; d=google.com; s=arc-20160816; b=y2FeXrj9vkOOO+iZcF1yC4U8IovJQ0wA8x16xeOscIfo5dXiRGlpt2pjaYLyQYSUzw LGnnq0Vaa6t5HknsxT5mAfWr93KcXVH/9hTYOKPRgqc6XrCn8Q0aCPUJMf7srbXT0rL6 C6yPgkSySz6f52YLPwo87PPrWZy4pVyT+Qg90Zvor9dL5xGotS0KbljtjZ5GWYeN+Rxb mZIl1DuLvOAiN2KPO7kGrTCW/JeRwWRnB9/F3I7QyaSgnBEuTjjEa8y9FbYkeHYi9mBs he3m5qF/p2OqDN4bF0h6kt4ODmkeJEth1bT+8DlJ8kcK+gZCxUKLDNSUA8pfV+F69hRI rDMQ== 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=6bbKNDX87yUDdIr/XYadYIsyXQmZkxSGxGdrxu25bns=; b=py9p+sFNGp03Hl0Dolk7BgiU9UUdRXVsLqFuAon5yqYEBQ7WaFjTawZc22mTO/vmv9 mG/Gxz2MH2X4cWzcyxZ3V7gBeXrHkyVRPr4TXd3bf0YqWkLD57/6DLeIHo6JKWndVm8h LY5nWUBhwaMhm00kkSGBc6PR8FyH78M5+H6Mver6HhKmUjYE/7DIEjjzJAWsLsn+6Kn/ kvBbKZ3eQHgYoc5yqysF4Wv5+oYVFOlBsaxjMdalPNrD4h03ielQmZuH9zHaGswmc1gx 9+VUPnKBscjTPFkhnxH0lvZThgZvNKwMQlLQ3CWfpkUdnoOxBmSrEILUBgGC5r6oyVx/ qwww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vp30La2l; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si589384edn.387.2020.10.28.14.40.29; Wed, 28 Oct 2020 14:40:51 -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=@kernel.org header.s=default header.b=vp30La2l; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506300AbgJ0WXy (ORCPT + 99 others); Tue, 27 Oct 2020 18:23:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:49310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505747AbgJ0WXy (ORCPT ); Tue, 27 Oct 2020 18:23:54 -0400 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48278221FB; Tue, 27 Oct 2020 22:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603837433; bh=Cc+90dgAQa5qCqT7yhr5+fNXcD/lqcWVm7Ov6RIsF+E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vp30La2lUQBdT+96S72S0Dz1GBdL4xWzRgVCDUUYiqM/K1v5/g9Nnn/y8+SrzYwQg h75xpYI33IvDxYnn9rJtAMoYxl0HX+x4vO0D92tKl80Ffkjq93h0t7Dd8Cud+CGbTQ 66CRxjf9li3sgA29EGFpvFJiJpiA8eroc6IiQMh8= Received: by mail-ot1-f42.google.com with SMTP id n15so2568853otl.8; Tue, 27 Oct 2020 15:23:53 -0700 (PDT) X-Gm-Message-State: AOAM53155J3qiMXis/tlwYxqv5IK0Ms8lOLFqVgF6GiTbVIYG4U6HHAH 4nT3qBkHtkGOXsKRxbeqFsrImCdUrYlRw0TLWww= X-Received: by 2002:a05:6830:4028:: with SMTP id i8mr2946472ots.90.1603837432594; Tue, 27 Oct 2020 15:23:52 -0700 (PDT) MIME-Version: 1.0 References: <20201027205723.12514-1-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Tue, 27 Oct 2020 23:23:41 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE To: Nick Desaulniers Cc: LKML , Network Development , bpf , Arnd Bergmann , Arvind Sankar , Randy Dunlap , Josh Poimboeuf , Thomas Gleixner , Alexei Starovoitov , Daniel Borkmann , Peter Zijlstra , Geert Uytterhoeven , Kees Cook Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Oct 2020 at 23:03, Nick Desaulniers wrote: > > On Tue, Oct 27, 2020 at 2:50 PM Ard Biesheuvel wrote: > > > > On Tue, 27 Oct 2020 at 22:20, Nick Desaulniers wrote: > > > > > > On Tue, Oct 27, 2020 at 1:57 PM Ard Biesheuvel wrote: > > > > > > > > diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h > > > > index 6e390d58a9f8..ac3fa37a84f9 100644 > > > > --- a/include/linux/compiler_types.h > > > > +++ b/include/linux/compiler_types.h > > > > @@ -247,10 +247,6 @@ struct ftrace_likely_data { > > > > #define asm_inline asm > > > > #endif > > > > > > > > -#ifndef __no_fgcse > > > > -# define __no_fgcse > > > > -#endif > > > > - > > > Finally, this is going to disable GCSE for the whole translation unit, > > > which may be overkill. Previously it was isolated to one function > > > definition. You could lower the definition of the preprocessor define > > > into kernel/bpf/core.c to keep its use isolated as far as possible. > > > > > > > Which preprocessor define? > > __no_fgcse > But we can't use that, that is the whole point of this patch.