Skip to content

Commit

Permalink
libs2eplugins: remove a buggy API S2ESetCpuLogLevel that does nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
yype committed Apr 13, 2024
1 parent e17812d commit b5521a4
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion guest/common/include/s2e/opcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ extern "C" {
#define BASE_S2E_CLEAR_TEMPS 0x53
#define BASE_S2E_FORK_COUNT 0x54
#define BASE_S2E_FLUSH_TBS 0x55
#define BASE_S2E_SET_LIBCPU_LOG_LEVEL 0x56

// Maximum S2E opcode allowed
#define BASE_S2E_MAX_OPCODE 0x70
Expand Down
2 changes: 0 additions & 2 deletions guest/windows/libcommon/include/s2e/s2e.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ UINT32 NTAPI S2EWriteMemory(PVOID Destination, PVOID Source, DWORD Count);
VOID NTAPI S2EDisableAllApicInterrupts(VOID);
VOID NTAPI S2EEnableAllApicInterrupts(VOID);

VOID NTAPI S2ESetCpuLogLevel(UINT32 LogLevel);

VOID NTAPI S2EMakeSymbolic(PVOID Buffer, UINT32 Size, PCSTR Name);
INT NTAPI S2ESymbolicInt(PCSTR Name, INT InitialValue);
UINT8 NTAPI S2ESymbolicChar(PCSTR Name, UINT8 InitialValue);
Expand Down
11 changes: 0 additions & 11 deletions guest/windows/libcommon/src/amd64/s2e.asm
Original file line number Diff line number Diff line change
Expand Up @@ -424,15 +424,4 @@ S2EReturnHook64 proc frame
ret
S2EReturnHook64 endp

;RCX, RDX, R8, R9
public S2ESetCpuLogLevel
S2ESetCpuLogLevel proc frame ; _Level: dword
.endprolog
mov rax, rcx; _Level
db 0fh, 3fh
db 00h, 56h, 00h, 00h
db 00h, 00h, 00h, 00h
ret
S2ESetCpuLogLevel endp

end
10 changes: 0 additions & 10 deletions guest/windows/libcommon/src/i386/s2e.asm
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,5 @@ S2EEnableAllApicInterrupts proc near
ret
S2EEnableAllApicInterrupts endp

public S2ESetCpuLogLevel
S2ESetCpuLogLevel proc near _Level: dword
mov eax, _Level
db 0fh, 3fh
db 00h, 56h, 00h, 00h
db 00h, 00h, 00h, 00h
ret 08h
S2ESetCpuLogLevel endp


end

1 change: 0 additions & 1 deletion guest/windows/libs2e/libs2e.def
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ EXPORTS
S2EPrintExpression
S2EKillState
S2EWriteMemory
S2ESetCpuLogLevel
S2EMakeSymbolic
S2ESymbolicInt
S2ESymbolicChar
Expand Down
5 changes: 0 additions & 5 deletions libs2eplugins/src/s2e/Plugins/Core/BaseInstructions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,11 +942,6 @@ void BaseInstructions::handleBuiltInOps(S2EExecutionState *state, uint64_t opcod
se_tb_safe_flush();
} break;

case BASE_S2E_SET_LIBCPU_LOG_LEVEL: {
loglevel = (int) state->regs()->read<uint64_t>(CPU_OFFSET(regs[R_EAX]));
getInfoStream(state) << "Set libcpu loglevel to " << hexval(loglevel) << "\n";
} break;

default:
getWarningsStream(state) << "BaseInstructions: Invalid built-in opcode " << hexval(opcode) << '\n';
break;
Expand Down

0 comments on commit b5521a4

Please sign in to comment.