tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Recent sysctl changes
On Wed, Mar 05, 2014 at 03:56:54PM -0500, Thor Lancelot Simon wrote:
> On Wed, Mar 05, 2014 at 08:55:50PM +0200, Andreas Gustafsson wrote:
> >
> > 2. I also object to the change of kern_sysctl.c 1.247.
> >
> > This change attempts to work around the problems caused by the changes
> > to the variable types by making sysctl() return different types
> > depending on the value of the *oldlenp argument.
>
> As I recall, we considered this approach before creating hw.physmem64,
> and decided it was just a little too cute.
>
> I don't actually know of any code that hands over a "wrong-size"
> buffer and will therefore break, though. Do you? I agree the
> possibility does exist.
I actually wonder if the code should also support single byte reads
for things like machdep.sse which are effectively booleans.
Maybe we should also allow 1, 4 and 8 byte reads for items declared
as booleans.
IIRC one of the arm ABIs uses 4 byte booleans - bound to be a cause
for confusion at some point.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index