(However the documentation for physmem says the module is under LGPLv2+
so either the documentation is wrong or the top of the file is wrong or
else I don't understand what's going on here).

Unfortunately although all the modules above are LGPLv2, I just noticed
that getpass depends indirectly on realloc. Documentation for realloc
says its LGPLv2+ so I didn't think it was a problem, but the top of the
file says LGPLv3.