Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp52610ybg; Mon, 27 Jul 2020 23:11:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzup23bV/QZf9zGD2AW0Qiw+AcqGqIsoaFzQC4EABcdgKpgMR7iJT5d1KISS3TN5uXeo9C4 X-Received: by 2002:a17:906:a88b:: with SMTP id ha11mr8410235ejb.545.1595916674997; Mon, 27 Jul 2020 23:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595916674; cv=none; d=google.com; s=arc-20160816; b=nvLO30/HfXGQ8FscVOtAuqMp+/y651oJtoaVZmtE373f5dnu7RAviPKweLLt/9GRnv pkwWXKovNtcrQy+fRe7ekX2PeRyVheJe5VxYfrdzSfQN0PyllKRzMXWZSJ3RnW3MI8d6 vBHnH4RuXog5im5lQrVecDJAbknMSvTzovJYdK/wuYEsLf9wgIS9vOuJ3kRSiXX6efHn j8OioEFzwRMfvSWvX/AHdlblot0dqJDxo6uTYKQjQnSWMQpqojN115eGhGxun4tVcwB/ Q+rxLW8QN2iEToVEmgeLXj1kaqv6G31oX3Jajxt4tzLERBNnrC6w+N+qXFhGafG6I64/ MoVg== 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=NBkYNLK/UsU+H/NI4eZY+7e5iBngk/v8pGC3lNVjOpc=; b=03ppNSDD24SdSnvwcKeeHVtZpR8C5F48Uq6z0yWn6yC0k+0/NNNaBLwwXu1nc/o21w 2rs+2V1SAX95/Tnt69L5c5KL/FYk1+JzIR4oGCjQ0D/RjlIB+3TgdNaM3J3+5eTJEZxQ rnCNpTHz+in8MBJ88yCV1ZZxigSwbmKUTQj4I79F8bO+ofJ2PyTMwylBlM1mrImn1MA7 c2DLBjB+avcVbyBmg7DuAnuWrpjI2pht5x09nl9Z+HNgM3D/D2lDWyWd9XSYCgZ/2edI VGW7XJOPC/eOnmWKAinK35j5dLmThBnHexhShjlNYAr/HNN1lmiou6ZvvTJClX+Zl0CD BmNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M42esjLI; 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 bq8si7764093ejb.52.2020.07.27.23.10.52; Mon, 27 Jul 2020 23:11:14 -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=20161025 header.b=M42esjLI; 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 S1727051AbgG1GIp (ORCPT + 99 others); Tue, 28 Jul 2020 02:08:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726407AbgG1GIo (ORCPT ); Tue, 28 Jul 2020 02:08:44 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47CCBC061794; Mon, 27 Jul 2020 23:08:44 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id j187so17627848qke.11; Mon, 27 Jul 2020 23:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NBkYNLK/UsU+H/NI4eZY+7e5iBngk/v8pGC3lNVjOpc=; b=M42esjLI82UA6Y99wBsskZzJOPHQ9lgJOQgkSVEwTakQwBqm/KtT6UHl+sgOVwiMgJ 4vbEEdwKHwYeCu0QlvbijXMW20PwS8xJ7xuIfNISci+te1/99aNz7clMJXG7tSJfmTIu /sj+tgDSC+/oet97egbTsS2xRZwlzH8nhy0/odSwURO7VZ7lrf6lJZuxU3sLYr7We9xM qsWHlNSgwE803Q06t/0PqW9Z5WlrAP5ZqCX91x2p5VY0RvAlUdGojpOEEZBKY8KbWhO8 VJ2TKjiX0SuuHEjqirw3g5QYqik5r4NgqaLWACQlduSNe+QzLAXoo0ANQRqpYBnDgwjq huuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NBkYNLK/UsU+H/NI4eZY+7e5iBngk/v8pGC3lNVjOpc=; b=R0xDo/mm4z179fjkY+sO5DgPurroCN4GBy21Hhu/EzFJL4bflLmgDHLduiMZg9rj9o k4PcNfmK4QDGOzRkccr73TkQigntWHpcrQzLE0FHwRGJsRQUfBEv7Dr6ZcB8BC2qPfMU WXL5IiRNBAj3Sah4W+0N1pS/2rcQxYdf3EEhsyMNsGHs3Gn3S+06RD8asQ3f6B0VdaL2 1np5ErDOJeFUhog2rwLbscWq+foF4vH5QJlV/f22BCVXTTO39NudWy4crHWE9A8uKGaz VF01NYLt6SuASgVNOClz8GsqPJQFqhhQgrJitMdOVUjrXCwe4oNb6Mtf0WwQxNF2OG0q nh2A== X-Gm-Message-State: AOAM531FLReEwt8i66bzQ1x76hbWP2ER9qU4kuFvvjwhtUmy2hEVBNVd yk93Y69ydstAWR59TmjNmg/EugMTVP8iaHgZHMs= X-Received: by 2002:a37:a655:: with SMTP id p82mr25994500qke.92.1595916523518; Mon, 27 Jul 2020 23:08:43 -0700 (PDT) MIME-Version: 1.0 References: <20200727184506.2279656-1-guro@fb.com> <20200727184506.2279656-34-guro@fb.com> In-Reply-To: <20200727184506.2279656-34-guro@fb.com> From: Andrii Nakryiko Date: Mon, 27 Jul 2020 23:08:32 -0700 Message-ID: Subject: Re: [PATCH bpf-next v2 33/35] bpf: selftests: don't touch RLIMIT_MEMLOCK To: Roman Gushchin Cc: 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 12:21 PM Roman Gushchin wrote: > > Since bpf is not using memlock rlimit for memory accounting, > there are no more reasons to bump the limit. > > Signed-off-by: Roman Gushchin > --- Similarly for bench, it's a tool that's not coupled with the latest kernel version, it will be a big step down if the tool doesn't bump rlimit on its own on slightly older kernels. Let's just keep it for now. > tools/testing/selftests/bpf/bench.c | 16 --------------- > .../selftests/bpf/progs/bpf_iter_bpf_map.c | 5 ++--- > tools/testing/selftests/bpf/xdping.c | 6 ------ > tools/testing/selftests/net/reuseport_bpf.c | 20 ------------------- > 4 files changed, 2 insertions(+), 45 deletions(-) > > diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c > index 944ad4721c83..f66610541c8a 100644 > --- a/tools/testing/selftests/bpf/bench.c > +++ b/tools/testing/selftests/bpf/bench.c > @@ -29,25 +29,9 @@ static int libbpf_print_fn(enum libbpf_print_level level, > return vfprintf(stderr, format, args); > } > > -static int bump_memlock_rlimit(void) > -{ > - struct rlimit rlim_new = { > - .rlim_cur = RLIM_INFINITY, > - .rlim_max = RLIM_INFINITY, > - }; > - > - return setrlimit(RLIMIT_MEMLOCK, &rlim_new); > -} > - > void setup_libbpf() > { > - int err; > - > libbpf_set_print(libbpf_print_fn); > - > - err = bump_memlock_rlimit(); > - if (err) > - fprintf(stderr, "failed to increase RLIMIT_MEMLOCK: %d", err); > } > [...]