Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp575208imm; Fri, 28 Sep 2018 03:25:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV62eRh+iVVtze02pctIbGVwIjwsjIgFzL2ZAPN1S48gBlWongxq46o5VJVS3YmuDZYbU6eO+ X-Received: by 2002:a62:ca1b:: with SMTP id n27-v6mr7300062pfg.69.1538130332964; Fri, 28 Sep 2018 03:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538130332; cv=none; d=google.com; s=arc-20160816; b=WOLpZiIDpw1hcRLHriSkyN9wzsBwjEFuqJPVueKL9uj1NnG9yjomLZbeN1KTgNpRAC FsFhKccGK1f7t5foUPNUuXO8FwmtxgXoN/w269WWDmGC+gqRXJIX0XwhbioSJsbterug qNRGMp+Jw0ylPdgO+Pp5d4u+86YlAZzk+OJSbuSepGOLE5aBnRolgVtTdlmw3c74fXom CHpPWoEi15DYO8fuFBfv8xqYehDXwb+C0AMDn8IKmyp6+Fgs0aD4BAeADXJxRkRx6I8R 8tW7gCJrnjyyy/e8mEhFy6f2z4FR/2mosMME+8RXNqaBlBWB0QbTzCvaTrJrDD9IY7/P VVQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pvc7tOC6Knfednrgqlv5BibEH//tfqrHoyN25vxI7sI=; b=LBhRAsEGTDn4Ep8DpGOfZbst1KwtnpQZC+5Qi6/UXk4UEX9bofzSq0L2YLDhGo5IC2 tgWX5twMuDMjdLW+k4fmPORd0miK6L6k3c4+0X6WPNYS06EtHIGjvVbohBBm6H1Mc/PJ 9iCiWzThm2kCnMwT5hikczpC5relrptTXmsAcVH9yKiiOh2AKlESt0SZMfkLhSSpAb0i VO6sxgPni5MimSN1zL1G0/JL254Gp8cxLdUwlGzpuRsKXvNXRisdl0AktjRJiSMHlAz8 gDQey303P3PqJ6VB/A3PmebAV/YzEYNJAeBeKowEopfmO7bnDJvoKEIn2LD6JlCNvQrp M2yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nZGytgrK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2-v6si4717522pfb.69.2018.09.28.03.25.17; Fri, 28 Sep 2018 03:25:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nZGytgrK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729400AbeI1QsP (ORCPT + 99 others); Fri, 28 Sep 2018 12:48:15 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35521 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729116AbeI1QsP (ORCPT ); Fri, 28 Sep 2018 12:48:15 -0400 Received: by mail-pg1-f195.google.com with SMTP id v133-v6so4170885pgb.2; Fri, 28 Sep 2018 03:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pvc7tOC6Knfednrgqlv5BibEH//tfqrHoyN25vxI7sI=; b=nZGytgrKFXcm8xP6XtGqw+h79hKX4hMfNK1RvypplJB22l3EyBhySgubkf8PmI50Br t48GDZCvba0KlJtku2N97rqbdNgLJvRJa0HsFqWJanzGzX05+Kg72pGihFJOy9JujwsS aQex4hpM9k+hoiICfq/aQ2C1HJijRi+rUg3seU6XQDmdog0IEhA/z/6esUlF36XjUpBV gzP3oxI2C7Fha3M9oLWKUJ1uJO47gcqZXZWQa35W5gKK6PE+yWZmWT3UGiviRCncU/qN fuuEl7tBlpJPb52cn0G8nvuF+zTafqVgFnoBs8EDQ3sifck6xeKnTl+P+eztAoVxgnIL v98Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pvc7tOC6Knfednrgqlv5BibEH//tfqrHoyN25vxI7sI=; b=ZSHc56gRWT1kBr6ROxLotKcOiAR3u0eMXEcjVaBk7rIp+wmpbpC1fLfQ39JWOG5qQa sIsqcb0amgxSnikWcisqnfpmN/UOpBMVSTEPvMq7LcnJ//mE2Pof5y8BGHhM40z3wATs VWkLuMFko6/dpYLHg2623MbFM/pRS4Wm7dc4/7VSul6D940H9mFupQHXthC3t3BSswLf acrl3dOVFOWuZrQO3km+m8BJw/buk+sSHciiJBzDkiJrx4RX4/igJC/ffTjxzpLj69pG oDiZzpziR49QD0dhmQ/idGzcJ5hRX2b2oH+UEcyiFAZxTXlypBDexQP8rU5guC8I/dyo /p3A== X-Gm-Message-State: ABuFfoh/gc2m/LNvFU69xVNoqvCzX5/hmUMZb7zezOopAH74OndvFn/J pgImA1Kv6YWC279u55XGCj1236EGo6k= X-Received: by 2002:a65:5b07:: with SMTP id y7-v6mr11576218pgq.125.1538130309771; Fri, 28 Sep 2018 03:25:09 -0700 (PDT) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:180::1:5ff1]) by smtp.gmail.com with ESMTPSA id 70-v6sm7474830pfz.27.2018.09.28.03.25.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 03:25:08 -0700 (PDT) Date: Fri, 28 Sep 2018 12:25:01 +0200 From: Alexei Starovoitov To: Roman Gushchin Cc: netdev@vger.kernel.org, Song Liu , linux-kernel@vger.kernel.org, kernel-team@fb.com, Daniel Borkmann , Alexei Starovoitov Subject: Re: [PATCH v3 bpf-next 03/10] bpf: introduce per-cpu cgroup local storage Message-ID: <20180928102458.dbia6xnxkijvkld6@ast-mbp.dhcp.thefacebook.com> References: <20180926113326.29069-1-guro@fb.com> <20180926113326.29069-4-guro@fb.com> <20180928084528.i5txkac34pmqvs3p@ast-mbp.dhcp.thefacebook.com> <20180928100302.GB9018@castle.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180928100302.GB9018@castle.DHCP.thefacebook.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 28, 2018 at 11:03:03AM +0100, Roman Gushchin wrote: > > > + > > > + if (unlikely(map_flags & BPF_EXIST)) > > > + return -EINVAL; > > > > that should have been BPF_NOEXIST ? > > Yeah, or maybe even better s/&/!= ? > It's probably better to require BPF_EXIST flag to update a cgroup storage? > Agree? If so, let me fix this for both shared and per-cpu versions in > a follow-up patch. I think BPF_ANY is technically valid too. If we were to require strict BPF_EXIST only, we'd need to fix stable too. I'm fine with both (BPF_EXIST only and BPF_ANY|BPF_EXIST). Daniel, what do you think?