Date: Sat, 30 Jan 2016 21:02:56 +0300 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: mokhi <mokhi64@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: thread-unsafety problems as spl*() ones are NOP Message-ID: <20160130180256.GT37895@zxy.spb.ru> In-Reply-To: <CAByVWPWQJ1wP95S59SiWWBa0k9j2%2Bu1az-D04_V1voo99CxqCw@mail.gmail.com> References: <CAByVWPWuqdtZ-5p2%2BvGf4v%2BPjjCBkiTQSsZQ06vk-f=bx_TQrQ@mail.gmail.com> <CAByVWPWQJ1wP95S59SiWWBa0k9j2%2Bu1az-D04_V1voo99CxqCw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160130180256.GT37895>