Re: 2.4 in-kernel file opening
From: Randy.Dunlap
Date: Tue Oct 04 2005 - 12:53:27 EST
On Tue, 4 Oct 2005, Martin Drab wrote:
> On Tue, 4 Oct 2005, Martin Drab wrote:
>
> > On Tue, 4 Oct 2005, Martin Drab wrote:
> >
> > > Hi,
> > >
> > > can anybody tell me why there is no sys_open() exported in kernel/ksyms.c
> > > in 2.4 kernels while the sys_close() is there? And what is then the
> > > preferred way of opening files from within a 2.4 kernel module?
> >
> > Is it just pure filp_open()/filp_close() ?
>
> Now I see sys_open() is doing a strncpy_from_user() conversion, so that's
> why it's not good for in-kernel use. So I assume the
> filp_open()/filp_close() is OK then.
Still, there is no "preferred" way of opening files from
within the kernel. Do it in userspace.
--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/