[Bug 297819] ELF binaries that have current writable mmap mapping should still execute instead of failing with "Text file busy"

[email protected]
Newsgroups gmane.os.freebsd.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297819

            Bug ID: 297819
           Summary: ELF binaries that have current writable mmap mapping
                    should still execute instead of failing with "Text
                    file busy"
           Product: Base System
           Version: 15.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 274057
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=274057&action=edit
mio-write-no-exec.tgz

See the attached testcase.

How to run the testcase:
1. gmake
2. build/runner /bin/ls # this copiles /bin/ls, mmaps it to memory with
writable flag

The last command prints: /tmp/target-copy: Text file busy

This should not happen because other programs might be altering something in
this file, or they might be preparing to alter this file.

It should execute the way how it is on disk at the moment.

There is no reason to make ELF modification and execution exclusive to each
other.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.