(value)
| 1076 | |
| 1077 | @staticmethod |
| 1078 | def SetASLR(value): |
| 1079 | try: |
| 1080 | with open('/proc/sys/kernel/randomize_va_space', 'w') as f: |
| 1081 | f.write(str(value)) |
| 1082 | except Exception: |
| 1083 | logging.exception( |
| 1084 | 'Failed to update ASLR to %s. Are we running under sudo?', value) |
| 1085 | raise |
| 1086 | |
| 1087 | new_value = CustomMachineConfiguration.GetASLR() |
| 1088 | if value != new_value: |
| 1089 | raise Exception('Present value is %s' % new_value) |
| 1090 | |
| 1091 | @staticmethod |
| 1092 | def GetCPUCoresRange(): |