Re: Lemote Yeeloong observations
Martin Husemann <[email protected]> Fri, 11 May 2012 09:11:41 +0200
| Newsgroups | gmane.os.netbsd.ports.evbmips |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 11, 2012 at 12:52:49AM -0500, John D. Baker wrote:
> Searching for EINVAL revealed calls to netbsd32_ioctl() with commands
> "CLOCKCTL_CLOCK_SETTIME", "CLOCKCTL_SETTIMEOFDAY", and "_IOWR" as
> failing in this way. A few lines earlier, ioctl() calls with command
> "CLOCKCTL_NTP_ADJTIME" fails with EFAULT. Alignment issues?
This seems strange, the address should be that of a global variable in ntpd,
and thus should be properly aligned.
Could you instrument the code in src/sys/compat/netbsd32/netbsd32_time.c
and see if the EFAULT comes from the return (error); in line 155 and print
the pointer value?
Something like:
if ((error = copyin(SCARG_P32(uap, tp), &ntv32, sizeof(ntv32)))) {
printf("error %d pointer %p\n", error, (void*)SCARG_P32(uap, tp));
return error;
}
Martin