瀏覽代碼

Pal/Linux-SGX: map manifest file as read only

There is no point to map manifest file as writable.

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Isaku Yamahata 7 年之前
父節點
當前提交
3c9c21a604
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Pal/src/host/Linux-SGX/sgx_main.c
  2. 1 1
      Pal/src/security/Linux/main.c

+ 1 - 1
Pal/src/host/Linux-SGX/sgx_main.c

@@ -613,7 +613,7 @@ int load_manifest (int fd, struct config_store ** config_ptr)
 
     void * config_raw = (void *)
             INLINE_SYSCALL(mmap, 6, NULL, nbytes,
-                           PROT_READ|PROT_WRITE, MAP_PRIVATE,
+                           PROT_READ, MAP_PRIVATE,
                            fd, 0);
 
     if (IS_ERR_P(config_raw)) {

+ 1 - 1
Pal/src/security/Linux/main.c

@@ -154,7 +154,7 @@ int load_manifest (int fd, struct config_store * config)
 
     void * config_raw = (void *)
             INLINE_SYSCALL(mmap, 6, NULL, nbytes,
-                           PROT_READ|PROT_WRITE, MAP_PRIVATE,
+                           PROT_READ, MAP_PRIVATE,
                            fd, 0);
 
     if (IS_ERR_P(config_raw))