On Monday, September 20, 2021 at 12:13:27 AM UTC+8, Chris Elvidge wrote:
> On 19/09/2021 03:42 pm, Lew Pitcher wrote:
> > On Sat, 18 Sep 2021 17:00:56 -0700,
hongy...@gmail.com wrote:
> >
> >> On Saturday, September 18, 2021 at 11:36:19 PM UTC+8, Lew Pitcher wrote:
> > [snip]
> >>> Hongy also seems to be assuming that a "non-script executable file" only
> >>> consists of an ELF executable. Under Linux, this is not true, as almost
> >>> /any/ file can be executed using the binfmt_misc facility. This facility
> >>> allows the sysop to define new "magic numbers" for "non-script executable"
> >>> files (such as a+x WAV files, or a+x pdf files) and the interpreter that
> >>> the kernel will automagically invoke to execute that sort of file.
> >>>
> >>> See /usr/src/linux/Documentation/binfmt_misc.txt for details,
> >>
> >> $ ls /usr/src/linux/Documentation/binfmt_misc.txt
> >> ls: cannot access '/usr/src/linux/Documentation/binfmt_misc.txt': No such file or directory
> >
> > Did you install the appropriate kernel source code?
> >
> > /usr/src/linux usually symlinks to the Linux kernel source code (which is
> > named with the full kernel version, something like /usr/src/linux-4.4.276)
> > and the Documentation subdirectory of that source code directory contains
> > the binfmt_misc.txt file.
> I found :
> /usr/src/linux-5.13.13/Documentation/admin-guide/binfmt-misc.rst
linux-doc: /usr/share/doc/linux-doc/html/_sources/admin-guide/binfmt-misc.rst.txt