<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">
<pre>on 2019/11/04 18:50, Jan Stancek wrote:</pre>
</div>
<blockquote type="cite"
cite="mid:1706711917.10302442.1572864628434.JavaMail.zimbra@redhat.com">
<pre class="moz-quote-pre" wrap="">
----- Original Message -----
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
This is likely not related to rlimit. Can you check if unprivileged bpf is allowed:
cat /proc/sys/kernel/unprivileged_bpf_disabled</pre>
</blockquote>
<pre>Hi JanĀ </pre>
<pre>Thanks for your quick reply. this value in my system is 1.
unprivileged bpf isn't allowed. Do we need to check it before run in case?
</pre>
<blockquote type="cite"
cite="mid:1706711917.10302442.1572864628434.JavaMail.zimbra@redhat.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
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
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
</body>
</html>