arielby | 10 years ago | on: Critical Xen bug in PV memory virtualization code
arielby's comments
arielby | 10 years ago | on: Critical Xen bug in PV memory virtualization code
It's not like Xen HVMs have a better security story than PVMs. The paravirtualization code should probably be more heavily audited than it is already.
arielby | 10 years ago | on: BoringSSL
arielby | 10 years ago | on: Several types of types in programming languages
I think the distinction is that #3b-types, which denote the "encoding" of a value, mapping it to its meaning, are often used as a basis for a #2-types system (to parametrize operations).
arielby | 10 years ago | on: Several types of types in programming languages
arielby | 10 years ago | on: Nix the Tricks: Math tricks defeat understanding
arielby | 10 years ago | on: Cyber Sleuths Track Hacker to China’s Military
arielby | 10 years ago | on: Cross-VM RSA Key Recovery in a Public Cloud
arielby | 10 years ago | on: St. Petersburg paradox
However, many perturbations of this lottery can actually be good bets.
For example, suppose you gain 3^n dollars with probability 2^{-n}. Then you have a 1/128 chance of winning $2187, a 1/256 change of winning $6561, and this game starts looking much nicer.
The "Pascal's Mugging" divergence is a different problem, where Solomonoff-style priors imply negative-exponential probabilities of Busy-Beaverish payoffs. Ordinary priors don't really have this problem.
arielby | 10 years ago | on: The origins of chroot()
arielby | 10 years ago | on: Factoring RSA Keys with TLS Perfect Forward Secrecy
The findings are very similar to the classic "Ron was wrong, Whit is right" paper - if you scan the entire Internet, you will find broken hardware. You will also find SSH servers with their root password being `12345678`.
arielby | 10 years ago | on: What is wrong with NULL
arielby | 10 years ago | on: What is wrong with NULL
That's just coercing into a "modern C buffer" and slicing it. It has the disadvantage that coercion is not equality or subtyping - i.e. you will have to do lots of wrappings and unwrappings in mixed code.
> Every C method that takes a character buffer either a) has a corresponding length parameter or b) is avoided because of the security risks. In practice this means that C also stores the length information, just on the side instead of combined into a struct with the buffer.
You are surely talking about the buffer's capacity, not the string's length. These are distinct concepts. Anyway, functions that only read strings, and structs that only store them read-only, aren't interested in the capacity of any buffer.
Anyway, C strings aren't responsible for the fixed-size buffers of Cold War-era code - that code uses fixed-size buffers for everything. Their main claim to fame is their popularity in parsing code, which is edge-case- and bug-prone.
arielby | 10 years ago | on: What is wrong with NULL
arielby | 10 years ago | on: What is wrong with NULL
* unlike Pascal-style strings, they can be usefully sliced, especially if you can modify them strtok-style.
* unlike (ptr,len) "Modern C buffers"/Rust-style strings, references to them are pointer-sized, and they can be used as a serialization format.
This makes the kind of application that is based on cutting pieces of a string and passing them around a good measure faster, especially compared to say C++'s "atomically reference-counted, re-allocating at the slightest touch" std::string.
This style of programming is not particularly popular nowadays, so buffer-strings are better-fitting. Its main problem is its multitude of edge-cases, which tend to demonstrate C's "every bug is exploitable" problem well.
arielby | 10 years ago | on: What is wrong with NULL
arielby | 10 years ago | on: Lock freedom without garbage collection in Rust
However, with both RCU and the epoch-based scheme, you can make quiescent states as fine- or coarse-grained as you desire.
arielby | 10 years ago | on: Lock freedom without garbage collection in Rust
arielby | 10 years ago | on: Indices Point Between Elements
arielby | 10 years ago | on: Indices Point Between Elements
for example, if you have the following structs
typedef struct { void *key; } base;
typedef struct { base b; int misc; int data[2]; } derived;
then derived is laid out as follows -----+------+---------+---------+---------+-----
... | base | derived | data[0] | data[1] | ...
-----+------+---------+---------+---------+-----
^ ^ ^
| | |
base derived.data &derived.data[2]