This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Whacky ia64: linux_proc_xfer_partial and lseek vs pread64
On Fri, Feb 10, 2006 at 08:00:23PM +0100, Andreas Schwab wrote:
> Daniel Jacobowitz <drow@false.org> 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