STRUCT TEST_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to struct test_data(9) β€” that's the manual page name right there, and it lives in the Kernel API Manual, section 9, which is the kernel-API section, iykyk. πŸ’…

This one's a shortie, so let's not drag it out.


✨ NAME ✨

  • struct test_data β€” Test data.

That's genuinely the whole thing. πŸ’€ A struct called test_data, and what is it? Test data. The name ate and left zero crumbs. πŸŽ€


no cap, that's all the description this page gives us β€” a name and a one-liner, and we're honoring every crumb of it. 🫢 The rest is still loading, bestie, so stay tuned. 🌸

✨ SYNOPSIS ✨

okay bestie so the SYNOPSIS here is literally just a struct and then an absolutely unhinged amount of data 😭 no arguments, no return value, no functions to call β€” it's the struct test_data definition and the data[] table that the test just chucks itself at. here's the shape of the thing:

struct test_data {
    int len;
    u8 bytes[INTEL_PT_PKT_MAX_SZ];
    enum intel_pt_pkt_ctx ctx;
    struct intel_pt_pkt packet;
    enum intel_pt_pkt_ctx new_ctx;
    int ctx_unchanged;
    } data[] = {

and then. the array. all of it. in order. exactly like this:

    { 1, { 0 }, 0, { INTEL_PT_PAD, 0, 0 }, 0, 1 },
    { 1, { 4 }, 0, { INTEL_PT_TNT, 1, 0 }, 0, 0 },
    { 1, { 6 }, 0, { INTEL_PT_TNT, 1, 0x20ULL << 58 }, 0, 0 },
    { 1, { 0x80 }, 0, { INTEL_PT_TNT, 6, 0 }, 0, 0 },
    { 1, { 0xfe }, 0, { INTEL_PT_TNT, 6, 0x3fULL << 58 }, 0, 0 },
    { 8, { 0x02, 0xa3, 2 }, 0, { INTEL_PT_TNT, 1, 0xa302ULL << 47 }, 0, 0 },
    { 8, { 0x02, 0xa3, 3 }, 0, { INTEL_PT_TNT, 1, 0x1a302ULL << 47 }, 0, 0 },
    { 8, { 0x02, 0xa3, 0, 0, 0, 0, 0, 0x80 }, 0, { INTEL_PT_TNT, 47, 0xa302ULL << 1 }, 0, 0 },
    { 8, { 0x02, 0xa3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, 0, { INTEL_PT_TNT, 47, 0xffffffffffffa302ULL << 1 }, 0, 0 },

    { 1, { 0x0d }, 0, { INTEL_PT_TIP, 0, 0 }, 0, 0 },
    { 3, { 0x2d, 1, 2 }, 0, { INTEL_PT_TIP, 1, 0x201 }, 0, 0 },
    { 5, { 0x4d, 1, 2, 3, 4 }, 0, { INTEL_PT_TIP, 2, 0x4030201 }, 0, 0 },
    { 7, { 0x6d, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_TIP, 3, 0x60504030201 }, 0, 0 },
    { 7, { 0x8d, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_TIP, 4, 0x60504030201 }, 0, 0 },
    { 9, { 0xcd, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_TIP, 6, 0x807060504030201 }, 0, 0 },

    { 1, { 0x11 }, 0, { INTEL_PT_TIP_PGE, 0, 0 }, 0, 0 },
    { 3, { 0x31, 1, 2 }, 0, { INTEL_PT_TIP_PGE, 1, 0x201 }, 0, 0 },
    { 5, { 0x51, 1, 2, 3, 4 }, 0, { INTEL_PT_TIP_PGE, 2, 0x4030201 }, 0, 0 },
    { 7, { 0x71, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_TIP_PGE, 3, 0x60504030201 }, 0, 0 },
    { 7, { 0x91, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_TIP_PGE, 4, 0x60504030201 }, 0, 0 },
    { 9, { 0xd1, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_TIP_PGE, 6, 0x807060504030201 }, 0, 0 },

    { 1, { 0x01 }, 0, { INTEL_PT_TIP_PGD, 0, 0 }, 0, 0 },
    { 3, { 0x21, 1, 2 }, 0, { INTEL_PT_TIP_PGD, 1, 0x201 }, 0, 0 },
    { 5, { 0x41, 1, 2, 3, 4 }, 0, { INTEL_PT_TIP_PGD, 2, 0x4030201 }, 0, 0 },
    { 7, { 0x61, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_TIP_PGD, 3, 0x60504030201 }, 0, 0 },
    { 7, { 0x81, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_TIP_PGD, 4, 0x60504030201 }, 0, 0 },
    { 9, { 0xc1, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_TIP_PGD, 6, 0x807060504030201 }, 0, 0 },

    { 1, { 0x1d }, 0, { INTEL_PT_FUP, 0, 0 }, 0, 0 },
    { 3, { 0x3d, 1, 2 }, 0, { INTEL_PT_FUP, 1, 0x201 }, 0, 0 },
    { 5, { 0x5d, 1, 2, 3, 4 }, 0, { INTEL_PT_FUP, 2, 0x4030201 }, 0, 0 },
    { 7, { 0x7d, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_FUP, 3, 0x60504030201 }, 0, 0 },
    { 7, { 0x9d, 1, 2, 3, 4, 5, 6 }, 0, { INTEL_PT_FUP, 4, 0x60504030201 }, 0, 0 },
    { 9, { 0xdd, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_FUP, 6, 0x807060504030201 }, 0, 0 },

    { 8, { 0x02, 0x43, 2, 4, 6, 8, 10, 12 }, 0, { INTEL_PT_PIP, 0, 0xC0A08060402 }, 0, 0 },
    { 8, { 0x02, 0x43, 3, 4, 6, 8, 10, 12 }, 0, { INTEL_PT_PIP, 0, 0xC0A08060403 }, 0, 0 },

    { 2, { 0x99, 0x00 }, 0, { INTEL_PT_MODE_EXEC, 0, 16 }, 0, 0 },
    { 2, { 0x99, 0x01 }, 0, { INTEL_PT_MODE_EXEC, 1, 64 }, 0, 0 },
    { 2, { 0x99, 0x02 }, 0, { INTEL_PT_MODE_EXEC, 2, 32 }, 0, 0 },
    { 2, { 0x99, 0x04 }, 0, { INTEL_PT_MODE_EXEC, 4, 16 }, 0, 0 },
    { 2, { 0x99, 0x05 }, 0, { INTEL_PT_MODE_EXEC, 5, 64 }, 0, 0 },
    { 2, { 0x99, 0x06 }, 0, { INTEL_PT_MODE_EXEC, 6, 32 }, 0, 0 },

    { 2, { 0x99, 0x20 }, 0, { INTEL_PT_MODE_TSX, 0, 0 }, 0, 0 },
    { 2, { 0x99, 0x21 }, 0, { INTEL_PT_MODE_TSX, 0, 1 }, 0, 0 },
    { 2, { 0x99, 0x22 }, 0, { INTEL_PT_MODE_TSX, 0, 2 }, 0, 0 },

    { 2, { 0x02, 0x83 }, 0, { INTEL_PT_TRACESTOP, 0, 0 }, 0, 0 },

    { 4, { 0x02, 0x03, 0x12, 0 }, 0, { INTEL_PT_CBR, 0, 0x12 }, 0, 1 },

    { 8, { 0x19, 1, 2, 3, 4, 5, 6, 7 }, 0, { INTEL_PT_TSC, 0, 0x7060504030201 }, 0, 1 },

    { 2, { 0x59, 0x12 }, 0, { INTEL_PT_MTC, 0, 0x12 }, 0, 1 },

    { 7, { 0x02, 0x73 }, 0, { INTEL_PT_TMA, 0, 0 }, 0, 1 },
    { 7, { 0x02, 0x73, 1, 2 }, 0, { INTEL_PT_TMA, 0, 0x201 }, 0, 1 },
    { 7, { 0x02, 0x73, 0, 0, 0, 0xff, 1 }, 0, { INTEL_PT_TMA, 0x1ff, 0 }, 0, 1 },
    { 7, { 0x02, 0x73, 0x80, 0xc0, 0, 0xff, 1 }, 0, { INTEL_PT_TMA, 0x1ff, 0xc080 }, 0, 1 },

    { 1, { 0x03 }, 0, { INTEL_PT_CYC, 0, 0 }, 0, 1 },
    { 1, { 0x0b }, 0, { INTEL_PT_CYC, 0, 1 }, 0, 1 },
    { 1, { 0xfb }, 0, { INTEL_PT_CYC, 0, 0x1f }, 0, 1 },
    { 2, { 0x07, 2 }, 0, { INTEL_PT_CYC, 0, 0x20 }, 0, 1 },
    { 2, { 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0xfff }, 0, 1 },
    { 3, { 0x07, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x1000 }, 0, 1 },
    { 3, { 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0x7ffff }, 0, 1 },
    { 4, { 0x07, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x80000 }, 0, 1 },
    { 4, { 0xff, 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0x3ffffff }, 0, 1 },
    { 5, { 0x07, 1, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x4000000 }, 0, 1 },
    { 5, { 0xff, 0xff, 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0x1ffffffff }, 0, 1 },
    { 6, { 0x07, 1, 1, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x200000000 }, 0, 1 },
    { 6, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0xffffffffff }, 0, 1 },
    { 7, { 0x07, 1, 1, 1, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x10000000000 }, 0, 1 },
    { 7, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0x7fffffffffff }, 0, 1 },
    { 8, { 0x07, 1, 1, 1, 1, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x800000000000 }, 0, 1 },
    { 8, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0x3fffffffffffff }, 0, 1 },
    { 9, { 0x07, 1, 1, 1, 1, 1, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x40000000000000 }, 0, 1 },
    { 9, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe }, 0, { INTEL_PT_CYC, 0, 0x1fffffffffffffff }, 0, 1 },
    { 10, { 0x07, 1, 1, 1, 1, 1, 1, 1, 1, 2 }, 0, { INTEL_PT_CYC, 0, 0x2000000000000000 }, 0, 1 },
    { 10, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe }, 0, { INTEL_PT_CYC, 0, 0xffffffffffffffff }, 0, 1 },

    { 7, { 0x02, 0xc8, 1, 2, 3, 4, 5 }, 0, { INTEL_PT_VMCS, 5, 0x504030201 }, 0, 0 },

    { 2, { 0x02, 0xf3 }, 0, { INTEL_PT_OVF, 0, 0 }, 0, 0 },
    { 2, { 0x02, 0xf3 }, INTEL_PT_BLK_4_CTX, { INTEL_PT_OVF, 0, 0 }, 0, 0 },
    { 2, { 0x02, 0xf3 }, INTEL_PT_BLK_8_CTX, { INTEL_PT_OVF, 0, 0 }, 0, 0 },

    { 16, { 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82 }, 0, { INTEL_PT_PSB, 0, 0 }, 0, 0 },
    { 16, { 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82 }, INTEL_PT_BLK_4_CTX, { INTEL_PT_PSB, 0, 0 }, 0, 0 },
    { 16, { 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82 }, INTEL_PT_BLK_8_CTX, { INTEL_PT_PSB, 0, 0 }, 0, 0 },

    { 2, { 0x02, 0x23 }, 0, { INTEL_PT_PSBEND, 0, 0 }, 0, 0 },

    { 11, { 0x02, 0xc3, 0x88, 1, 2, 3, 4, 5, 6, 7 }, 0, { INTEL_PT_MNT, 0, 0x7060504030201 }, 0, 1 },

    { 6, { 0x02, 0x12, 1, 2, 3, 4 }, 0, { INTEL_PT_PTWRITE, 0, 0x4030201 }, 0, 0 },
    { 10, { 0x02, 0x32, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_PTWRITE, 1, 0x807060504030201 }, 0, 0 },
    { 6, { 0x02, 0x92, 1, 2, 3, 4 }, 0, { INTEL_PT_PTWRITE_IP, 0, 0x4030201 }, 0, 0 },
    { 10, { 0x02, 0xb2, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_PTWRITE_IP, 1, 0x807060504030201 }, 0, 0 },

    { 2, { 0x02, 0x62 }, 0, { INTEL_PT_EXSTOP, 0, 0 }, 0, 1 },
    { 2, { 0x02, 0xe2 }, 0, { INTEL_PT_EXSTOP_IP, 0, 0 }, 0, 1 },

    { 10, { 0x02, 0xc2 }, 0, { INTEL_PT_MWAIT, 0, 0 }, 0, 0 },
    { 10, { 0x02, 0xc2, 1, 2, 3, 4, 5, 6, 7, 8 }, 0, { INTEL_PT_MWAIT, 0, 0x807060504030201 }, 0, 0 },
    { 10, { 0x02, 0xc2, 0xff, 2, 3, 4, 7, 6, 7, 8 }, 0, { INTEL_PT_MWAIT, 0, 0x8070607040302ff }, 0, 0 },

    { 4, { 0x02, 0x22 }, 0, { INTEL_PT_PWRE, 0, 0 }, 0, 1 },
    { 4, { 0x02, 0x22, 1, 2 }, 0, { INTEL_PT_PWRE, 0, 0x0201 }, 0, 1 },
    { 4, { 0x02, 0x22, 0x80, 0x34 }, 0, { INTEL_PT_PWRE, 0, 0x3480 }, 0, 1 },
    { 4, { 0x02, 0x22, 0x00, 0x56 }, 0, { INTEL_PT_PWRE, 0, 0x5600 }, 0, 1 },

    { 7, { 0x02, 0xa2 }, 0, { INTEL_PT_PWRX, 0, 0 }, 0, 1 },
    { 7, { 0x02, 0xa2, 1, 2, 3, 4, 5 }, 0, { INTEL_PT_PWRX, 0, 0x504030201 }, 0, 1 },
    { 7, { 0x02, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff }, 0, { INTEL_PT_PWRX, 0, 0xffffffffff }, 0, 1 },

    { 3, { 0x02, 0x63, 0x00 }, 0, { INTEL_PT_BBP, 0, 0 }, INTEL_PT_BLK_8_CTX, 0 },
    { 3, { 0x02, 0x63, 0x80 }, 0, { INTEL_PT_BBP, 1, 0 }, INTEL_PT_BLK_4_CTX, 0 },
    { 3, { 0x02, 0x63, 0x1f }, 0, { INTEL_PT_BBP, 0, 0x1f }, INTEL_PT_BLK_8_CTX, 0 },
    { 3, { 0x02, 0x63, 0x9f }, 0, { INTEL_PT_BBP, 1, 0x1f }, INTEL_PT_BLK_4_CTX, 0 },

    { 5, { 0x04 }, INTEL_PT_BLK_4_CTX, { INTEL_PT_BIP, 0, 0 }, INTEL_PT_BLK_4_CTX, 0 },
    { 5, { 0xfc }, INTEL_PT_BLK_4_CTX, { INTEL_PT_BIP, 0x1f, 0 }, INTEL_PT_BLK_4_CTX, 0 },
    { 5, { 0x04, 1, 2, 3, 4 }, INTEL_PT_BLK_4_CTX, { INTEL_PT_BIP, 0, 0x04030201 }, INTEL_PT_BLK_4_CTX, 0 },
    { 5, { 0xfc, 1, 2, 3, 4 }, INTEL_PT_BLK_4_CTX, { INTEL_PT_BIP, 0x1f, 0x04030201 }, INTEL_PT_BLK_4_CTX, 0 },

    { 9, { 0x04 }, INTEL_PT_BLK_8_CTX, { INTEL_PT_BIP, 0, 0 }, INTEL_PT_BLK_8_CTX, 0 },
    { 9, { 0xfc }, INTEL_PT_BLK_8_CTX, {

(and yeah β€” the source really does just stop mid-{ right there in this chunk 🫠 the 0xfc / INTEL_PT_BLK_8_CTX entry picks itself back up in the next bit, don't worry.)


πŸŽ€ the six slots, in order

every single row gives you these, and only these, in this order:

  • int len β€” how many of the bytes are actually live in that row.
  • u8 bytes[INTEL_PT_PKT_MAX_SZ] β€” the raw packet bytes themselves, sitting in a u8 array.
  • enum intel_pt_pkt_ctx ctx β€” the context the thing starts out in. Mostly 0, and where it isn't, it's spelled out loud like INTEL_PT_BLK_4_CTX / INTEL_PT_BLK_8_CTX.
  • struct intel_pt_pkt packet β€” the expected parse result, given as three braced values.
  • enum intel_pt_pkt_ctx new_ctx β€” the context it's supposed to land in afterwards.
  • int ctx_unchanged β€” an int flag, and it's 1 or 0 depending on the row. lowkey the main character of the last column tbh πŸ’…

πŸ” the groups, in the order they show up

not me memorising this whole table β€” but like, for real, spotting the runs makes it way less scary:

  • INTEL_PT_PAD β€” exactly one entry, { 0 } with ctx_unchanged set to 1.
  • INTEL_PT_TNT β€” nine entries, starting with the single bytes 4 / 6 / 0x80 / 0xfe, then the multi-byte 0x02, 0xa3, ... ones with counts like 1 and 47 and those giant ULL << 47 / ULL << 1 payload expressions.
  • INTEL_PT_TIP β€” six entries, first bytes 0x0d, 0x2d, 0x4d, 0x6d, 0x8d, 0xcd.
  • INTEL_PT_TIP_PGE β€” six entries, 0x11, 0x31, 0x51, 0x71, 0x91, 0xd1.
  • INTEL_PT_TIP_PGD β€” six entries, 0x01, 0x21, 0x41, 0x61, 0x81, 0xc1.
  • INTEL_PT_FUP β€” six entries, 0x1d, 0x3d, 0x5d, 0x7d, 0x9d, 0xdd.
  • INTEL_PT_PIP β€” two entries, both { 0x02, 0x43, ... }, payloads 0xC0A08060402 and 0xC0A08060403.
  • INTEL_PT_MODE_EXEC β€” six entries, { 0x99, 0x00 } through { 0x99, 0x06 }, with 16 / 64 / 32 in the packet slot.
  • INTEL_PT_MODE_TSX β€” three entries, { 0x99, 0x20 }, { 0x99, 0x21 }, { 0x99, 0x22 }.
  • INTEL_PT_TRACESTOP β€” one entry, { 0x02, 0x83 }.
  • INTEL_PT_CBR β€” one entry, { 0x02, 0x03, 0x12, 0 }, ctx_unchanged = 1.
  • INTEL_PT_TSC β€” one entry, { 0x19, 1, 2, 3, 4, 5, 6, 7 }, ctx_unchanged = 1.
  • INTEL_PT_MTC β€” one entry, { 0x59, 0x12 }, ctx_unchanged = 1.
  • INTEL_PT_TMA β€” four entries, all { 0x02, 0x73, ... }, ctx_unchanged = 1.
  • INTEL_PT_CYC β€” the big one: twenty-one entries climbing from one byte up to ten bytes, first bytes 0x03 / 0x0b / 0xfb / 0x07 / 0xff, payloads going all the way from 0 to 0xffffffffffffffff. iconic honestly πŸ”₯
  • INTEL_PT_VMCS β€” one entry, { 0x02, 0xc8, 1, 2, 3, 4, 5 }, packet slot { INTEL_PT_VMCS, 5, 0x504030201 }.
  • INTEL_PT_OVF β€” three entries, all the same { 0x02, 0xf3 } bytes, once with ctx 0 and then again with INTEL_PT_BLK_4_CTX and INTEL_PT_BLK_8_CTX.
  • INTEL_PT_PSB β€” three entries, all the sixteen-byte { 0x02, 0x82, ... } repeat, again once plain and once each with INTEL_PT_BLK_4_CTX / INTEL_PT_BLK_8_CTX.
  • INTEL_PT_PSBEND β€” one entry, { 0x02, 0x23 }.
  • INTEL_PT_MNT β€” one entry, { 0x02, 0xc3, 0x88, 1, 2, 3, 4, 5, 6, 7 }, ctx_unchanged = 1.
  • INTEL_PT_PTWRITE β€” two entries, { 0x02, 0x12, ... } and { 0x02, 0x32, ... }.
  • INTEL_PT_PTWRITE_IP β€” two entries, { 0x02, 0x92, ... } and { 0x02, 0xb2, ... }.
  • INTEL_PT_EXSTOP β€” one entry, { 0x02, 0x62 }, ctx_unchanged = 1.
  • INTEL_PT_EXSTOP_IP β€” one entry, { 0x02, 0xe2 }, ctx_unchanged = 1.
  • INTEL_PT_MWAIT β€” three entries, all { 0x02, 0xc2, ... } with len 10 and ctx_unchanged = 0. (the third one has that chaotic 0xff, 2, 3, 4, 7, 6, 7, 8 byte run and I love her for it 🌸)
  • INTEL_PT_PWRE β€” four entries, { 0x02, 0x22, ... }, ctx_unchanged = 1.
  • INTEL_PT_PWRX β€” three entries, { 0x02, 0xa2, ... }, ctx_unchanged = 1.
  • INTEL_PT_BBP β€” four entries, { 0x02, 0x63, 0x00 / 0x80 / 0x1f / 0x9f }, and the new_ctx flips between INTEL_PT_BLK_8_CTX and INTEL_PT_BLK_4_CTX depending on the byte. πŸ‘€
  • INTEL_PT_BIP β€” the { 0x04 } / { 0xfc } family, len 5 for the INTEL_PT_BLK_4_CTX ones and len 9 for the INTEL_PT_BLK_8_CTX ones... and that's exactly where this part of the page cuts off. ✨
heads up bestie: don't "tidy" any of these numbers when you copy them. <red>every byte, every shift, every ctx_unchanged flag is load-bearing</red> and if you fat-finger a 0xff the test is gonna be so confused 😭

…and the array just keeps going, bestie πŸ’… icymi here's the rest of it, verbatim, no cap:

           INTEL_PT_BIP, 0x1f, 0}, INTEL_PT_BLK_8_CTX, 0 }, {
           9, {
           0x04, 1, 2, 3, 4, 5, 6, 7, 8}, INTEL_PT_BLK_8_CTX, {
           INTEL_PT_BIP, 0, 0x0807060504030201}, INTEL_PT_BLK_8_CTX, 0 }, {
           9, {
           0xfc, 1, 2, 3, 4, 5, 6, 7, 8}, INTEL_PT_BLK_8_CTX, {
           INTEL_PT_BIP, 0x1f, 0x0807060504030201}, INTEL_PT_BLK_8_CTX, 0 },  {
           2, {
           0x02, 0x33}, INTEL_PT_BLK_4_CTX, {
           INTEL_PT_BEP, 0, 0}, 0, 0 }, {
           2, {
           0x02, 0xb3}, INTEL_PT_BLK_4_CTX, {
           INTEL_PT_BEP_IP, 0, 0}, 0, 0 }, {
           2, {
           0x02, 0x33}, INTEL_PT_BLK_8_CTX, {
           INTEL_PT_BEP, 0, 0}, 0, 0 }, {
           2, {
           0x02, 0xb3}, INTEL_PT_BLK_8_CTX, {
           INTEL_PT_BEP_IP, 0, 0}, 0, 0 },  {
           4, {
           0x02, 0x13, 0x01, 0x03}, 0, {
           INTEL_PT_CFE, 1, 3}, 0, 0 }, {
           4, {
           0x02, 0x13, 0x81, 0x03}, 0, {
           INTEL_PT_CFE_IP, 1, 3}, 0, 0 }, {
           4, {
           0x02, 0x13, 0x1f, 0x00}, 0, {
           INTEL_PT_CFE, 0x1f, 0}, 0, 0 }, {
           4, {
           0x02, 0x13, 0x9f, 0xff}, 0, {
           INTEL_PT_CFE_IP, 0x1f, 0xff}, 0, 0 },  {
           11, {
           0x02, 0x53, 0x09, 1, 2, 3, 4, 5, 6, 7}, 0, {
           INTEL_PT_EVD, 0x09, 0x7060504030201}, 0, 0 }, {
           11, {
           0x02, 0x53, 0x3f, 2, 3, 4, 5, 6, 7, 8}, 0, {
           INTEL_PT_EVD, 0x3f, 0x8070605040302}, 0, 0 },  {
           0, {
           0}, 0, {
           0, 0, 0}, 0, 0 },
        };

🌸 Members 🌸

okay so here's what each lil field in the struct actually means, bestie 🫢

  • len β€” how many bytes you're decoding, literally just the count πŸ“
  • bytes β€” the actual bytes to decode ✨
  • ctx β€” the packet context you're decoding with πŸŽ€
  • packet β€” the packet you expect to come out 🎯
  • new_ctx β€” the new packet context you expect afterwards πŸ¦‹
  • ctx_unchanged β€” bestie listen πŸ‘€ this one says the packet context must not change. like, at all. it stays exactly as it was πŸ’…

🌈 SEE ALSO 🌈

  • Kernel file ./tools/perf/arch/x86/tests/intel-pt-test.c β€” go read the source, iykyk πŸ“–

and that's the whole vibe check, babes πŸ’– this icon of a page comes from ./tools/perf/arch/x86/tests, dated October 2026, and it's the struct test_data(9) page β€” periodt. go write some tests and slay βœ¨πŸ‘‘

πŸ“¦ where this page comes from