From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manolis Ragkousis Subject: Re: [PATCH] Build sandbox support etc. unconditionally on Linux. Date: Wed, 10 Aug 2016 22:07:21 +0300 Message-ID: References: <07494b64-bc74-6b7f-166f-14eeff2f196b@gmail.com> <87bn10wmka.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXYqh-0004oK-1N for guix-devel@gnu.org; Wed, 10 Aug 2016 15:07:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXYqc-0001T6-1H for guix-devel@gnu.org; Wed, 10 Aug 2016 15:07:30 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:35714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXYqb-0001Ss-Qh for guix-devel@gnu.org; Wed, 10 Aug 2016 15:07:25 -0400 Received: by mail-wm0-x242.google.com with SMTP id i5so11393611wmg.2 for ; Wed, 10 Aug 2016 12:07:25 -0700 (PDT) In-Reply-To: <87bn10wmka.fsf@netris.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mark H Weaver Cc: guix-devel Hello Mark, On 08/10/16 20:39, Mark H Weaver wrote: > > I'm very reluctant to apply this patch. In general, it's preferable to > rely on autoconf to test for individual features, rather than testing > for particular kernels by name. It seems to me that this patch will > hinder portability to other kernels. > > I'd be inclined to return to the approach you were proposing before > discovering this upstream patch. I'll take a look at it soon. > > What do you think? Well the other solution will be to break the CHROOT_ENABLED into smaller macros, depending on what we check. If you think this is a better solution then okay with me. Locally I broke CHROOT_ENABLED into #define CHROOT_ENABLED HAVE_CHROOT && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(MS_PRIVATE) #define CLONE_ENABLED defined(CLONE_NEWNS) #if defined(SYS_pivot_root) #define pivot_root(new_root, put_old) (syscall(SYS_pivot_root, new_root, put_old)) #endif And maybe we should rename CHROOT_ENABLED into SANDBOX_ENABLED or something similar to better describe its purpose. WDYT? Thank you for looking into it, Manolis