linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: root@chaos.analogic.com
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: syscall __NR_mmap2
Date: Mon, 07 Jul 2003 14:32:31 -0700	[thread overview]
Message-ID: <3F09E6EF.8000806@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0307071655470.22074@chaos>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard B. Johnson wrote:

> write(1, "Addr = 000b8000\n", 16)       = 16
> open("/dev/mem", O_RDWR)                = 3
> mmap2(0xb8000, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0xb8000) = 0xb8000

mmap64() (and if you compile glibc with an adequate minimal kernel
requirement mmap as well) is implemented using mmap2.  It works nicely.
 Admittedly, I haven't used the stock 2.4 kernel.  And I also haven't
used /dev/mem.  But at least for the first part I would expect to see
problem reports since the code is used and glibc wouldn't work.

In your code, assuming this is x86, do you really want to read the
memory starting at address 0xb8000000?  This is what your code does.  I
don't know enough about the kernel memory layout to say whether
something is supposed to be there or not.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/Cebv2ijCOnn/RHQRAukcAKCbI3cTMvmAsHxRWX2ralSqUlcp8ACfTBRU
PNoh4p0/XrWFWXk9JnbnNyk=
=DQ6S
-----END PGP SIGNATURE-----


  reply	other threads:[~2003-07-07 21:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-07 21:00 syscall __NR_mmap2 Richard B. Johnson
2003-07-07 21:32 ` Ulrich Drepper [this message]
2003-07-08 11:56   ` Richard B. Johnson
2003-07-08  0:36 ` Jamie Lokier
2003-07-08 11:54   ` Richard B. Johnson
2003-07-08 13:59     ` Kurt Wall
2003-07-08 14:05     ` Jamie Lokier
2003-07-08 14:40       ` Richard B. Johnson
2003-07-08 14:49         ` Randy.Dunlap
2003-07-08 14:51         ` Kurt Wall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F09E6EF.8000806@redhat.com \
    --to=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).