Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp672131imm; Fri, 28 Sep 2018 05:05:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV63JzcgdKVqYe9ahfAh9VB/pwz3Ofzm0+3Qrvm0NC36snyOm4fzwMWtlVFOLB7QG3b9jQXS6 X-Received: by 2002:a63:f206:: with SMTP id v6-v6mr15215977pgh.319.1538136327071; Fri, 28 Sep 2018 05:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538136327; cv=none; d=google.com; s=arc-20160816; b=g+eNgn+FCa86DJ+MjVbUg5k3j8kPlpRzjhMI/ul4g6P2IYuMQy0rTVd5SDWDXuyVVT KPkcK7hrAaJgxL6fHMvXZdsD0jOGcZ7DCAlkipMxrFwmwZFs4UG3px56NvtM9scpdkE9 2RmnRLhiKmUZF9WB/NuUmuDAH2EhUGlSpHKPHlXSFXvD8In5wOX2LOq4eFpRt1eJR1S4 OmPEzvbJsC5G1iGEAVf8gRk9FVawYSm/mahW75kT+dhbyxbNvCMLjDplpcicAGaK6dfV VTSq4osFzOqrgYWPTiPVhsTHCjpYfzpkSr3U7t87eT3vioJmBF2CHNWDa0ZxL3ao9iFf Qs7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=D4nzhL11/a3q628cpNnERClDuP/Byy5jV0zRV3c8BFU=; b=EXPBBQ9bDAQIARQs3dxVl8jW9VTkj2hs+mv6iIWGdPVrs6Vzz0TEf+QcMQmwD4J/iW M88Sn9Sqi6BfIc9Fc1x1h143ctGqxVWo5vFC2SBvBhF5O+2+0Bi0/H0QVvohb7RqpCOC KKA80Fqkdf2plbTpJwog1yyq9tngdBC2Dhdhf+oNBMTwbLhFNi3oUgk2Vy35vplnbgtV aHJ83FqSkROzQqnvrDI0koALoy8DEzDacUzKsVeTKMSWeLCeoDtAjGK/1RrmqaGlbFh6 IBwyO6P2v/88YyD6WV+IBMgE9C9YrEcIFor4+XNYohbXsGMSfIye4tnOLnlRIZ2XKPd7 PArA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p91-v6si4717408plb.51.2018.09.28.05.05.09; Fri, 28 Sep 2018 05:05:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727676AbeI1S1B (ORCPT + 99 others); Fri, 28 Sep 2018 14:27:01 -0400 Received: from www62.your-server.de ([213.133.104.62]:39031 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbeI1S1A (ORCPT ); Fri, 28 Sep 2018 14:27:00 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1g5rUZ-0001EL-DM; Fri, 28 Sep 2018 14:03:31 +0200 Received: from [178.197.248.15] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1g5rUZ-00011b-82; Fri, 28 Sep 2018 14:03:31 +0200 Subject: Re: [PATCH v3 bpf-next 03/10] bpf: introduce per-cpu cgroup local storage To: Alexei Starovoitov , Roman Gushchin Cc: netdev@vger.kernel.org, Song Liu , linux-kernel@vger.kernel.org, kernel-team@fb.com, Alexei Starovoitov 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> <20180928102458.dbia6xnxkijvkld6@ast-mbp.dhcp.thefacebook.com> From: Daniel Borkmann Message-ID: <21a7ecfb-c7cd-d7aa-01d1-4e055e410817@iogearbox.net> Date: Fri, 28 Sep 2018 14:03:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180928102458.dbia6xnxkijvkld6@ast-mbp.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.1/24989/Fri Sep 28 10:53:45 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/28/2018 12:25 PM, Alexei Starovoitov wrote: > 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? I'm okay with either option, both seem plausible.