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]
Date:   Thu, 5 Mar 2020 08:43:32 +0000
From:   "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@...ia.com>
To:     "mingo@...nel.org" <mingo@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "acme@...nel.org" <acme@...nel.org>
CC:     "williams@...hat.com" <williams@...hat.com>,
        "acme@...hat.com" <acme@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
        "namhyung@...nel.org" <namhyung@...nel.org>,
        "jolsa@...nel.org" <jolsa@...nel.org>,
        "dave@...olabs.net" <dave@...olabs.net>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>
Subject: Re: [PATCH 4/5] perf bench: Share some global variables to fix build
 with gcc 10

On Tue, 2020-03-03 at 16:48 -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@...hat.com>

BTW there's also some div-by-zero bugs here if runtime is zero:

$ perf bench epoll wait --runtime=0
# Running 'epoll/wait' benchmark:
Run summary [PID 30859]: 7 threads monitoring on 64 file-descriptors for 0
secs.

Floating point exception (core dumped)

> diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-
> wait.c
> index 7af694437f4e..d1c5cb526b9f 100644
> --- a/tools/perf/bench/epoll-wait.c
> +++ b/tools/perf/bench/epoll-wait.c
> 
> @@ -519,7 +518,7 @@ int bench_epoll_wait(int argc, const char **argv)
>  		qsort(worker, nthreads, sizeof(struct worker), cmpworker);
>  
>  	for (i = 0; i < nthreads; i++) {
> -		unsigned long t = worker[i].ops/runtime.tv_sec;
> +		unsigned long t = worker[i].ops / bench__runtime.tv_sec;
>  
>  		update_stats(&throughput_stats, t);
>  
> diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-
> hash.c
> index 8ba0c3330a9a..21776862e940 100644
> --- a/tools/perf/bench/futex-hash.c
> +++ b/tools/perf/bench/futex-hash.c
> 
> @@ -204,7 +204,7 @@ int bench_futex_hash(int argc, const char **argv)
>  	pthread_mutex_destroy(&thread_lock);
>  
>  	for (i = 0; i < nthreads; i++) {
> -		unsigned long t = worker[i].ops/runtime.tv_sec;
> +		unsigned long t = worker[i].ops / bench__runtime.tv_sec;
>  		update_stats(&throughput_stats, t);
>  		if (!silent) {
>  			if (nfutexes == 1)
> diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-
> lock-pi.c
> index d0cae8125423..30d97121dc4f 100644
> --- a/tools/perf/bench/futex-lock-pi.c
> +++ b/tools/perf/bench/futex-lock-pi.c
> 
> @@ -211,7 +210,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
>  	pthread_mutex_destroy(&thread_lock);
>  
>  	for (i = 0; i < nthreads; i++) {
> -		unsigned long t = worker[i].ops/runtime.tv_sec;
> +		unsigned long t = worker[i].ops / bench__runtime.tv_sec;
>  
>  		update_stats(&throughput_stats, t);
>  		if (!silent)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ