Skip to content

Instantly share code, notes, and snippets.

@max-verem
max-verem / demo.c
Created April 7, 2017 08:59
Embedding Flash in Linux GTK Application - Sandbox Violation
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
@max-verem
max-verem / blackmagic-10.8.5a4.patch
Created March 28, 2017 08:06
blackmagic-10.8.5a4 under Fedora 25
--- blackmagic-10.8.5a4/blackmagic_lib.c.origin 2017-02-21 01:42:18.000000000 +0200
+++ blackmagic-10.8.5a4/blackmagic_lib.c 2017-03-28 10:54:51.205782144 +0300
@@ -662,7 +662,16 @@
write = 0;
down_read(&current_task->mm->mmap_sem);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ if (current_task == current)
+ ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);