From owner-freebsd-arch@FreeBSD.ORG Fri Jul 12 22:25:22 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CBC023FD; Fri, 12 Jul 2013 22:25:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id A8A0712A3; Fri, 12 Jul 2013 22:25:22 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0637BB987; Fri, 12 Jul 2013 18:25:22 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: Extending MADV_PROTECT Date: Fri, 12 Jul 2013 17:48:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201305071433.27993.jhb@freebsd.org> <20130522084145.GJ3047@kib.kiev.ua> <201306281446.01797.jhb@freebsd.org> In-Reply-To: <201306281446.01797.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201307121748.57778.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Jul 2013 18:25:22 -0400 (EDT) Cc: Konstantin Belousov , arch@freebsd.org, "Robert N. M. Watson" , Jilles Tjoelker X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 22:25:22 -0000 On Friday, June 28, 2013 2:46:01 pm John Baldwin wrote: > Ok, there isn't really a clear consensus here, but I need a system call to let > me toggle this flag on existing processes. > > One reason I don't like the procctl() approach is I am uneasy about forcing > a certain behavior for how commands treat pgid (first-fail vs best-effort). > I guess it can always change in the future so that isn't completely unsolvable. > > I guess I am fine just making it use hardcoded sizes instead of full-blown > ioctl encoding. Ok, I have updated patches for this for HEAD. I have not yet implemented the inheritance bits because I'm loathe to add the first bit to a p_flag2. :-P However, if that's the best course of action I suppose we can do that. The kernel patch is at www.freebsd.org/~jhb/patches/procctl.patch The patch for the protect binary is at www.freebsd.org/~jhb/patches/protect.patch -- John Baldwin