All of lore.kernel.org
 help / color / mirror / Atom feed
From: anupam.kapoor@gmail.com (anupam kapoor)
To: kernelnewbies@lists.kernelnewbies.org
Subject: userspace stack start and end
Date: Mon, 28 Jul 2014 09:21:34 +0530	[thread overview]
Message-ID: <874my2gmyh.fsf@gmail.com> (raw)
In-Reply-To: <CA+JLOiu44fBorVE4QaY2wVa_6KvJxiWE-G7nSm060v3nVNPdVQ@mail.gmail.com> (Xin Tong's message of "Sun, 27 Jul 2014 22:35:22 -0500")

>>>>> [Sun, 27 Jul 2014 22:35:22 -0500]: "Xin Tong" (xin-tong):

,----[ xin-tong ]
| where is user:stack-segment-size defined ? 
`----
that is computable once again :) (assuming x86, and 1+3 split)
  user:stack-segment-size = ((unsigned long)(0xc0000000 - user:start-stack)) >> PAGE_SHIFT

kind regards
anupam

    
,----[ anupam ]
| ,----[ xin-tong ]
| | I am trying to find the start and end address of the userspace
| stack.
| | I see in the task_struct there is start_stack. But I could not
| find
| | end_start anywhere in the kernel code ?
| |
| | Can someone please tell me how to find the end of the stack ?
| 
| `----
| but that should be computable right e.g.
| user:stack-end = user:stack-start + user:stack-segment-size *
| number-of-pages
`----

  reply	other threads:[~2014-07-28  3:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-27 16:52 userspace stack start and end Xin Tong
2014-07-28  3:32 ` anupam kapoor
2014-07-28  3:35   ` Xin Tong
2014-07-28  3:51     ` anupam kapoor [this message]
2014-07-29  0:44       ` Xin Tong
2014-08-01 16:22 ` Peter Teoh
2014-08-01 16:31   ` Peter Teoh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874my2gmyh.fsf@gmail.com \
    --to=anupam.kapoor@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.