From owner-freebsd-hackers@freebsd.org Wed Jan 27 16:36:59 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAD8AA70409 for ; Wed, 27 Jan 2016 16:36:59 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BD4141A75; Wed, 27 Jan 2016 16:36:59 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u0RGawh2064067 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 27 Jan 2016 09:36:58 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u0RGawC2064064; Wed, 27 Jan 2016 09:36:58 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Wed, 27 Jan 2016 09:36:58 -0700 (MST) From: Warren Block To: Allan Jude cc: freebsd-hackers@freebsd.org Subject: Re: syslogd(8) with OOM Killer protection In-Reply-To: <56A86D91.3040709@freebsd.org> Message-ID: References: <56A86D91.3040709@freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 27 Jan 2016 09:36:58 -0700 (MST) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 16:37:00 -0000 On Wed, 27 Jan 2016, Allan Jude wrote: > On 2016-01-27 01:21, Marcelo Araujo wrote: >> Hi guys, >> >> I would like to know your opinion about this REVIEW[1]. >> The basic idea is protect by default the syslogd(8) against been killed by >> OOM with an option to disable the protection. >> >> Some people like the idea, other people would prefer something more global >> where we can protect any daemon by the discretion of our choice. >> >> Thoughts? >> >> >> [1] https://reviews.freebsd.org/D4973 >> >> >> Best, >> > > I do like the idea of generalizing it, say via rc.subr > > So you can just do: > > someapp_protect=YES (and maybe syslogd has this enabled by default in > /etc/defaults/rc.conf) and it prefixes the start command with protect -i. Possibly simpler to provide a list in one setting than an individual setting for each daemon. With ideas from other posters: oomprotect_daemons="crond syslogd"