add barebones dmesg
not factorize emalloc, which is used only once