Re: [Linux-ia64] /proc/pid/mem and stack variables

From: David Mosberger <>
Date: 2001-01-18 13:48:11
>>>>> On Mon, 15 Jan 2001 18:57:56 +0100 (MET), Erich Focht <> said:

  Erich> A small patch for the file fs/proc/base.c implementing llseek for
  Erich> /proc/PID/mem is appended. It's the same as for /dev/kmem therefore it
  Erich> does only SEEK_SET and SEEK_CUR, not SEEK_END. 

Thanks for the patch, I applied it to my tree and will work on getting
it into Linus's tree.

  Erich> It works for reading from stack pages, positioning is ok but the return
  Erich> value is -1 (which is wrong). Probably because the offsets seem to be
  Erich> negative... Can anybody please tell me why I'm getting the -1 error return
  Erich> though I should get back the huge negative offset?

I added a force_successful_syscall_return() to ensure that a succesful
lseek() returning a "negative" value isn't mistaken as an error.  I
did the same to memory_lseek() in drivers/char/mem.c.  This should
avoid the problem you were seeing.

Received on Wed Jan 17 18:51:22 2001

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:01 EST