News for hackers. Stuff that matters.
Re:Actually Portable Executable by skissane on Friday February 26, 2021 @07:42PM (#26281573)
> Not that I’m aware of. The decoding of an instruction is complicated and also dependent on the current operating mode and a few other things. So, for an OS to pass those lengths before hand, it’d have to know everything about the current state of the processor at that instruction

The compiler would know the instruction boundaries. It could store that information in a read-only section in the executable. The OS would then just pass that section to the CPU somehow.

I don't think there is anything impossible about this. Would there be sufficient performance benefit to justify the added complexity? I don't know, quite possibly not.

Re:Actually Portable Executable by Cloudef on Saturday February 27, 2021 @12:29AM (#26282901)
This sounds like a potential attack vector.
Re:Actually Portable Executable by skissane on Saturday February 27, 2021 @12:35AM (#26282927)
I'm not sure why it would be. If the boundary information were wrong, the CPU instruction decode would fail, but that should just be an invalid instruction exception, which operating systems already know how to handle.