linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* semantics of KSTK_ESP and friends
@ 2015-02-12  7:10 Vineet Gupta
  2015-02-24 12:01 ` James Hogan
  0 siblings, 1 reply; 2+ messages in thread
From: Vineet Gupta @ 2015-02-12  7:10 UTC (permalink / raw)
  To: linux-arch@vger.kernel.org, james Hogan; +Cc: Alexey Brodkin, al Viro, lkml

Hi,

Is KSTK_ESP supposed to return the kernel mode SP of a sleeping task or is it supposed to provide the user mode SP at the time of last kernel entry ?

The 2 non arch users of the API expect the user mode SP semantics:
* vm_is_stack_for_task() - to annotate /proc/<pid>/maps stack vma - which is shere Alexey noted this.
* do_task_stat()

ARC port uses these for unwinding the task of a sleeping task (hence kernel mode SP semantics).
metag (from the looks of it) also seem to provide kernel mode value, while most others seem to provide the user mode variant.

 I can fix ARC to work with expectation of generic code, but wanted to understand anyways.

Thx,
-Vineet

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-24 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12  7:10 semantics of KSTK_ESP and friends Vineet Gupta
2015-02-24 12:01 ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).