Re: CVS commit: src/sys/dev/pci

2016-11-16 Thread Michael
On Wed, 16 Nov 2016 22:05:19 +
"Michael Lorenz"  wrote:

> Module Name:  src
> Committed By: macallan
> Date: Wed Nov 16 22:05:19 UTC 2016
> 
> Modified Files:
>   src/sys/dev/pci: voyager.c
> 
> Log Message:
> add more plumbing to pass a clockframe around so pwmclock can work again
> 
> Hi nick!

My brainfart, not his. Message changed on the server:

pass clockframe aropund in voyager_intr()


Re: CVS commit: src/sys/compat/netbsd32

2016-11-16 Thread Rin Okuyama

On 2016/11/16 18:33, Michael van Elst wrote:

There is a slight twist.

If NTP isn't defined, the code will call the standard (64bit)
ioctl handler with the assumption that the arg uses the same
layout in 64bit and 32bit mode.

If the ioctl handler is builtin, it won't understand the ioctl either
and everything is fine. But if it is a loaded module, it might be
compiled with different NTP option and so the wrong routine is called.

Fortunately that's just theoretical because the module can't be loaded
when compiled differently (because it references ntp_adjtime). But
that is a different issue and might be solved in the future.

So I suggest to make the compat32 code handle CLOCK_NTP_ADJTIME even
when compiled with !NTP but just return ENOTTY.

N.B. clockctlioctl returns EINVAL for unrecognized ioctl commands,
it should also return ENOTTY.


Thank you for pointing out the possible failure. Your suggestion
sounds good to me.

Thanks,
Rin


Re: CVS commit: src/sys/compat/netbsd32

2016-11-16 Thread Michael van Elst
On Tue, Nov 15, 2016 at 07:44:52PM +0900, Rin Okuyama wrote:
> On 2016/11/15 19:26, Martin Husemann wrote:
> >On Tue, Nov 15, 2016 at 07:23:09PM +0900, Rin Okuyama wrote:
> >>This results in build failure for most ARM environments:
> >>
> >>  http://releng.netbsd.org/builds/HEAD/201611140950Z/
> >>
> >>I think that NTP stuff should be protected by "#ifdef NTP".
> >>Can I commit the attached patch?
> >
> >Sounds good, but don't you need to add #include "opt_ntp.h" to
> >netbsd32_ioctl.c ?
> 
> Thank you so much! I added this. Otherwise, NTP kernel gets
> broken this time...

There is a slight twist.

If NTP isn't defined, the code will call the standard (64bit)
ioctl handler with the assumption that the arg uses the same
layout in 64bit and 32bit mode.

If the ioctl handler is builtin, it won't understand the ioctl either
and everything is fine. But if it is a loaded module, it might be
compiled with different NTP option and so the wrong routine is called.

Fortunately that's just theoretical because the module can't be loaded
when compiled differently (because it references ntp_adjtime). But
that is a different issue and might be solved in the future.

So I suggest to make the compat32 code handle CLOCK_NTP_ADJTIME even
when compiled with !NTP but just return ENOTTY.

N.B. clockctlioctl returns EINVAL for unrecognized ioctl commands,
it should also return ENOTTY.


Greetings,
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."