Re: [PATCH 1/4] uaccess: add copy_word_from_user

From: Andrew Morton
Date: Thu Feb 26 2009 - 00:35:45 EST


On Wed, 25 Feb 2009 20:46:11 -0500 (EST) Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

>
> >
> > There are arguments either way. Lately we've tended to take the
> > position that a whole interface either is or is not wholly exported.
> > The uaccess functions are exported, so this one should be as well.
> >
> > We can of course do that later on, when there's a user - I have no
> > particular preference personally.
> >
> > <looks at probe_kernel_read and probe_kernel_write>
> >
> > These are really part of the uaccess interface too. I don't see a need
> > for both lib/uaccess.c and mm/maccess.c?
>
> Ah, I didn't notice that file. I could move this to that file, or move the
> maccess to this file. I just thought lib would be a better location.
> What would you suggest?

Don't care much. There is no rationale for the "maccess" name though -
there's no such term in Linux. lib/uaccess.c seems a fine place for
such things.

> >
> > probe_kernel_read() and probe_kernel_write() are EXPORT_SYMBOL_GPL,
> > whereas the rest of the uaccess interface is EXPORT_SYMBOL. Ho hum.
>
> Looks like another clean up. I guess probe_kernel is because it is more
> kernel internals and should not be used by binary modules? Although
> nothing prevents a kernel module from using the uaccess code for the
> kernel. Or even make a fault section themselves.

hm, yes. And I can't find any module which calls probe_kernel_*().
Perhaps that export was added for consistency, even though it's
inconsistently licensed.

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