Re: how do you call userspace syscalls (e.g. sys_rename) from inside kernel

From: Luke Kenneth Casson Leighton
Date: Fri Oct 08 2004 - 12:31:19 EST


On Fri, Oct 08, 2004 at 06:37:01PM +0200, Jan-Benedict Glaw wrote:
> On Fri, 2004-10-08 17:20:25 +0100, Luke Kenneth Casson Leighton <lkcl@xxxxxxxx>
> wrote in message <20041008162025.GL5551@xxxxxxxx>:
> > On Fri, Oct 08, 2004 at 05:18:40PM +0200, Brice Goglin wrote:
>
> > > mm_segment_t old_fs;
> > > old_fs = get_fs();
> > > set_fs(KERNEL_DS);
> > > <do you stuff here>
> > > set_fs(old_fs);
> >
> > that's it! that's what i was looking for. thank you.
>
> Most probably, this is not what you were looking for. You just don't
> know that yet (-:

*grin*. yeh, like someone else privately responded saying i might want
to look at compat_alloc_userspace() instead :)


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