Re: cvs commit: src/sys/kern kern_sysctl.c

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Sun, 5 Oct 2003 03:41:11 -0700 (PDT)
On  5 Oct, Bruce M Simpson wrote:
> bms         2003/10/05 02:37:47 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/kern             kern_sysctl.c 
>   Log:
>   Fix a security problem in sysctl() the long way round.
>   
>   Use pre-emption detection to avoid the need for wiring a userland buffer
>   when copying opaque data structures.
>   
>   sysctl_wire_old_buffer() is now a no-op. Other consumers of this
>   API should use pre-emption detection to notice update collisions.

There are a number of consumers of sysctl_wire_old_buffer() that use it
to avoid blocking while holding a mutex.  In general they call
SYSCTL_OUT() multiple times while traversing a data structure.  They
probably should have been fixed before neutering
sysctl_wire_old_buffer().
Received on Sun Oct 05 2003 - 03:41:24 UTC