* [Bug tapsets/11269] New: syscall.mmap decoding $fd incorrectly with MAP_ANONYMOUS
@ 2010-02-10 21:58 dsmith at redhat dot com
2010-02-23 17:12 ` [Bug tapsets/11269] " dsmith at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: dsmith at redhat dot com @ 2010-02-10 21:58 UTC (permalink / raw)
To: systemtap
The user side of mmap is defined like this:
void *mmap(void *addr, size_t length, int prot, int flags,
int fd, off_t offset);
The kernel side is defined like this:
long sys_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long off)
Notice that on the user side, 'fd' is a signed integer, while on the kernel side
it is an unsigned long.
The mmap manpage says this about the MAP_ANONYMOUS flag:
MAP_ANONYMOUS
The mapping is not backed by any file; its contents are initial-
ized to zero. The fd and offset arguments are ignored; however,
some implementations require fd to be -1 if MAP_ANONYMOUS (or
MAP_ANON) is specified, and portable applications should ensure
this.
Here's the problem. When MAP_ANONYMOUS is used and fd is set to -1, the
syscall.mmap probe treats $fd as an unsigned long, so -1 looks like 4294967295
(on x86_64).
--
Summary: syscall.mmap decoding $fd incorrectly with MAP_ANONYMOUS
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: tapsets
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: dsmith at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11269
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tapsets/11269] syscall.mmap decoding $fd incorrectly with MAP_ANONYMOUS
2010-02-10 21:58 [Bug tapsets/11269] New: syscall.mmap decoding $fd incorrectly with MAP_ANONYMOUS dsmith at redhat dot com
@ 2010-02-23 17:12 ` dsmith at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2010-02-23 17:12 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|systemtap at sources dot |dsmith at redhat dot com
|redhat dot com |
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=11269
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-23 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-10 21:58 [Bug tapsets/11269] New: syscall.mmap decoding $fd incorrectly with MAP_ANONYMOUS dsmith at redhat dot com
2010-02-23 17:12 ` [Bug tapsets/11269] " dsmith at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).