Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp891461pxb; Wed, 27 Oct 2021 14:34:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6AT8idUL45/Q0PEsDmRqKtuWaM96PVDJYHHyEIwEz3Cb8OoafPHsKoMaSFzh459prtjb9 X-Received: by 2002:a17:906:284e:: with SMTP id s14mr143514ejc.332.1635370478201; Wed, 27 Oct 2021 14:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370478; cv=none; d=google.com; s=arc-20160816; b=ZO64yfHTuqn2jUYCEnEMv68kI93oO19ygBny7bgToRDYPJ/TrGITIIbWG7pHmHJV3n oMfZpJAV0Ti+dVE/MAVkviuu/rZqAn8BDHubghCl8gb6lBaGkCGrZ6Ycb6n1zzK9weyg FvqqRcdMeNqxxOBOZB57CEVaf4BCWZVFeLv1LaQNzK709wz7qEqqMDTjg3Y9h7dVR5S9 yIUvorDEdhTs1Ck3onDSQP/PpksLneiiDgIpMinzD1aVkYGd8UQ5iLo2l39NZMpoxnF7 HjLUOeDDcKsGm/+nvCOKbk7nTfEG8HJmccWCML85aaQ8onecccQdVNvyLhTebUWqO9os qCvg== 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=Y4Ep56fOfPjwhoMraFFxW5wtkRrwAnAh+988/M+IXBc=; b=bJlBp81xjgi8rTJ6YOgv8TPsbLGxDhaaUotfSczm1ZkaPqVRmjXCT1qEvox+duT10V 1Y58lHncAbquGuUb4M0bAWJ9IUZ4+X7bkdIgbtccAJJvpm4H6C6L1wKnC497p3HV4TcN gcW2aficykVbsXuwc5ac1LOL6UcF0IHI9S4ftc3VYTcftcYxg3AgRYt19zRG3ZYitGMz s12PO/YGOHGYd3/D+AHpNwN7gsp64r79g6hweKeurgZxa/6+1aUrPGwTmgF3lA/57j5e x7C6Y/LVkqCAhjiPwQnZIDpCstG1yN/6d0C4KAxdRBgoNpI3URkf/plbxhcSqGjOHbIP E5/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MPxf5hLK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cn26si1159990edb.128.2021.10.27.14.34.15; Wed, 27 Oct 2021 14:34:38 -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=@gmail.com header.s=20210112 header.b=MPxf5hLK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240236AbhJ0SE2 (ORCPT + 97 others); Wed, 27 Oct 2021 14:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238448AbhJ0SE1 (ORCPT ); Wed, 27 Oct 2021 14:04:27 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E71C061570; Wed, 27 Oct 2021 11:02:01 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id 67so8426718yba.6; Wed, 27 Oct 2021 11:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y4Ep56fOfPjwhoMraFFxW5wtkRrwAnAh+988/M+IXBc=; b=MPxf5hLKbtPKOnPYmQX3pQjMalBbUHIPoY+DVdJukH85kdrla+XRmMDmLvR+Fi6P95 IlBIZO0GdSK9BtsTcbfex64fTiEdv4r5uHiYRJBd94iqSuHTBBJviq7Q8ISDbnBPDreI FnIZuHfvZOzFv4n69aT97nZNtMQTqU7IkYzo4p9DP/TGf+VoaAtCgDkNJ1sS9qb3OHg0 CAxXmqIzdBtQHah0cpMGJ7MVRdS2msU8ozI3SbontNQgTc4djocIhQhDA46B6ChChAMF Lj5t1xO80nfAfEW8xZTZBkYFXUI9eNmeGMsdJpYslSlrqVSqXDKduJBllxybXxvrlUSB 3lfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y4Ep56fOfPjwhoMraFFxW5wtkRrwAnAh+988/M+IXBc=; b=A+vRdKDk92uBYp2hFTGl37dQF6eWLL6fw4cVA6VR8rHlSPAg+kRPnxB/Ww7s+4isvC YqXNkyeRy8YwoAKTOTy17ZvluXBSTdBOPgyb5JACS91nFSdTRxWzLwaeGOT5vBg+1Gej yt1ycAKcYnVd8mI8BKEZ5x3kSG/kW2m50aetFYSTdE6WstMiXDzSPIZ11nsOjRO5OB34 LcIW7xKB0c2d8Y3gkbt6BHH5EyGV4IMYL0wC8Bx3Cw9tDoJstGlfnidAoChZaCbBf2iB b8yiQpU1ffmfl4uCJqATjGd++Td6UiH6YUgcXKHq00e/VOMbUVMOrtykpT36wPfyrIvr oWHQ== X-Gm-Message-State: AOAM533a7jSHZyX9hHj1NOxJbm/9tNC+1EhzjF/JCtSlKpoBSMEjwIsl HDzweLppE2y7bmUF6UOyxipUTCaxzKFz33V8fuA= X-Received: by 2002:a25:aa0f:: with SMTP id s15mr26612332ybi.51.1635357720816; Wed, 27 Oct 2021 11:02:00 -0700 (PDT) MIME-Version: 1.0 References: <20211026223528.413950-1-jevburton.kernel@gmail.com> In-Reply-To: <20211026223528.413950-1-jevburton.kernel@gmail.com> From: Andrii Nakryiko Date: Wed, 27 Oct 2021 11:01:49 -0700 Message-ID: Subject: Re: [PATCH v2] libbpf: Deprecate bpf_objects_list To: Joe Burton Cc: Andrii Nakryiko , bpf , Networking , open list , Joe Burton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 3:35 PM Joe Burton wrote: > > From: Joe Burton > > Add a flag to `enum libbpf_strict_mode' to disable the global > `bpf_objects_list', preventing race conditions when concurrent threads > call bpf_object__open() or bpf_object__close(). > > bpf_object__next() will return NULL if this option is set. > > Callers may achieve the same workflow by tracking bpf_objects in > application code. > > [0] Closes: https://github.com/libbpf/libbpf/issues/293 > > Signed-off-by: Joe Burton > --- Applied to bpf-next, thanks. Please specify kernel tree next time (i.e., [PATCH bpf-next] subject prefix) > tools/lib/bpf/libbpf.c | 8 +++++++- > tools/lib/bpf/libbpf.h | 3 ++- > tools/lib/bpf/libbpf_legacy.h | 6 ++++++ > 3 files changed, 15 insertions(+), 2 deletions(-) > [...]