Re:Asmttpd – Web server for Linux written in amd64 assembly
by JoeAltmaier on Wednesday May 20, 2015 @12:53AM
(#9574739)
In a paged system, reading past the end of the string, but no further than the last whole aligned word containing the null terminator, will never page fault. So that can still work.
It's hard to do this safely for strcpy/strcmp because you might read past the end of the buffer when trying to test against a null terminator. memcmp/memcpy and length-prefixed blocks let you use a Duff's-Device-like construct to test only the last word byte-by-byte.