lkml.org 
[lkml]   [1998]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[2.1.90 patch] SMP sys_idle() user level hang
    This program call sys_idle() and then the process became unkillable
    since sys_idle should not be used from userland.

    void main()
    {
    __asm__ volatile ("int $0x80" : : "a" ((long)0x70));
    }

    Here the patch:
    --- linux/arch/i386/kernel/process.c 1998/03/25 14:29:40 1.1
    +++ linux/arch/i386/kernel/process.c 1998/03/25 14:35:05
    @@ -171,6 +171,8 @@

    asmlinkage int sys_idle(void)
    {
    + if (current->pid != 0)
    + return -EPERM;
    cpu_idle(NULL);
    return 0;
    }

    Thanks to Eliott for the tipsy.c program that showed this up (but please
    Eliott remeber to tell people run it as nobody!!!!!! for example with
    `echo ~andrea/devel/tipsy | su - nobody`). Not it' s running from some
    minutes and no more problems here.
    Andrea[s] Arcangeli


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu

    \
     
     \ /
      Last update: 2005-03-22 13:41    [W:0.034 / U:30.376 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site