Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp65033ybg; Mon, 27 Jul 2020 15:45:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaRLvi+kPPA7fBuHLaAgynIVpXx6CaaT0rMc0QBAjScbIWHMI8bEY/RdbogK+ARAzdb3Zx X-Received: by 2002:a17:906:280c:: with SMTP id r12mr22770195ejc.105.1595889944363; Mon, 27 Jul 2020 15:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595889944; cv=none; d=google.com; s=arc-20160816; b=EAA2kj7pfA5YYGpOdshIODjDCXdRtz/KzIkTbaCZBCukib/OPLAHT673H6gf5eEbH+ 4f5TBk4Ldg3Z717UPJuOxtli51TvFWQyvEhPbZqtQgStjfLK4z8JWECqOewK3+Akr/wG S0MGXtvzo+jpeRfJpmSQy8Sp6zqJLkMCM00TU0EfJKg0MPB5xz4W5yTCLw3oh+taXg6j usEARX7a9FjmbTz6gL13hGN4vbORfiN5h0A/DCIcRea3VZ2lWS8EyV0I92/TmSQgI6a3 WiSzaVfsUabv/6hXyXWnWHtYgUnqth/+dnHLpNgGlaROZb9BJvf31SMRPwUlUVes7dRY St/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JNgiYfTrbNl40HuPXfOPGzQd+Pz6KgPmslq9zg8TKcE=; b=NDI8HWbLdVFSFN1//DwxoxKzbZz8P7gvqVqFoLG/c0kM45cLsX5IhclMJJE7dJiEpY LLEoFUpYRpC2pcZKioWc47cGgKH7NYB65O0wM3WujFtMi+5YKRkiBOiY3A/pWMdYXhPP 6SdcJaHWqFqaKLLtQtk71uiqS3ti+evCeWMILxU2yb3elxtRE46rO9OMSpXgsumHNdVQ TVNnvVRnX3JPHz7M5HsWIn5Pay4zvgPtfw2OAwTG+dMK+2FzTuMSB+Sqa5/YeL06ujws yV6WYHLTRnBpEed186bjdIEtinG+4qU1wmCtj7eeHLLsit/vmOcd6pADvZuSFF1w5ZZx 2D5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CHxTzexH; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si6677624ejr.25.2020.07.27.15.45.22; Mon, 27 Jul 2020 15:45:44 -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=@kernel.org header.s=default header.b=CHxTzexH; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbgG0WpC (ORCPT + 99 others); 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-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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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