Summary: | Request for implementing SIDT instruction | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Dennis Lubert <plasmahh> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | glider, tom |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | A patch for the SIDT and SGDT support in VEX on x86 and amd64 |
Description
Dennis Lubert
2004-11-18 13:26:20 UTC
*** Bug 230085 has been marked as a duplicate of this bug. *** Created attachment 42530 [details]
A patch for the SIDT and SGDT support in VEX on x86 and amd64
This patch implements the SIDT and SGDT instructions support via a dirty helper that invokes native (x86/amd64) S{I,G}DT instructions. The approach is transparent for the client applications, so the redpill method is not able to distinguish between a native run and a Valgrind run.
Can you provide some rationale as to why simply passing these instructions through is valid? Given that, as I understand it, the descriptor tables affect the interpretation of segment registers I would have though valgrind would need to be aware of any changes made to the descriptor tables? (In reply to comment #3) > Can you provide some rationale as to why simply passing these instructions > through is valid? Given that, as I understand it, the descriptor tables affect > the interpretation of segment registers I would have though valgrind would need > to be aware of any changes made to the descriptor tables? IIUC, the SIDT and SGDT instructions do not modify the descriptor tables, only LIDT/LGDT do (which are harder to implement). Reading the descriptor tables shouldn't affect the segment registers. Am I missing something? Ah OK I had my load/store ideas the wrong way round. That should be fine then. Obviously as it's a VEX issue Julian will need to deal with it anyway. Alexander, can you explain why you want to use this instruction? According to the Intel documentation "SIDT is only useful in operating-system software; however it can be used in application programs without causing an exception to be generated." (In reply to comment #6) The SIDT instruction is for some strange reason used by the client code in Mac OS 10.6 (see https://bugs.kde.org/show_bug.cgi?id=205241#c36), so Valgrind can't work on Snow Leopard without having it implemented. > Alexander, can you explain why you want to use this instruction? > According to the Intel documentation "SIDT is only useful in > operating-system software; however it can be used in application > programs without causing an exception to be generated." |