STRUCT TEST_DATA(9)
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 thebytesare actually live in that row.u8 bytes[INTEL_PT_PKT_MAX_SZ]β the raw packet bytes themselves, sitting in au8array.enum intel_pt_pkt_ctx ctxβ the context the thing starts out in. Mostly0, and where it isn't, it's spelled out loud likeINTEL_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's1or0depending 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 }withctx_unchangedset to1.INTEL_PT_TNTβ nine entries, starting with the single bytes4/6/0x80/0xfe, then the multi-byte0x02, 0xa3, ...ones with counts like1and47and those giantULL << 47/ULL << 1payload expressions.INTEL_PT_TIPβ six entries, first bytes0x0d,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, ... }, payloads0xC0A08060402and0xC0A08060403.INTEL_PT_MODE_EXECβ six entries,{ 0x99, 0x00 }through{ 0x99, 0x06 }, with16/64/32in 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 bytes0x03/0x0b/0xfb/0x07/0xff, payloads going all the way from0to0xffffffffffffffff. 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 withctx0and then again withINTEL_PT_BLK_4_CTXandINTEL_PT_BLK_8_CTX.INTEL_PT_PSBβ three entries, all the sixteen-byte{ 0x02, 0x82, ... }repeat, again once plain and once each withINTEL_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, ... }withlen10andctx_unchanged=0. (the third one has that chaotic0xff, 2, 3, 4, 7, 6, 7, 8byte 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 thenew_ctxflips betweenINTEL_PT_BLK_8_CTXandINTEL_PT_BLK_4_CTXdepending on the byte. πINTEL_PT_BIPβ the{ 0x04 }/{ 0xfc }family,len5for theINTEL_PT_BLK_4_CTXones andlen9for theINTEL_PT_BLK_8_CTXones... 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, everyctx_unchangedflag is load-bearing</red>and if you fat-finger a0xffthe 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms