-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathREADME
More file actions
19 lines (13 loc) · 689 Bytes
/
README
File metadata and controls
19 lines (13 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Overview:
mlockall_agent is a simple JVMTI agent that runs a small piece of code at JVM start time.
This code does the following:
- Raises the current process's resource limit for locked memory
- Calls mlockall() to lock all current and future allocations in wired memory
- Sets the current userid and group list to match a target user
- Continues on JVM initialization
Usage:
Simply add the following JVM argument to the Java command line:
-agentpath:/path/to/libmlockall_agent.so=user=target_user_for_setuid
Then, run the Java process as root.
If the Java command line is obscured within a script, you can also use the JAVA_TOOL_OPTIONS
environment variable for the same effect.