Skip to content

Commit

Permalink
Merge pull request #1 from jovanbulck/master
Browse files Browse the repository at this point in the history
Fixed compililation errors for Linux >4.6.4.
  • Loading branch information
haitaohuang authored Aug 16, 2016
2 parents 0fb8995 + c8ace80 commit 37d9282
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions isgx.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/rwsem.h>
#include <linux/sched.h>
#include <linux/workqueue.h>
#include <linux/version.h>

/* Number of times to spin before going to sleep because of an interrupt
* storm.
Expand Down
7 changes: 6 additions & 1 deletion isgx_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ struct page *isgx_get_backing_page(struct isgx_enclave* enclave,

backing_addr = enclave->backing + entry->addr - enclave->base;

ret = get_user_pages(enclave->owner,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,4)
ret = get_user_pages_remote(
#else
ret = get_user_pages(
#endif
enclave->owner,
enclave->mm,
backing_addr,
1, /* nr_pages */
Expand Down

0 comments on commit 37d9282

Please sign in to comment.