From owner-svn-src-all@FreeBSD.ORG Thu Mar 1 21:56:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA5FB106566C; Thu, 1 Mar 2012 21:56:21 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id A4A498FC1C; Thu, 1 Mar 2012 21:56:21 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id q21LuJI7077703 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 1 Mar 2012 13:56:20 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4F4FF088.4040508@freebsd.org> Date: Thu, 01 Mar 2012 13:56:24 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19 MIME-Version: 1.0 To: Konstantin Belousov References: <201202261425.q1QEPm9g069102@svn.freebsd.org> <86mx81byt6.fsf@in138.ua3> <20120229132507.GB55074@deviant.kiev.zoral.com.ua> <201202290936.02309.jhb@freebsd.org> <20120229153328.GG55074@deviant.kiev.zoral.com.ua> In-Reply-To: <20120229153328.GG55074@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , John Baldwin , svn-src-all@freebsd.org, Mikolaj Golub , "Robert N. M. Watson" , svn-src-head@freebsd.org Subject: Re: svn commit: r232181 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 01 Mar 2012 21:56:22 -0000 On 2/29/12 7:33 AM, Konstantin Belousov wrote: > On Wed, Feb 29, 2012 at 09:36:02AM -0500, John Baldwin wrote: >> On Wednesday, February 29, 2012 8:25:07 am Konstantin Belousov wrote: >>> On Wed, Feb 29, 2012 at 02:37:25PM +0200, Mikolaj Golub wrote: >>>> On Wed, 29 Feb 2012 12:03:00 +0000 Robert N. M. Watson wrote: >>>> >>>> RNMW> I think the monitoring aspect of the patch is fine. >>>> >>>> RNMW> The bit I was worried about was external umask changes. This can cause >>>> RNMW> race conditions for applications that manage their umask -- for >>>> RNMW> example, bsdtar, if I recall correctly. It's one thing to use a >>>> RNMW> debugger to force an application to change its umask -- the developer >>>> RNMW> needs to know they are changing application behaviour. But exposing a >>>> RNMW> feature that can lead to correct applications but incorrect results is >>>> RNMW> a risky thing to do, hence my objection. >>>> >>>> RNMW> I think given the other objections, it would be wise to remove write >>>> RNMW> access to process umasks, but retain read access for procstat (which is >>>> RNMW> quite useful, I agree). >>>> >>>> I still don't see why having a sysctl RW is worse than asking users to run >>>> something like in the attach when they need to change umask for another >>>> process, but ok, if people don't like RW I will remove it. >>>> >>> What is done is attach is much worse then the sysctl, just because >>> debugger attach often causes spurious EINTR, indeed seriously disrupting >>> applications, as opposed to some uncertain damage that could be done in >>> theory. >> kgdb doesn't though, and presumably for umask you would change it via kgdb, so >> from the running process' perspective it would look the same as changing it via >> sysctl. > Right, but an idea of the change was to allow to do this for somebody who > does not know how to perform it in kgdb. Not to mention that kgdb -w > is risky, e.g. because filedesc might have changed under kgdb, so you would > write over freed memory. but it's lowering the bar TOO much I think,