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: <20190705164025.GB8600@kernel.org>
Date:   Fri, 5 Jul 2019 13:40:25 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Numfor Mbiziwo-Tiapo <nums@...gle.com>
Cc:     peterz@...radead.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, songliubraving@...com, mbd@...com,
        linux-kernel@...r.kernel.org, irogers@...gle.com,
        eranian@...gle.com
Subject: Re: [PATCH 2/2] Fix perf-hooks test

Em Tue, Jul 02, 2019 at 10:37:16AM -0700, Numfor Mbiziwo-Tiapo escreveu:
> The perf-hooks test fails with Address Sanitizer and Memory
> Sanitizer builds because it purposefully generates a segfault.
> Checking if these sanitizers are active when running this test
> will allow the perf-hooks test to pass.

Can you please add to the commit log message, here, the sequence of
steps needed to build with these sanitizers, so that one can replicate
the steps and reproduce the results?

- Arnaldo
 
> Signed-off-by: Numfor Mbiziwo-Tiapo <nums@...gle.com>
> ---
>  tools/perf/tests/perf-hooks.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/perf/tests/perf-hooks.c b/tools/perf/tests/perf-hooks.c
> index a693bcf017ea..524ecba63615 100644
> --- a/tools/perf/tests/perf-hooks.c
> +++ b/tools/perf/tests/perf-hooks.c
> @@ -25,7 +25,12 @@ static void the_hook(void *_hook_flags)
>  	*hook_flags = 1234;
>  
>  	/* Generate a segfault, test perf_hooks__recover */
> +#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
> +defined(THREAD_SANITIZER) || defined(SAFESTACK_SANITIZER)
> +	raise(SIGSEGV);
> +#else
>  	*p = 0;
> +#endif
>  }
>  
>  int test__perf_hooks(struct test *test __maybe_unused, int subtest __maybe_unused)
> -- 
> 2.22.0.410.gd8fdbe21b5-goog

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ