From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4667 invoked by alias); 10 Feb 2006 19:06:23 -0000 Received: (qmail 4632 invoked by uid 22791); 10 Feb 2006 19:06:22 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 10 Feb 2006 19:06:21 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F7daz-00080B-Dx; Fri, 10 Feb 2006 14:06:17 -0500 Date: Fri, 10 Feb 2006 19:06:00 -0000 From: Daniel Jacobowitz To: Andreas Schwab Cc: David Lecomber , gdb Subject: Re: Whacky ia64: linux_proc_xfer_partial and lseek vs pread64 Message-ID: <20060210190617.GA30740@nevyn.them.org> Mail-Followup-To: Andreas Schwab , David Lecomber , gdb References: <1139591736.3780.26.camel@cpc2-oxfd8-0-0-cust771.oxfd.cable.ntl.com> <20060210181441.GA29255@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00089.txt.bz2 On Fri, Feb 10, 2006 at 08:00:23PM +0100, Andreas Schwab wrote: > Daniel Jacobowitz writes: > > > On Fri, Feb 10, 2006 at 07:04:51PM +0100, Andreas Schwab wrote: > >> pread and lseek with SEEK_SET do not allow negative offsets. lseek on > >> /proc/$$/mem is a special exception. > > > > Uh-oh. Should pread have the same exception, or must we fall back to > > lseek? > > pread fails upfront with offset < 0, whereas lseek lets the filesystem > llseek function decide. But a fallback wouldn't help here anyway, because > you can't read the vdso memory with read, only with ptrace. Fascinating. That definitely seems like a kernel bug to me; why not? I see some magic bits in the kernel ptrace support to read backing stores, which are obviously going to get fouled up by pread support. But I don't see anything that would affect the vDSO. -- Daniel Jacobowitz CodeSourcery