Skip to content

Instantly share code, notes, and snippets.

@citrus-it
Last active December 5, 2024 14:43
Show Gist options
  • Save citrus-it/f64d8a8aee00fb5158cc5ef2567cfb87 to your computer and use it in GitHub Desktop.
Save citrus-it/f64d8a8aee00fb5158cc5ef2567cfb87 to your computer and use it in GitHub Desktop.
hexdump output comparison

Relating to https://code.illumos.org/c/illumos-gate/+/3833/3 (patchset 3)

smbios

NB: Spaces now printed as-is rather than as dot (.)

bloody% smbios -t1 -x
ID    SIZE TYPE
2     105  SMB_TYPE_SYSTEM (type 1) (system information)

  Manufacturer: OmniOS
  Product: OmniOS HVM
  Version: 1.0
  Serial Number: 15d75ebd-b708-c0ef-eaa1-8670b7ce8a40

  UUID: bd5ed715-08b7-efc0-eaa1-8670b7ce8a40
  Wake-Up Event: 0x6 (power switch)
  SKU Number: 001
  Family: Virtual Machine

  offset:   0 1 2 3  4 5 6 7  8 9 a b  c d e f  0123456789abcdef
       0:  011b0200 01020304 bd5ed715 08b7efc0  .........^......
    0x10:  eaa18670 b7ce8a40 0605064f 6d6e694f  [email protected]
    0x20:  53004f6d 6e694f53 2048564d 00312e30  S.OmniOS.HVM.1.0
    0x30:  00313564 37356562 642d6237 30382d63  .15d75ebd-b708-c
    0x40:  3065662d 65616131 2d383637 30623763  0ef-eaa1-8670b7c
    0x50:  65386134 30003030 31005669 72747561  e8a40.001.Virtua
    0x60:  6c204d61 6368696e 65                 l.Machine
ID    SIZE TYPE
2     105  SMB_TYPE_SYSTEM (type 1) (system information)

  Manufacturer: OmniOS
  Product: OmniOS HVM
  Version: 1.0
  Serial Number: 15d75ebd-b708-c0ef-eaa1-8670b7ce8a40

  UUID: bd5ed715-08b7-efc0-eaa1-8670b7ce8a40
  Wake-Up Event: 0x6 (power switch)
  SKU Number: 001
  Family: Virtual Machine

        0 1 2 3  4 5 6 7  8 9 a b  c d e f   0123456789abcdef
  00:  011b0200 01020304 bd5ed715 08b7efc0 | .........^......
  10:  eaa18670 b7ce8a40 0605064f 6d6e694f | [email protected]
  20:  53004f6d 6e694f53 2048564d 00312e30 | S.OmniOS HVM.1.0
  30:  00313564 37356562 642d6237 30382d63 | .15d75ebd-b708-c
  40:  3065662d 65616131 2d383637 30623763 | 0ef-eaa1-8670b7c
  50:  65386134 30003030 31005669 72747561 | e8a40.001.Virtua
  60:  6c204d61 6368696e 65                | l Machine

nvmeadm

# nvmeadm get-logpage nvme1 wdc/ccds
nvme1: CCDS Build Information (wdc/ccds)
               0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f   0123456789abcdef
0x000000  | 43 46 45 5f 43 43 44 53 01 00 00 00 01 00 01 00 | CFE_CCDS........
0x000010  | 02 60 00 00 43 46 45 5f 43 43 44 53 01 00 00 00 | .`..CFE_CCDS....
0x000020  | 02 00 01 00                                     | ....
# /tmp/nvmeadm get-logpage nvme1 wdc/ccds
nvme1: CCDS Build Information (wdc/ccds)
      0  1  2  3  4  5  6  7   8  9  a  b  c  d  e  f   0123456789abcdef
00:  43 46 45 5f 43 43 44 53  01 00 00 00 01 00 01 00 | CFE_CCDS........
10:  02 60 00 00 43 46 45 5f  43 43 44 53 01 00 00 00 | .`..CFE_CCDS....
20:  02 00 01 00                                      | ....

elfdump

bloody% elfdump -n core.sudo.4751 | sed -n '/pr_fpreg/,/^$/p'
            pr_fpreg:
                [0]     7f 13 00 00   00 00 00 00   00 00 00 00
                [12]    00 00 00 00   00 00 00 00   00 00 00 00
                [24]    80 1f 00 00   ff ff 00 00   00 00 00 00
                ...
                [492]   00 00 00 00   00 00 00 00   00 00 00 00
                [504]   00 00 00 00   00 00 00 00   00 00 00 00
                [516]   00 00 00 00   00 00 00 00   00 00 00 00

        pr_fpreg:
            [0]     7f 13 00 00   00 00 00 00   00 00 00 00
            [12]    00 00 00 00   00 00 00 00   00 00 00 00
            [24]    80 1f 00 00   ff ff 00 00   00 00 00 00
            ...
            [492]   00 00 00 00   00 00 00 00   00 00 00 00
            [504]   00 00 00 00   00 00 00 00   00 00 00 00
            [516]   00 00 00 00   00 00 00 00   00 00 00 00
bloody% /tmp/elfdump -n core.sudo.4751 | sed -n '/pr_fpreg/,/^$/p'
            pr_fpreg:
                [0]     7f 13 00 00  00 00 00 00  00 00 00 00
                [12]    00 00 00 00  00 00 00 00  00 00 00 00
                [24]    80 1f 00 00  ff ff 00 00  00 00 00 00
                [36]    00 00 00 00  00 00 00 00  00 00 00 00
                ...
                [492]   00 00 00 00  00 00 00 00  00 00 00 00
                [504]   00 00 00 00  00 00 00 00  00 00 00 00
                [516]   00 00 00 00  00 00 00 00  00 00 00 00

        pr_fpreg:
            [0]     7f 13 00 00  00 00 00 00  00 00 00 00
            [12]    00 00 00 00  00 00 00 00  00 00 00 00
            [24]    80 1f 00 00  ff ff 00 00  00 00 00 00
            ...
            [492]   00 00 00 00  00 00 00 00  00 00 00 00
            [504]   00 00 00 00  00 00 00 00  00 00 00 00
            [516]   00 00 00 00  00 00 00 00  00 00 00 00
bloody% elfdump -n /opt/ooce/go-1.20/pkg/tool/illumos_amd64/dist

Note Section:  .note.go.buildid

  entry [0]
    namesz: 0x4
    descsz: 0x53
    type:   0x4
    name:
        Go\0\0
    desc:
        [0]     74 41 36 6e   72 30 48 48   6f 50 6c 59   42 71 75 33
        [16]    75 33 41 6b   2f 30 41 66   52 78 77 31   4f 75 47 71
        [32]    74 73 50 59   31 6b 36 7a   6c 2f 42 4d   5a 71 4a 56
        [48]    62 4a 31 5f   47 67 46 6b   47 33 75 75   32 49 2f 43
        [64]    74 6b 31 69   61 68 4d 4d   6a 37 76 52   50 57 59 34
        [80]    70 32 4c
bloody% /tmp/elfdump -n /opt/ooce/go-1.20/pkg/tool/illumos_amd64/dist

Note Section:  .note.go.buildid

  entry [0]
    namesz: 0x4
    descsz: 0x53
    type:   0x4
    name:
        Go\0\0
    desc:
        [0]     74 41 36 6e  72 30 48 48  6f 50 6c 59  42 71 75 33
        [16]    75 33 41 6b  2f 30 41 66  52 78 77 31  4f 75 47 71
        [32]    74 73 50 59  31 6b 36 7a  6c 2f 42 4d  5a 71 4a 56
        [48]    62 4a 31 5f  47 67 46 6b  47 33 75 75  32 49 2f 43
        [64]    74 6b 31 69  61 68 4d 4d  6a 37 76 52  50 57 59 34
        [80]    70 32 4c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment