From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point Date: Sun, 22 Nov 2020 22:03:17 +0100 Message-ID: References: <87ima8ylfv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30066"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44631@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 22 22:04:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgwWp-0007ef-5w for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 22:04:11 +0100 Original-Received: from localhost ([::1]:43124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgwWn-0001uJ-M2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 16:04:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgwWg-0001tX-L3 for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 16:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgwWg-0000RY-DR for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 16:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kgwWg-0007Sa-9H for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 16:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Nov 2020 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44631 X-GNU-PR-Package: emacs Original-Received: via spool by 44631-submit@debbugs.gnu.org id=B44631.160607901528644 (code B ref 44631); Sun, 22 Nov 2020 21:04:02 +0000 Original-Received: (at 44631) by debbugs.gnu.org; 22 Nov 2020 21:03:35 +0000 Original-Received: from localhost ([127.0.0.1]:48415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgwWF-0007Rv-1c for submit@debbugs.gnu.org; Sun, 22 Nov 2020 16:03:35 -0500 Original-Received: from mail-ot1-f43.google.com ([209.85.210.43]:40502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgwWE-0007Rh-0Y for 44631@debbugs.gnu.org; Sun, 22 Nov 2020 16:03:34 -0500 Original-Received: by mail-ot1-f43.google.com with SMTP id 79so14089058otc.7 for <44631@debbugs.gnu.org>; Sun, 22 Nov 2020 13:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yld+livQuAAbulrAN4NBjIJNJEgknnFq67/0nyf4bYY=; b=gkZQ5nUydKu/HvjOUG1GRRXqiPLqMivDISSU8zCQnPxBhFa+28Rlf2baqeXWhF6424 f5zaKWCv1NAq5V7v/JmhsF9wNeo46d69eDmzombfgUUEfXA3g/OE5y9nRIFa9xUibzot es8Qvju/w3y6fg8MicU3SIkOPauKFyh9n849lcGA8Vsw13R3mKrewBaVGBDM9mxtekgW 2wyxd+d0F2mN6TYYVef/28hCt3j6VimqErUGlZLrVEGCqHPEywsMn9C6c3RsAAt5zFis AxpwttDDMCcaI0MWBXaLYUKaO7u76r42p5v5ifVXMCWtkCxNft4U987lk64RYfcEyM/3 rEhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yld+livQuAAbulrAN4NBjIJNJEgknnFq67/0nyf4bYY=; b=Xmz4cXdOV10QRcObhIbtRJz4XI1Nj/MSUCk3cyNXoClp+ezYtCCbo9P+uWopN2iGHa I1yDag1s/jgOh4prvOtMBJf9E9QAdyhzdfXIDhTYGuhmsivVPPYgrPIL0Z9/gzQbtfqO TYKD96DwYfvgkKxMj70Ssqcvk52rd4Dg9c/wpnWGl2egsmzh93Qnsk1q1uLbnBoVl23J WDIjch2iR6NZa9GzTN8Fol9CGUh0MjDSuRME8HCtlM/hqlCpOiD0vlqTnLujQETa+B8B RfGj+wktUEIu2hFEPccC0tPRItyR36y882Get9s9QrN1jP0rxdNAJ1XtvqblPzjlIIpt Q7XA== X-Gm-Message-State: AOAM533033ykDgaktf9f3QUsF4Bk8LikUUBOcgyhblTD57mRAl/m9PXM 3X83MPtoegECX9A9Llidw3GZSPUiCNCSIQoqEcdCli1f0gQ= X-Google-Smtp-Source: ABdhPJwEWKgPo5BZxvudPQvb0PRj6ZVCOU0zIxHUt3WO4o78SXBEdI7y+r+q/ksTMmVg/4tgXlmgUkdkf99n7DoY4EM= X-Received: by 2002:a05:6830:2301:: with SMTP id u1mr12570973ote.36.1606079008273; Sun, 22 Nov 2020 13:03:28 -0800 (PST) In-Reply-To: <87ima8ylfv.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193877 Archived-At: Am Sa., 14. Nov. 2020 um 17:04 Uhr schrieb Lars Ingebrigtsen : > > Philipp Stephani writes: > > > Granted, this is rather exotic. > > It's really exotic. :-) I'm just wondering -- did you happen upon this > while trying to do something, or is it just designed to trigger the bug? I've been experimenting with creating a sandbox for Emacs using https://developers.google.com/sandboxed-api/. That works by (a) installing a Linux kernel syscall filter to limit the allowed syscalls, and (b) enabling user and mount namespaces. Using the mount namespaces, the sandbox can be restricted exactly to the files that Emacs needs to access. In the case of byte compilation, it needs to write exactly one file, the byte-compiled output, so it's possible to mount exactly that file. This bug makes this approach impossible. (That's not a really onerous restriction; one can e.g. mount an empty directory, and then have the output file written there. It would just be nicer if it worked without such workarounds.) > > > Nevertheless, byte-compile-file could > > fall back to a direct write-region without temporary file + rename, or > > rename-file could fall back to copy + remove on EBUSY (like EXDEV). > > Hm... the latter sounds like an easy fix, but aren't there more commond > cases where you get EBUSY where copy + remove would fail, too? Probably, but I guess the situation wouldn't become worse, as presumably these cases already fail today.