All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arch@vger.kernel.org, rmk@arm.linux.org.uk,
	tony.luck@intel.com
Subject: Re: [PATCH]add epoll compat code to fsl/compat.c
Date: Wed, 21 Feb 2007 22:14:49 +0000	[thread overview]
Message-ID: <20070221221449.GE8957@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702211259440.16904@alien.or.mcafeemobile.com>

On Wed, Feb 21, 2007 at 01:04:51PM -0800, Davide Libenzi wrote:

> > Oh, we can. "put_user()" and "get_user()" already have to work on totally 
> > unaligned data. If some architecture has problems with that, they have 
> > bigger issues, methinks.
> > 
> > We can't trust user pointers, and that includes not trusting them being 
> > aligned. 
> 
> Don't we get EFAULT in case of exception (access or alignment) in there?
> For "dealing with", here we'd need them to do the correct thing 
> (split-load?) in case of mis-aligned access.

On an architecture which doesn't transparently handle missalignment the
best approach is to have the unalignment exception handler fix things
such that the 99.999% common case of properly aligned get_user/put_user
doesn't have to care.  A few nasty architectures (Afair old ARM and the
b0rked R5900 in the Playstation 2 for 128-bit integer loads) however
don't throw exceptions so __get_user / __put_user have to handle the
problem manually which of course adds considerable overhead to the common
case.

  Ralf

  parent reply	other threads:[~2007-02-21 22:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-20 21:57 [patch 18/50] add epoll compat code to kernel/compat.c akpm
2007-02-20 23:20 ` Stephen Rothwell
2007-02-20 23:33   ` Davide Libenzi
2007-02-21  1:01     ` Stephen Rothwell
2007-02-21  1:05       ` Stephen Rothwell
2007-02-21  1:12       ` Davide Libenzi
2007-02-21  3:10         ` [PATCH]add epoll compat code to fsl/compat.c Stephen Rothwell
2007-02-21 20:24           ` Davide Libenzi
2007-02-21 20:36             ` Linus Torvalds
2007-02-21 21:04               ` Davide Libenzi
2007-02-21 21:15                 ` Linus Torvalds
2007-02-22  3:07                   ` David Miller
2007-02-22  4:03                     ` Davide Libenzi
2007-02-22  4:39                     ` Stephen Rothwell
2007-02-21 22:14                 ` Ralf Baechle [this message]
2007-02-21 22:25                   ` Davide Libenzi
2007-02-21 23:23                     ` Ralf Baechle
2007-02-22  3:02               ` David Miller
2007-02-22  3:08                 ` Davide Libenzi
2007-02-21  1:38       ` [patch 18/50] add epoll compat code to kernel/compat.c Ralf Baechle
2007-02-20 23:57   ` Andrew Morton

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=20070221221449.GE8957@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=sfr@canb.auug.org.au \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    /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.