All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] asm-generic: uaccess: fix up local access_ok() usage
Date: Sun, 14 Jun 2009 12:10:17 +0200	[thread overview]
Message-ID: <200906141210.17922.arnd@arndb.de> (raw)
In-Reply-To: <8bd0f97a0906131747odfe851chebfef9a541fa5c58@mail.gmail.com>

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

  reply	other threads:[~2009-06-14 10:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-13 14:30 [PATCH] asm-generic: uaccess: fix up local access_ok() usage Mike Frysinger
2009-06-13 14:30 ` [PATCH] asm-generic: hard_irqs: handle NR_IRQS > 256 automatically Mike Frysinger
2009-06-13 17:57   ` H. Peter Anvin
2009-06-13 21:18     ` Arnd Bergmann
2009-06-14  0:25       ` Mike Frysinger
2009-06-14 20:43         ` [PATCH] asm-generic: drop HARDIRQ_BITS definition from hardirq.h Arnd Bergmann
2009-06-15 15:59           ` Steven Rostedt
2009-06-15 16:17           ` Mike Frysinger
2009-06-15 16:44           ` Steven Rostedt
2009-06-16 14:37             ` [PATCH v3] " Arnd Bergmann
2009-06-13 15:59 ` [PATCH] asm-generic: uaccess: fix up local access_ok() usage Mike Frysinger
2009-06-13 20:53 ` Arnd Bergmann
2009-06-14  0:47   ` Mike Frysinger
2009-06-14 10:10     ` Arnd Bergmann [this message]
2009-06-14 10:17       ` Mike Frysinger
2009-06-14 10:24         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906141210.17922.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier.adi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.