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, 19 Apr 2012 17:40:07 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>, arnaldo.melo@...il.com,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [GIT PULL 00/13] Annotation improvements (G+ edition)

On Thu, Apr 19, 2012 at 5:31 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Thu, Apr 19, 2012 at 1:33 PM, Arnaldo Carvalho de Melo
> (crappy) arrow head to find possible loops (backwards jumps).
>
> The above snippet would then become:
>
>    2.08        test   %rdx,%rdx
>    0.00        jne    38                  ----v
>    0.00        jmp    53                  ----v
>    5.13   30:  mov    (%rdx),%rdx
>    0.74        test   %rdx,%rdx
>    0.00        je     53                  ----v
>    0.06   38:  lea    -0x20(%rdx),%rax
>   59.64        cmp    -0x20(%rdx),%edi
>    0.40        jne    30                      ----^
>   17.36        cmp    -0x18(%rdx),%cx
>    0.00        jne    30                      ----^
>    1.91        cmp    0x4(%rax),%esi
>    0.00        jne    30                      ----^
>    0.22        test   %rax,%rax
>    0.20        je     53                  ----v
>    1.68        leaveq
>    1.90        retq
>    0.00   53:  incl   %gs:0xe214
>    0.00        xor    %eax,%eax

Side note: I'm not at all certain that the arrows should be at the end
of the line. It might be even better to show it at the head of the
line, ie something like


    2.08        test   %rdx,%rdx
    0.00 v      jne    38
    0.00 v      jmp    53
    5.13   30:  mov    (%rdx),%rdx
    0.74        test   %rdx,%rdx
    0.00 v      je     53
    0.06   38:  lea    -0x20(%rdx),%rax
   59.64        cmp    -0x20(%rdx),%edi
    0.40 ^--    jne    30
   17.36        cmp    -0x18(%rdx),%cx
    0.00 ^--    jne    30
    1.91        cmp    0x4(%rax),%esi
    0.00 ^--    jne    30
    0.22        test   %rax,%rax
    0.20 v      je     53
    1.68        leaveq
    1.90        retq
    0.00   53:  incl   %gs:0xe214
    0.00        xor    %eax,%eax

but then you obviously need to make it work right if a branch is also
a branch target.

Oh, and one other visual clue that could be useful: unconditional
branches (including "ret") that actually end the flow of code and
don't have a fallthrough to the next instruction would be nice to see
clearly. Even perhaps an empty line following them? Although maybe
that would be wasting precious vertical space..

                              Linus
--
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