Re: How to hack it up ( Was: Anyway to mknod from kernel?)

Tigran Aivazian (tigran@sco.COM)
Wed, 27 Oct 1999 08:16:46 +0100 (BST)


note that I was only commenting on the issue of making system calls and
*NOT* on the specific case of mknod-ing from the kernel.

The idea that a UNIX kernel should have *any* dealings with
manipulating files by their filenames is absolutely
unacceptable, except when it is *really* needed e.g. execing "/sbin/init"
or "/sbin/modprobe" (or the value in proc) to do things.

Apart from well-defined cases when there is no other way (or no other
perfect way), polluting the kernel with opening files by name, mknoding
devices etc etc is a bad thing.

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 Wed, 27 Oct 1999, Tigran Aivazian wrote:

> Hi Sergey,
>
> You wrote recently:
>
> > It works perfectly on Intel Red Hat 6.0. What about another arch. ?
>
> That is exactly the point. Alan Cox (and others) kindly explained
> recently that doing the stuff you do in your sample code is not portable
> because you can't expect sys_call_table[__NR_unlink] to have the same (or
> any) meaning on some architectures.
>
> Therefore, it is much cleaner to export the necessary sys_*() functions
> and call them just as normal functions.
>
> 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
>
>
>

-
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/