Use the entire word in ptrace_get_vec_len() and ptrace_read_vec().

For compat binaries, use the upper 32-bits as the next word instead
of calling ptrace(2) to get it.  This reduces the number of ptrace(2)
calls when reading argv and envp for compat binaries.
This commit is contained in:
Todd C. Miller
2022-05-09 10:09:30 -06:00
parent c9a481506d
commit f82aa334cc
2 changed files with 49 additions and 26 deletions

View File

@@ -231,8 +231,7 @@ struct sudo_ptrace_regs {
struct compat_user_pt_regs compat;
#endif
} u;
unsigned long wordsize;
unsigned long addrmask;
unsigned int wordsize;
bool compat;
};