LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-20-2010, 06:53 AM   #1
shankarvk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Question accessing stack of non-current task


Hi,

Is it possible for the kernel to access the user-stack data of a
task different from "current" ?

I thought the answer is "no". ( Kernel sees memory through the page-table of "current" )

But I found few places in kernel where this is done. ( eg: debug_rt_mutex_print_deadlock() in rtmutex-debug.c )

What is the explanation ?

thanks
 
Old 04-20-2010, 09:20 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
The kernel can do this, why not? The kernel is able to access all memory of user processes otherwise context switches would not be possible. The kernel runs in a different permission space than user programs (kernel space vs user space)

jlinkels
 
Old 04-28-2010, 05:33 AM   #3
shankarvk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
this answer is incorrect..
 
Old 04-28-2010, 05:45 AM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
So? What is the correct answer?

jlinkels
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Task bar no longer shows task Richard Rahl Linux - Newbie 3 04-12-2010 09:39 AM
single 8K process stack vs 4K process stack and a seperate 4K interrupt stack charvak Linux - Kernel 1 03-17-2010 06:58 PM
giving separate stack space for each task manas_sem Programming 2 03-01-2007 04:34 PM
How to get current stack usage phuna Programming 4 08-11-2005 09:25 PM
Accessing the task bar without a mouse superztnt Linux - Newbie 2 06-08-2004 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration