Stories
Slash Boxes
Comments

SoylentNews is people

posted by cmn32480 on Wednesday May 23 2018, @06:47PM   Printer-friendly
from the your-computer-is-not-a-fast-PDP-11 dept.

Very interesting article at the IEEE ACM by David Chisnall.

In the wake of the recent Meltdown and Spectre vulnerabilities, it's worth spending some time looking at root causes. Both of these vulnerabilities involved processors speculatively executing instructions past some kind of access check and allowing the attacker to observe the results via a side channel. The features that led to these vulnerabilities, along with several others, were added to let C programmers continue to believe they were programming in a low-level language, when this hasn't been the case for decades.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by Wootery on Saturday May 26 2018, @07:14PM

    by Wootery (2341) on Saturday May 26 2018, @07:14PM (#684634)

    You are assuming that register allocation is a part of being a low level language. This is only true on certain CPUs. Many I've programmed on only HAD two registers, and their use was essentially fixed.

    Register-allocation isn't a language feature, it's what a compiler does to map the variables onto the target machine's registers, spilling to memory if necessary. Whether you're compiling C, or Java, or JavaScript, you have to solve the register-allocation problem. All serious modern compilers will make the effort to enregister variables where appropriate. Wikipedia page. [wikipedia.org]

    you can suggest that kind of hardware assignment is a low level feature

    With some non-portable extensions of C, you can request/insist that the compiler use a specific register for a variable. That is certainly a low-level feature, yes.

    something like a C++ private variable

    You've misunderstood the intent of C++ private variables. They're about helping the programmer write good object-oriented code. They don't protect you against hostile code with access to your process. [itcsolutions.eu]

    In other languages/programming environments, things might be different, but C++ provides no such language features, and has no such security model.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2