Bug 162454 - x86-64 on 32-bit vdso syscall entry, %ebp value is not seen in %rbp via ptrace
Summary: x86-64 on 32-bit vdso syscall entry, %ebp value is not seen in %rbp via ptrace
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-05 04:19 UTC by Roland McGrath
Modified: 2015-01-04 22:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-05 01:18:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch for upstream and FC kernels to fix it. (2.57 KB, patch)
2005-07-05 09:28 UTC, Roland McGrath
no flags Details | Diff

Description Roland McGrath 2005-07-05 04:19:32 UTC
+++ This bug was initially created as a clone of Bug #160049 +++

$ uname -a
Linux bnocera 2.6.9-1.906_EL #1 Sun Dec 12 22:51:52 EST 2004 i686 i686 i386
GNU/Linux
$ file test
test: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux
2.2.5, dynamically linked (uses shared libs), not stripped
$ strace -v ./a.out 2>&1 | grep old
old_mmap(NULL, 76063, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fed000
old_mmap(0x469000, 1215644, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x469000
old_mmap(0x58c000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x123000) = 0x58c000
old_mmap(0x590000, 7324, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x590000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7fec000

On the 64 bit machine:
rpm -q strace
strace-4.5.9-2.EL3
[root@host-59 tmp]# uname -a
Linux host-59.support.localnet 2.4.21-27.0.2.ELsmp #1 SMP Wed Jan 12 23:25:44
EST 2005 x86_64 x86_64 x86_64 GNU/Linux
[root@host-59 tmp]# file test
test: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux
2.2.5, dynamically linked (uses shared libs), not stripped
[root@host-59 tmp]# strace -v ./test 2>&1 | grep old
old_mmap(0xedf500000000, 8589934593, PROT_READ|PROT_WRITE, 0xf /* MAP_???
*/|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_EXECUTABLE|MAP_LOCKED|0xfffe06c0,
14849, 0x3b55b00000000) = 0x40016000
old_mmap(0x1375cc00000000, 8589934597, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) =
0x40025000
old_mmap(0x300040157000, 77309411331, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) =
0x40157000
old_mmap(0x25cc4015a000, 214748364803,
PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, MAP_FILE,
0, 0) = 0x4015a000
old_mmap(0x100000000000, 146028888067,
PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, 0x8 /*
MAP_???
*/|MAP_FIXED|MAP_NORESERVE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_EXECUTABLE|0x40000400,
1073744439, 0x840010307) = 0x4015d000
old_mmap()                              = -1 EFAULT (Bad address)

test is built from the test.c below:
#include <sys/syscall.h>
#include <unistd.h>
#include <sys/mman.h>

int main (int argc, char **argv)
{
        syscall (SYS_mmap2, NULL, 88983, PROT_READ, MAP_PRIVATE, 3, 0);
        return 0;
}

Comment 1 Roland McGrath 2005-07-05 09:28:06 UTC
Created attachment 116348 [details]
Patch for upstream and FC kernels to fix it.

This patch relative to the rawhide kernel works.
I'm sending it upstream.

Comment 2 Dave Jones 2005-07-15 21:42:21 UTC
[This comment has been added as a mass update for all FC4 kernel bugs.
 If you have migrated this bug from an FC3 bug today, ignore this comment.]

Please retest your problem with todays 2.6.12-1.1398_FC4 update.

If your problem involved being unable to boot, or some hardware not being
detected correctly, please make sure your /etc/modprobe.conf is correct *BEFORE*
installing any kernel updates.
If in doubt, you can recreate this file using..

mv /etc/sysconfig/hwconf /etc/sysconfig/hwconf.bak
mv /etc/modprobe.conf /etc/modprobe.conf.bak
kudzu


Thank you.


Comment 5 Dave Jones 2005-09-30 07:14:49 UTC
Mass update to all FC4 bugs:

An update has been released (2.6.13-1.1526_FC4) which rebases to a new upstream
kernel (2.6.13.2). As there were ~3500 changes upstream between this and the
previous kernel, it's possible your bug has been fixed already.

Please retest with this update, and update this bug if necessary.

Thanks.


Comment 6 Dave Jones 2005-11-10 20:23:49 UTC
2.6.14-1.1637_FC4 has been released as an update for FC4.
Please retest with this update, as a large amount of code has been changed in
this release, which may have fixed your problem.

Thank you.


Comment 7 Dave Jones 2006-02-03 06:13:16 UTC
This is a mass-update to all currently open kernel bugs.

A new kernel update has been released (Version: 2.6.15-1.1830_FC4)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

Thank you.


Comment 8 John Thacker 2006-05-05 01:18:27 UTC
Closing per previous comment.


Note You need to log in before you can comment on or make changes to this bug.