linux 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. #------------------------------------------------------------------------------
  2. # $File: linux,v 1.85 2023/07/17 14:40:09 christos Exp $
  3. # linux: file(1) magic for Linux files
  4. #
  5. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  6. # The following basic Linux magic is useful for reference, but using
  7. # "long" magic is a better practice in order to avoid collisions.
  8. #
  9. # 2 leshort 100 Linux/i386
  10. # >0 leshort 0407 impure executable (OMAGIC)
  11. # >0 leshort 0410 pure executable (NMAGIC)
  12. # >0 leshort 0413 demand-paged executable (ZMAGIC)
  13. # >0 leshort 0314 demand-paged executable (QMAGIC)
  14. #
  15. 0 lelong 0x00640107 Linux/i386 impure executable (OMAGIC)
  16. >16 lelong 0 \b, stripped
  17. 0 lelong 0x00640108 Linux/i386 pure executable (NMAGIC)
  18. >16 lelong 0 \b, stripped
  19. 0 lelong 0x0064010b Linux/i386 demand-paged executable (ZMAGIC)
  20. >16 lelong 0 \b, stripped
  21. 0 lelong 0x006400cc Linux/i386 demand-paged executable (QMAGIC)
  22. >16 lelong 0 \b, stripped
  23. #
  24. 0 string \007\001\000 Linux/i386 object file
  25. >20 lelong >0x1020 \b, DLL library
  26. # Linux-8086 stuff:
  27. 0 string \01\03\020\04 Linux-8086 impure executable
  28. >28 long !0 not stripped
  29. 0 string \01\03\040\04 Linux-8086 executable
  30. >28 long !0 not stripped
  31. #
  32. 0 string \243\206\001\0 Linux-8086 object file
  33. #
  34. 0 string \01\03\020\20 Minix-386 impure executable
  35. >28 long !0 not stripped
  36. 0 string \01\03\040\20 Minix-386 executable
  37. >28 long !0 not stripped
  38. 0 string \01\03\04\20 Minix-386 NSYM/GNU executable
  39. >28 long !0 not stripped
  40. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  41. 216 lelong 0421 Linux/i386 core file
  42. !:strength / 2
  43. >220 string >\0 of '%s'
  44. >200 lelong >0 (signal %d)
  45. #
  46. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  47. # this can be overridden by the DOS executable (COM) entry
  48. 2 string LILO Linux/i386 LILO boot/chain loader
  49. #
  50. # Linux make config build file, from Ole Aamot <oka@oka.no>
  51. # Updated by Ken Sharp
  52. 28 string make\ config Linux make config build file (old)
  53. 49 search/70 Kernel\ Configuration Linux make config build file
  54. #
  55. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  56. # Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
  57. # See: https://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
  58. 0 leshort 0x0436 Linux/i386 PC Screen Font v1 data,
  59. >2 byte&0x01 0 256 characters,
  60. >2 byte&0x01 !0 512 characters,
  61. >2 byte&0x02 0 no directory,
  62. >2 byte&0x02 !0 Unicode directory,
  63. >3 byte >0 8x%d
  64. 0 string \x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
  65. >16 lelong x %d characters,
  66. >12 lelong&0x01 0 no directory,
  67. >12 lelong&0x01 !0 Unicode directory,
  68. >28 lelong x %d
  69. >24 lelong x \bx%d
  70. # Linux swap and hibernate files
  71. # Linux kernel: include/linux/swap.h
  72. # util-linux: libblkid/src/superblocks/swap.c
  73. # format v0, unsupported since 2002
  74. 0xff6 string SWAP-SPACE Linux old swap file, 4k page size
  75. 0x1ff6 string SWAP-SPACE Linux old swap file, 8k page size
  76. 0x3ff6 string SWAP-SPACE Linux old swap file, 16k page size
  77. 0x7ff6 string SWAP-SPACE Linux old swap file, 32k page size
  78. 0xfff6 string SWAP-SPACE Linux old swap file, 64k page size
  79. # format v1, supported since 1998
  80. 0 name linux-swap
  81. >0x400 lelong 1 little endian, version %u,
  82. >>0x404 lelong x size %u pages,
  83. >>0x408 lelong x %u bad pages,
  84. >0x400 belong 1 big endian, version %u,
  85. >>0x404 belong x size %u pages,
  86. >>0x408 belong x %u bad pages,
  87. >0x41c string \0 no label,
  88. >0x41c string >\0 LABEL=%s,
  89. >0x40c ubelong x UUID=%08x
  90. >0x410 ubeshort x \b-%04x
  91. >0x412 ubeshort x \b-%04x
  92. >0x414 ubeshort x \b-%04x
  93. >0x416 ubelong x \b-%08x
  94. >0x41a ubeshort x \b%04x
  95. 0xff6 string SWAPSPACE2 Linux swap file, 4k page size,
  96. >0 use linux-swap
  97. 0x1ff6 string SWAPSPACE2 Linux swap file, 8k page size,
  98. >0 use linux-swap
  99. 0x3ff6 string SWAPSPACE2 Linux swap file, 16k page size,
  100. >0 use linux-swap
  101. 0x7ff6 string SWAPSPACE2 Linux swap file, 32k page size,
  102. >0 use linux-swap
  103. 0xfff6 string SWAPSPACE2 Linux swap file, 64k page size,
  104. >0 use linux-swap
  105. 0 name linux-hibernate
  106. >0 string S1SUSPEND \b, with SWSUSP1 image
  107. >0 string S2SUSPEND \b, with SWSUSP2 image
  108. >0 string ULSUSPEND \b, with uswsusp image
  109. >0 string LINHIB0001 \b, with compressed hibernate image
  110. >0 string \xed\xc3\x02\xe9\x98\x56\xe5\x0c \b, with tuxonice image
  111. >0 default x \b, with unknown hibernate image
  112. 0xfec string SWAPSPACE2 Linux swap file, 4k page size,
  113. >0 use linux-swap
  114. >0xff6 use linux-hibernate
  115. 0x1fec string SWAPSPACE2 Linux swap file, 8k page size,
  116. >0 use linux-swap
  117. >0x1ff6 use linux-hibernate
  118. 0x3fec string SWAPSPACE2 Linux swap file, 16k page size,
  119. >0 use linux-swap
  120. >0x3ff6 use linux-hibernate
  121. 0x7fec string SWAPSPACE2 Linux swap file, 32k page size,
  122. >0 use linux-swap
  123. >0x7ff6 use linux-hibernate
  124. 0xffec string SWAPSPACE2 Linux swap file, 64k page size,
  125. >0 use linux-swap
  126. >0xfff6 use linux-hibernate
  127. #
  128. # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
  129. # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  130. # and Nicolas Lichtmaier <nick@debian.org>
  131. # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  132. # Linux kernel boot images (i386 arch) (Wolfram Kleff)
  133. # URL: https://www.kernel.org/doc/Documentation/x86/boot.txt
  134. 514 string HdrS Linux kernel
  135. !:strength + 55
  136. # often no extension like in linux, vmlinuz, bzimage or memdisk but sometimes
  137. # Acronis Recovery kernel64.dat and Plop Boot Manager plpbtrom.bin
  138. # DamnSmallLinux 1.5 damnsmll.lnx
  139. !:ext /dat/bin/lnx
  140. >510 leshort 0xAA55 x86 boot executable
  141. >>518 leshort >0x1ff
  142. >>>529 byte 0 zImage,
  143. >>>529 byte 1 bzImage,
  144. >>>526 lelong >0
  145. >>>>(526.s+0x200) string >\0 version %s,
  146. >>498 leshort 1 RO-rootFS,
  147. >>498 leshort 0 RW-rootFS,
  148. >>508 leshort >0 root_dev %#X,
  149. >>502 leshort >0 swap_dev %#X,
  150. >>504 leshort >0 RAMdisksize %u KB,
  151. >>506 leshort 0xFFFF Normal VGA
  152. >>506 leshort 0xFFFE Extended VGA
  153. >>506 leshort 0xFFFD Prompt for Videomode
  154. >>506 leshort >0 Video mode %d
  155. # This also matches new kernels, which were caught above by "HdrS".
  156. 0 belong 0xb8c0078e Linux kernel
  157. >0x1e3 string Loading version 1.3.79 or older
  158. >0x1e9 string Loading from prehistoric times
  159. # System.map files - Nicolas Lichtmaier <nick@debian.org>
  160. 8 search/1 \ A\ _text Linux kernel symbol map text
  161. # LSM entries - Nicolas Lichtmaier <nick@debian.org>
  162. 0 search/1 Begin3 Linux Software Map entry text
  163. 0 search/1 Begin4 Linux Software Map entry text (new format)
  164. # From Matt Zimmerman, enhanced for v3 by Matthew Palmer
  165. 0 belong 0x4f4f4f4d User-mode Linux COW file
  166. >4 belong <3 \b, version %d
  167. >>8 string >\0 \b, backing file %s
  168. >4 belong >2 \b, version %d
  169. >>32 string >\0 \b, backing file %s
  170. ############################################################################
  171. # Linux kernel versions
  172. 0 string \xb8\xc0\x07\x8e\xd8\xb8\x00\x90 Linux
  173. >497 leshort 0 x86 boot sector
  174. >>514 belong 0x8e of a kernel from the dawn of time!
  175. >>514 belong 0x908ed8b4 version 0.99-1.1.42
  176. >>514 belong 0x908ed8b8 for memtest86
  177. >497 leshort !0 x86 kernel
  178. >>504 leshort >0 RAMdisksize=%u KB
  179. >>502 leshort >0 swap=%#X
  180. >>508 leshort >0 root=%#X
  181. >>>498 leshort 1 \b-ro
  182. >>>498 leshort 0 \b-rw
  183. >>506 leshort 0xFFFF vga=normal
  184. >>506 leshort 0xFFFE vga=extended
  185. >>506 leshort 0xFFFD vga=ask
  186. >>506 leshort >0 vga=%d
  187. >>514 belong 0x908ed881 version 1.1.43-1.1.45
  188. >>514 belong 0x15b281cd
  189. >>>0xa8e belong 0x55AA5a5a version 1.1.46-1.2.13,1.3.0
  190. >>>0xa99 belong 0x55AA5a5a version 1.3.1,2
  191. >>>0xaa3 belong 0x55AA5a5a version 1.3.3-1.3.30
  192. >>>0xaa6 belong 0x55AA5a5a version 1.3.31-1.3.41
  193. >>>0xb2b belong 0x55AA5a5a version 1.3.42-1.3.45
  194. >>>0xaf7 belong 0x55AA5a5a version 1.3.46-1.3.72
  195. >>514 string HdrS
  196. >>>518 leshort >0x1FF
  197. >>>>529 byte 0 \b, zImage
  198. >>>>529 byte 1 \b, bzImage
  199. >>>>(526.s+0x200) string >\0 \b, version %s
  200. # Linux boot sector thefts.
  201. 0 belong 0xb8c0078e Linux
  202. >0x1e6 belong 0x454c4b53 ELKS Kernel
  203. >0x1e6 belong !0x454c4b53 style boot sector
  204. ############################################################################
  205. # Linux S390 kernel image
  206. # Created by: Jan Kaluza <jkaluza@redhat.com>
  207. 8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
  208. >0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
  209. # 64bit
  210. >>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
  211. >>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
  212. >>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
  213. >>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
  214. # 32bit
  215. >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
  216. >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
  217. >>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
  218. >>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
  219. ############################################################################
  220. # Linux ARM compressed kernel image
  221. # From: Kevin Cernekee <cernekee@gmail.com>
  222. # Update: Joerg Jenderek
  223. 0x24 lelong 0x016f2818 Linux kernel ARM boot executable zImage
  224. # There are three possible situations: LE, BE with LE bootloader and pure BE.
  225. # In order to aid telling these apart a new endian flag was added. In order
  226. # to support kernels before the flag and BE with LE bootloader was added we'll
  227. # do a negative check against the BE variant of the flag when we see a LE magic.
  228. >0x30 belong !0x04030201 (little-endian)
  229. # raspian "kernel7.img", Vu+ Ultimo4K "kernel_auto.bin"
  230. !:ext img/bin
  231. >0x30 belong 0x04030201 (big-endian)
  232. 0x24 belong 0x016f2818 Linux kernel ARM boot executable zImage (big-endian)
  233. ############################################################################
  234. # Linux AARCH64 kernel image
  235. 0x38 lelong 0x644d5241 Linux kernel ARM64 boot executable Image
  236. >0x18 lelong ^1 \b, little-endian
  237. >0x18 lelong &1 \b, big-endian
  238. >0x18 lelong &2 \b, 4K pages
  239. >0x18 lelong &4 \b, 16K pages
  240. >0x18 lelong &6 \b, 32K pages
  241. ############################################################################
  242. # Linux 8086 executable
  243. 0 lelong&0xFF0000FF 0xC30000E9 Linux-Dev86 executable, headerless
  244. >5 string .
  245. >>4 string >\0 \b, libc version %s
  246. 0 lelong&0xFF00FFFF 0x4000301 Linux-8086 executable
  247. >2 byte&0x01 !0 \b, unmapped zero page
  248. >2 byte&0x20 0 \b, impure
  249. >2 byte&0x20 !0
  250. >>2 byte&0x10 !0 \b, A_EXEC
  251. >2 byte&0x02 !0 \b, A_PAL
  252. >2 byte&0x04 !0 \b, A_NSYM
  253. >2 byte&0x08 !0 \b, A_STAND
  254. >2 byte&0x40 !0 \b, A_PURE
  255. >2 byte&0x80 !0 \b, A_TOVLY
  256. >28 long !0 \b, not stripped
  257. >37 string .
  258. >>36 string >\0 \b, libc version %s
  259. # 0 lelong&0xFF00FFFF 0x10000301 ld86 I80386 executable
  260. # 0 lelong&0xFF00FFFF 0xB000301 ld86 M68K executable
  261. # 0 lelong&0xFF00FFFF 0xC000301 ld86 NS16K executable
  262. # 0 lelong&0xFF00FFFF 0x17000301 ld86 SPARC executable
  263. # SYSLINUX boot logo files (from 'ppmtolss16' sources)
  264. # https://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
  265. # file extension .lss .16
  266. 0 lelong =0x1413f33d SYSLINUX' LSS16 image data
  267. # syslinux-4.05/mime/image/x-lss16.xml
  268. !:mime image/x-lss16
  269. >4 leshort x \b, width %d
  270. >6 leshort x \b, height %d
  271. 0 string OOOM User-Mode-Linux's Copy-On-Write disk image
  272. >4 belong x version %d
  273. # SE Linux policy database
  274. # From: Mike Frysinger <vapier@gentoo.org>
  275. 0 lelong 0xf97cff8c SE Linux policy
  276. >16 lelong x v%d
  277. >20 lelong 1 MLS
  278. >24 lelong x %d symbols
  279. >28 lelong x %d ocons
  280. # Linux Logical Volume Manager (LVM)
  281. # Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
  282. #
  283. # System ID, UUID and volume group name are 128 bytes long
  284. # but they should never be full and initialized with zeros...
  285. #
  286. # LVM1
  287. #
  288. 0x0 string/b HM\001 LVM1 (Linux Logical Volume Manager), version 1
  289. >0x12c string/b >\0 , System ID: %s
  290. 0x0 string/b HM\002 LVM1 (Linux Logical Volume Manager), version 2
  291. >0x12c string/b >\0 , System ID: %s
  292. # LVM2
  293. #
  294. # It seems that the label header can be in one the four first sector
  295. # of the disk... (from _find_labeller in lib/label/label.c of LVM2)
  296. #
  297. # 0x200 seems to be the common case
  298. 0 name lvm2
  299. # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
  300. >0x0 string >\x2f \b, UUID: %.6s
  301. >0x6 string >\x2f \b-%.4s
  302. >0xa string >\x2f \b-%.4s
  303. >0xe string >\x2f \b-%.4s
  304. >0x12 string >\x2f \b-%.4s
  305. >0x16 string >\x2f \b-%.4s
  306. >0x1a string >\x2f \b-%.6s
  307. >0x20 lequad x \b, size: %lld
  308. # read the offset to add to the start of the header, and the header
  309. # start in 0x200
  310. 0x218 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  311. >&(&-12.l-0x20) use lvm2
  312. 0x018 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  313. >&(&-12.l-0x20) use lvm2
  314. 0x418 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  315. >&(&-12.l-0x20) use lvm2
  316. 0x618 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  317. >&(&-12.l-0x20) use lvm2
  318. # LVM snapshot
  319. # from Jason Farrel
  320. 0 string SnAp LVM Snapshot (CopyOnWrite store)
  321. >4 lelong !0 - valid,
  322. >4 lelong 0 - invalid,
  323. >8 lelong x version %d,
  324. >12 lelong x chunk_size %d
  325. # SE Linux policy database
  326. 0 lelong 0xf97cff8c SE Linux policy
  327. >16 lelong x v%d
  328. >20 lelong 1 MLS
  329. >24 lelong x %d symbols
  330. >28 lelong x %d ocons
  331. # Summary: Xen saved domain file
  332. # Created by: Radek Vokal <rvokal@redhat.com>
  333. 0 string LinuxGuestRecord Xen saved domain
  334. >20 search/256 (name
  335. >>&1 string x (name %s)
  336. # Type: Xen, the virtual machine monitor
  337. # From: Radek Vokal <rvokal@redhat.com>
  338. 0 string LinuxGuestRecord Xen saved domain
  339. #>2 regex \(name\ [^)]*\) %s
  340. >20 search/256 (name (name
  341. >>&1 string x %s...)
  342. # Systemd journald files
  343. # See https://www.freedesktop.org/wiki/Software/systemd/journal-files/.
  344. # From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
  345. # Update: Joerg Jenderek
  346. # URL: https://systemd.io/JOURNAL_FILE_FORMAT/
  347. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/j/journal-sysd.trid.xml
  348. # Note: called "systemd journal" by TrID
  349. # verified by `journalctl --file=user-1000.journal`
  350. # check magic signature[8]
  351. 0 string LPKSHHRH
  352. # check that state is one of known values
  353. # STATE_OFFLINE~0 STATE_ONLINE~1 STATE_ARCHIVED~2
  354. >16 ubyte&252 0
  355. # check that each half of three unique id128s is non-zero
  356. # file_id
  357. >>24 ubequad >0
  358. >>>32 ubequad >0
  359. # machine_id
  360. >>>>40 ubequad >0
  361. >>>>>48 ubequad >0
  362. # boot_id; last writer
  363. >>>>>>56 ubequad >0
  364. >>>>>>>64 ubequad >0 Journal file
  365. #!:mime application/octet-stream
  366. !:mime application/x-linux-journal
  367. # provide more info
  368. # head_entry_realtime; contains a POSIX timestamp stored in microseconds
  369. >>>>>>>>184 leqdate/1000000 !0 \b, %s
  370. >>>>>>>>184 leqdate 0 empty
  371. # If a file is closed after writing the state field should be set to STATE_OFFLINE
  372. >>>>>>>>16 ubyte 0 \b,
  373. # for offline and empty only journal~ extension found
  374. >>>>>>>>>184 leqdate 0 offline
  375. # https://man7.org/linux/man-pages/man8/systemd-journald.service.8.html
  376. # GRR: add char ~ inside parse_ext in ../../src/apprentice.c to avoid in file version 5.44 error like:
  377. # Magdir/linux, 463: Warning: EXTENSION type ` journal~' has bad char '~'
  378. !:ext journal~
  379. # for offline and non empty often *.journal~ but also user-1001.journal
  380. >>>>>>>>>184 leqdate !0 offline
  381. !:ext journal/journal~
  382. # if a file is opened for writing the state field should be set to STATE_ONLINE
  383. >>>>>>>>16 ubyte 1 \b,
  384. # for online and empty only journal~ extension found
  385. >>>>>>>>>184 leqdate 0 online
  386. # system@0005febee06e2ff2-f7ea54d10e4346ff.journal~
  387. !:ext journal~
  388. # for online and non empty only journal extension found
  389. >>>>>>>>>184 leqdate !0 online
  390. # system.journal user-1000.journal
  391. !:ext journal
  392. # after a file has been rotated it should be set to STATE_ARCHIVED
  393. >>>>>>>>16 ubyte 2 \b, archived
  394. !:ext journal
  395. # no *.journal~ found
  396. #!:ext journal/journal~
  397. # compatible_flags
  398. >>>>>>>>8 ulelong&1 1 \b, sealed
  399. # incompatible_flags; COMPRESSED_XZ~1 COMPRESSED_LZ4~2 KEYED_HASH~4 COMPRESSED_ZSTD~8 COMPACT~16
  400. #>>>>>>>>12 ulelong x FLAGS=%#x
  401. >>>>>>>>12 ulelong&1 1 \b, compressed
  402. >>>>>>>>12 ulelong&2 !0 \b, compressed lz4
  403. >>>>>>>>12 ulelong&4 !0 \b, keyed hash siphash24
  404. >>>>>>>>12 ulelong&8 !0 \b, compressed zstd
  405. >>>>>>>>12 ulelong&16 !0 \b, compact
  406. # uint8_t reserved[7]; apparently nil
  407. #>>17 long !0 \b, reserved %#8.8x
  408. # seqnum_id; like: 0 e623691afec94b5aa968ae2d726c49cc f98b2af481924b29 8d6816ca3639edc6
  409. #>>>>>>>>72 ubequad x \b, seqnum_id %#16.16llx
  410. #>>>>>>>>80 ubequad x b%16.16llx
  411. # header_size like: 100h
  412. >>>>>>>>88 ulequad !0x100h \b, header size %#llx
  413. # arena_size like: 0 7fff00h ffff00h 17fff00h
  414. #>>>>>>>>96 ulequad >0 \b, arena size %#llx
  415. # data_hash_table_offset like: 0 15f0h 15f0h
  416. #>>>>>>>>104 ulequad >0 \b, hash table offset %#llx
  417. # data_hash_table_size like: 0 38e380h
  418. #>>>>>>>>112 ulequad >0 \b, hash table size %#llx
  419. # field_hash_table_offset like: 0 110h
  420. #>>>>>>>>120 ulequad >0 \b, field hash table offset %#llx
  421. # field_hash_table_size like: 0 14d0h
  422. #>>>>>>>>128 ulequad >0 \b, field hash table size %#llx
  423. # tail_object_offset like: 0 43edd8h 511278h c68968h d487d0h efaa98h
  424. #>>>>>>>>136 ulequad >0 \b, tail object offset %#llx
  425. # n_objects like: 0 1032h 5a2eh 92bdh a8b5h aa75h 112adh 40c23h 4714eh
  426. #>>>>>>>>144 ulequad >0 \b, objects %#llx
  427. # n_entries like: 0 3aeh 235ah 2dc4h 3125h 16129h 187a1h
  428. >>>>>>>>152 ulequad >0 \b, entries %#llx
  429. # tail_entry_seqnum like: 0 1988h 16249h 24c12h 24c12h 41e64h 9fefdh
  430. #>>>>>>>>160 ulequad >0 \b, tail entry seqnum %#llx
  431. # head_entry_seqnum like: 0 1h 15dbh 6552h 213bfh 213bfh 3e672h 9a28ah
  432. #>>>>>>>>168 ulequad >0 \b, head entry seqnum %#llx
  433. # entry_array_offset like: 0 390058h 3909d8h 3909e0h
  434. #>>>>>>>>176 ulequad >0 \b, entry array offset %#llx
  435. # BCache backing and cache devices
  436. # From: Gabriel de Perthuis <g2p.code@gmail.com>
  437. 0x1008 lequad 8
  438. >0x1018 string \xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81 BCache
  439. >>0x1010 ulequad 0 cache device
  440. >>0x1010 ulequad 1 backing device
  441. >>0x1010 ulequad 3 cache device
  442. >>0x1010 ulequad 4 backing device
  443. >>0x1048 string >0 \b, label "%.32s"
  444. >>0x1028 ubelong x \b, uuid %08x
  445. >>0x102c ubeshort x \b-%04x
  446. >>0x102e ubeshort x \b-%04x
  447. >>0x1030 ubeshort x \b-%04x
  448. >>0x1032 ubelong x \b-%08x
  449. >>0x1036 ubeshort x \b%04x
  450. >>0x1038 ubelong x \b, set uuid %08x
  451. >>0x103c ubeshort x \b-%04x
  452. >>0x103e ubeshort x \b-%04x
  453. >>0x1040 ubeshort x \b-%04x
  454. >>0x1042 ubelong x \b-%08x
  455. >>0x1046 ubeshort x \b%04x
  456. # Linux device tree:
  457. # File format description can be found in the Linux kernel sources at
  458. # Documentation/devicetree/booting-without-of.txt
  459. # From Christoph Biedl
  460. 0 belong 0xd00dfeed
  461. # structure must be within blob, strings are omitted to handle devicetrees > 1M
  462. >&(8.L) byte x
  463. >>20 belong >1 Device Tree Blob version %d
  464. >>>4 belong x \b, size=%d
  465. >>>20 belong >1
  466. >>>>28 belong x \b, boot CPU=%d
  467. >>>20 belong >2
  468. >>>>32 belong x \b, string block size=%d
  469. >>>20 belong >16
  470. >>>>36 belong x \b, DT structure block size=%d
  471. # glibc locale archive as defined in glibc locale/locarchive.h
  472. 0 lelong 0xde020109 locale archive
  473. >24 lelong x %d strings
  474. # Linux Software RAID (mdadm)
  475. # Russell Coker <russell@coker.com.au>
  476. 0 name linuxraid
  477. >16 belong x UUID=%8x:
  478. >20 belong x \b%8x:
  479. >24 belong x \b%8x:
  480. >28 belong x \b%8x
  481. >32 string x name=%s
  482. >72 lelong x level=%d
  483. >92 lelong x disks=%d
  484. 4096 lelong 0xa92b4efc Linux Software RAID
  485. >4100 lelong x version 1.2 (%d)
  486. >4096 use linuxraid
  487. 0 lelong 0xa92b4efc Linux Software RAID
  488. >4 lelong x version 1.1 (%d)
  489. >0 use linuxraid
  490. # Summary: Database file for mlocate
  491. # Description: A database file as used by mlocate, a fast implementation
  492. # of locate/updatedb. It uses merging to reuse the existing
  493. # database and avoid rereading most of the filesystem. It's
  494. # the default version of locate on Arch Linux (and others).
  495. # File path: /var/lib/mlocate/mlocate.db by default (but configurable)
  496. # Site: https://fedorahosted.org/mlocate/
  497. # Format docs: https://linux.die.net/man/5/mlocate.db
  498. # Type: mlocate database file
  499. # URL: https://fedorahosted.org/mlocate/
  500. # From: Wander Nauta <info@wandernauta.nl>
  501. 0 string \0mlocate mlocate database
  502. >12 byte x \b, version %d
  503. >13 byte 1 \b, require visibility
  504. >16 string x \b, root %s
  505. # Dump files for iproute2 tool. Generated by the "ip r|a save" command. URL:
  506. # https://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
  507. # From: Pavel Emelyanov <xemul@parallels.com>
  508. 0 lelong 0x45311224 iproute2 routes dump
  509. 0 lelong 0x47361222 iproute2 addresses dump
  510. # Image and service files for CRIU tool.
  511. # URL: https://criu.org
  512. # From: Pavel Emelyanov <xemul@parallels.com>
  513. 0 lelong 0x54564319 CRIU image file v1.1
  514. 0 lelong 0x55105940 CRIU service file
  515. 0 lelong 0x58313116 CRIU inventory
  516. # Kdump compressed dump files
  517. # https://github.com/makedumpfile/makedumpfile/blob/master/IMPLEMENTATION
  518. 0 string KDUMP\x20\x20\x20 Kdump compressed dump
  519. >0 use kdump-compressed-dump
  520. 0 name kdump-compressed-dump
  521. >8 long x v%d
  522. >12 string >\0 \b, system %s
  523. >77 string >\0 \b, node %s
  524. >142 string >\0 \b, release %s
  525. >207 string >\0 \b, version %s
  526. >272 string >\0 \b, machine %s
  527. >337 string >\0 \b, domain %s
  528. # Flattened format
  529. 0 string makedumpfile
  530. >16 bequad 1
  531. >>0x1010 string KDUMP\x20\x20\x20 Flattened kdump compressed dump
  532. >>>0x1010 use kdump-compressed-dump
  533. # Device Tree files
  534. 0 search/1024 /dts-v1/ Device Tree File (v1)
  535. # beat c code
  536. !:strength +14
  537. # e2fsck undo file
  538. # David Gilman <davidgilman1@gmail.com>
  539. 0 string E2UNDO02 e2fsck undo file, version 2
  540. >44 lelong x \b, undo file is
  541. >>44 lelong&1 0 not finished
  542. >>44 lelong&1 1 finished
  543. >48 lelong x \b, undo file features:
  544. >>48 lelong&1 0 lacks filesystem offset
  545. >>48 lelong&1 1 has filesystem offset
  546. >>>64 lequad x at %#llx
  547. # ansible vault (does not really belong here)
  548. 0 string $ANSIBLE_VAULT; Ansible Vault
  549. >&0 regex [0-9]+\\.[0-9]+ \b, version %s
  550. >>&0 string ;
  551. >>>&0 regex [A-Z0-9]+ \b, encryption %s
  552. # From: Joerg Jenderek
  553. # URL: https://www.gnu.org/software/grub
  554. # Reference: https://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz
  555. # grub-2.06/include/grub/keyboard_layouts.h
  556. # grub-2.06/grub-core/commands/keylayouts.c
  557. # GRUB_KEYBOARD_LAYOUTS_FILEMAGIC
  558. 0 string GRUBLAYO GRUB Keyboard
  559. !:mime application/x-grub-keyboard
  560. !:ext gkb
  561. # GRUB_KEYBOARD_LAYOUTS_VERSION like: 10
  562. >8 ulelong !10 \b, version %u
  563. # 4 grub_uint32_t grub_keyboard_layout[160]
  564. # for normal french keyboard this is letter a
  565. >92 ubyte !0x71
  566. >>92 ubyte >0x40 \b, english q is %c
  567. #>732 ubyte x \b, english Q is %c
  568. # for normal german keyboard this is letter z
  569. >124 ubyte !0x79
  570. >>124 ubyte >0x40 \b, english y is %c
  571. #>764 ubyte x \b, english Y is %c