From owner-svn-src-all@FreeBSD.ORG Sun Oct 5 19:45:39 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 B4B0419A; Sun, 5 Oct 2014 19:45:39 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D769BA; Sun, 5 Oct 2014 19:45:38 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id n3so2803163wiv.15 for ; Sun, 05 Oct 2014 12:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=CF31lD6XwTglbgyVbm2sAEgeI3fZB31r0F5dpWB6fL0=; b=HOOFdWUIy16vxYYcvcf8IkLpCIhHyBhZScRicsAeHAPEw165Vr7133CDntBreUk7sr kcDlfubbg8P8LfBXq3EHXF+RrBAUBYi61/BGtEYSByLD9IMYDH3vP5HJZeF/RkTdViCa W7pjCgHG9oEXTMfSQzeDb365wLG3jhWk7KsLI4sLgCKaF2JZYyefCDDPxsqrNEE18uz6 06cAq7Igcc2Ex7DlK+KhGTQEkicGbuGKv2xUnKXRQgwdME95p2WErhUu9NhaPPwjxzb3 fYl293A808QVbMfWYbZovyQqpkmhLNMYh5XxkSl4CuRZe+TvYJW8UQc1hiz5KK8p/jIF lULA== X-Received: by 10.180.184.225 with SMTP id ex1mr3464776wic.22.1412538336583; Sun, 05 Oct 2014 12:45:36 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id ce1sm14919614wjc.2.2014.10.05.12.45.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 Oct 2014 12:45:35 -0700 (PDT) Date: Sun, 5 Oct 2014 21:45:33 +0200 From: Mateusz Guzik To: Stefan Farfeleder Subject: Re: svn commit: r272505 - in head/sys: kern sys Message-ID: <20141005194533.GD9262@dft-labs.eu> References: <201410040808.s9488uAI099166@svn.freebsd.org> <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> <20141005163953.GA1890@mole.fafoe.narf.at> <20141005171617.GB26076@kib.kiev.ua> <20141005181906.GB1890@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141005181906.GB1890@mole.fafoe.narf.at> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, Mateusz Guzik , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Bjoern A. Zeeb" , Konstantin Belousov , Konstantin Belousov 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 19:45:39 -0000 On Sun, Oct 05, 2014 at 08:19:06PM +0200, Stefan Farfeleder wrote: > On Sun, Oct 05, 2014 at 08:16:17PM +0300, Konstantin Belousov wrote: > > 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. > > Yes, it breaks due to the missing file. > Can you update the kernel to at least r272569 and test again? Make sure you are running the new kernel before testing the driver. -- Mateusz Guzik