Re: [PATCH bpf-next v2] selftests/bpf: Rewrite two infinite loops in bound check cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 28, 2023 at 5:11 AM Xu Kuohai <xukuohai@xxxxxxxxxxxxxxx> wrote:
>
> From: Xu Kuohai <xukuohai@xxxxxxxxxx>
>
> The two infinite loops in bound check cases added by commit
> 1a3148fc171f ("selftests/bpf: Check when bounds are not in the 32-bit range")
> increased the execution time of test_verifier from about 6 seconds to
> about 9 seconds. Rewrite these two infinite loops to finite loops to get
> rid of this extra time cost.
>
> Signed-off-by: Xu Kuohai <xukuohai@xxxxxxxxxx>
> ---
> v2:
>  - rewrite the infinite loops to finite loops instead of removing the
>    test cases
>
> v1: https://lore.kernel.org/bpf/20230327153538.850440-1-xukuohai@xxxxxxxxxxxxxxx/

Thanks.
On my VM with debug kernel it went
from:
real   0m37.508s
user   0m0.382s
sys    0m36.555s

to:
real   0m14.547s
user   0m0.378s
sys    0m13.661s

Applied.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux