Re: Weightless process class

From: Rik van Riel (riel@conectiva.com.br)
Date: Wed Oct 04 2000 - 15:34:55 EST


On Wed, 4 Oct 2000, Nathan Paul Simons wrote:
> On Wed, Oct 04, 2000 at 04:16:22PM -0300, Rik van Riel wrote:
> > Do we have something like an in_kernel(proc) macro ???
>
> "user_mode()" in include/asm/ptrace.h? But that only checks to
> see if the regs struct you passed it are from a kernel thread or
> not. No checks to see if the process has any kernel locks.

A process can't grab a kernel lock and then switch
back to user mode, can it? (if it could, I can
imagine some nasty DoS attacks...)

Problem is, when we decide to schedule in a process
or not, we know the process was last stuck in
schedule() ... in kernel mode ;(

I'd love to be proven wrong though ... this would be
some extremely useful functionality ;)

regards,

Rik

--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/ http://www.surriel.com/

- 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/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:14 EST