From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] question about the EPERM error of LTP bpf test
Date: Mon, 4 Nov 2019 05:50:28 -0500 (EST) [thread overview]
Message-ID: <1706711917.10302442.1572864628434.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <008a677b-644d-615f-6c4f-0961af928700@cn.fujitsu.com>
----- Original Message -----
> Hi All
>
> Now, I test bpf_prog02 and bpf_prog03 in my system(4.18.0-107.el8.x86_64).
>
> #./bpf_prog03
> tst_buffers.c:55: INFO: Test is using guarded buffers
> tst_test.c:1137: INFO: Timeout per run is 0h 05m 00s
> bpf_common.h:18: INFO: Raising RLIMIT_MEMLOCK to 262143
> tst_capability.c:29: INFO: Dropping CAP_SYS_ADMIN(21)
> bpf_common.h:37: CONF: bpf() requires CAP_SYS_ADMIN on this system: EPERM (1)
> #
>
> Jan Stancek has added rlimit_bump_memlock function to avoid EPERM errno,
> but I still can meet this problem every time even though I have increased
> BPF_MEMLOCK_ADD limit.
This is likely not related to rlimit. Can you check if unprivileged bpf is allowed:
cat /proc/sys/kernel/unprivileged_bpf_disabled
>
> How can I run the two cases normally? Also, this error log(requires
> CAP_SYS_ADMIN on this system: EPERM
> ) makes me confused in this situation(because case drops CAP_SYS_ADMIN, but
> log reports need CAP_SYS_ADMIN)
> and I think we may change it into "require CAP_SYS_ADMIN or max locked memory
> limit is too low".
>
> Or, can I keep CAP_SYS_ADMIN cap in bpf_prog02/[3]?
>
>
> Thanks
> Yang Xu
>
>
>
>
>
next prev parent reply other threads:[~2019-11-04 10:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 7:45 [LTP] question about the EPERM error of LTP bpf test Yang Xu
2019-11-04 10:50 ` Jan Stancek [this message]
2019-11-04 10:59 ` Yang Xu
2019-11-04 11:25 ` Jan Stancek
2019-11-04 14:50 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1706711917.10302442.1572864628434.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox