From: "Durantez, Marc" <durantez@is.s.u-tokyo.ac.jp>
To: ultralinux@vger.kernel.org
Subject: Accessing an arbitrary user space from a module
Date: Wed, 14 Apr 1999 02:44:41 +0000 [thread overview]
Message-ID: <marc-linux-ultrasparc-92406432012725@msgid-missing> (raw)
Hello,
I writing a module for an implementation of distributed shared memory
on a group of computers over a LAN, but I still have not enought
experience with the kernel.
My problem is that I don't know how to access an arbitrary user memory
space from my module. Let us suppose I have a buffer in kernel space
and I want to copy it in the memory space of process A at some virtual
address.
First case: I am not at interrupt time but I am in the context of
another process like a deamon or whatever.
I tried something using get_fs() and set_fs() but I don't really know
what a mm_segment_t represents for an ultrasparc, I hoped it would
work but it didn't (it wasn't a very rigourous test so may be it
should work!)
Second case: At interrupt time, what can I do? I understand that
provoquing a page falt is not an option so I got carefully the pte_t
corresponding to the destination where I want to write, checked its
validity with pte_present() but finally got a fault when accessing
using paddr = (pte_page(*pte)|(addr&(~PAGE_MASK))+PAGE_OFFSET; where
paddr should be the physical address. But I guess I will run into more
trouble to mark the page as dirty or if the buffer I want to write is
accross two or more pages.
Please, could you tell me where I am wrong and where should I look for
more information on the web or in the source?
Thank you,
Marc
next reply other threads:[~1999-04-14 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-14 2:44 Durantez, Marc [this message]
1999-04-14 4:30 ` Accessing an arbitrary user space from a module David Miller
1999-04-14 7:11 ` Durantez, Marc
1999-04-14 7:12 ` David Miller
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=marc-linux-ultrasparc-92406432012725@msgid-missing \
--to=durantez@is.s.u-tokyo.ac.jp \
--cc=ultralinux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.