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: <20160120135924.GR27085@kernel.org>
Date:	Wed, 20 Jan 2016 10:59:24 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Ben Hutchings <ben@...adent.org.uk>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Wang Nan <wangnan0@...wei.com>, He Kuang <hekuang@...wei.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Jiri Olsa <jolsa@...nel.org>, Kaixu Xia <xiakaixu@...wei.com>,
	Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH perf 3/4] perf tools: Fix unused variables:
 x86_{32,64}_regoffset_table

Em Tue, Jan 19, 2016 at 09:33:06PM +0000, Ben Hutchings escreveu:
> gcc 5 doesn't seem to care about these, but gcc 6 does and that
> results in a build failure.

Ben, please CC the people on the CC list for the patch that introduces
the problem, Wang, He, can I have your Acked-by?

- Arnaldo
 
> Fixes: bbbe6bf6037d ("perf tools: Introduce regs_query_register_offset() ...")
> Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> ---
>  tools/perf/arch/x86/util/dwarf-regs.c | 38 ++++++++++++++++-------------------
>  1 file changed, 17 insertions(+), 21 deletions(-)
> 
> diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c
> index 9223c16..fe1e516 100644
> --- a/tools/perf/arch/x86/util/dwarf-regs.c
> +++ b/tools/perf/arch/x86/util/dwarf-regs.c
> @@ -55,26 +55,10 @@ struct pt_regs_offset {
>  
>  #define REG_OFFSET_END {.name = NULL, .offset = 0}
>  
> +/* TODO: switching by dwarf address size */
>  #ifdef __x86_64__
> -# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
> -# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1}
> -#else
> -# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1}
> -# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
> -#endif
> -
> -static const struct pt_regs_offset x86_32_regoffset_table[] = {
> -	REG_OFFSET_NAME_32("%ax",	eax),
> -	REG_OFFSET_NAME_32("%cx",	ecx),
> -	REG_OFFSET_NAME_32("%dx",	edx),
> -	REG_OFFSET_NAME_32("%bx",	ebx),
> -	REG_OFFSET_NAME_32("$stack",	esp),	/* Stack address instead of %sp */
> -	REG_OFFSET_NAME_32("%bp",	ebp),
> -	REG_OFFSET_NAME_32("%si",	esi),
> -	REG_OFFSET_NAME_32("%di",	edi),
> -	REG_OFFSET_END,
> -};
>  
> +#define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
>  static const struct pt_regs_offset x86_64_regoffset_table[] = {
>  	REG_OFFSET_NAME_64("%ax",	rax),
>  	REG_OFFSET_NAME_64("%dx",	rdx),
> @@ -94,12 +78,24 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = {
>  	REG_OFFSET_NAME_64("%r15",	r15),
>  	REG_OFFSET_END,
>  };
> -
> -/* TODO: switching by dwarf address size */
> -#ifdef __x86_64__
>  #define regoffset_table x86_64_regoffset_table
> +
>  #else
> +
> +#define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
> +static const struct pt_regs_offset x86_32_regoffset_table[] = {
> +	REG_OFFSET_NAME_32("%ax",	eax),
> +	REG_OFFSET_NAME_32("%cx",	ecx),
> +	REG_OFFSET_NAME_32("%dx",	edx),
> +	REG_OFFSET_NAME_32("%bx",	ebx),
> +	REG_OFFSET_NAME_32("$stack",	esp),	/* Stack address instead of %sp */
> +	REG_OFFSET_NAME_32("%bp",	ebp),
> +	REG_OFFSET_NAME_32("%si",	esi),
> +	REG_OFFSET_NAME_32("%di",	edi),
> +	REG_OFFSET_END,
> +};
>  #define regoffset_table x86_32_regoffset_table
> +
>  #endif
>  
>  /* Minus 1 for the ending REG_OFFSET_END */
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ