4 ms·
> I'm talking code vs data check, pointer bounds check, pointer write-check to prevent modification, optionally stack overflow, and so on. I'm probably showing
by dewster 10y ago
> I'm talking code vs data check, pointer bounds check, pointer write-check to prevent modification, optionally stack overflow, and so on.
I'm probably showing my ignorance, but I don't think anyone can convince me that in a perfect world software errors should be caught by dedicated hardware. Same with pushing software security issues to the HW.
SW needs a pottery barn rule, you broke it you pay for it. The HW is already too complicated as it is.
- nickpsecurity 10y ago"SW needs a pottery barn rule, you broke it you pay for it." Software, even small stuff, has proven to be too complex to get right consistently except for the most, elite programmers. A safety net or safe by default makes more sense. It's more fundamental than that, though. You see, certain languages in programming are closer to how we think and express our ideas as people. We find we get more productive as we abstract away from the machine. Yet, stuff close to machine is most efficient. Common machine designs were pretty arbitrary: alternatives existed with benefits. Market forces caused proliferation of specific, painful architectures. So, the right thing seems to be to raise abstraction of underlying machine while modifying architecture to express safe or secure programs naturally. For instance, you don't want out of bounds pointers, overflowing stacks, or data treated as code. So, why does your CPU allow that in the first place all over memory and program code? Just foolish. Instead, design the CPU to include compiler-calculated bounds with pointers, to spot stack overflows in making, and to mark & treat differently code vs data. That's what Burroughs did and SAFE is doing. Another is modular programming and OOP's takeover of modern programming. Our systems are broken down into modules with internal state, function calls operating on it, and function calls to other modules. We enforce separation between these states, expect some functions/data to stay private, and expect certain datatypes in function calls. Object-descriptor architectures divide hardware into objects with read/write/execute/access permissions enforced as CPU runs the program. Natural way to express such a system. Mapping OOP expressions & procedures onto a stack, heap, user/kernel MMU, and optionally some segments doesn't fit the use case at all. Alien to it actually. So, the idea is to combine a language for efficient, productive, and safe-by-default expression of our intent as programmers with a CPU designed to efficiently run that plus provide low-cost checks as a safety net. That was Burroughs approach. An embedded version might be combination of Java subset with Java CPU's like jop-design.com or Sandia's Secure Processor (aka SSP or Score). Java CPU runs hardware ideal for language with some basic checks built-in that run at high speed. Language, type system, static analysis, compiler, and programmer do rest. So, two different models. One is arbitrary machines designed for whatever Thompson or Moore preferred on minimal hardware they had with "just try harder" told to programmers. Other is carefully-designed, safe languages with CPU's built for them & checking their integrity. Option 2 makes more sense to me even if minority opinion. ;)
- dewster 10y agoSW coming to HW saying "your ALU is broken because it's rounding incorrectly" or "we need feature X to speed up our real-time calculations" I get. SW coming to HW saying "we need feature Y because our own SW process is so completely screwed up and out of control it takes an Einstein to do it right" I don't get.
- nickpsecurity 10y agoMy background is high assurance. I know most of systems designed to be nearly flawless. Best minds, processes, and tooling still left occasional flaws. So how do you expect average, time-constrained, tool-constrained programmers to do better on inherently unsafe machines? And why do you promote unsafe machines in first place if safe alternatives have almist no overhead plus match language better? Not making much sense. Part of this process you talk about is selecting tools that make job easier. Applies to CPU's as well as anything else. My research is taking it all the way down to how gates or analog circuits are done to max availability or integrity. Burroughs plus NonStop with correct by construction synthesis basically.
- dewster 10y agoHW/SW co-design is supposed to go like this: Never do anything in HW if you can do it in SW. Because HW is expensive and dangerously set in stone. Because SW can be as complex as it needs to be and can be easily fixed / updated later. If you can't do it in a timely manner in SW, add the minimum safest HW to enable things. That's it. Except for cosmic rays flipping bits, well designed processors aren't inherently unsafe. People and the software they write are unsafe (guns don't kill people...). Why put any SW onus on HW where it will almost always be more expensive and less flexible?
- nickpsecurity 10y agoYou're still ignoring the other tradeoff of safety where you use any cost-effective technique at any layer to meet your goals. Intel's blown millions of gates on stuff tgey dont need plus bad ideas for safety. The stuff Im mentioning is in thousands. I imagine it's cheaper, faster, and easier to change than what vendors already add. Besides, empirical evidence is strongly against your statements about people's competence or bad analogies to guns. Empirical evidence, even for OpenBSD or Bernstein, show the best coders can't consistently make software work on tooling and architectures you seem to prefer. Whereas, average people using Rust and/or Java CPU's are producing software faster with few to no exploitable defects. And both can be targeted to under 10,000 gates (ARM is 30k+).