Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 865149

Summary: dev-util/ROPgadget-6.8 - fails tests on ppc64
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: mario.haustein
Status: RESOLVED FIXED    
Severity: normal CC: sam
Priority: Normal Keywords: PullRequest, TESTFAILURE
Version: unspecified   
Hardware: PPC64   
OS: Linux   
See Also: https://github.com/JonathanSalwan/ROPgadget/pull/182
https://github.com/gentoo/gentoo/pull/27094
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 863782    
Attachments: build.log (ppc64, 6.8)
emerge --info
build.log (ppc64, 6.9)

Description ernsteiswuerfel archtester 2022-08-14 10:58:40 UTC
Created attachment 799593 [details]
build.log (ppc64, 6.8)

[...]
> 0x0000000000001e05 : rol byte ptr [rcx], cl ; add byte ptr [rax], al ; jmp 0x1d30
> 0x0000000000001f2d : rol dword ptr [rax + rax], 0 ; jmp 0x1d14
> 0x0000000000001e83 : rol dword ptr [rdx], cl ; add byte ptr [rax], al ; jmp 0x1d14
> 0x0000000000001e37 : sub byte ptr [rdx], al ; add byte ptr [rax], al ; jmp 0x1d30
> 0x0000000000001ebf : test byte ptr [rbx], al ; add byte ptr [rax], al ; jmp 0x1d14
> 0x0000000000001da7 : xor al, 1 ; add byte ptr [rax], al ; jmp 0x1d14
> 0x0000000000001dbf : xor al, 1 ; add byte ptr [rax], al ; jmp 0x1d30
> 0x0000000000001efb : xor al, 4 ; add byte ptr [rax], al ; jmp 0x1d14
> 0x0000000000001ea1 : xor dword ptr [rbx], eax ; add byte ptr [rax], al ; jmp 0x1d14
> 0x0000000000001ac9 : xor eax, dword ptr [rcx] ; add byte ptr [rax], al ; jmp 0x1c42
> 0x0000000000001e1f : xor eax, dword ptr [rdx] ; add byte ptr [rax], al ; jmp 0x1d14
> 
> Unique gadgets found: 194
 * ERROR: dev-util/ROPgadget-6.8::gentoo failed (test phase):
 *   (no error message)
Comment 1 ernsteiswuerfel archtester 2022-08-14 10:59:25 UTC
Created attachment 799595 [details]
emerge --info
Comment 2 mario.haustein 2022-08-23 05:27:02 UTC
Can you please try again with dev-util/ROPgadget-6.9. Thanks.
Comment 3 ernsteiswuerfel archtester 2022-08-25 10:58:37 UTC
Created attachment 801004 [details]
build.log (ppc64, 6.9)

Looks like 6.9 fails with the same errors.
Comment 4 mario.haustein 2022-08-31 16:37:08 UTC
It's a endianness issue since the library assumes the endianness of the host machine for reading PE and Mach-O files.

I submitted a patch to upstream. See: https://github.com/JonathanSalwan/ROPgadget/pull/182
Comment 5 Larry the Git Cow gentoo-dev 2022-08-31 19:34:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0aa2f3819eb678caed7ee21071720c1f54545d3a

commit 0aa2f3819eb678caed7ee21071720c1f54545d3a
Author:     Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
AuthorDate: 2022-08-31 19:30:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-31 19:34:16 +0000

    dev-util/ROPgadget: add 7.0
    
    Closes: https://bugs.gentoo.org/865149
    Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
    Closes: https://github.com/gentoo/gentoo/pull/27094
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/ROPgadget/Manifest             |  1 +
 dev-util/ROPgadget/ROPgadget-7.0.ebuild | 35 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)