[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906141210.17922.arnd@arndb.de>
Date: Sun, 14 Jun 2009 12:10:17 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Mike Frysinger <vapier.adi@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] asm-generic: uaccess: fix up local access_ok() usage
On Sunday 14 June 2009, Mike Frysinger wrote:
> well, if you dont mind a bit of cruft, you can undef it ;)
> #include <asm-generic/uaccess.h>
> #undef access_ok
That will only work for the users outside of uaccess.h, so it doesn't
solve this problem.
> the Blackfin port does have hardware memory protection (MPU) and it
> does handle r/w/x bits, but we havent merged this into access_ok yet,
> just the vma lists
Hmm, if the hardware can catch memory protection errors, why would
you want to check them again in access_ok()? Are the checks disabled
in kernel mode? Most implementations of access_ok only check if the
address is a kernel or user pointer, because the kernel can access
both on most architectures, and the MMU only protects you from
passing invalid pointers, not valid kernel pointers.
> > What I really got wrong was the prototype for __access_ok(), as you
> > showed in your follow-up. I only tested this with the microblaze
> > patch that overrides __access_ok() with an architecture specific
> > version that gets this part right.
>
> yeah, that looks good, but i'd still like the __access_ok -> access_ok
Ok, no problem. I can take that change as well, don't care much either way.
Arnd <><
--
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