opnsense-ports/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c
Franco Fichtner 12bc82a3d1 */*: sync with upstream
Taken from: HardenedBSD
2018-04-10 00:35:34 +02:00

14 lines
684 B
C

# We don't have MAP_NORESERVE so use MAP_NOSYNC | MAP_NOCORE and
# hope for the best (this alloc is too big but it's only a test)
#
--- src/intel/tools/aubinator.c.orig 2017-10-02 15:49:02 UTC
+++ src/intel/tools/aubinator.c
@@ -637,7 +637,7 @@ int main(int argc, char *argv[])
/* mmap a terabyte for our gtt space. */
gtt_size = 1ull << 40;
gtt = mmap(NULL, gtt_size, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_NOSYNC | MAP_NOCORE, -1, 0);
if (gtt == MAP_FAILED) {
fprintf(stderr, "failed to alloc gtt space: %s\n", strerror(errno));
exit(EXIT_FAILURE);