Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2004 15:30:06 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        alfred@FreeBSD.org
Cc:        jhb@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_subr.c
Message-ID:  <200410122230.i9CMU6dv073297@gw.catspoiler.org>
In-Reply-To: <20041012221950.GT38364@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 Oct, Alfred Perlstein wrote:
> * Don Lewis <truckman@FreeBSD.org> [041012 15:17] wrote:
>> On 12 Oct, Alfred Perlstein wrote:
>> > I like this, my only concern is that there may be places that
>> > call this with locks held but with the kernel/user buffer wired
>> > so that it can't fault.
>> > 
>> > Are you sure this isn't the case?  (specifically for some sysctls)
>> 
>> There are a number of sysctl handlers where I added code to wire the
>> buffer so that there was no danger of sleeping while a mutex is held.
>> Allocating a kernel buffer and doing an extra copy would be ugly.
> 
> Yup.  Maybe an auxilliary uio_move_wired() that doesn't do this
> check?

As I mentioned in my followup message, the sysctl handlers don't use
uiomove().  This might be a good idea for copyin() and copyout(), where
the _wired versions would check to see if the memory was actually wired.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410122230.i9CMU6dv073297>