From 1574864072612d65539508591fcc366ff7c5f986 Mon Sep 17 00:00:00 2001 From: Sleigh-InSPECtor Date: Thu, 16 May 2024 11:33:27 +0930 Subject: [PATCH 1/2] x86: Fix overlap issue with INCSS/RDSSP --- Ghidra/Processors/x86/data/languages/cet.sinc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/Processors/x86/data/languages/cet.sinc b/Ghidra/Processors/x86/data/languages/cet.sinc index ea707de8d5..2d5d9aefd9 100644 --- a/Ghidra/Processors/x86/data/languages/cet.sinc +++ b/Ghidra/Processors/x86/data/languages/cet.sinc @@ -12,7 +12,7 @@ define pcodeop ShadowStackPush4B; define pcodeop ShadowStackLoad8B; define pcodeop ShadowStackLoad4B; -:INCSSPD r32 is vexMode=0 & $(PRE_F3) & (opsize=0 | opsize=1 | opsize=2 | opsize=3) & byte=0x0f; byte=0xae; reg_opcode=5 & r32 { +:INCSSPD r32 is vexMode=0 & $(PRE_F3) & byte=0x0f; byte=0xae; reg_opcode=5 & r32 { SSP = SSP + zext(4 * r32:1); } @ifdef IA64 @@ -21,7 +21,7 @@ define pcodeop ShadowStackLoad4B; } @endif -:RDSSPD r32 is vexMode=0 & $(PRE_F3) & (opsize=0 | opsize=1 | opsize=2 | opsize=3) & byte=0x0f; byte=0x1e; mod=3 & reg_opcode=1 & r32 { +:RDSSPD r32 is vexMode=0 & $(PRE_F3) & byte=0x0f; byte=0x1e; mod=3 & reg_opcode=1 & r32 { r32 = SSP:4; } @ifdef IA64 From c7be8e96292f1f12966e5e9bb78d8c38ed352588 Mon Sep 17 00:00:00 2001 From: James <49045138+ghidracadabra@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:21:07 +0000 Subject: [PATCH 2/2] GP-5267 updated language version --- Ghidra/Processors/x86/data/languages/x86.ldefs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ghidra/Processors/x86/data/languages/x86.ldefs b/Ghidra/Processors/x86/data/languages/x86.ldefs index a5f79795e7..126a0c299a 100644 --- a/Ghidra/Processors/x86/data/languages/x86.ldefs +++ b/Ghidra/Processors/x86/data/languages/x86.ldefs @@ -5,7 +5,7 @@ endian="little" size="32" variant="default" - version="4.1" + version="4.2" slafile="x86.sla" processorspec="x86.pspec" manualindexfile="../manuals/x86.idx" @@ -37,7 +37,7 @@ endian="little" size="32" variant="System Management Mode" - version="4.1" + version="4.2" slafile="x86.sla" processorspec="x86-16.pspec" manualindexfile="../manuals/x86.idx" @@ -50,7 +50,7 @@ endian="little" size="16" variant="Real Mode" - version="4.1" + version="4.2" slafile="x86.sla" processorspec="x86-16-real.pspec" manualindexfile="../manuals/x86.idx" @@ -70,7 +70,7 @@ endian="little" size="16" variant="Protected Mode" - version="4.1" + version="4.2" slafile="x86.sla" processorspec="x86-16.pspec" manualindexfile="../manuals/x86.idx" @@ -85,7 +85,7 @@ endian="little" size="64" variant="default" - version="4.1" + version="4.2" slafile="x86-64.sla" processorspec="x86-64.pspec" manualindexfile="../manuals/x86.idx" @@ -108,7 +108,7 @@ endian="little" size="64" variant="compat32" - version="4.1" + version="4.2" slafile="x86-64.sla" processorspec="x86-64-compat32.pspec" manualindexfile="../manuals/x86.idx"