LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-12-2016, 08:29 AM   #1
tsenthilnath
LQ Newbie
 
Registered: Aug 2016
Posts: 12

Rep: Reputation: Disabled
Marking a page read-only (because of kexec segments being corrupted)


Hello all,

We are facing a strange corruption of the segment which is loaded using kexec command.

The steps which are we following is this
- Loading a new kernel using "kexec -l" command and then
- We are doing many proprietary shutdowns of the devices and finally we are executing
- "kexec -e" to jump to the new kernel.

Between the "kexec -l" and "kexec -e" our proprietary code is going and corrupting the loaded the segments and hence we couldn't successfully execute the new kernel (the system is hung not even early debugs are printed from the new kernel). But if we execute "kexec -e" immediately after "kexec -l" the new kernel executes perfectly.

In order to find who is the culprit, I want to mark the pages which are allocated as part of segment loading as read-only(after copying the content), so that if someone tries to write it throws an exception and we can catch it easily. To do that I want to mark the pages which are returned by alloc_pages(GFP_HIGHUSER, 0) as read-only after the required content is copied.

Could you please let me know how to do this ?

Thanks,
Senthil
 
Old 10-14-2016, 09:51 AM   #2
tsenthilnath
LQ Newbie
 
Registered: Aug 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Can someone throw a light on this ?

Thanks,
Senthil
 
  


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
Thread/Forum Read Marking jeremy LQ Suggestions & Feedback 128 01-08-2012 11:24 AM
SUGGESTION - Marking threads as read worm5252 LQ Suggestions & Feedback 6 12-28-2009 03:26 PM
Exim not marking messages as read birdseye Linux - General 1 11-30-2005 01:01 PM

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

All times are GMT -5. The time now is 05:12 AM.

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