Skip to main content
Quote the exact line which zeroes out the variables.
Source Link
Vilinkameni
  • 1.2k
  • 1
  • 5
  • 13

The fields are intentionally zeroed out. Quote fs/proc/array.c:

    /*
     * esp and eip are intentionally zeroed out.  There is no
     * non-racy way to read them without freezing the task.
     * Programs that need reliable values can use ptrace(2).
     *
     * The only exception is if the task is core dumping because
     * a program is not able to use ptrace(2) in that case. It is
     * safe because the task has stopped executing permanently.
     */
/*
 * esp and eip are intentionally zeroed out.  There is no
 * non-racy way to read them without freezing the task.
 * Programs that need reliable values can use ptrace(2).
 *
 * The only exception is if the task is core dumping because
 * a program is not able to use ptrace(2) in that case. It is
 * safe because the task has stopped executing permanently.
 */

This zeroing out can be seen at line 489 in the same file from the current Linux 6.10-rc2:

vsize = eip = esp = 0;

The fields are intentionally zeroed out. Quote fs/proc/array.c:

    /*
     * esp and eip are intentionally zeroed out.  There is no
     * non-racy way to read them without freezing the task.
     * Programs that need reliable values can use ptrace(2).
     *
     * The only exception is if the task is core dumping because
     * a program is not able to use ptrace(2) in that case. It is
     * safe because the task has stopped executing permanently.
     */

The fields are intentionally zeroed out. Quote fs/proc/array.c:

/*
 * esp and eip are intentionally zeroed out.  There is no
 * non-racy way to read them without freezing the task.
 * Programs that need reliable values can use ptrace(2).
 *
 * The only exception is if the task is core dumping because
 * a program is not able to use ptrace(2) in that case. It is
 * safe because the task has stopped executing permanently.
 */

This zeroing out can be seen at line 489 in the same file from the current Linux 6.10-rc2:

vsize = eip = esp = 0;
Source Link
Vilinkameni
  • 1.2k
  • 1
  • 5
  • 13

The fields are intentionally zeroed out. Quote fs/proc/array.c:

    /*
     * esp and eip are intentionally zeroed out.  There is no
     * non-racy way to read them without freezing the task.
     * Programs that need reliable values can use ptrace(2).
     *
     * The only exception is if the task is core dumping because
     * a program is not able to use ptrace(2) in that case. It is
     * safe because the task has stopped executing permanently.
     */