{"action":"opened","number":1080,"pull_request":{"url":"https://api.github.com/repos/oscarlab/graphene/pulls/1080","id":327407589,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI3NDA3NTg5","html_url":"https://github.com/oscarlab/graphene/pull/1080","diff_url":"https://github.com/oscarlab/graphene/pull/1080.diff","patch_url":"https://github.com/oscarlab/graphene/pull/1080.patch","issue_url":"https://api.github.com/repos/oscarlab/graphene/issues/1080","number":1080,"state":"open","locked":false,"title":"[Pal/Linux-SGX] Do not overwrite sgx.static_address in manifest","user":{"login":"dimakuv","id":1975435,"node_id":"MDQ6VXNlcjE5NzU0MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/1975435?v=4","gravatar_id":"","url":"https://api.github.com/users/dimakuv","html_url":"https://github.com/dimakuv","followers_url":"https://api.github.com/users/dimakuv/followers","following_url":"https://api.github.com/users/dimakuv/following{/other_user}","gists_url":"https://api.github.com/users/dimakuv/gists{/gist_id}","starred_url":"https://api.github.com/users/dimakuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimakuv/subscriptions","organizations_url":"https://api.github.com/users/dimakuv/orgs","repos_url":"https://api.github.com/users/dimakuv/repos","events_url":"https://api.github.com/users/dimakuv/events{/privacy}","received_events_url":"https://api.github.com/users/dimakuv/received_events","type":"User","site_admin":false},"body":"## Affected components\r\n\r\n- [ ] README and global configuration\r\n- [ ] Linux PAL\r\n- [x] SGX PAL\r\n- [ ] FreeBSD PAL\r\n- [ ] Common PAL code\r\n- [ ] Library OS (i.e., SHIM), including GLIBC\r\n\r\n## Description of the changes <!-- (reasons and measures) -->\r\n\r\nPreviously, the \"sgx.static_address\" field was overwritten by the pal-sgx-sign tool in the manifest, even if the manifest author explicitly specified it as 0 or 1. Sometimes, it is important to keep sgx.static_address as the manifest author intended. This PR adds a check to overwrite sgx.static_address only if not specified in manifest.\r\n\r\n## How to test this PR? <!-- (if applicable) -->\r\n\r\nThis bug triggers in the following case:\r\n- One program will call another program (e.g., `python` will execve `bash`)\r\n- As part of execve, Graphene-SGX will create a checkpoint and allocate it in the child at exactly the same address as in the parent\r\n- Now if the parent program (`python`) is a non-PIE executable, it will have its `sgx.static_address = 1`. This will force Graphene to create the manifest which starts the enclave at e.g. addresses `0 - 4GB`.\r\n- But if the child program (`bash`) is a PIE executable, it will have `sgx.static_address = 0`. This will force Graphene to create the manifest which starts the enclave at non-zero addresses e.g. `4GB-8GB`.\r\n- Now the parent creates the checkpoint somewhere in `0-4GB` range, but Graphene wants to have the same checkpoint range in the child. But since the child doesn't have `0-4GB` addresses, the child fails with allocation error.","created_at":"2019-10-12T00:42:36Z","updated_at":"2019-10-12T00:42:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oscarlab/graphene/pulls/1080/commits","review_comments_url":"https://api.github.com/repos/oscarlab/graphene/pulls/1080/comments","review_comment_url":"https://api.github.com/repos/oscarlab/graphene/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oscarlab/graphene/issues/1080/comments","statuses_url":"https://api.github.com/repos/oscarlab/graphene/statuses/5ea2bdaf0f31d2872985e57e995cd699f32799d5","head":{"label":"oscarlab:dimakuv/do-not-overwrite-static_address","ref":"dimakuv/do-not-overwrite-static_address","sha":"5ea2bdaf0f31d2872985e57e995cd699f32799d5","user":{"login":"oscarlab","id":7105811,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMDU4MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/7105811?v=4","gravatar_id":"","url":"https://api.github.com/users/oscarlab","html_url":"https://github.com/oscarlab","followers_url":"https://api.github.com/users/oscarlab/followers","following_url":"https://api.github.com/users/oscarlab/following{/other_user}","gists_url":"https://api.github.com/users/oscarlab/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarlab/subscriptions","organizations_url":"https://api.github.com/users/oscarlab/orgs","repos_url":"https://api.github.com/users/oscarlab/repos","events_url":"https://api.github.com/users/oscarlab/events{/privacy}","received_events_url":"https://api.github.com/users/oscarlab/received_events","type":"Organization","site_admin":false},"repo":{"id":18259989,"node_id":"MDEwOlJlcG9zaXRvcnkxODI1OTk4OQ==","name":"graphene","full_name":"oscarlab/graphene","private":false,"owner":{"login":"oscarlab","id":7105811,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMDU4MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/7105811?v=4","gravatar_id":"","url":"https://api.github.com/users/oscarlab","html_url":"https://github.com/oscarlab","followers_url":"https://api.github.com/users/oscarlab/followers","following_url":"https://api.github.com/users/oscarlab/following{/other_user}","gists_url":"https://api.github.com/users/oscarlab/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarlab/subscriptions","organizations_url":"https://api.github.com/users/oscarlab/orgs","repos_url":"https://api.github.com/users/oscarlab/repos","events_url":"https://api.github.com/users/oscarlab/events{/privacy}","received_events_url":"https://api.github.com/users/oscarlab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/oscarlab/graphene","description":"Graphene / Graphene-SGX - a library OS for Linux multi-process applications, with Intel SGX support","fork":false,"url":"https://api.github.com/repos/oscarlab/graphene","forks_url":"https://api.github.com/repos/oscarlab/graphene/forks","keys_url":"https://api.github.com/repos/oscarlab/graphene/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oscarlab/graphene/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oscarlab/graphene/teams","hooks_url":"https://api.github.com/repos/oscarlab/graphene/hooks","issue_events_url":"https://api.github.com/repos/oscarlab/graphene/issues/events{/number}","events_url":"https://api.github.com/repos/oscarlab/graphene/events","assignees_url":"https://api.github.com/repos/oscarlab/graphene/assignees{/user}","branches_url":"https://api.github.com/repos/oscarlab/graphene/branches{/branch}","tags_url":"https://api.github.com/repos/oscarlab/graphene/tags","blobs_url":"https://api.github.com/repos/oscarlab/graphene/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oscarlab/graphene/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oscarlab/graphene/git/refs{/sha}","trees_url":"https://api.github.com/repos/oscarlab/graphene/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oscarlab/graphene/statuses/{sha}","languages_url":"https://api.github.com/repos/oscarlab/graphene/languages","stargazers_url":"https://api.github.com/repos/oscarlab/graphene/stargazers","contributors_url":"https://api.github.com/repos/oscarlab/graphene/contributors","subscribers_url":"https://api.github.com/repos/oscarlab/graphene/subscribers","subscription_url":"https://api.github.com/repos/oscarlab/graphene/subscription","commits_url":"https://api.github.com/repos/oscarlab/graphene/commits{/sha}","git_commits_url":"https://api.github.com/repos/oscarlab/graphene/git/commits{/sha}","comments_url":"https://api.github.com/repos/oscarlab/graphene/comments{/number}","issue_comment_url":"https://api.github.com/repos/oscarlab/graphene/issues/comments{/number}","contents_url":"https://api.github.com/repos/oscarlab/graphene/contents/{+path}","compare_url":"https://api.github.com/repos/oscarlab/graphene/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oscarlab/graphene/merges","archive_url":"https://api.github.com/repos/oscarlab/graphene/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oscarlab/graphene/downloads","issues_url":"https://api.github.com/repos/oscarlab/graphene/issues{/number}","pulls_url":"https://api.github.com/repos/oscarlab/graphene/pulls{/number}","milestones_url":"https://api.github.com/repos/oscarlab/graphene/milestones{/number}","notifications_url":"https://api.github.com/repos/oscarlab/graphene/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oscarlab/graphene/labels{/name}","releases_url":"https://api.github.com/repos/oscarlab/graphene/releases{/id}","deployments_url":"https://api.github.com/repos/oscarlab/graphene/deployments","created_at":"2014-03-30T07:58:58Z","updated_at":"2019-10-11T17:07:35Z","pushed_at":"2019-10-12T00:37:37Z","git_url":"git://github.com/oscarlab/graphene.git","ssh_url":"git@github.com:oscarlab/graphene.git","clone_url":"https://github.com/oscarlab/graphene.git","svn_url":"https://github.com/oscarlab/graphene","homepage":"https://grapheneproject.io","size":383548,"stargazers_count":362,"watchers_count":362,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":259,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":128,"open_issues":259,"watchers":362,"default_branch":"master"}},"base":{"label":"oscarlab:master","ref":"master","sha":"d5e477fa47c1744703ab77fe7f63f6a0ec52171b","user":{"login":"oscarlab","id":7105811,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMDU4MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/7105811?v=4","gravatar_id":"","url":"https://api.github.com/users/oscarlab","html_url":"https://github.com/oscarlab","followers_url":"https://api.github.com/users/oscarlab/followers","following_url":"https://api.github.com/users/oscarlab/following{/other_user}","gists_url":"https://api.github.com/users/oscarlab/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarlab/subscriptions","organizations_url":"https://api.github.com/users/oscarlab/orgs","repos_url":"https://api.github.com/users/oscarlab/repos","events_url":"https://api.github.com/users/oscarlab/events{/privacy}","received_events_url":"https://api.github.com/users/oscarlab/received_events","type":"Organization","site_admin":false},"repo":{"id":18259989,"node_id":"MDEwOlJlcG9zaXRvcnkxODI1OTk4OQ==","name":"graphene","full_name":"oscarlab/graphene","private":false,"owner":{"login":"oscarlab","id":7105811,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMDU4MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/7105811?v=4","gravatar_id":"","url":"https://api.github.com/users/oscarlab","html_url":"https://github.com/oscarlab","followers_url":"https://api.github.com/users/oscarlab/followers","following_url":"https://api.github.com/users/oscarlab/following{/other_user}","gists_url":"https://api.github.com/users/oscarlab/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarlab/subscriptions","organizations_url":"https://api.github.com/users/oscarlab/orgs","repos_url":"https://api.github.com/users/oscarlab/repos","events_url":"https://api.github.com/users/oscarlab/events{/privacy}","received_events_url":"https://api.github.com/users/oscarlab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/oscarlab/graphene","description":"Graphene / Graphene-SGX - a library OS for Linux multi-process applications, with Intel SGX support","fork":false,"url":"https://api.github.com/repos/oscarlab/graphene","forks_url":"https://api.github.com/repos/oscarlab/graphene/forks","keys_url":"https://api.github.com/repos/oscarlab/graphene/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oscarlab/graphene/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oscarlab/graphene/teams","hooks_url":"https://api.github.com/repos/oscarlab/graphene/hooks","issue_events_url":"https://api.github.com/repos/oscarlab/graphene/issues/events{/number}","events_url":"https://api.github.com/repos/oscarlab/graphene/events","assignees_url":"https://api.github.com/repos/oscarlab/graphene/assignees{/user}","branches_url":"https://api.github.com/repos/oscarlab/graphene/branches{/branch}","tags_url":"https://api.github.com/repos/oscarlab/graphene/tags","blobs_url":"https://api.github.com/repos/oscarlab/graphene/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oscarlab/graphene/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oscarlab/graphene/git/refs{/sha}","trees_url":"https://api.github.com/repos/oscarlab/graphene/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oscarlab/graphene/statuses/{sha}","languages_url":"https://api.github.com/repos/oscarlab/graphene/languages","stargazers_url":"https://api.github.com/repos/oscarlab/graphene/stargazers","contributors_url":"https://api.github.com/repos/oscarlab/graphene/contributors","subscribers_url":"https://api.github.com/repos/oscarlab/graphene/subscribers","subscription_url":"https://api.github.com/repos/oscarlab/graphene/subscription","commits_url":"https://api.github.com/repos/oscarlab/graphene/commits{/sha}","git_commits_url":"https://api.github.com/repos/oscarlab/graphene/git/commits{/sha}","comments_url":"https://api.github.com/repos/oscarlab/graphene/comments{/number}","issue_comment_url":"https://api.github.com/repos/oscarlab/graphene/issues/comments{/number}","contents_url":"https://api.github.com/repos/oscarlab/graphene/contents/{+path}","compare_url":"https://api.github.com/repos/oscarlab/graphene/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oscarlab/graphene/merges","archive_url":"https://api.github.com/repos/oscarlab/graphene/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oscarlab/graphene/downloads","issues_url":"https://api.github.com/repos/oscarlab/graphene/issues{/number}","pulls_url":"https://api.github.com/repos/oscarlab/graphene/pulls{/number}","milestones_url":"https://api.github.com/repos/oscarlab/graphene/milestones{/number}","notifications_url":"https://api.github.com/repos/oscarlab/graphene/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oscarlab/graphene/labels{/name}","releases_url":"https://api.github.com/repos/oscarlab/graphene/releases{/id}","deployments_url":"https://api.github.com/repos/oscarlab/graphene/deployments","created_at":"2014-03-30T07:58:58Z","updated_at":"2019-10-11T17:07:35Z","pushed_at":"2019-10-12T00:37:37Z","git_url":"git://github.com/oscarlab/graphene.git","ssh_url":"git@github.com:oscarlab/graphene.git","clone_url":"https://github.com/oscarlab/graphene.git","svn_url":"https://github.com/oscarlab/graphene","homepage":"https://grapheneproject.io","size":383548,"stargazers_count":362,"watchers_count":362,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":259,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":128,"open_issues":259,"watchers":362,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oscarlab/graphene/pulls/1080"},"html":{"href":"https://github.com/oscarlab/graphene/pull/1080"},"issue":{"href":"https://api.github.com/repos/oscarlab/graphene/issues/1080"},"comments":{"href":"https://api.github.com/repos/oscarlab/graphene/issues/1080/comments"},"review_comments":{"href":"https://api.github.com/repos/oscarlab/graphene/pulls/1080/comments"},"review_comment":{"href":"https://api.github.com/repos/oscarlab/graphene/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oscarlab/graphene/pulls/1080/commits"},"statuses":{"href":"https://api.github.com/repos/oscarlab/graphene/statuses/5ea2bdaf0f31d2872985e57e995cd699f32799d5"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":8,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"dimakuv"}}