From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70987C43331 for ; Sat, 28 Mar 2020 01:48:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40275206F6 for ; Sat, 28 Mar 2020 01:48:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ae5AxabD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbgC1Bsv (ORCPT ); Fri, 27 Mar 2020 21:48:51 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:37732 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbgC1Bsv (ORCPT ); Fri, 27 Mar 2020 21:48:51 -0400 Received: by mail-pg1-f195.google.com with SMTP id a32so5505348pga.4; Fri, 27 Mar 2020 18:48:50 -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; bh=ZFoiLEARI3ThGnDyc2jHxTpFEzA0wvG0QeUmiAQEtNE=; b=ae5AxabDXf/CTqKrV9i3nVMNu0dDkhH+eKlAGid7zP7KNhxXc/iHymj70NQ7J13sRj MPafmQUPDGxNIRc3CTIoK0x5OXEL99+CkORT6qhn7d6wArOc3e3DAjE3FZyiWFH9V3JD NH6NdbMNyX3OLgEI5VNxAo0B0bp75yQXtpc+IR9UE9RaKzsgOJEJB9c7+BKLY8yfZXZ9 FAJ9Y7cqtHlDo/r3w8TOPBPaCx+W9PLEQcG9Pj0yXnEM1lFTC9kokx7EKqcysJtUz8fD SDp8t/csaQ4n3qKo113+oiQhmkp057e9HT264w+DAOWikaET0ERkJyf6jtP3xcRvX1vZ X5QQ== 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; bh=ZFoiLEARI3ThGnDyc2jHxTpFEzA0wvG0QeUmiAQEtNE=; b=PeNo0kGh6uPK3ehbWOmovotzs1HQbc+QJ0+wlKLQr8jyaI5zcIGxQqLazzud74C3rc 9PW8Ww3beEU66R3oSRy1Jgcxi8JbyZGvflgysdrtNSasqAAtPMkdOXGtUgkD+IqRK7fz r9Xuw22GI4ATjsjpmpAbCNsvnlrVAP+14hMmfDjmWD9b8w6JOhAlnpalgAVHPjg61f1w Ef2N14t+vIkP2BbOw4RyX0/Wm+ee7tzB6MAOxWU/ra7KqALtQ31xVA+v+D7ya9xXMYd7 QOV4LBtpln84WTwIWO4NiOj9XR+TU43+UrzNp452KMERaGiLtDoYmBvzaZrCtqt5p8lg XnAQ== X-Gm-Message-State: ANhLgQ0jeIo9Hr4Ro2CglolZOGJ2eMRrh7gU8yMqAV0d5ke50Q7hrilQ 6SuZUdwg61zVwKd7pu6fpBDeigpn X-Google-Smtp-Source: ADFU+vs5Kg6ooK8RVx6Wm1A4Dqqwxh/I/s7RhaKQYgNOCyuqr9+9rjxsdMyuGMfVZjfH+HrYL7qSmA== X-Received: by 2002:a65:55c6:: with SMTP id k6mr2326491pgs.52.1585360130229; Fri, 27 Mar 2020 18:48:50 -0700 (PDT) Received: from ast-mbp ([2620:10d:c090:400::5:f1d9]) by smtp.gmail.com with ESMTPSA id y13sm4973205pfp.88.2020.03.27.18.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 18:48:49 -0700 (PDT) Date: Fri, 27 Mar 2020 18:48:44 -0700 From: Alexei Starovoitov To: Daniel Borkmann Cc: m@lambda.lt, joe@wand.net.nz, bpf@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH bpf-next 3/7] bpf: add netns cookie and enable it for bpf cgroup hooks Message-ID: <20200328014844.xz5s67j2cyvnf7lp@ast-mbp> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri, Mar 27, 2020 at 04:58:52PM +0100, Daniel Borkmann wrote: > + * > + * u64 bpf_get_netns_cookie(void *ctx) > + * Description > + * Retrieve the cookie (generated by the kernel) of the network > + * namespace the input *ctx* is associated with. The network > + * namespace cookie remains stable for its lifetime and provides > + * a global identifier that can be assumed unique. If *ctx* is > + * NULL, then the helper returns the cookie for the initial > + * network namespace. The cookie itself is very similar to that > + * of bpf_get_socket_cookie() helper, but for network namespaces > + * instead of sockets. All new helpers in this patch and few others are missing 'flags' argument. Yes. It's kinda hard right now to come up with a use case for the flags, since all helpers look kinda trivial, simple, and single purpose. But the same thing happened with bpf_send_signal(). It felt that there is no way to extend it. Yet later we had to add bpf_send_signal_thread() which could have been handled with flags if they were there. So please add flags to all new helpers though it might seem redundant.