Re: [gtk-list] Re: X and idles => incredible slowdowns



Jon Trowbridge wrote:

> On Sat, Apr 29, 2000 at 06:26:26PM +0200, Antonio Campos wrote:
> > But you have to agree with me, that an application being able to take almost
> > all the control of the X server, IS A VERY BAD THING. It makes posible
> > malicious applications, X hangs and therefore Linux hangs, etc.
>
> This isn't really all that different from the situation with any
> application.  If I trick you into running the program:
>
> int main()
> {
>   for(;;) {
>     fork();
>     malloc(100000);
>   }
> }
>

Well, you are right. The above will make the kernel fight for scarcer and scarcer
resources, and in conclusion, the kernel would pay no attention to the user
requests in keyboards/mouses ( the processes that hold these resources), etc...
But there is a solution there, (if it were in the kernel):

The kernel could reserve some permanent space (say through a module loaded in the
initial scripts), that gets the kernel in a known state, where the user can
select a offending process to kill -9 it, and so the system would return to a
stable state. (I think this should be the right thing to do). Of course, a user
only could kill -9 his process, etc...

In the X server side, a similar thing should exist. I don't know exactly what.
Maybe a realtime thread on the X server process to allow the user kill -9 the
Server in a delimited time?. I think it should be better that the current
behaviour.

By the way, thanks for your time analyzing my code. But the code itself isn't the
interesting thing. The interesting thing is that I CAN DO a VERY SIMPLE program
that gets the X server to a very a bad state. And that's BAD (don't you agree
with me?).

Anyway, thanks...

>
> your system is going to get very unhappy very fast.  So this problem
> has nothing to do with X, and complaining to the XFree people will
> probably just annoy them.  (Sure, maybe XFree could change its
> behavior if one client is flooding it with requests, but it seems to
> me that the nuts and bolts of how to do this properly would be
> extremely tricky --- and I'm sure a "malicious app" could always find
> a way to get around any reasonable scheme.  There are other ways to
> consume all X server resources than just flooding it with window-move
> requests.)
>
> And anyway, as pointed out by others already, the situation with Linux
> is much better than that on Windows...
>
> -JT
>
> --
> GNU/Linux: Free your mind and your OS will follow.
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]