Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264228AbUDSArE (ORCPT ); Sun, 18 Apr 2004 20:47:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264231AbUDSArE (ORCPT ); Sun, 18 Apr 2004 20:47:04 -0400 Received: from mail.shareable.org ([81.29.64.88]:52131 "EHLO mail.shareable.org") by vger.kernel.org with ESMTP id S264228AbUDSArC (ORCPT ); Sun, 18 Apr 2004 20:47:02 -0400 Date: Mon, 19 Apr 2004 01:46:57 +0100 From: Jamie Lokier To: Linus Torvalds Cc: chris@scary.beasts.org, akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: Nasty 2.6 sendfile() bug / regression; affects vsftpd Message-ID: <20040419004657.GD11064@mail.shareable.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 721 Lines: 21 Looking at related code, sys_sendfile64 a few lines down. if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t)))) return -EFAULT; if (unlikely(put_user(pos, offset))) return -EFAULT; It seems odd that put_user() is used to write an 8-byte value, but get_user() cannot be used read one. I looked in and indeed the asymmetry is there. Is there a reason why put_user() supports 1/2/4/8 bytes and get_user() supports only 1/2/4 bytes? -- Jamie - 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/