Review Board 2.0.15


[se] Initialize Linux' default code and data segments

Review Request #1449 - Created Sept. 26, 2012 and updated

Information
Lluís Vilanova
gem5
Reviewers
Default
Applied to stable repository.

   
Review request changed
Updated (Oct. 23, 2012, 4:08 a.m.)

Change Summary:

Add missing bits in "X86_64LiveProcess::initState" by mimicking "I386LiveProcess::initState".

Diff:

Revision 3 (+108 -3)

Show changes

Posted (Oct. 28, 2012, 1:35 p.m.)
Lluís, can you comment on why we need to initialize the code and data segments?
What functionality gets enabled due to this initialization? Also, can you provide
some documentation on how you decided the values that are to be used for different
attributes being initialized?
  1. The purpose is to provide a default segment configuration for SE linux apps that mimics Linux' configuration. Given that the "modify_ldt" syscall is not available in SE mode, the patch is not that useful after all, so it could as well be dropped.
    
    Values in "process.cc" for "X86_64LiveProcess::initState" are taken from the already-existing code for "X86_32LiveProcess::initState". The rest of the "magic" numbers are taken from the appropriate headers in the Linux source (comments specify from which macros and files in Linux these values are taken from).
    
    Again, feel free to drop the patch.