News for hackers. Stuff that matters.
Re:Data-oriented design or why you might shoot yourself in t... by bccdee on Monday June 28, 2021 @04:02PM (#27667137)
If we're talking about making guarantees about blocking the programmer's ability to modify parts of the address space, we're no longer discussing programming paradigms. We're discussing security proofs. The MMU does not play a core role in object-oriented programming.
Re:Data-oriented design or why you might shoot yourself in t... by corty on Monday June 28, 2021 @04:37PM (#27667735)
Historically, this is not entirely correct. Segmented MMUs (as opposed to the more common, currently used concept of paged MMUs) were intended to provide the hardware support for the protection levels and the data/code mixture in OOP. I.e. each object would have executable, readable, r/w and inaccessible parts. Protected by the MMU, depending on the currently accessing context, that is, a subclass, friend class, other class, etc. But creating a segment descriptor for each object or even just each class was, of course, far too expensive in the end.
Re:Data-oriented design or why you might shoot yourself in t... by bccdee on Monday June 28, 2021 @10:15PM (#27670924)
That's actually really interesting, I hadn't heard of that.
Re:Data-oriented design or why you might shoot yourself in t... by rsj_hn on Monday June 28, 2021 @09:49PM (#27670727)
We're not talking about the programmer doing something, but about the code doing something, which is absolutely all about security proofs. And while the OS protects an address space, the OO runtime protects memory within that runtime, so a private variable isn't available to code running outside the class while the same cannot be said for C code. That's the benefit of offloading memory management in interpreted languages.