From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from x35.xmailserver.org ([64.71.152.41]:2314 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423119AbXBUVEy (ORCPT ); Wed, 21 Feb 2007 16:04:54 -0500 Received: from alien.or.mcafeemobile.com by x35.xmailserver.org with [XMail 1.25 ESMTP Server] id for from ; Wed, 21 Feb 2007 16:04:51 -0500 Date: Wed, 21 Feb 2007 13:04:51 -0800 (PST) From: Davide Libenzi Subject: Re: [PATCH]add epoll compat code to fsl/compat.c In-Reply-To: Message-ID: References: <200702202159.l1KLxMcC021074@shell0.pdx.osdl.net> <20070221102027.52bf703a.sfr@canb.auug.org.au> <20070221120145.419a03ee.sfr@canb.auug.org.au> <20070221141040.1807a368.sfr@canb.auug.org.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-arch-owner@vger.kernel.org To: Linus Torvalds Cc: Stephen Rothwell , Andrew Morton , David Woodhouse , linux-arch@vger.kernel.org, rmk@arm.linux.org.uk, tony.luck@intel.com, ralf@linux-mips.org List-ID: On Wed, 21 Feb 2007, Linus Torvalds wrote: > > > On Wed, 21 Feb 2007, Davide Libenzi wrote: > > > > I don't think we can safely assume that we can access a potentially > > 4-bytes aligned u64 on 64 bit architectures that require compat: > > > > put_user(ev.data, &events->data); > > 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. - Davide