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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 DBAD1C433F2 for ; Mon, 27 Jul 2020 22:45:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5DB920809 for ; Mon, 27 Jul 2020 22:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595889907; bh=JNgiYfTrbNl40HuPXfOPGzQd+Pz6KgPmslq9zg8TKcE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=sSDltaZJHlaj3xleWIqRRfpONu/087PL4ATmQ0CBm0nHEDWGFTDAq+6XOm6BzsgpB QCyyQxqUDrDnoTfqoOr3Hd1yow4Ye7ahdWprx2YxSLZ3XyukCzybY14NxH/ltxj9ZX QnmymuCJiFprqNjIB8nrMj8o3t3KAk63cz7Hgs68= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727893AbgG0WpC (ORCPT ); Mon, 27 Jul 2020 18:45:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:46880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbgG0WpA (ORCPT ); Mon, 27 Jul 2020 18:45:00 -0400 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF06D20A8B; Mon, 27 Jul 2020 22:44:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595889900; bh=JNgiYfTrbNl40HuPXfOPGzQd+Pz6KgPmslq9zg8TKcE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CHxTzexH7pcmV+xLnwhlzXdnWhlC2KVdjv9tVZSVIseQc79RvgYGPDwW/CGoodjC0 QAXPyQiubGTWgzI1g/7ZApb65wUK3g7Avr2+JhUatm7XaVCYQbq7r0RZbukk66V3Zq xRyC43IeUbaQwyZbDcCNCIPGAsMnWQfdIYbulU5A= Received: by mail-lf1-f48.google.com with SMTP id m15so9235396lfp.7; Mon, 27 Jul 2020 15:44:59 -0700 (PDT) X-Gm-Message-State: AOAM530/s2K6RE1Hpv5GBfsCuPN1VCIaX0kmBgtsOng3LPjpdzVdwo3A AdyJ0Eajvayqw1Sx8UNbnBd+bFeJqumnw8B9PWw= X-Google-Smtp-Source: ABdhPJzn6/szMBVbE/sS/47cJfytwIL6LNRxd4cXwyyxJUCcc1x2a+4Rj0suCq/Kg+8MpsKsuE8jnTVpoXYLg5I+wWI= X-Received: by 2002:ac2:5683:: with SMTP id 3mr12529185lfr.69.1595889898210; Mon, 27 Jul 2020 15:44:58 -0700 (PDT) MIME-Version: 1.0 References: <20200727184506.2279656-1-guro@fb.com> <20200727184506.2279656-30-guro@fb.com> In-Reply-To: From: Song Liu Date: Mon, 27 Jul 2020 15:44:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v2 29/35] bpf: libbpf: cleanup RLIMIT_MEMLOCK usage To: Andrii Nakryiko Cc: Roman Gushchin , bpf , Networking , Alexei Starovoitov , Daniel Borkmann , Kernel Team , open list Content-Type: text/plain; charset="UTF-8" Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Mon, Jul 27, 2020 at 3:07 PM Andrii Nakryiko wrote: > > On Mon, Jul 27, 2020 at 12:21 PM Roman Gushchin wrote: > > > > As bpf is not using memlock rlimit for memory accounting anymore, > > let's remove the related code from libbpf. > > > > Bpf operations can't fail because of exceeding the limit anymore. > > > > They can't in the newest kernel, but libbpf will keep working and > supporting old kernels for a very long time now. So please don't > remove any of this. > > But it would be nice to add a detection of whether kernel needs a > RLIMIT_MEMLOCK bump or not. Is there some simple and reliable way to > detect this from user-space? > Agreed. We will need compatibility or similar detection for perf as well. Thanks, Song