[lkml]   [2002]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch[ Simple Topology API
    Alexander Viro writes:

    > It's hard to enjoy the use of prctl(). Especially for things like
    > "give me the number of the first CPU in node <n>" - it ain't no
    > process controll, no matter how you stretch it.

    Yeah... eeew.

    > <soapbox> That's yet another demonstration of the evil of multiplexing
    > syscalls. They hide the broken APIs and make them easy to introduce.
    > And broken APIs get introduced - through each of these. prctl(), fcntl(),
    > ioctl() - you name it. Please, don't do that. </soapbox>

    This wouldn't happen if it wasn't so damn hard to add a syscall.
    If you make people go though all the arch maintainers just to
    add a simple arch-independent syscall, they'll just bolt their
    code into some dark hidden corner of the kernel. That's life.
    Make syscalls easy to write, and this won't happen.

    Can you guess what would happen if you got rid of prctl(),
    fcntl(), and ioctl()? We'd get apps with code like this:

    // write address of one of these to /proc/orifice
    typedef struct evil {
    int version; // struct version
    struct evil *next; // next in list
    struct evil *prev; // prev in list
    char opcode; // indicates what we will do
    int (*fn)(void *); // callback function (if not NULL)
    void *addr; // an address in kernel memory
    short flags; // 0x0001 call fn w/ ints off, 0x0002 w/ BKL
    double timeout; // in microfortnights (uses APIC's NMI)
    } evil;

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

     \ /
      Last update: 2005-03-22 13:22    [W:0.020 / U:16.088 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site