From patchwork Fri Jun 10 11:26:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Monnet X-Patchwork-Id: 12877492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECA78C433EF for ; Fri, 10 Jun 2022 11:27:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349273AbiFJL1B (ORCPT ); Fri, 10 Jun 2022 07:27:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235663AbiFJL1A (ORCPT ); Fri, 10 Jun 2022 07:27:00 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C8122ABF4 for ; Fri, 10 Jun 2022 04:26:53 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id e5so6911712wma.0 for ; Fri, 10 Jun 2022 04:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VgMVPv4VK0tMFupouOR7uFX4/hpxEtAvDXH2/9FsBwY=; b=VRwNzRnZNNDqEJWT0WNUxcec+1dBvFFOpMn1ev098avOe/rXR/UKX2GcYU7WP1Mkio 188zy633tizv/3ptZBGyBOk41aOpSVpCL6wgNt/B/op2vgDsLbVltBkGnAo8e0DxSCqj sWfMwT+7wKooGFUEPq67YahL4ugjLFjr/gR2ayexvVyZcgc12w+oVwqeQlEptyxwA2sR UsHc9TsWCeUr9yA+mXXNIS67WbNvwyo/epeugwvKTaJ3Vtiygf4NO8H1Mi/KYHvLbrKe VT/1JByxjeYBONFiE+04jW5jGI/Qur9fQGtL/9Ibu7B3DXfnBy7j6twBwmGyh4ECr6AN VQiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VgMVPv4VK0tMFupouOR7uFX4/hpxEtAvDXH2/9FsBwY=; b=WaI3DJFqTqCtHEeq94x7hW2sJWiBRzIPqH0RDSBcLXNsA6ke8InRzTjBmU0+GdkbTr DeZcI1hIJ8jgRgDSew/5EYNl66ZA4NodN2s2sLiLGFX0QuvUvVyeuDTqnW7FA+Y8Vbfo 7dng3ckXKG0PVRr8BdgzOn2G5YgSK+e9FhhI6zPThbInQuPEPpr6GigqrxRtKaG9aC7T L4WjQwb0Rf7jvpcIou2fp/nyHSu5agt9q3NJhmLKwL7lXvQHY8H5DjB3HDDXaVfQskkV HDDmANMd3yvmVH9A/qSK214zzAknk2cIj52jchz+mb3RRm2kZW5tiCtrVyscPuAGzQax Mk6w== X-Gm-Message-State: AOAM531CEfz/rryIuVOjPNj2TZjKF/eRT4JcNqiDQrHL7iwfNnbpxKD6 ePhLugT/AvTW40lSdLPB3/Z3Bg== X-Google-Smtp-Source: ABdhPJwKNg6mj97pA5W7lvkQdXVMIAZgOoWLgb7TwqgIRMKXfpIEuOwN55GiWHpIu10YnLoLBm8HiA== X-Received: by 2002:a05:600c:4f90:b0:394:970a:71bd with SMTP id n16-20020a05600c4f9000b00394970a71bdmr8379354wmq.158.1654860412420; Fri, 10 Jun 2022 04:26:52 -0700 (PDT) Received: from harfang.fritz.box ([51.155.200.13]) by smtp.gmail.com with ESMTPSA id z2-20020adff1c2000000b0020c5253d8dcsm25893202wro.40.2022.06.10.04.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 04:26:51 -0700 (PDT) From: Quentin Monnet To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Yafang Shao , Harsh Modi , Paul Chaignon , netdev@vger.kernel.org, bpf@vger.kernel.org, Quentin Monnet Subject: [PATCH bpf-next 0/2] bpftool: Restore memlock rlimit bump Date: Fri, 10 Jun 2022 12:26:46 +0100 Message-Id: <20220610112648.29695-1-quentin@isovalent.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net We recently removed the uncondtional rlimit bump from bpftool, deferring it to libbpf to probe the system for memcg-based memory accounting and to raise the rlimit if necessary. This probing is based on the availability of a given BPF helper, and his known to fail on some environments where the helper, but not the memcg memory accounting, has been backported. To work around this, this set restores the memlock rlimit bump in bpftool. Please see the description of the first patch for more details. Quentin Monnet (2): Revert "bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK" bpftool: Do not check return value from libbpf_set_strict_mode() tools/bpf/bpftool/common.c | 8 ++++++++ tools/bpf/bpftool/feature.c | 2 ++ tools/bpf/bpftool/main.c | 2 -- tools/bpf/bpftool/main.h | 2 ++ tools/bpf/bpftool/map.c | 2 ++ tools/bpf/bpftool/pids.c | 1 + tools/bpf/bpftool/prog.c | 3 +++ tools/bpf/bpftool/struct_ops.c | 2 ++ 8 files changed, 20 insertions(+), 2 deletions(-)