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

From: Ian Lepore <ian_at_freebsd.org>
Date: Sat, 30 Jan 2016 14:09:35 -0700
On Sat, 2016-01-30 at 18:56 +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?
> 
> Thanks, Mokhi.

If you start working on locking in keyboard drivers you might discover
there are dragons there.  For example...

https://lists.freebsd.org/pipermail/svn-src-head/2014-March/056833.html

-- Ian
Received on Sat Jan 30 2016 - 20:09:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:02 UTC