lkml.org 
[lkml]   [1999]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: access_ok inside kernelspace
    Actually, Ingo - there *is* one case where going through _syscallX() and
    therefore int 0x80 from the kernel *is* the only way. This is when the
    caller is a module. That is how I call sysfs() from BFS module.

    So, if nobody objects to allowing modules to make system calls (as we
    established the corruption this morning was just my bug - so behaviour is
    valid), I will send this trivial patch to Linus (exporting errno):

    --- ksyms.c.0 Tue Oct 19 12:44:53 1999
    +++ ksyms.c Tue Oct 19 12:45:15 1999
    @@ -40,6 +40,7 @@
    #include <linux/poll.h>
    #include <linux/mm.h>
    #include <linux/capability.h>
    +#include <linux/unistd.h>

    #if defined(CONFIG_PROC_FS)
    #include <linux/proc_fs.h>
    @@ -79,6 +80,9 @@
    #endif
    EXPORT_SYMBOL(get_option);
    EXPORT_SYMBOL(get_options);
    +
    +/* errno */
    +EXPORT_SYMBOL(errno);

    /* process memory management */
    EXPORT_SYMBOL(do_mmap);

    Regards,
    ------
    Tigran A. Aivazian | http://www.sco.com
    Escalations Research Group | tel: +44-(0)1923-813796
    Santa Cruz Operation Ltd | http://www.ocston.org/~tigran
    On Tue, 19 Oct 1999, Tigran Aivazian wrote:

    > On Tue, 19 Oct 1999, Ingo Molnar wrote:
    > > why this vendetta against using sys_ functions directly? We dont go
    > > through a trap because in most cases that is unnecessery overhead. You are
    > > not being logical i think.
    >
    > Yes, I understand that overhead is unnecessary. Which is why I now say -
    > "why do we do _syscallX() from kernel at all? (other than when we *have*
    > to)"
    >
    > And example I give is exec_modprobe() doing close(i) when it could just do
    > sys_close(i).
    >
    > Regards,
    > Tigran.
    >
    > PS. Thank you for your patient explanations!
    >
    >
    >


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

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