Allow disabling ASLR via DISABLE_ASLR environment variable
* VMAddressSpace: Add randomizingEnabled property. * VMUserAddressSpace: Randomize addresses only when randomizingEnabled property is set. * create_team_arg(): Check, if the team's environment contains "DISABLE_ASLR=1". Set the team's address space property randomizingEnabled accordingly in load_image_internal() and exec_team().
This commit is contained in:
@@ -61,6 +61,11 @@ public:
|
||||
void IncrementChangeCount()
|
||||
{ fChangeCount++; }
|
||||
|
||||
inline bool IsRandomizingEnabled() const
|
||||
{ return fRandomizingEnabled; }
|
||||
inline void SetRandomizingEnabled(bool enabled)
|
||||
{ fRandomizingEnabled = enabled; }
|
||||
|
||||
inline AreaIterator GetAreaIterator();
|
||||
|
||||
VMAddressSpace*& HashTableLink() { return fHashTableLink; }
|
||||
@@ -143,6 +148,7 @@ protected:
|
||||
int32 fFaultCount;
|
||||
int32 fChangeCount;
|
||||
VMTranslationMap* fTranslationMap;
|
||||
bool fRandomizingEnabled;
|
||||
bool fDeleting;
|
||||
static VMAddressSpace* sKernelAddressSpace;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user