Lowercase SCNO_IN_RANGE and SCNO_IS_VALID
* defs.h (SCNO_IN_RANGE): Rename to scno_in_range. All callers updated. (SCNO_IS_VALID): Rename to scno_is_valid. All callers updated.
This commit is contained in:
parent
832fd63fc4
commit
ae39bba347
5
count.c
5
count.c
@ -53,14 +53,13 @@ count_syscall(struct tcb *tcp, const struct timeval *syscall_exiting_tv)
|
||||
struct timeval wtv;
|
||||
struct timeval *tv = &wtv;
|
||||
struct call_counts *cc;
|
||||
unsigned long scno = tcp->scno;
|
||||
|
||||
if (!SCNO_IN_RANGE(scno))
|
||||
if (!scno_in_range(tcp->scno))
|
||||
return;
|
||||
|
||||
if (!counts)
|
||||
counts = xcalloc(nsyscalls, sizeof(*counts));
|
||||
cc = &counts[scno];
|
||||
cc = &counts[tcp->scno];
|
||||
|
||||
cc->calls++;
|
||||
if (syserror(tcp))
|
||||
|
6
defs.h
6
defs.h
@ -879,7 +879,7 @@ extern struct fault_opts *fault_vec[SUPPORTED_PERSONALITIES];
|
||||
|
||||
/* Checks that sysent[scno] is not out of range. */
|
||||
static inline bool
|
||||
SCNO_IN_RANGE(unsigned long scno)
|
||||
scno_in_range(unsigned long scno)
|
||||
{
|
||||
return scno < nsyscalls;
|
||||
}
|
||||
@ -890,9 +890,9 @@ SCNO_IN_RANGE(unsigned long scno)
|
||||
* and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set.
|
||||
*/
|
||||
static inline bool
|
||||
SCNO_IS_VALID(unsigned long scno)
|
||||
scno_is_valid(unsigned long scno)
|
||||
{
|
||||
return SCNO_IN_RANGE(scno)
|
||||
return scno_in_range(scno)
|
||||
&& sysent[scno].sys_func
|
||||
&& !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ arch_get_scno(struct tcb *tcp)
|
||||
* Do some sanity checks to figure out if it's
|
||||
* really a syscall entry
|
||||
*/
|
||||
if (!SCNO_IN_RANGE(scno)) {
|
||||
if (!scno_in_range(scno)) {
|
||||
if (alpha_a3 == 0 || alpha_a3 == -1) {
|
||||
if (debug_flag)
|
||||
error_msg("stray syscall exit: r0 = %ld", scno);
|
||||
|
@ -72,7 +72,7 @@ arch_get_scno(struct tcb *tcp)
|
||||
* Do some sanity checks to figure out
|
||||
* whether it's really a syscall entry.
|
||||
*/
|
||||
if (arm_regs.ARM_ip && !SCNO_IN_RANGE(scno)) {
|
||||
if (arm_regs.ARM_ip && !scno_in_range(scno)) {
|
||||
if (debug_flag)
|
||||
error_msg("pid %d stray syscall exit:"
|
||||
" ARM_ip = %ld, scno = %ld",
|
||||
|
@ -4,7 +4,7 @@ arch_get_scno(struct tcb *tcp)
|
||||
{
|
||||
tcp->scno = mips_REG_V0;
|
||||
|
||||
if (!SCNO_IN_RANGE(tcp->scno)) {
|
||||
if (!scno_in_range(tcp->scno)) {
|
||||
if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
|
||||
if (debug_flag)
|
||||
error_msg("stray syscall exit: v0 = %ld",
|
||||
|
@ -407,7 +407,7 @@ decode_ipc_subcall(struct tcb *tcp)
|
||||
static void
|
||||
decode_mips_subcall(struct tcb *tcp)
|
||||
{
|
||||
if (!SCNO_IS_VALID(tcp->u_arg[0]))
|
||||
if (!scno_is_valid(tcp->u_arg[0]))
|
||||
return;
|
||||
tcp->scno = tcp->u_arg[0];
|
||||
tcp->qual_flg = qual_flags(tcp->scno);
|
||||
@ -553,7 +553,7 @@ struct fault_opts *fault_vec[SUPPORTED_PERSONALITIES];
|
||||
static struct fault_opts *
|
||||
tcb_fault_opts(struct tcb *tcp)
|
||||
{
|
||||
return (SCNO_IN_RANGE(tcp->scno) && tcp->fault_vec[current_personality])
|
||||
return (scno_in_range(tcp->scno) && tcp->fault_vec[current_personality])
|
||||
? &tcp->fault_vec[current_personality][tcp->scno] : NULL;
|
||||
}
|
||||
|
||||
@ -1213,7 +1213,7 @@ get_scno(struct tcb *tcp)
|
||||
if (rc != 1)
|
||||
return rc;
|
||||
|
||||
if (SCNO_IS_VALID(tcp->scno)) {
|
||||
if (scno_is_valid(tcp->scno)) {
|
||||
tcp->s_ent = &sysent[tcp->scno];
|
||||
tcp->qual_flg = qual_flags(tcp->scno);
|
||||
} else {
|
||||
@ -1278,5 +1278,5 @@ syscall_name(long scno)
|
||||
if (current_personality == X32_PERSONALITY_NUMBER)
|
||||
scno &= ~__X32_SYSCALL_BIT;
|
||||
#endif
|
||||
return SCNO_IS_VALID(scno) ? sysent[scno].sys_name: NULL;
|
||||
return scno_is_valid(scno) ? sysent[scno].sys_name: NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user