Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1509730rwl; Sun, 26 Mar 2023 04:07:39 -0700 (PDT) X-Google-Smtp-Source: AKy350Zyvt+axZSqWryaxPxA9uY4fVh26eRoGlUTB9q7qtAsiLHV4AHxS/D8eBYIwGNK8u/gwo6p X-Received: by 2002:a17:906:53cf:b0:8b2:8876:2a11 with SMTP id p15-20020a17090653cf00b008b288762a11mr9466544ejo.28.1679828858993; Sun, 26 Mar 2023 04:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679828858; cv=none; d=google.com; s=arc-20160816; b=D9KDrNz+VFurMDYFde/9GLTaSMvgWqrge/dUDwgwIuQ9EjWXrT2DwywJxTLmUT9ik1 gocEETRKtLyVL6CC/kInjvwO0Dv53RZFX+lePoav7th1FoJYd03j/8WNR9Lm3GkUMCF4 VLY8fuk+7ugA8d8bO3/WmtxUf6Xja7p6GgQY9tNiSdr/vPwFzD7rCfLD0oTWTZhZ55Tx nIeuY4toGsvtQgq+rD+pHAj6z+aH12YV47+HmxFuCigjRsZj4ZguBoWem5xHwPAy0OLE KvRl020t/vIjY1WoOBqrLEqJHmMXNhGAUetAzyfl44e3nWcHjFMnXb5/vv3a+hWyQMFj cX6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ZOhUE0GIrPQQrwkaf+eGsvLtMgFpamtwBmeKz3fNh/0=; b=VyNsmfvXDhCVovTPKs1n+OuLJmwhaXQIPfu9TFIwMPySlTnCGgfj4htYHL1Rz3Zzw2 rGmMVY+C1G1AbkGpvtBb8r1uH2TqehQdfYLsrz03cH5PWRKWLtJXB6uKTMyNPprikNI+ XPSes1gWJ9cILbgpMsFlU+wKyTJbzMryl/Td4uZdh1ZM+lCRNVVKfJBjp6FqkjTEhPxQ nUEgCXKd7U4a1P8MS5+Rc9Te/0YDgAUgpZ78ihLlBX2IX4h3oY7J1sRClYNDloIYgDY3 5JhweJwpIoOpvXDWWujovKjjrfJ/BhnKK1Iqckftw/3o4aPv7I/2fptea5DOUlfjR2Wk yYug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CVxDi74U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020aa7d457000000b004acd080ecc5si25035280edr.98.2023.03.26.04.07.10; Sun, 26 Mar 2023 04:07:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CVxDi74U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231912AbjCZKvG (ORCPT + 99 others); Sun, 26 Mar 2023 06:51:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjCZKvF (ORCPT ); Sun, 26 Mar 2023 06:51:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F99C8A76; Sun, 26 Mar 2023 03:51:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3C9DDB802C7; Sun, 26 Mar 2023 10:51:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9A25C433EF; Sun, 26 Mar 2023 10:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679827862; bh=FHPeY0bBNjHJIClJXaIFz3XIcVRJuN+5dh1lhnc4TQM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CVxDi74U3iKq4twMK+8kkrCKlvr2M+DtovQIf+m6/MoMI8tV9dNNLn35EescGXA0u AbCepbpeoAUxQL32cB2Eu5vNartY3QDi2OnKwy2kjZHLpggdoe8H4XHhRvrd4BkgID XmXJg1QSraCmiZPx8iOutdiJfQJ//6j16+JjgxKyab7UBkT6lJukb1vrTv21vG7IPc GItopIEq6QerbRDq/nTn63XDRWIyrD7QuMi5r/nyUNum2+GVJ3HkTHtFC2ccVubWlH 5nADJvrzqpo4GrWK7Kxu3qIYQe0T3pvZ+kvIHHPKMljUbLelPWGJhABszUAPTmZ/Ev m/fImHDjMMYng== Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 89AE2A22553; Sun, 26 Mar 2023 12:50:58 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Yafang Shao , ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: Re: [RFC PATCH bpf-next 08/13] bpf: Alloc and free bpf_map id in bpf namespace In-Reply-To: <20230326092208.13613-9-laoar.shao@gmail.com> References: <20230326092208.13613-1-laoar.shao@gmail.com> <20230326092208.13613-9-laoar.shao@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Sun, 26 Mar 2023 12:50:58 +0200 Message-ID: <87mt3z7pm5.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yafang Shao writes: > We only expose the bpf map id under current bpf namespace to user. The > map->id is still the id in the init bpf namespace. > > The result as follows, > > Run bpftool in a new bpf namespace > $ bpftool map show > 4: array name kprobe_b.rodata flags 0x80 > key 4B value 37B max_entries 1 memlock 360B > btf_id 159 frozen The btf_id is identical for all the different objects in this example output; surely that can't be right? Copy-paste error? Same thing in the other patches... -Toke