[File-cvs] CVS commit: file/magic/Magdir

Christos Zoulas christos at zoulas.com
Fri Oct 18 15:16:18 UTC 2019


Module Name:	file
Committed By:	christos
Date:		Fri Oct 18 15:16:18 UTC 2019

Modified Files:
	file/magic/Magdir: msdos

Log Message:
>From John Villalovos:

Support ARM64 Linux vmlinux files Version 2. Changes from the first
one is to pull out the PE (Portable Executable) check so that it is
checked as long as it is an MS-DOS file (based on MZ being the first
two bytes of the file). Unfortunately it made the patch size quite
large

Currently 'file' only says that the ARM64 Linux vmlinux files are MS-DOS
executables.  They are in fact PE files that are used to boot via
UEFI.

Here is a before and after showing the difference with and without the patch.
$ file vmlinux
linux: MS-DOS executable
$ file -m msdos vmlinux
linux: MS-DOS executable PE PE32+ executable (EFI application) ARM64
(stripped to external PDB), for MS Windows

Info of the vmlinux file:
$ head -c 256 vmlinux | xxd
00000000: 4d5a 0091 ffbf 2d14 0000 0800 0000 0000  MZ....-.........
00000010: 0020 2601 0000 0000 0a00 0000 0000 0000  . &.............
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 4152 4d64 4000 0000  ........ARMd at ...
00000040: 5045 0000 64aa 0200 0000 0000 0000 0000  PE..d...........
00000050: 0000 0000 a000 0602 0b02 0214 0010 c300  ................
00000060: 0000 6300 0000 0000 e85a b700 0010 0000  ..c......Z......
00000070: 0000 0000 0000 0000 0010 0000 0002 0000  ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000090: 0020 2601 0010 0000 23a2 1d01 0a00 0000  . &.....#.......
000000a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000c0: 0000 0000 0600 0000 0000 0000 0000 0000  ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000e0: 0000 0000 0000 0000 0032 1d01 7005 0000  .........2..p...
000000f0: 0000 0000 0000 0000 2e74 6578 7400 0000  .........text...

An example file of this type can be found here:
http://ftp.nl.debian.org/debian/dists/buster/main/installer-arm64/current/images/netboot/netboot.tar.gz


To generate a diff of this commit:
cvs rdiff -r1.133 -r1.134 file/magic/Magdir/msdos

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



More information about the File-cvs mailing list