From owner-svn-src-all@FreeBSD.ORG Sun Oct 5 16:40:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6250FCAB; Sun, 5 Oct 2014 16:40:05 +0000 (UTC) Received: from fep19.mx.upcmail.net (fep19.mx.upcmail.net [62.179.121.39]) by mx1.freebsd.org (Postfix) with ESMTP id BD86CC0F; Sun, 5 Oct 2014 16:40:02 +0000 (UTC) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep19-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20141005163954.UMLU22985.viefep19-int.chello.at@edge04.upcmail.net>; Sun, 5 Oct 2014 18:39:54 +0200 Received: from mole.fafoe.narf.at ([80.109.238.242]) by edge04.upcmail.net with edge id zUft1o00F5EV2AQ01UftYh; Sun, 05 Oct 2014 18:39:53 +0200 X-SourceIP: 80.109.238.242 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 513106D47C; Sun, 5 Oct 2014 18:39:54 +0200 (CEST) Date: Sun, 5 Oct 2014 18:39:54 +0200 From: Stefan Farfeleder To: "Bjoern A. Zeeb" Subject: Re: svn commit: r272505 - in head/sys: kern sys Message-ID: <20141005163953.GA1890@mole.fafoe.narf.at> References: <201410040808.s9488uAI099166@svn.freebsd.org> <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov , Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2014 16:40:05 -0000 On Sat, Oct 04, 2014 at 02:21:54PM +0000, Bjoern A. Zeeb wrote: > > On 04 Oct 2014, at 08:08 , Mateusz Guzik wrote: > > > Author: mjg > > Date: Sat Oct 4 08:08:56 2014 > > New Revision: 272505 > > URL: https://svnweb.freebsd.org/changeset/base/272505 > > > > Log: > > Plug capability races. > > > > fp and appropriate capability lookups were not atomic, which could result in > > improper capabilities being checked. > > > > This could result either in protection bypass or in a spurious ENOTCAPABLE. > > > > Make fp + capability check atomic with the help of sequence counters. > > > > Reviewed by: kib > > MFC after: 3 weeks > > > > Modified: > > head/sys/kern/kern_descrip.c > > head/sys/sys/filedesc.h > > … > > > This file is included from user space. There is no opt_capsicum.h there. > Including an opt_* in the header file seems wrong in a lot of ways usually. > > I tried to add a bandaid for the moment with r272523 which (to be honest) makes it worse. > > This needs a better fix. Hi, this also breaks the nvidia-driver port (also with your fix). BR, Stefan