Re: A better interface, perhaps: a timed signal flag

From: Steven Rostedt
Date: Fri Jul 28 2006 - 11:03:46 EST

On Fri, 2006-07-28 at 10:52 -0400, Theodore Tso wrote:

> Good point, and limiting this facility to one such timeout per
> task_struct seems like a reasonable restriction. The downsides I can
> see about about mapping the tasks' own task struct would be (a) a
> potential security leak either now or in the future if some field in
> the task_struct shouldn't be visible to a non-privileged userspace
> program, and (b) exposing the task_struct might cause some (stupid)
> programs to depend on the task_struct layout. Allocating an otherwise
> empty 4k page just for this purpose wouldn't be all that horrible,
> though, and would avoid these potential problems.

Actually, if you are going to map a page, then allow the user to do
PAGE_SIZE / sizeof(*flag) timers. That way the user gets a single page
mapped for this purpose, and can have multiple flags.

I would only limit it to one page though. Since this page can not be
swapped out, if you allow for more than one page, a non privileged user
can map in a bunch of non swappable pages and might be able to perform a
DoS attack.

-- Steve

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at