Note that while the original Linux code has the same issue, I don't really fancy sending there a patch similar to patch 1. That's because my XSA-307 related "make find_next_{,zero_}bit() have well defined behavior" was entirely ignored, so I would expect nothing better here.
1: correct string.h functions for "int" -> "unsigned char" conversion 2: tidy the memset() macro Really I happened to be looking at the memset() macro, being a little surprised of the special casing of 0 there. As a result I was curious to see how much more efficient __memzero() really was compared to memset(). The first thing which actually caught my attention is that part of __memzero()'s code lives outside of the function (i.e. ahead of ENTRY()). This saves a branch (and interestingly memset() does _not_ do the same), but (a) renders the ELF symbol table somewhat wrong and (b) leaves debug info generated with gas 2.39 not covering the entire function in the new subprogram DIE that it generates (line number info and .debug_ranges are correct nevertheless). Jan