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: <53F60BE0.5050509@gmail.com>
Date:	Thu, 21 Aug 2014 09:10:24 -0600
From:	David Ahern <dsahern@...il.com>
To:	Matthieu CASTET <matthieu.castet@...rot.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: perf on biarch

On 8/18/14, 3:16 AM, Matthieu CASTET wrote:
> Le Fri, 8 Aug 2014 13:50:52 -0600,
> David Ahern <dsahern@...il.com> a écrit :
>
>> On 8/8/14, 10:40 AM, Matthieu CASTET wrote:
>>> Hi,
>>>
>>> I have a 64 bits kernel running with 32 bits binaries.
>>> If I run 32 bits perf on this 64 bits kernel 3.14, I got weird result :
>>>
>>> - perf trace doesn't work [1]
>>
>> I have patches that fix that:
>>       git clone https://github.com/dsahern/linux.git
>>       git checkout perf-full-monty
>>
>> And if autodetection fails you can manually force it with -M x86.
>>
> Thanks david.
> It is better, but it seems there are problem with argument parsing.
>
> For example for
> "mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xf77e2000"
> I got :
> - 2.847 ( 0.004 ms): mmap2(arg0: 0, arg1: 0, arg2: 4096, arg3: 0, arg4:
> 3, arg5: 0         ) = -143273984
>
>
> Note the 4096 position. Running perf trace on a 32 bits kernel give
> 4096 at arg1.

What kernel version? And are you running my perf command or did you 
extract the relevant patches?

Using a mixed system here:

# uname -a
Linux switch 3.4.10 #1 SMP Wed Jul 30 13:10:46 PDT 2014 x86_64 GNU/Linux

# file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.34, stripped

And comparing 'strace ls':

mmap2(0x41217000, 33356, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 
3, 0) = 0x41217000

to 'perf trace ls':

1.239 ( 0.015 ms): mmap2(arg0: 1092710400, arg1: 33356, arg2: 5, arg3: 
2050, arg4: 3, arg5: 0) = 1092710400

I am seeing a consistent output between strace and perf-trace for 32-bit 
app on 64-bit kernel -- though perf-trace does need the pretty print for 
mmap2.

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