From: Pavel Machek <pavel@suse.cz>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Address translation
Date: Thu, 23 Nov 2000 00:49:29 +0000 [thread overview]
Message-ID: <20001123004928.A96@toy> (raw)
In-Reply-To: <E13yhcO-0003qy-00@wisbech.cl.cam.ac.uk>
In-Reply-To: <E13yhcO-0003qy-00@wisbech.cl.cam.ac.uk>; from Keir.Fraser@cl.cam.ac.uk on Wed, Nov 22, 2000 at 09:39:51PM +0000
Hi!
> otherwise valid) I think the access macros are unnecessary. I would be
> *very* glad if someone could confirm this, or shoot me down. :)
>
> For instance, a kernel module I am writing allocates some memory in
> the current process's address space as follows:
>
> down(&mm->mmap_sem);
> s->table = (void **)get_unmapped_area(0, SIZEOF_TABLE);
> if ( s->table != NULL )
> do_brk((unsigned long)s->table, SIZEOF_TABLE);
> up(&mm->mmap_sem);
>
> Some questions:
> (1) In a "top half" thread, can I now access this memory without the
> access macros (since I know the address range is valid)?
> (2) Can I also access this memory from an interrupt/exception
> context, or must I lock it? (ie. can faults be handled from such
> a context)
poof! I've shooted you.
You may definitely access such memory from interrupt.
--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-23 23:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-22 21:39 Address translation Keir Fraser
2000-11-23 0:49 ` Pavel Machek [this message]
2000-11-23 20:23 ` Andreas Bombe
2000-11-23 21:04 ` Bjorn Wesen
2000-11-24 23:28 ` Andreas Bombe
-- strict thread matches above, loose matches on Subject: below --
2000-11-21 14:41 Rubén Gallardo Fructuoso
2000-11-21 17:20 ` Jeff Dike
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=20001123004928.A96@toy \
--to=pavel@suse.cz \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
/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