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: <YzRXrzrta0BrcDQ6@kernel.org>
Date:   Wed, 28 Sep 2022 11:18:23 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Jiri Olsa <jolsa@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org, Song Liu <songliubraving@...com>,
        Jiri Slaby <jirislaby@...nel.org>
Subject: Re: [PATCH] perf lock contention: Fix a build error on 32-bit

Em Mon, Sep 26, 2022 at 02:56:38PM -0700, Namhyung Kim escreveu:
> It was reported that it failed to build the BPF lock contention skeleton
> on 32 bit arch due to the size of long.  The lost count is used only for
> reporting errors due to lack of stackmap space through bad_hist which type
> is 'int'.  Let's use int type then.

Thanks, applied.

- Arnaldo

 
> Reported-by: Jiri Slaby <jirislaby@...nel.org>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/bpf_skel/lock_contention.bpf.c | 2 +-
>  tools/perf/util/lock-contention.h              | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/bpf_skel/lock_contention.bpf.c b/tools/perf/util/bpf_skel/lock_contention.bpf.c
> index e107d71f0f1a..1bb8628e7c9f 100644
> --- a/tools/perf/util/bpf_skel/lock_contention.bpf.c
> +++ b/tools/perf/util/bpf_skel/lock_contention.bpf.c
> @@ -75,7 +75,7 @@ int has_task;
>  int stack_skip;
>  
>  /* error stat */
> -unsigned long lost;
> +int lost;
>  
>  static inline int can_record(void)
>  {
> diff --git a/tools/perf/util/lock-contention.h b/tools/perf/util/lock-contention.h
> index 67db311fc9df..b8cb8830b7bc 100644
> --- a/tools/perf/util/lock-contention.h
> +++ b/tools/perf/util/lock-contention.h
> @@ -114,7 +114,7 @@ struct lock_contention {
>  	struct machine *machine;
>  	struct hlist_head *result;
>  	unsigned long map_nr_entries;
> -	unsigned long lost;
> +	int lost;
>  	int max_stack;
>  	int stack_skip;
>  };
> -- 
> 2.38.0.rc1.362.ged0d419d3c-goog

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ