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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0560a851-5e8c-d82a-8445-a16a92b967c9@loongson.cn>
Date:   Thu, 17 Aug 2023 15:22:31 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Shuah Khan <shuah@...nel.org>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Christian Brauner <brauner@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kselftest@...r.kernel.org, loongarch@...ts.linux.dev,
        linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v6] selftests/clone3: Fix broken test under
 !CONFIG_TIME_NS

Hi Shuah,

On 07/11/2023 05:13 PM, Tiezhu Yang wrote:
> When execute the following command to test clone3 under !CONFIG_TIME_NS:
>
>   # make headers && cd tools/testing/selftests/clone3 && make && ./clone3
>
> we can see the following error info:
>
>   # [7538] Trying clone3() with flags 0x80 (size 0)
>   # Invalid argument - Failed to create new process
>   # [7538] clone3() with flags says: -22 expected 0
>   not ok 18 [7538] Result (-22) is different than expected (0)
>   ...
>   # Totals: pass:18 fail:1 xfail:0 xpass:0 skip:0 error:0
>
> This is because if CONFIG_TIME_NS is not set, but the flag
> CLONE_NEWTIME (0x80) is used to clone a time namespace, it
> will return -EINVAL in copy_time_ns().
>
> If kernel does not support CONFIG_TIME_NS, /proc/self/ns/time
> will be not exist, and then we should skip clone3() test with
> CLONE_NEWTIME.
>
> With this patch under !CONFIG_TIME_NS:
>
>   # make headers && cd tools/testing/selftests/clone3 && make && ./clone3
>   ...
>   # Time namespaces are not supported
>   ok 18 # SKIP Skipping clone3() with CLONE_NEWTIME
>   ...
>   # Totals: pass:18 fail:0 xfail:0 xpass:0 skip:1 error:0
>
> Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME")
> Suggested-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> ---
>
> v6: Rebase on 6.5-rc1 and update the commit message
>
>  tools/testing/selftests/clone3/clone3.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>

Hi Shuah,

Any comments? I guess this should go through the linux-kselftest tree.

Thanks,
Tiezhu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ