Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262972AbUDSF2R (ORCPT ); Mon, 19 Apr 2004 01:28:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262963AbUDSF2R (ORCPT ); Mon, 19 Apr 2004 01:28:17 -0400 Received: from fw.osdl.org ([65.172.181.6]:58014 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262960AbUDSF2Q (ORCPT ); Mon, 19 Apr 2004 01:28:16 -0400 Date: Sun, 18 Apr 2004 22:28:11 -0700 (PDT) From: Linus Torvalds To: Jamie Lokier cc: chris@scary.beasts.org, akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: Nasty 2.6 sendfile() bug / regression; affects vsftpd In-Reply-To: <20040419004657.GD11064@mail.shareable.org> Message-ID: References: <20040419004657.GD11064@mail.shareable.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 960 Lines: 25 On Mon, 19 Apr 2004, Jamie Lokier wrote: > > Is there a reason why put_user() supports 1/2/4/8 bytes and get_user() > supports only 1/2/4 bytes? It's a bit more complicated to do get_user, mainly because we use a 64-bit value to pass the data around already on x86 - the "real data" in %eax, and the error code in %edx. So you'd need to have a slightly different calling convention for the 8-byte case, so it was more than just "duplicate the other cases". I agree that it's an ugly special case. get/put_user should really accept all the normal cases, and that includes 'u64'. Not a lot of code cares, though, so for now we've just had the special case. You are the first one to notice, I think. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/