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: <f91f1e69-310e-5256-de6e-9bceeaa7b205@linuxfoundation.org>
Date:   Wed, 3 Feb 2021 11:30:13 -0700
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>, Shuah Khan <shuah@...nel.org>
Cc:     linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests: breakpoints: Fix wrong argument of ptrace()
 when single step

On 2/3/21 1:39 AM, Tiezhu Yang wrote:
> According to the error message, the first argument of ptrace() should be
> PTRACE_SINGLESTEP instead of PTRACE_CONT when ptrace single step.
> 
> Fixes: f43365ee17f8 ("selftests: arm64: add test for unaligned/inexact watchpoint handling")
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> ---
>   tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
> index ad41ea6..2f4d4d6 100644
> --- a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
> +++ b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
> @@ -143,7 +143,7 @@ static bool run_test(int wr_size, int wp_size, int wr, int wp)
>   	if (!set_watchpoint(pid, wp_size, wp))
>   		return false;
>   
> -	if (ptrace(PTRACE_CONT, pid, NULL, NULL) < 0) {
> +	if (ptrace(PTRACE_SINGLESTEP, pid, NULL, NULL) < 0) {
>   		ksft_print_msg(
>   			"ptrace(PTRACE_SINGLESTEP) failed: %s\n",
>   			strerror(errno));
> 

Right before this it does a set_watchpoint(). PTRACE_CONT is what
makes sense to me. Error might be the one that is incorrect here?

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ