tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: prop_*_internalize and copyin/out for syscall ?



On Mon, Jan 17, 2011 at 09:32:11AM -0800, Matt Thomas wrote:
> 
> On Jan 17, 2011, at 9:00 AM, Manuel Bouyer wrote:
> 
> > On Mon, Jan 17, 2011 at 08:55:00AM -0800, Matt Thomas wrote:
> >> returning a proplib via sysctl has similar problems.  I want to use
> >> a proplib to retrieve the evcnts ...
> > 
> > sysctl is a special case of syscall, isn't it ?
> 
> Yes and no.  The proplib is return as a return of a MIB request so
> there's no dedicated argument to be unwrapped as in the the case
> of a syscall argument.  So the pref can't be hidden until you wrap
> the entire sysctl request in a convenience wrapper.

Yes, but as a result the struct pref * you get still contains
data that comes from a kernel copyout. So the functions I propose should
also be useable for this case.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index