From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point Date: Tue, 24 Nov 2020 07:16:24 +0100 Message-ID: <87y2irb7pj.fsf@gnus.org> References: <87ima8ylfv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3929"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44631@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 24 07:17:11 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 1khRdW-0000sI-5K for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 07:17:10 +0100 Original-Received: from localhost ([::1]:43792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khRdU-0001NU-QN for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 01:17:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khRdO-0001N9-5U for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 01:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khRdN-0006EV-Un for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 01:17:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khRdN-0003MU-Ps for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 01:17:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Nov 2020 06:17:01 +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.160619859812741 (code B ref 44631); Tue, 24 Nov 2020 06:17:01 +0000 Original-Received: (at 44631) by debbugs.gnu.org; 24 Nov 2020 06:16:38 +0000 Original-Received: from localhost ([127.0.0.1]:52494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khRd0-0003JQ-34 for submit@debbugs.gnu.org; Tue, 24 Nov 2020 01:16:38 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:49392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khRcy-0003IK-1K for 44631@debbugs.gnu.org; Tue, 24 Nov 2020 01:16:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=k2ecQILHC1Ai8Sd5zwZ5kEIw7jESl8bgMcicqjQPm7M=; b=mkSw1//z5NUcelrpjODuAWo/dc xYatA8+LwO4EaYE5X+WSxc+0CH26R/ouSLQh1o1KahIrjbnX4D5/2iqhJ3i9ViwBDHezAbPIEAvhB eBp+TN71ggwyL13/JMasY9pre/kvGvxELgmh/YdpCrdhFZ7RV1rn0Me3aKRVZco4Bytk=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khRco-0000HN-6V; Tue, 24 Nov 2020 07:16:29 +0100 X-Now-Playing: The Police's =?UTF-8?Q?=5FZenyatt=C3=A0?= Mondatta_: "Don't Stand So Close To Me" In-Reply-To: (Philipp Stephani's message of "Sun, 22 Nov 2020 22:03:17 +0100") 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:194016 Archived-At: Philipp Stephani writes: > 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. Hm, interesting... >> > 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. No, I can't think of any cases where this would lead to a worse result than the current situation, but it's somewhat scary making a low-level general change like this in `rename-file' -- I have no idea whether EBUSY is used for other oddball failure cases like this. Making the change in byte-compile-file sounds safer, but would require more work. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no