Do not use widen_to_ulong in kexec.c and process_vm.c
Automatic argument truncation makes use of this function redundant. * kexec.c (SYS_FUNC(kexec_load)): Do not invoke widen_to_ulong. * process_vm.c (SYS_FUNC(process_vm_readv), SYS_FUNC(process_vm_writev)): Likewise.
This commit is contained in:
parent
6a360e2f3e
commit
552888b1ac
10
kexec.c
10
kexec.c
@ -81,16 +81,16 @@ print_kexec_segments(struct tcb *tcp, const unsigned long addr,
|
||||
SYS_FUNC(kexec_load)
|
||||
{
|
||||
/* entry, nr_segments */
|
||||
printaddr(widen_to_ulong(tcp->u_arg[0]));
|
||||
tprintf(", %lu, ", widen_to_ulong(tcp->u_arg[1]));
|
||||
printaddr(tcp->u_arg[0]);
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
|
||||
/* segments */
|
||||
print_kexec_segments(tcp, widen_to_ulong(tcp->u_arg[2]),
|
||||
widen_to_ulong(tcp->u_arg[1]));
|
||||
print_kexec_segments(tcp, tcp->u_arg[2],
|
||||
tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
|
||||
/* flags */
|
||||
unsigned long n = widen_to_ulong(tcp->u_arg[3]);
|
||||
unsigned long n = tcp->u_arg[3];
|
||||
printxval_long(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???");
|
||||
n &= ~(unsigned long) KEXEC_ARCH_MASK;
|
||||
if (n) {
|
||||
|
12
process_vm.c
12
process_vm.c
@ -34,9 +34,9 @@ SYS_FUNC(process_vm_readv)
|
||||
/* arg 1: pid */
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
} else {
|
||||
unsigned long local_iovcnt = widen_to_ulong(tcp->u_arg[2]);
|
||||
unsigned long remote_iovcnt = widen_to_ulong(tcp->u_arg[4]);
|
||||
unsigned long flags = widen_to_ulong(tcp->u_arg[5]);
|
||||
unsigned long local_iovcnt = tcp->u_arg[2];
|
||||
unsigned long remote_iovcnt = tcp->u_arg[4];
|
||||
unsigned long flags = tcp->u_arg[5];
|
||||
|
||||
/* arg 2: local iov */
|
||||
tprint_iov_upto(tcp, local_iovcnt, tcp->u_arg[1],
|
||||
@ -56,9 +56,9 @@ SYS_FUNC(process_vm_readv)
|
||||
|
||||
SYS_FUNC(process_vm_writev)
|
||||
{
|
||||
unsigned long local_iovcnt = widen_to_ulong(tcp->u_arg[2]);
|
||||
unsigned long remote_iovcnt = widen_to_ulong(tcp->u_arg[4]);
|
||||
unsigned long flags = widen_to_ulong(tcp->u_arg[5]);
|
||||
unsigned long local_iovcnt = tcp->u_arg[2];
|
||||
unsigned long remote_iovcnt = tcp->u_arg[4];
|
||||
unsigned long flags = tcp->u_arg[5];
|
||||
|
||||
/* arg 1: pid */
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user