Classic "protocol" error
Classic "protocol" error
Posted Oct 15, 2017 21:31 UTC (Sun) by davecb (subscriber, #1574)Parent article: unsafe_put_user() turns out to be unsafe
Protocol in the sense a psycologist would use it, you understand!
If I do a b c d e, then c and d return something I want. a, c and e are overhead. If I don't do them in that order, though, I get a silent failure.
The general solution is to ensure that you can only do them in that order: this can be arbitrarily hard. In this case, it might just be a kind of scatter-gather I/O
struct pair { void *from, *to };
magic_transfer_thingie(int count, pair pairs[])