[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54EC6833.6090709@imgtec.com>
Date: Tue, 24 Feb 2015 12:01:55 +0000
From: James Hogan <james.hogan@...tec.com>
To: Vineet Gupta <Vineet.Gupta1@...opsys.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
CC: Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
al Viro <viro@...IV.linux.org.uk>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: semantics of KSTK_ESP and friends
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
>
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists