From owner-svn-src-all@FreeBSD.ORG Sun Oct 5 17:16:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6F88593; Sun, 5 Oct 2014 17:16:22 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3713CFB0; Sun, 5 Oct 2014 17:16:22 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s95HGHiA086725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Oct 2014 20:16:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s95HGHiA086725 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s95HGHuX086724; Sun, 5 Oct 2014 20:16:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 5 Oct 2014 20:16:17 +0300 From: Konstantin Belousov To: Stefan Farfeleder Subject: Re: svn commit: r272505 - in head/sys: kern sys Message-ID: <20141005171617.GB26076@kib.kiev.ua> References: <201410040808.s9488uAI099166@svn.freebsd.org> <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> <20141005163953.GA1890@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141005163953.GA1890@mole.fafoe.narf.at> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: src-committers@freebsd.org, Mateusz Guzik , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Konstantin Belousov , svn-src-head@freebsd.org 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 17:16:22 -0000 On Sun, Oct 05, 2014 at 06:39:54PM +0200, Stefan Farfeleder wrote: > 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). Is the breakage due to missing opt_capsicum.h file ? If yes, what I proposed, i.e. making the new member unconditional, should fix it without changes to the module build system.