From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: file offset corruption on 32-bit machines? Date: Mon, 14 Apr 2008 17:54:52 +0100 Message-ID: <20080414175452.27c3652d@core> References: <20080411135544.GG2160@csclub.uwaterloo.ca> <20080414162031.GD15824@duck.suse.cz> <20080414162202.GB7387@csclub.uwaterloo.ca> <20080414165354.GF15824@duck.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Lennart Sorensen , Bodo Eggert <7eggert@gmx.de>, Diego Calleja , Jiri Kosina , Michal Hocko , Meelis Roos , Linux Kernel list , linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:45227 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1758427AbYDNQ7S (ORCPT ); Mon, 14 Apr 2008 12:59:18 -0400 In-Reply-To: <20080414165354.GF15824@duck.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > Well, but imagine you have a file /proc/my_secret_file from which you > are able to read from position A:a and B:b but not from position > A:b. Concievably, checks for the file position could be bypassed because of > this race... I know this is kind of dumb example but I can imagine someone Unlikely as the ppos passed to the driver is a private copy and the user could equally use pread/pwrite to specify that offset.