From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 30 15:26:35 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A20316A401 for ; Tue, 30 Jan 2007 15:26:35 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id CCD4913C461 for ; Tue, 30 Jan 2007 15:26:34 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id l0UFQY77081483; Tue, 30 Jan 2007 09:26:34 -0600 (CST) (envelope-from dan) Date: Tue, 30 Jan 2007 09:26:34 -0600 From: Dan Nelson To: waldeck@gmx.de Message-ID: <20070130152633.GF19656@dan.emsphone.com> References: <20070130140227.26613101832@hk2.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070130140227.26613101832@hk2.uwaterloo.ca> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: top delay value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 15:26:35 -0000 In the last episode (Jan 30), waldeck@gmx.de said: > An unprivileged user could waste all CPU time by setting a low delay > value in top (interactive or via -s). Are you sure? In 6.2 at least, "s0" in interactive mode results in a 1-second delay, and "top -s0" prints top: warning: seconds delay should be positive -- using default .... What version of FreeBSD are you seeing this on? > Is there any possibility to deactivate this functionality without > recompilation? > > There are other top implementations that use a "secure mode" > configuration which avoids the setting of the delay value for > unprivileged users. Users can hog CPU by running "while true ; do done" or any number of other methods. That's what CPU limits are for :) -- Dan Nelson dnelson@allantgroup.com