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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2dc3fbd9-217b-1e7e-1b77-dad14bce91e0@linuxfoundation.org>
Date:   Sun, 30 Oct 2022 02:29:41 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Li Zhijian <lizhijian@...itsu.com>, brauner@...nel.org,
        shuah@...nel.org, linux-kselftest@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Philip Li <philip.li@...el.com>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v3] ksefltests: pidfd: Fix wait_states: Test terminated by
 timeout

On 8/31/22 21:10, Li Zhijian wrote:
> 0Day/LKP observed that the kselftest blocks forever since one of the
> pidfd_wait doesn't terminate in 1 of 30 runs. After digging into
> the source, we found that it blocks at:
> ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WCONTINUED, NULL), 0);
> 
> wait_states has below testing flow:
>    CHILD                 PARENT
>    ---------------+--------------
> 1 STOP itself
> 2                   WAIT for CHILD STOPPED
> 3                   SIGNAL CHILD to CONT
> 4 CONT
> 5 STOP itself
> 5'                  WAIT for CHILD CONT
> 6                   WAIT for CHILD STOPPED
> 
> The problem is that the kernel cannot ensure the order of 5 and 5', once
> 5 goes first, the test will fail.
> 
> we can reproduce it by:
> $ while true; do make run_tests -C pidfd; done
> 
> Introduce a blocking read in child process to make sure the parent can
> check its WCONTINUED.
> 
> CC: Philip Li <philip.li@...el.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Li Zhijian <lizhijian@...itsu.com>
> Reviewed-by: Christian Brauner (Microsoft) <brauner@...nel.org>
> ---

Sorry for the delay. Now applied to linux-kselftest fixes for rc4

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ