lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 13 May 2007 03:44:42 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Davide Libenzi <davidel@...ilserver.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...sign.ru>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: undefined reference to `__clear_user' (was: Re: [patch 2/13]
 signal/timer/event fds v10 - signalfd core ...)

On Sun, 13 May 2007 12:28:23 +0200 (CEST) Geert Uytterhoeven <geert@...ux-m68k.org> wrote:

> 	Hi Davide,
> 
> On Mon, 2 Apr 2007, Davide Libenzi wrote:
> > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > +++ linux-2.6.21-rc5.fds/fs/signalfd.c	2007-04-02 15:06:29.000000000 -0700
> 
> > +/*
> > + * Copied from copy_siginfo_to_user() in kernel/signal.c
> > + */
> > +static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
> > +			     siginfo_t const *kinfo)
> > +{
> > +	long err;
> > +
> > +	BUILD_BUG_ON(sizeof(struct signalfd_siginfo) != 128);
> > +
> > +	/*
> > +	 * Unused memebers should be zero ...
> > +	 */
> > +	err = __clear_user(uinfo, sizeof(*uinfo));
>               ^^^^^^^^^^^^
> 
> Shouldn't this be `clear_user()'? I don't see any access_ok() calls
> before this call (I do see them in copy_siginfo_to_user() in
> kernel/signal.c), but of course I may miss something...
> 
> I only noticed because m68k doesn't have __clear_user(), as this routine
> was never needed by generic code before your change.
> 

The vfs does the access_ok() checking on entry to read, write, readv,
writev, pread and pwrite.

I _think_ that covers everything, in which case all the code which
implements reading and writing can use the __ functions.  We have a lot of
code which doesn't avail itself of that optimisation though: 12 zillion
sysfs and proc handlers, for a start.

(I think.  I only recently noticed this and might have missed a path).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists