thread-unsafety problems as spl*() ones are NOP

Slawa Olhovchenkov slw at zxy.spb.ru
Sat Jan 30 18:03:06 UTC 2016


On Sat, Jan 30, 2016 at 06:56:00PM +0330, mokhi wrote:

> Hi.
> in kbd.c there are many places spltty()/splx() used assuming it locks/unlocks.
> though there is bug filed for this, and ive asked in #bsddev, Ive
> preferred to ask and ensure it from here again.
> As these functions are obsoleted now, this assumption is incorrect and
> some places we have thread-unsafely which leads to security problems
> (and/or for example double-free, etc)
> 
> can i use mutex/spin/lock/unlock under where assumed a lock/unlock by
> using spltty()/splx() to patch it?

If other parts of kernel sources, locked by spltty()/splx(), don't
interacted by called function and accessed data.

Cuurently, in stable, spltty used in 27 files and splx in 101 files.


More information about the freebsd-current mailing list