From: James Hogan <james.hogan@imgtec.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
al Viro <viro@ZenIV.linux.org.uk>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: semantics of KSTK_ESP and friends
Date: Tue, 24 Feb 2015 12:01:55 +0000 [thread overview]
Message-ID: <54EC6833.6090709@imgtec.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA230756658D08C@IN01WEMBXB.internal.synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
Hi Vineet,
On 12/02/15 07:10, Vineet Gupta wrote:
> 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()
Judging by both these uses, it would be the task's user mode SP that is
desired. Same for KSTK_EIP by the looks of it. Well spotted!
I'll look into fixing Metag.
Cheers
James
>
> 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
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-02-24 12:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 7:10 semantics of KSTK_ESP and friends Vineet Gupta
2015-02-24 12:01 ` James Hogan [this message]
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=54EC6833.6090709@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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.