lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Jan 2017 10:07:32 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Martin KaFai Lau <kafai@...com>, netdev@...r.kernel.org
CC:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH] bpf: Fix test_lru_sanity5() in test_lru_map.c

On 01/17/2017 07:17 AM, Martin KaFai Lau wrote:
> test_lru_sanity5() fails when the number of online cpus
> is fewer than the number of possible cpus.  It can be
> reproduced with qemu by using cmd args "--smp cpus=2,maxcpus=8".
>
> The problem is the loop in test_lru_sanity5() is testing
> 'i' which is incorrect.
>
> This patch:
> 1. Make sched_next_online() always return -1 if it cannot
>     find a next cpu to schedule the process.
> 2. In test_lru_sanity5(), the parent process does
>     sched_setaffinity() first (through sched_next_online())
>     and the forked process will inherit it according to
>     the 'man sched_setaffinity'.
>
> Fixes: 5db58faf989f ("bpf: Add tests for the LRU bpf_htab")
> Reported-by: Daniel Borkmann <daniel@...earbox.net>
> Signed-off-by: Martin KaFai Lau <kafai@...com>

Looks good, thanks for fixing!

Acked-by: Daniel Borkmann <daniel@...earbox.net>

(Patch is against -net tree.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ