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: <20160513111402.890ae6cc571ad388a54571f8@kernel.org>
Date:	Fri, 13 May 2016 11:14:02 +0900
From:	Masami Hiramatsu <mhiramat@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: [PATCH 05/10] perf dwarf: Guard !x86_64 definitions under
 #ifdef else clause

On Thu, 12 May 2016 17:03:50 -0300
Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@...hat.com>
> 
> To fix the build on Fedora Rawhide (gcc 6.0.0 20160311 (Red Hat 6.0.0-0.17):
> 
>     CC       /tmp/build/perf/arch/x86/util/dwarf-regs.o
>   arch/x86/util/dwarf-regs.c:66:36: error: 'x86_32_regoffset_table' defined but not used [-Werror=unused-const-variable=]
>    static const struct pt_regs_offset x86_32_regoffset_table[] = {
>                                       ^~~~~~~~~~~~~~~~~~~~~~
>   cc1: all warnings being treated as errors

Looks good to me too.

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thanks!

> 
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: David Ahern <dsahern@...il.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Wang Nan <wangnan0@...wei.com>
> Link: http://lkml.kernel.org/n/tip-fghuksc1u8ln82bof4lwcj0o@git.kernel.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  tools/perf/arch/x86/util/dwarf-regs.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c
> index 9223c164e545..1f86ee8fb831 100644
> --- a/tools/perf/arch/x86/util/dwarf-regs.c
> +++ b/tools/perf/arch/x86/util/dwarf-regs.c
> @@ -63,6 +63,8 @@ struct pt_regs_offset {
>  # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
>  #endif
>  
> +/* TODO: switching by dwarf address size */
> +#ifndef __x86_64__
>  static const struct pt_regs_offset x86_32_regoffset_table[] = {
>  	REG_OFFSET_NAME_32("%ax",	eax),
>  	REG_OFFSET_NAME_32("%cx",	ecx),
> @@ -75,6 +77,8 @@ static const struct pt_regs_offset x86_32_regoffset_table[] = {
>  	REG_OFFSET_END,
>  };
>  
> +#define regoffset_table x86_32_regoffset_table
> +#else
>  static const struct pt_regs_offset x86_64_regoffset_table[] = {
>  	REG_OFFSET_NAME_64("%ax",	rax),
>  	REG_OFFSET_NAME_64("%dx",	rdx),
> @@ -95,11 +99,7 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = {
>  	REG_OFFSET_END,
>  };
>  
> -/* TODO: switching by dwarf address size */
> -#ifdef __x86_64__
>  #define regoffset_table x86_64_regoffset_table
> -#else
> -#define regoffset_table x86_32_regoffset_table
>  #endif
>  
>  /* Minus 1 for the ending REG_OFFSET_END */
> -- 
> 2.5.5
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ