"Strong" stack protection for GCC
lwn.net
lwn.net
There's an upcoming "Security" talk which will cover lots of other ways we've worked to improve the fundamental protection offered by the CPU, but the stack is covered in the Memory talk: http://ootbcomp.com/topic/memory/ and ootbcomp.com/topic/introduction-to-the-mill-cpu-programming-model-2/
Well, damn, I must be late to the party. The Mill just caught my attention a week ago, and I'm far from being tired of hearing about it.
Thank you for sharing what you can.
I meant particularly the return-to-libc type of attacks that the canary (to some extent) protects against, when I claimed immunity (and improved performance).
We have some stuff to talk about on the protecting authentication flags and things front too, but I'm afraid that'll have to wait for the Security talk.
One other security-related aspect that we have already presented is how stack debris is not readable once returned, so malicious code can't go looking at it.
We've also talked a little bit about how we don't have rings, and we have very cheap syscalls across protection boundaries. So there are some hints of stuff to come.
The Mill is far from exploit-free, but vast swathes of attacks can be stopped or mitigated and we do our best.
There is CPU-bound code out there, where every cycle saved in an inner loop equates to hours of improved runtime or thousands of additional client transactions/second. Safer languages have made great strides in the kinds of dynamic profiling and optimization that can equal the performance of optimized C/C++, but there remain real penalties in startup and profiling time.
I don't think we'd reinvent C on modern machines, which have millions of times more memory than K&R had to work with on their PDP-7.
Fixing pathetic macro system and type system (if that qualifies at all) would get rid of many many bugs.
I have done systems programming in Assembly, BASIC dialects, Pascal dialects, Modula-2, Ada, Oberon, without writing a single line of C.
There was a time C was confined to UNIX System V at some university labs and the world at large had other sytems languages to choose from.
Interest in C raised, because we wanted to have at home some kind of compiler for homework and while at the same time UNIX variants started to spread into the industry.
I know kids these days, raised in the VM golden age, think many of the current language features are only possible in a VM based environment, it wasn't like that 20 years ago.
There are hardly any feature ANSI/ISO C has over other systems languages, other than having 30+ years of investment into compiler backends and complaining other languages tend to be a bit more verbose.