diff --git a/repos/libports/src/lib/drm/ioctl.cc b/repos/libports/src/lib/drm/ioctl.cc index 914f225543..079a27c77f 100644 --- a/repos/libports/src/lib/drm/ioctl.cc +++ b/repos/libports/src/lib/drm/ioctl.cc @@ -380,7 +380,8 @@ class Drm_call { drm_i915_gem_create * const p = reinterpret_cast(arg); - uint64_t const size = (p->size + 0xfff) & ~0xfff; + /* roundup to next page size and add guarding page */ + uint64_t const size = ((p->size + 0xfff) & ~0xfff) + 0x1000; Handle handle = _alloc_buffer(size); if (handle == INVALID_HANDLE) { return -1; } diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index d4613efd36..e92f9133bd 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -1443,8 +1443,8 @@ class Gpu::Session_component : public Genode::Session_object * => better construct Buffer object as whole */ - /* roundup to next page size and add guarding page */ - size = ((size + 0xffful) & ~0xffful) + 0x1000; + /* roundup to next page size */ + size = ((size + 0xffful) & ~0xffful); try { Genode::Dataspace_capability cap = _device.alloc_buffer(_heap, size);