From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SDL6IUSOM2DBYQAA0tVLHw (envelope-from ) for ; Mon, 22 Feb 2021 10:58:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EOvSHUSOM2DlYwAAbx9fmQ (envelope-from ) for ; Mon, 22 Feb 2021 10:58:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A76ED23B4B for ; Mon, 22 Feb 2021 11:58:11 +0100 (CET) Received: from localhost ([::1]:50122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lE8un-00047R-UT for larch@yhetil.org; Mon, 22 Feb 2021 05:58:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lE8uf-00045L-Uv for bug-guix@gnu.org; Mon, 22 Feb 2021 05:58:01 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lE8uf-0007mI-NK for bug-guix@gnu.org; Mon, 22 Feb 2021 05:58:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lE8uf-0007qL-Ku for bug-guix@gnu.org; Mon, 22 Feb 2021 05:58:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46292: =?UTF-8?Q?=E2=80=98guix?= environment =?UTF-8?Q?-C=E2=80=99?= fails with Linux 4.19 (Debian) Resent-From: Lucas Nussbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 22 Feb 2021 10:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46292 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 46292-submit@debbugs.gnu.org id=B46292.161399146830129 (code B ref 46292); Mon, 22 Feb 2021 10:58:01 +0000 Received: (at 46292) by debbugs.gnu.org; 22 Feb 2021 10:57:48 +0000 Received: from localhost ([127.0.0.1]:55786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lE8uS-0007pt-9V for submit@debbugs.gnu.org; Mon, 22 Feb 2021 05:57:48 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:10454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lE8uQ-0007pf-0f for 46292@debbugs.gnu.org; Mon, 22 Feb 2021 05:57:47 -0500 X-IronPort-AV: E=Sophos;i="5.81,197,1610406000"; d="scan'208";a="373751926" Received: from xanadu.blop.info ([178.79.145.134]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2021 11:57:39 +0100 Date: Mon, 22 Feb 2021 11:57:36 +0100 From: Lucas Nussbaum Message-ID: <20210222105736.GA31789@xanadu.blop.info> References: <87h7ms8658.fsf@inria.fr> <20210210060403.GA15175@xanadu.blop.info> <877dn5sj14.fsf_-_@gnu.org> <20210218132334.GC20744@xanadu.blop.info> <871rd8e8p2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871rd8e8p2.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 46292@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.37 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: A76ED23B4B X-Spam-Score: -2.37 X-Migadu-Scanner: scn1.migadu.com X-TUID: zGMUWmutUzCu On 22/02/21 at 10:46 +0100, Ludovic Courtès wrote: > Hi Lucas, > > Lucas Nussbaum skribis: > > > On 18/02/21 at 12:38 +0100, Ludovic Courtès wrote: > > [...] > > >> I tried grabbing mount options from there and reapplying them to the > >> MS_REMOUNT call (patch below). However, that still doesn’t work: > >> > >> --8<---------------cut here---------------start------------->8--- > >> 14273 mount("/gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static-5.0.16", "/tmp/guix-directory.Plgkgt//gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static-5.0.16", 0x236a4b0, MS_RDONLY|MS_REMOUNT|MS_BIND, "rw,nosuid,nodev,relatime") = -1 EPERM (Operation not permitted) > >> --8<---------------cut here---------------end--------------->8--- > > > > That's strange: it worked in my manual tests. > > I investigated some more and can’t get it to work. Do you happen to > have a working invocation or C snippet? Here is an example: root@grisou-48:/tmp# mkdir t m without nosuid: root@grisou-48:/tmp# unshare -mrf mesg: cannot open /dev/pts/0: Permission denied root@grisou-48:/tmp# mount --bind t m root@grisou-48:/tmp# mount --bind -r -o remount ./t ./m root@grisou-48:/tmp# logout now remount with nosuid: root@grisou-48:/tmp# mount -o remount,nosuid /tmp root@grisou-48:/tmp# mount |grep /tmp /dev/sda5 on /tmp type ext4 (rw,nosuid,relatime) and try again: root@grisou-48:/tmp# unshare -mrf mesg: cannot open /dev/pts/0: Permission denied root@grisou-48:/tmp# mount --bind t m root@grisou-48:/tmp# mount |grep /tmp /dev/sda5 on /tmp type ext4 (rw,nosuid,relatime) /dev/sda5 on /tmp/m type ext4 (rw,nosuid,relatime) root@grisou-48:/tmp# mount --bind -r -o remount ./t ./m mount: /tmp/m: permission denied. ^ that's expected but it works when specifying nosuid: root@grisou-48:/tmp# mount --bind -r -o remount,nosuid ./t ./m root@grisou-48:/tmp# >From strace: mount("/tmp/t", "/tmp/m", 0x55e75bf38cb0, MS_RDONLY|MS_NOSUID|MS_REMOUNT|MS_BIND, NULL) = 0 MS_NOSUID is missing from mountflags in your invocation. Apparently data can be NULL. -- Lucas Nussbaum +33 3 54 95 86 19 Responsable du programme plateformes d'expérimentation DDO-SDT - Direction Générale Déléguée à l'Innovation - Inria