[PATCH v2 25/32] sandbox: Move reading the RAM buffer into a better place