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: <Pine.BSM.4.64L.2401201816560.29203@herc.mirbsd.org>
Date: Sat, 20 Jan 2024 18:21:43 +0000 (UTC)
From: Thorsten Glaser <tg@...ian.org>
To: Linus Torvalds <torvalds@...uxfoundation.org>
cc: "H. Peter Anvin" <hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>,
        x86@...nel.org, rostedt@...dmis.org, linux-kernel@...r.kernel.org,
        linux-toolchains@...r.kernel.org, jpoimboe@...hat.com,
        alexei.starovoitov@...il.com, mhiramat@...nel.org
Subject: disassemblers (was Re: [PATCH 1/2] x86: Remove dynamic NOP selection)

Dixi quod…

>>Is there some sane tool that just does the sane thing and shows this as
>
>The only other disassemblers I know don’t know about ELF objects
>at all, I’m sorry to say.

I have searched through my bookmarks and found “Agner Fog’s objconv”
https://www.agner.org/optimize/#objconv which I had not yet tried as
it comes with a .exe but apparently, the included GPL source builds
on GNU/Linux (and BSD and MacOSX) as well.

Usage is: ./objconv -fgasm filename.o

This will write filename.asm ⚠ into the same directory as the .o file,
surprisingly.

It works for i386 and amd64 but not x32 (aka amd64ilp32) which is
mis-disassembled as if it were i386. Sample output fragment:

tsv_header:
        sub     rsp, 8                                  # 00E3 _ 48: 83. EC, 08
        lea     rdi, [.LC7+rip]                         # 00E7 _ 48: 8D. 3D, 00000000(rel)
        call    puts@PLT                                # 00EE _ E8, 00000000(PLT r)
        add     rsp, 8                                  # 00F3 _ 48: 83. C4, 08
        ret                                             # 00F7 _ C3

Bit irritating is it uses decimal numbers…

        sub     rsp, 232                                # 0102 _ 48: 81. EC, 000000E8

… and the way the input is separated with colon, period and comma,
but it’s legible enough.

Credits to Peter Cordes for the discovery.

bye,
//mirabilos
-- 
When he found out that the m68k port was in a pretty bad shape, he did
not, like many before him, shrug and move on; instead, he took it upon
himself to start compiling things, just so he could compile his shell.
How's that for dedication. -- Wouter, about my Debian/m68k revival

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ