Skip to content

Conversation

@glandium
Copy link
Contributor

@glandium glandium commented Oct 9, 2024

The instruction is present in some library in the 24H2 update for Windows 11:

==8508==interception_win: unhandled instruction at 0x7ff83e193a40: 44 0f b6 1a 4c 8b d2 48

This could be generalized, but getting all the ModR/M byte combinations right is tricky. Many other classes of instructions handled in this file could use some generalization too.

The instruction is present in some library in the 24H2 update for Windows 11:

==8508==interception_win: unhandled instruction at 0x7ff83e193a40: 44 0f b6 1a 4c 8b d2 48

This could be generalized, but getting all the ModR/M byte combinations
right is tricky. Many other classes of instructions handled in this file
could use some generalization too.
@llvmbot
Copy link
Member

llvmbot commented Oct 9, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Mike Hommey (glandium)

Changes

The instruction is present in some library in the 24H2 update for Windows 11:

==8508==interception_win: unhandled instruction at 0x7ff83e193a40: 44 0f b6 1a 4c 8b d2 48

This could be generalized, but getting all the ModR/M byte combinations right is tricky. Many other classes of instructions handled in this file could use some generalization too.


Full diff: https://github.com/llvm/llvm-project/pull/111638.diff

1 Files Affected:

  • (modified) compiler-rt/lib/interception/interception_win.cpp (+1)
diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index 4a6ff6656edb1c..4f60d4251303d6 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -768,6 +768,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
   }
 
   switch (*(u32*)(address)) {
+    case 0x1ab60f44:  // 44 0f b6 1a : movzx r11d, BYTE PTR [rdx]
     case 0x24448b48:  // 48 8b 44 24 XX : mov rax, QWORD ptr [rsp + XX]
     case 0x246c8948:  // 48 89 6C 24 XX : mov QWORD ptr [rsp + XX], rbp
     case 0x245c8948:  // 48 89 5c 24 XX : mov QWORD PTR [rsp + XX], rbx

@glandium
Copy link
Contributor Author

@rnk Could you take a look at this and merge it?

@serge-sans-paille
Copy link
Collaborator

@rnk approved it let's merge it then.

@serge-sans-paille serge-sans-paille merged commit ce4618a into llvm:main Oct 18, 2024
11 checks passed
@bernhardu
Copy link
Contributor

Hello, I am trying to prepare a patch to add more instructions to interception_win.
During this I wondered because this instruction "44 0f b6 1a" returns now 5,
but shouldn't it return 4?

@zmodem
Copy link
Collaborator

zmodem commented Oct 21, 2024

Hello, I am trying to prepare a patch to add more instructions to interception_win. During this I wondered because this instruction "44 0f b6 1a" returns now 5, but shouldn't it return 4?

You're right, it should be 4. I'll commit a fix.

Please CC me on your upcoming patch, I'd be happy to review it.

zmodem added a commit that referenced this pull request Oct 21, 2024
  movzx  r11d,BYTE PTR [rdx]

is four bytes long.

Follow-up to #111638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants