[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why can't we use the user-space pointer in kernel mode?
On Wed, 2006-05-03 at 22:20 +0800, cheng long wrote:
> > because it may be swapped out to disk ...
> > you need a special function that can deal with that (and swaps it right
> > back in)
> Why can't we use the "page fault handler" like in user space to swap
> the page back in?
that's a lot more tricky than it sounds ;)
(for example... how would you deliver SIGBUS to the kernel?)
to make this practical, there is a special copy operation that does do
this... but it's not generic.
(it's also a really easy way to get security holes; by copying at least
you get a snapshot of the data that the user cannot meddle with from
another thread)
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/