Re: Compat sysinfo syscall (kernel/sys.c) relying on undefined behavior?

2014-09-03 Thread Clemens Ladisch
Scotty Bauer wrote: > In the compat version of sysinfo, kernel/sys.c we see the following: > > /* Check to see if any memory value is too large for 32-bit and scale > * down if needed > */ > if ((s.totalram >> 32) || (s.totalswap >> 32)) { This code is supposed to check if any

Re: Compat sysinfo syscall (kernel/sys.c) relying on undefined behavior?

2014-09-03 Thread Clemens Ladisch
Scotty Bauer wrote: In the compat version of sysinfo, kernel/sys.c we see the following: /* Check to see if any memory value is too large for 32-bit and scale * down if needed */ if ((s.totalram 32) || (s.totalswap 32)) { This code is supposed to check if any of the

Compat sysinfo syscall (kernel/sys.c) relying on undefined behavior?

2014-09-02 Thread Scotty Bauer
am getting acquainted with the linux kernel and to do so I've been browsing the source. In the compat version of sysinfo, kernel/sys.c we see the following: COMPAT_SYSCALL_DEFINE1(sysinfo, struct compat_sysinfo __user *, info) { struct sysinfo s; do_sysinfo(); /* Check to see if

Compat sysinfo syscall (kernel/sys.c) relying on undefined behavior?

2014-09-02 Thread Scotty Bauer
am getting acquainted with the linux kernel and to do so I've been browsing the source. In the compat version of sysinfo, kernel/sys.c we see the following: COMPAT_SYSCALL_DEFINE1(sysinfo, struct compat_sysinfo __user *, info) { struct sysinfo s; do_sysinfo(s); /* Check to see