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: <20150831072259.GH19282@twins.programming.kicks-ass.net>
Date:	Mon, 31 Aug 2015 09:22:59 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Jan Stancek <jstancek@...hat.com>
Cc:	linux-kernel@...r.kernel.org, acme@...nel.org, jolsa@...nel.org,
	adrian.hunter@...el.com, dsahern@...il.com,
	cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com, mingo@...nel.org,
	namhyung@...nel.org, paulus@...ba.org
Subject: Re: [PATCH] perf tests: improve reading of objdump output

On Mon, Aug 31, 2015 at 09:18:33AM +0200, Jan Stancek wrote:
> There are couple of situations, where objdump output doesn't
> match "code reading" test expectations:
> 
> 1. gaps in output, objdump skips zero blocks by default
> 
>   ffffffff816704fe <sysret_check+0x4b>:
>   ffffffff816704fe:	7b 34                	jnp    ffffffff81670534  <sysret_signal+0x1c>
>         ...
>   ffffffff81670501 <sysret_careful>:
>   ffffffff81670501:	0f ba e2 03          	bt     $0x3,%edx
>   ffffffff81670505:	73 11                	jae    ffffffff81670518  <sysret_signal>
> 
> This patch adds "-z" to objdump parameters.
> 
> 2. bytes can be repeated in objdump output, test reads it all sequentially
>    assuming each address is represented in output only once.
> 
>   ffffffff8164efb3 <retint_swapgs+0x9>:
>   ffffffff8164efb3:       c1 5d 00 eb             rcrl   $0xeb,0x0(%rbp)
>   ffffffff8164efb7:       00 4c 8b 5c             add    %cl,0x5c(%rbx,%rcx,4)
> 
>   ffffffff8164efb8 <restore_c_regs_and_iret>:
>   ffffffff8164efb8:       4c 8b 5c 24 30          mov    0x30(%rsp),%r11
>   ffffffff8164efbd:       4c 8b 54 24 38          mov    0x38(%rsp),%r10
> 
> This patch stores objdump output to buffer according to address
> on each line.
> 
> 3. objdump output can span across multiple sections
> 
>   Disassembly of section .text:
>     0000000000000008 <crc32c+0x8>:
>        8:	48 89 e5             	mov    %rsp,%rbp
>        b:	53                   	push   %rbx
>        c:	8b 01                	mov    (%rcx),%eax
>     <snip>
>       6b:	90                   	nop
> 
>   Disassembly of section .init.text:
>     0000000000000008 <init_module+0x8>:
>        8:	00 00                	add    %al,(%rax)
>        a:	00 00                	add    %al,(%rax)
>        c:	48 89 e5
> 
> This patch aborts further reading if address starts going backwards,
> assuming we crossed sections.

I would have expected 3 patches, each patch doing exactly one of the
above.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ