244 + auto request_ptr = reinterpret_cast<MirMesaSetGBMDeviceRequest*>(
245 + request_msg.data.data());
Here and elsewhere you're reinterpret_casting data allocated with a uint8_t alignment to structure that needs stricter alignment (e.g. int or type*). That isn't safe (and even on processors where it is "safe" can be very inefficient.
244 + auto request_ptr = reinterpret_ cast<MirMesaSet GBMDeviceReques t*>( msg.data. data()) ;
245 + request_
Here and elsewhere you're reinterpret_casting data allocated with a uint8_t alignment to structure that needs stricter alignment (e.g. int or type*). That isn't safe (and even on processors where it is "safe" can be very inefficient.