[PATCH v3 31/38] sandbox: Move reading the RAM buffer into a better place