Re: reading process memory

2006-06-08 Thread Tofik Suleymanov
David Nugent wrote: Tofik Suleymanov wrote: Thank you for brief and altogether extensive explanation of the case.The thing i wanted to do is to read let's say portions of memory where .bss and .data block of a running program reside. is that possible ? Yes. Debuggers offer this

Re: reading process memory

2006-06-08 Thread Tofik Suleymanov
Diomidis Spinellis wrote: Tofik Suleymanov wrote: The only way you're going to be able to read another processes address space is in the kernel.Even a process running as root is not able to read another process's data. Incorrect; see this example: $ sed -e 's/this/that/' [1] 87345 $

Re: reading process memory

2006-06-08 Thread Tofik Suleymanov
David Nugent wrote: Tofik Suleymanov wrote: Thank you for brief and altogether extensive explanation of the case.The thing i wanted to do is to read let's say portions of memory where .bss and .data block of a running program reside. is that possible ? Yes. Debuggers offer this

Re: reading process memory

2006-06-08 Thread Diomidis Spinellis
Tofik Suleymanov wrote: Diomidis Spinellis wrote: Tofik Suleymanov wrote: The only way you're going to be able to read another processes address space is in the kernel.Even a process running as root is not able to read another process's data. Incorrect; see this example: $ sed -e

Re: reading process memory

2006-06-08 Thread Tofik Suleymanov
Diomidis Spinellis wrote: Tofik Suleymanov wrote: Diomidis Spinellis wrote: Tofik Suleymanov wrote: The only way you're going to be able to read another processes address space is in the kernel.Even a process running as root is not able to read another process's data. Incorrect; see this

Re: reading process memory

2006-06-08 Thread Tofik Suleymanov
David Nugent wrote: Tofik Suleymanov wrote: Thank you for brief and altogether extensive explanation of the case.The thing i wanted to do is to read let's say portions of memory where .bss and .data block of a running program reside. is that possible ? Yes. Debuggers offer this

Re: reading process memory

2006-06-08 Thread Dmitry Pryanishnikov
Hello! On Wed, 7 Jun 2006, Tofik Suleymanov wrote: I believe that it is possible to read contents of the memory used/utilized by a process (assuming right privileges). Yes, procfs allows it to user with the process's UID (or root). First i've tried to do this through procfs by reading

reading process memory

2006-06-07 Thread Tofik Suleymanov
Hello, folks I believe that it is possible to read contents of the memory used/utilized by a process (assuming right privileges). First i've tried to do this through procfs by reading 'mem' property of the given process, but no success. Maybe there is another way of doing such things ? Any

Re: reading process memory

2006-06-07 Thread James Riendeau
How are you defining assuming right privileges? The only way you're going to be able to read another processes address space is in the kernel. Even a process running as root is not able to read another process's data. One of the principle responsibilities of the OS is to manage the

Re: reading process memory

2006-06-07 Thread Tofik Suleymanov
James Riendeau wrote: How are you defining assuming right privileges? assuming uid 0 The only way you're going to be able to read another processes address space is in the kernel.Even a process running as root is not able to read another process's data. how does gdb then reads for example

Re: reading process memory

2006-06-07 Thread Diomidis Spinellis
Tofik Suleymanov wrote: The only way you're going to be able to read another processes address space is in the kernel.Even a process running as root is not able to read another process's data. Incorrect; see this example: $ sed -e 's/this/that/' [1] 87345 $ /bin/su Password: # dd

Re: reading process memory

2006-06-07 Thread David Nugent
Tofik Suleymanov wrote: Thank you for brief and altogether extensive explanation of the case.The thing i wanted to do is to read let's say portions of memory where .bss and .data block of a running program reside. is that possible ? Yes. Debuggers offer this functionality, for example. man