all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 44631@debbugs.gnu.org
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	[thread overview]
Message-ID: <87y2irb7pj.fsf@gnus.org> (raw)
In-Reply-To: <CAArVCkRwDs_krt8csjwGOXZn0KRxGLYx=yNm2HQ0u=vWe0E0Dg@mail.gmail.com> (Philipp Stephani's message of "Sun, 22 Nov 2020 22:03:17 +0100")

Philipp Stephani <p.stephani2@gmail.com> 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





  reply	other threads:[~2020-11-24  6:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 12:39 bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point Philipp Stephani
2020-11-14 16:04 ` Lars Ingebrigtsen
2020-11-22 21:03   ` Philipp Stephani
2020-11-24  6:16     ` Lars Ingebrigtsen [this message]
2020-12-12 15:19       ` Philipp Stephani
2020-12-13 12:32         ` Lars Ingebrigtsen
2020-12-13 16:41           ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2irb7pj.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=44631@debbugs.gnu.org \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.