{"action":"closed","number":21,"pull_request":{"url":"https://api.github.com/repos/01org/linux-sgx/pulls/21","id":86984142,"html_url":"https://github.com/01org/linux-sgx/pull/21","diff_url":"https://github.com/01org/linux-sgx/pull/21.diff","patch_url":"https://github.com/01org/linux-sgx/pull/21.patch","issue_url":"https://api.github.com/repos/01org/linux-sgx/issues/21","number":21,"state":"closed","locked":false,"title":"Clean up build_sections and build_mem_region code","user":{"login":"sean-jc","id":18535971,"avatar_url":"https://avatars.githubusercontent.com/u/18535971?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-jc","html_url":"https://github.com/sean-jc","followers_url":"https://api.github.com/users/sean-jc/followers","following_url":"https://api.github.com/users/sean-jc/following{/other_user}","gists_url":"https://api.github.com/users/sean-jc/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-jc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-jc/subscriptions","organizations_url":"https://api.github.com/users/sean-jc/orgs","repos_url":"https://api.github.com/users/sean-jc/repos","events_url":"https://api.github.com/users/sean-jc/events{/privacy}","received_events_url":"https://api.github.com/users/sean-jc/received_events","type":"User","site_admin":false},"body":"Modify build_mem_region to support an unaligned starting address.  This\r\nmakes it symmetrical with regard to starting and ending partial pages;\r\npreviously, build_mem_region only support partial pages at the end of a\r\nsection (caller was responsible for handling the first page).  Remove\r\nthe edge case handling of the first page from build_sections now that\r\nbuild_mem_region does not have alignment restrictions.\r\n\r\nChange the section_info_t parameter in build_mem_region to be a const\r\nreference to eliminate any need to check for a null pointer.\r\n\r\nMake the raw_data pointer in section_info_t const, as the source file's\r\ndata should never be modified.  This is currently cast away via GET_PTR\r\nin build_pages when calling into add_enclave_page; the add_enclave_page\r\nflow can be modified by a future commit to retain the const modifier.\r\n\r\nAdd two utilities, is_relocation_page and build_partial_page, to reduce\r\ncopy-paste code.\r\n\r\nAdd PAGE_OFFSET macro to calculate the offset within a page.\r\n\r\nAssert on address/size alignment in build_pages and build_context to\r\ndocument expected alignment and catch any related code bugs.\r\n\r\nSigned-off-by: Sean Christopherson <sean.j.christopherson@intel.com>","created_at":"2016-09-27T18:20:21Z","updated_at":"2016-10-24T07:45:32Z","closed_at":"2016-10-24T07:45:32Z","merged_at":"2016-10-24T07:45:32Z","merge_commit_sha":"14c19edaafdd70ab090c1f161a77589d8b9365c3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/01org/linux-sgx/pulls/21/commits","review_comments_url":"https://api.github.com/repos/01org/linux-sgx/pulls/21/comments","review_comment_url":"https://api.github.com/repos/01org/linux-sgx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/linux-sgx/issues/21/comments","statuses_url":"https://api.github.com/repos/01org/linux-sgx/statuses/14c19edaafdd70ab090c1f161a77589d8b9365c3","head":{"label":"sean-jc:build_sections_cleanup","ref":"build_sections_cleanup","sha":"14c19edaafdd70ab090c1f161a77589d8b9365c3","user":{"login":"sean-jc","id":18535971,"avatar_url":"https://avatars.githubusercontent.com/u/18535971?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-jc","html_url":"https://github.com/sean-jc","followers_url":"https://api.github.com/users/sean-jc/followers","following_url":"https://api.github.com/users/sean-jc/following{/other_user}","gists_url":"https://api.github.com/users/sean-jc/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-jc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-jc/subscriptions","organizations_url":"https://api.github.com/users/sean-jc/orgs","repos_url":"https://api.github.com/users/sean-jc/repos","events_url":"https://api.github.com/users/sean-jc/events{/privacy}","received_events_url":"https://api.github.com/users/sean-jc/received_events","type":"User","site_admin":false},"repo":{"id":66571793,"name":"linux-sgx","full_name":"sean-jc/linux-sgx","owner":{"login":"sean-jc","id":18535971,"avatar_url":"https://avatars.githubusercontent.com/u/18535971?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-jc","html_url":"https://github.com/sean-jc","followers_url":"https://api.github.com/users/sean-jc/followers","following_url":"https://api.github.com/users/sean-jc/following{/other_user}","gists_url":"https://api.github.com/users/sean-jc/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-jc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-jc/subscriptions","organizations_url":"https://api.github.com/users/sean-jc/orgs","repos_url":"https://api.github.com/users/sean-jc/repos","events_url":"https://api.github.com/users/sean-jc/events{/privacy}","received_events_url":"https://api.github.com/users/sean-jc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sean-jc/linux-sgx","description":"Intel SGX for Linux*","fork":true,"url":"https://api.github.com/repos/sean-jc/linux-sgx","forks_url":"https://api.github.com/repos/sean-jc/linux-sgx/forks","keys_url":"https://api.github.com/repos/sean-jc/linux-sgx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sean-jc/linux-sgx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sean-jc/linux-sgx/teams","hooks_url":"https://api.github.com/repos/sean-jc/linux-sgx/hooks","issue_events_url":"https://api.github.com/repos/sean-jc/linux-sgx/issues/events{/number}","events_url":"https://api.github.com/repos/sean-jc/linux-sgx/events","assignees_url":"https://api.github.com/repos/sean-jc/linux-sgx/assignees{/user}","branches_url":"https://api.github.com/repos/sean-jc/linux-sgx/branches{/branch}","tags_url":"https://api.github.com/repos/sean-jc/linux-sgx/tags","blobs_url":"https://api.github.com/repos/sean-jc/linux-sgx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sean-jc/linux-sgx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sean-jc/linux-sgx/git/refs{/sha}","trees_url":"https://api.github.com/repos/sean-jc/linux-sgx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sean-jc/linux-sgx/statuses/{sha}","languages_url":"https://api.github.com/repos/sean-jc/linux-sgx/languages","stargazers_url":"https://api.github.com/repos/sean-jc/linux-sgx/stargazers","contributors_url":"https://api.github.com/repos/sean-jc/linux-sgx/contributors","subscribers_url":"https://api.github.com/repos/sean-jc/linux-sgx/subscribers","subscription_url":"https://api.github.com/repos/sean-jc/linux-sgx/subscription","commits_url":"https://api.github.com/repos/sean-jc/linux-sgx/commits{/sha}","git_commits_url":"https://api.github.com/repos/sean-jc/linux-sgx/git/commits{/sha}","comments_url":"https://api.github.com/repos/sean-jc/linux-sgx/comments{/number}","issue_comment_url":"https://api.github.com/repos/sean-jc/linux-sgx/issues/comments{/number}","contents_url":"https://api.github.com/repos/sean-jc/linux-sgx/contents/{+path}","compare_url":"https://api.github.com/repos/sean-jc/linux-sgx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sean-jc/linux-sgx/merges","archive_url":"https://api.github.com/repos/sean-jc/linux-sgx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sean-jc/linux-sgx/downloads","issues_url":"https://api.github.com/repos/sean-jc/linux-sgx/issues{/number}","pulls_url":"https://api.github.com/repos/sean-jc/linux-sgx/pulls{/number}","milestones_url":"https://api.github.com/repos/sean-jc/linux-sgx/milestones{/number}","notifications_url":"https://api.github.com/repos/sean-jc/linux-sgx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sean-jc/linux-sgx/labels{/name}","releases_url":"https://api.github.com/repos/sean-jc/linux-sgx/releases{/id}","deployments_url":"https://api.github.com/repos/sean-jc/linux-sgx/deployments","created_at":"2016-08-25T15:47:42Z","updated_at":"2016-08-25T15:47:48Z","pushed_at":"2016-09-29T16:22:37Z","git_url":"git://github.com/sean-jc/linux-sgx.git","ssh_url":"git@github.com:sean-jc/linux-sgx.git","clone_url":"https://github.com/sean-jc/linux-sgx.git","svn_url":"https://github.com/sean-jc/linux-sgx","homepage":"https://01.org/intel-softwareguard-extensions","size":6356,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"01org:master","ref":"master","sha":"85947caa128f9f5c731cb25c3cdc4a4d5f95d6e7","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":52399959,"name":"linux-sgx","full_name":"01org/linux-sgx","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/linux-sgx","description":"Intel SGX for Linux*","fork":false,"url":"https://api.github.com/repos/01org/linux-sgx","forks_url":"https://api.github.com/repos/01org/linux-sgx/forks","keys_url":"https://api.github.com/repos/01org/linux-sgx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/linux-sgx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/linux-sgx/teams","hooks_url":"https://api.github.com/repos/01org/linux-sgx/hooks","issue_events_url":"https://api.github.com/repos/01org/linux-sgx/issues/events{/number}","events_url":"https://api.github.com/repos/01org/linux-sgx/events","assignees_url":"https://api.github.com/repos/01org/linux-sgx/assignees{/user}","branches_url":"https://api.github.com/repos/01org/linux-sgx/branches{/branch}","tags_url":"https://api.github.com/repos/01org/linux-sgx/tags","blobs_url":"https://api.github.com/repos/01org/linux-sgx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/linux-sgx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/linux-sgx/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/linux-sgx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/linux-sgx/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/linux-sgx/languages","stargazers_url":"https://api.github.com/repos/01org/linux-sgx/stargazers","contributors_url":"https://api.github.com/repos/01org/linux-sgx/contributors","subscribers_url":"https://api.github.com/repos/01org/linux-sgx/subscribers","subscription_url":"https://api.github.com/repos/01org/linux-sgx/subscription","commits_url":"https://api.github.com/repos/01org/linux-sgx/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/linux-sgx/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/linux-sgx/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/linux-sgx/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/linux-sgx/contents/{+path}","compare_url":"https://api.github.com/repos/01org/linux-sgx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/linux-sgx/merges","archive_url":"https://api.github.com/repos/01org/linux-sgx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/linux-sgx/downloads","issues_url":"https://api.github.com/repos/01org/linux-sgx/issues{/number}","pulls_url":"https://api.github.com/repos/01org/linux-sgx/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/linux-sgx/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/linux-sgx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/linux-sgx/labels{/name}","releases_url":"https://api.github.com/repos/01org/linux-sgx/releases{/id}","deployments_url":"https://api.github.com/repos/01org/linux-sgx/deployments","created_at":"2016-02-23T23:41:25Z","updated_at":"2016-10-23T15:02:15Z","pushed_at":"2016-10-24T07:45:32Z","git_url":"git://github.com/01org/linux-sgx.git","ssh_url":"git@github.com:01org/linux-sgx.git","clone_url":"https://github.com/01org/linux-sgx.git","svn_url":"https://github.com/01org/linux-sgx","homepage":"https://01.org/intel-softwareguard-extensions","size":6610,"stargazers_count":132,"watchers_count":132,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":9,"forks":37,"open_issues":9,"watchers":132,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/linux-sgx/pulls/21"},"html":{"href":"https://github.com/01org/linux-sgx/pull/21"},"issue":{"href":"https://api.github.com/repos/01org/linux-sgx/issues/21"},"comments":{"href":"https://api.github.com/repos/01org/linux-sgx/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/linux-sgx/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/linux-sgx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/linux-sgx/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/01org/linux-sgx/statuses/14c19edaafdd70ab090c1f161a77589d8b9365c3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"yuyuany","id":20528808,"avatar_url":"https://avatars.githubusercontent.com/u/20528808?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyuany","html_url":"https://github.com/yuyuany","followers_url":"https://api.github.com/users/yuyuany/followers","following_url":"https://api.github.com/users/yuyuany/following{/other_user}","gists_url":"https://api.github.com/users/yuyuany/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyuany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyuany/subscriptions","organizations_url":"https://api.github.com/users/yuyuany/orgs","repos_url":"https://api.github.com/users/yuyuany/repos","events_url":"https://api.github.com/users/yuyuany/events{/privacy}","received_events_url":"https://api.github.com/users/yuyuany/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":83,"deletions":103,"changed_files":4}}
{"actor":{"display_login":"yuyuany"}}