* [LTP] question about the EPERM error of LTP bpf test
@ 2019-11-04 7:45 Yang Xu
2019-11-04 10:50 ` Jan Stancek
0 siblings, 1 reply; 5+ messages in thread
From: Yang Xu @ 2019-11-04 7:45 UTC (permalink / raw)
To: ltp
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.
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 part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191104/b9d1b09a/attachment.htm>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] question about the EPERM error of LTP bpf test
2019-11-04 7:45 [LTP] question about the EPERM error of LTP bpf test Yang Xu
@ 2019-11-04 10:50 ` Jan Stancek
2019-11-04 10:59 ` Yang Xu
0 siblings, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2019-11-04 10:50 UTC (permalink / raw)
To: ltp
----- 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
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] question about the EPERM error of LTP bpf test
2019-11-04 10:50 ` Jan Stancek
@ 2019-11-04 10:59 ` Yang Xu
2019-11-04 11:25 ` Jan Stancek
0 siblings, 1 reply; 5+ messages in thread
From: Yang Xu @ 2019-11-04 10:59 UTC (permalink / raw)
To: ltp
on 2019/11/04 18:50, Jan Stancek wrote:
>
> ----- 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
Hi Jan
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?
>
>> 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 part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191104/6ac8ce58/attachment.htm>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] question about the EPERM error of LTP bpf test
2019-11-04 10:59 ` Yang Xu
@ 2019-11-04 11:25 ` Jan Stancek
2019-11-04 14:50 ` Jan Stancek
0 siblings, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2019-11-04 11:25 UTC (permalink / raw)
To: ltp
----- Original Message -----
>
> on 2019/11/04 18:50, Jan Stancek wrote:
>
> >
> > ----- 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
>
> Hi Jan
>
> 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?
Yes, we should check that and TCONF, or better still run test without
dropping CAP_SYS_ADMIN.
>
> >
> >> 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
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] question about the EPERM error of LTP bpf test
2019-11-04 11:25 ` Jan Stancek
@ 2019-11-04 14:50 ` Jan Stancek
0 siblings, 0 replies; 5+ messages in thread
From: Jan Stancek @ 2019-11-04 14:50 UTC (permalink / raw)
To: ltp
----- Original Message -----
>
>
> ----- Original Message -----
> >
> > on 2019/11/04 18:50, Jan Stancek wrote:
> >
> > >
> > > ----- 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
> >
> > Hi Jan
> >
> > 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?
>
> Yes, we should check that and TCONF, or better still run test without
> dropping CAP_SYS_ADMIN.
I added a hint to TCONF message, to have a look at unprivileged_bpf_disabled.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-04 14:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-04 7:45 [LTP] question about the EPERM error of LTP bpf test Yang Xu
2019-11-04 10:50 ` Jan Stancek
2019-11-04 10:59 ` Yang Xu
2019-11-04 11:25 ` Jan Stancek
2019-11-04 14:50 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox