Home
last modified time | relevance | path

Searched refs:process_id (Results 1 – 5 of 5) sorted by relevance

/platform_testing/utils/shell-as/
Dcontext.cpp54 bool ParseProcStatusFile(const pid_t process_id, uid_t* real_user_id, in ParseProcStatusFile() argument
58 std::string("/proc/") + std::to_string(process_id) + "/status"; in ParseProcStatusFile()
89 bool SecurityContextFromProcess(const pid_t process_id, in SecurityContextFromProcess() argument
92 if (getpidcon(process_id, &selinux_context) != 0) { in SecurityContextFromProcess()
93 std::cerr << "Unable to obtain SELinux context from process " << process_id in SecurityContextFromProcess()
98 cap_t capabilities = cap_get_pid(process_id); in SecurityContextFromProcess()
100 std::cerr << "Unable to obtain capability set from process " << process_id in SecurityContextFromProcess()
108 if (!ParseProcStatusFile(process_id, &user_id, &group_id, in SecurityContextFromProcess()
111 << process_id << std::endl; in SecurityContextFromProcess()
Delf-utils.cpp38 bool GetElfEntryPoint(const pid_t process_id, uint64_t* entry_address, in GetElfEntryPoint() argument
41 std::string exe_path = "/proc/" + std::to_string(process_id) + "/exe"; in GetElfEntryPoint()
44 std::cerr << "Unable to open executable of process " << process_id in GetElfEntryPoint()
53 std::cerr << "Unable to read executable of process " << process_id in GetElfEntryPoint()
Dexecute.cpp231 bool SetProgramCounter(const pid_t process_id, uint64_t program_counter) { in SetProgramCounter() argument
236 if (ptrace(PTRACE_GETREGSET, process_id, 1, &registers_iovec) != 0) { in SetProgramCounter()
240 if ((ptrace(PTRACE_SETREGSET, process_id, 1, &registers_iovec)) != 0) { in SetProgramCounter()
246 bool StepToEntryPoint(const pid_t process_id) { in StepToEntryPoint() argument
249 if (!GetElfEntryPoint(process_id, &entry_address, &is_arm_mode)) { in StepToEntryPoint()
276 ReadChildMemory(process_id, entry_address, backup.get(), trap_code_size); in StepToEntryPoint()
277 WriteChildMemory(process_id, entry_address, trap_code.get(), trap_code_size); in StepToEntryPoint()
278 ptrace(PTRACE_CONT, process_id, NULL, NULL); in StepToEntryPoint()
280 waitpid(process_id, &status, 0); in StepToEntryPoint()
289 if (!SetProgramCounter(process_id, entry_address)) { in StepToEntryPoint()
[all …]
Delf-utils.h31 bool GetElfEntryPoint(const pid_t process_id, uint64_t* entry_address,
Dcontext.h61 bool SecurityContextFromProcess(pid_t process_id, SecurityContext* context);