The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Mihai Donțu" <mihai.dontu@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: my first post
Date: Wed, 17 Jul 2013 13:05:39 +0300	[thread overview]
Message-ID: <20130717130539.557c4f62@mdontu-l> (raw)
In-Reply-To: <000d01ce82b4$2d9c1150$88d433f0$@com>

On Wed, 17 Jul 2013 14:09:20 +0800 merrysoft@tom.com wrote:
> I have meeted a problem with linux kernel 2.6.X.X that my user app
> wants to get thread kernel stack frame ponter(FP) from user space by
> system call or /proc system or any other ways except driver. I do not
> want to write a driver,) to finish it. I have endured this problem
> for a long time.
> 
> would anyone please to give me a hint to solve the problem.
> 

(I'm ignoring the questionable practicality of this)

People have gone to great lengths not to reveal sensitive addresses
from ring 0, %rsp/%rbp being subject to this restriction. If you
configure your kernel to expose full /dev/mem (CONFIG_STRICT_DEVMEM=n),
then using the image for your running kernel and with a bit of DWARF
knowledge, I _think_ it's possible to list the current running threads
and their contexts (ie. CPU registers). Otherwise, I don't believe
there's any way you can achieve this, other than exploiting a bug. :-)

-- 
Mihai Donțu

      reply	other threads:[~2013-07-17 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  6:09 my first post bob
2013-07-17 10:05 ` Mihai Donțu [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=20130717130539.557c4f62@mdontu-l \
    --to=mihai.dontu@gmail.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox