From owner-freebsd-current@freebsd.org Sat Jan 30 15:26:03 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35C40A732E6 for ; Sat, 30 Jan 2016 15:26:03 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4AA71F00 for ; Sat, 30 Jan 2016 15:26:02 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: by mail-lb0-x232.google.com with SMTP id cl12so55011685lbc.1 for ; Sat, 30 Jan 2016 07:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=35Z+FDbJXJqs3dbTvo66bHV4nQS86beU+Z6BZd+e2Lk=; b=K8T5ZghlntxMqy7iLOGrGj4vaElP6AsaO1kpu2NPZ5Irnob6gqPqgeNRASFk/QkTeT /8HSMIyjux+aKjqUOe711iFDy4R5ctZixQtBNFnd3MUekepHDLYWr50mrENH9lfLmzXt 0mIVMmpPNfRuz5t7JevZiG+zgACv7mHbVKWb2bgz5tt6IDFSuK/hzW4LZblf4YROgr4z mYT7NpHCma8TuR19/nWaKonYdRCcSD0DZmFqsN0UOCXgzX+MZzMHpOEtJE96IwFADIOd /Yi5ZYq1kXSbEkbCWpRag936HO6vT5EvNw2FBDpdE2U0f2tDiqCXxu6P/OXpYYN2981D +PNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=35Z+FDbJXJqs3dbTvo66bHV4nQS86beU+Z6BZd+e2Lk=; b=Lme4WqY+OewFJv0J/XX5361iPL1EEkrB4EtCymkPDnhTL37nxoMrgGF4saNRhScSNv MFpTA++lVBXTCaC5ghS6G9BaDLBfTXfyW4+eQHVSFF0chZllZaPwzCfTtYPKHUMA/v6H qLTmBVnThv0CFUuo3HPiqS3DfcHCadrW612v9UScNLKfwzg/JvNI/OEIW2VHVwQe+Bsz 0839bK/CMnI/XJgKDm2olh8Pdt5uE7twpoZZ5En9Iay4NoIRZ/WcKuZMTHI/YevlzKz7 Dmm5zb3nkYB2ILOy3mS/+q2kGLL2+RXsJu/fLTgAxWUEAZVTUm3t/h3LIP10J0i9PkQQ gkSA== X-Gm-Message-State: AG10YOR78puYcAL7nfjQp4zObGVSEl8eoy6o4fAwQVVSs2cd+Uigpo7LUhG4OHeNtiLVQ8k4mUToQgKIp7KQzw== MIME-Version: 1.0 X-Received: by 10.112.144.38 with SMTP id sj6mr5356369lbb.104.1454167560912; Sat, 30 Jan 2016 07:26:00 -0800 (PST) Received: by 10.25.139.68 with HTTP; Sat, 30 Jan 2016 07:26:00 -0800 (PST) In-Reply-To: References: Date: Sat, 30 Jan 2016 18:56:00 +0330 Message-ID: Subject: thread-unsafety problems as spl*() ones are NOP From: mokhi To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2016 15:26:03 -0000 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.