LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Closed Thread
  Search this Thread
Old 06-11-2008, 10:44 AM   #1
heroma
LQ Newbie
 
Registered: Jun 2008
Posts: 20

Rep: Reputation: 0
Security of process’s data inside Critical Section(in locking)


I read Linux Kernel Development Second Edition By Robert Love. And in section Big Kernel Lock I found this:


lock_kernel();
/*
* Critical section, synchronized against all other BKL users...
* Note, you can safely sleep here and the lock will be transparently
* released. When you reschedule, the lock will be transparently
* reacquired. This implies you will not deadlock, but you still do
* not want to sleep if you need the lock to protect data here!
*/
unlock_kernel();
It is about kernel 2.6.10 and before it.
why process datas is not secure here? So what is the usage of locking the kernel? I thougt that when a process want to leave CPU temporary, it’s values save in a stack, before switch context.
This situation is like the situation that scheduler take BKL from a process after a timestamp (with release_kernel_lock(prev)) and take time to another process. If it is so, this situation is not safe for a process too. Is it true? What is the difference between this condition and others that a process leaves CPU?
Best regards
 
Old 06-11-2008, 10:56 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread once and in only one forum. (Please see the LQ Rules.) Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is closed because it is a duplicate of http://www.linuxquestions.org/questi...ocking-648575/.
 
  


Closed Thread



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
Security of process’s data inside Critical Section(in locking) heroma Programming 1 06-12-2008 04:12 AM
All these security problems in this section Bill Johns Linux - Security 11 04-30-2008 09:41 PM
LXer: Mozilla Issues 'Critical' Security Fixes LXer Syndicated Linux News 0 11-11-2006 02:03 AM
CRITICAL data recovery from ext2/3 partition dadim Linux - General 4 01-09-2006 07:26 PM
firefox 1.0.6 - critical security flaw slackhack Linux - Security 3 09-23-2005 01:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 12:18 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