{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/rr/pulls/comments/26531079","id":26531079,"diff_hunk":"@@ -592,6 +593,20 @@ struct BaseArch : public wordsize, public FcntlConstants {\n   };\n   RR_VERIFY_TYPE(user_desc);\n \n+  // TODO(dannas): When to we need typedefs for types?\n+  // sizeof(int) will always be the x86_64 size. Guess I should use signed_int\n+  // for pid? But __u32 should be the same on 32bit and 64 bit platforms, right?\n+  struct cap_user_header_t {\n+    __u32 version;\n+    int pid;\n+  };\n+\n+  struct cap_user_data_t {\n+    __u32 effective;\n+    __u32 permitted;\n+    __u32 inheritable;\n+  };","path":"src/kernel_abi.h","position":24,"original_position":24,"commit_id":"2a0129ab84ea7424c99d2d2af0f821e9f5d036de","original_commit_id":"2a0129ab84ea7424c99d2d2af0f821e9f5d036de","user":{"login":"rocallahan","id":296135,"avatar_url":"https://avatars.githubusercontent.com/u/296135?v=3","gravatar_id":"","url":"https://api.github.com/users/rocallahan","html_url":"https://github.com/rocallahan","followers_url":"https://api.github.com/users/rocallahan/followers","following_url":"https://api.github.com/users/rocallahan/following{/other_user}","gists_url":"https://api.github.com/users/rocallahan/gists{/gist_id}","starred_url":"https://api.github.com/users/rocallahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocallahan/subscriptions","organizations_url":"https://api.github.com/users/rocallahan/orgs","repos_url":"https://api.github.com/users/rocallahan/repos","events_url":"https://api.github.com/users/rocallahan/events{/privacy}","received_events_url":"https://api.github.com/users/rocallahan/received_events","type":"User","site_admin":false},"body":"I like what you've written here. I like to have the kernel_abi definitions match the actual header contents as closely as possible. So I guess you just need to add a typedef for `__u32` to `BaseArch`.","created_at":"2015-03-16T21:48:36Z","updated_at":"2015-03-16T21:48:36Z","html_url":"https://github.com/mozilla/rr/pull/1444#discussion_r26531079","pull_request_url":"https://api.github.com/repos/mozilla/rr/pulls/1444","_links":{"self":{"href":"https://api.github.com/repos/mozilla/rr/pulls/comments/26531079"},"html":{"href":"https://github.com/mozilla/rr/pull/1444#discussion_r26531079"},"pull_request":{"href":"https://api.github.com/repos/mozilla/rr/pulls/1444"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/rr/pulls/1444","id":31282205,"html_url":"https://github.com/mozilla/rr/pull/1444","diff_url":"https://github.com/mozilla/rr/pull/1444.diff","patch_url":"https://github.com/mozilla/rr/pull/1444.patch","issue_url":"https://api.github.com/repos/mozilla/rr/issues/1444","number":1444,"state":"open","locked":false,"title":"[WIP]  Capget","user":{"login":"dannas","id":152178,"avatar_url":"https://avatars.githubusercontent.com/u/152178?v=3","gravatar_id":"","url":"https://api.github.com/users/dannas","html_url":"https://github.com/dannas","followers_url":"https://api.github.com/users/dannas/followers","following_url":"https://api.github.com/users/dannas/following{/other_user}","gists_url":"https://api.github.com/users/dannas/gists{/gist_id}","starred_url":"https://api.github.com/users/dannas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannas/subscriptions","organizations_url":"https://api.github.com/users/dannas/orgs","repos_url":"https://api.github.com/users/dannas/repos","events_url":"https://api.github.com/users/dannas/events{/privacy}","received_events_url":"https://api.github.com/users/dannas/received_events","type":"User","site_admin":false},"body":"WIP - not ready for merge, seeking feedback. (And I've messed up a merge - need to improve my git skills).\r\n\r\nI'm trying to add support for capget(2). It is used in ping(8) which is called from a properiatary application I wish to record.\r\n\r\nSome questions:\r\n* The capabilities subsystem looks kind of messy and I haven't found that many programs that appears to use it (googled for linux capabilities, capget, cap_get_proc, etcetera). Is ping(8) enough of a use case for you to accept it, or should I drop this PR?\r\n* capget is defined in glibc, but the header is in the libcap-dev debian package. How handle dependencies? The travis configuration would have to be updated. ..Should I avoid that hazzle by calling the syscall directly without the glibc wrapper? Or place a copy of the header in the rr source tree?\r\n* Have I understood the ABI requirements correctly if I say that `int` must be a typedef `signed_int` but `__u32` does not need any typedef indirection.\r\n \r\nNow I just have to figure out why the capget() call returns EINVAL. I've experimented with different sizes of the data and different versions. Will have to reread the `SYS_capget(...)` function again. ","created_at":"2015-03-16T20:40:11Z","updated_at":"2015-03-16T21:48:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c9547759f2ce8078c6cc60b6bf85245cf4e279e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/rr/pulls/1444/commits","review_comments_url":"https://api.github.com/repos/mozilla/rr/pulls/1444/comments","review_comment_url":"https://api.github.com/repos/mozilla/rr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/rr/issues/1444/comments","statuses_url":"https://api.github.com/repos/mozilla/rr/statuses/2a0129ab84ea7424c99d2d2af0f821e9f5d036de","head":{"label":"dannas:capget","ref":"capget","sha":"2a0129ab84ea7424c99d2d2af0f821e9f5d036de","user":{"login":"dannas","id":152178,"avatar_url":"https://avatars.githubusercontent.com/u/152178?v=3","gravatar_id":"","url":"https://api.github.com/users/dannas","html_url":"https://github.com/dannas","followers_url":"https://api.github.com/users/dannas/followers","following_url":"https://api.github.com/users/dannas/following{/other_user}","gists_url":"https://api.github.com/users/dannas/gists{/gist_id}","starred_url":"https://api.github.com/users/dannas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannas/subscriptions","organizations_url":"https://api.github.com/users/dannas/orgs","repos_url":"https://api.github.com/users/dannas/repos","events_url":"https://api.github.com/users/dannas/events{/privacy}","received_events_url":"https://api.github.com/users/dannas/received_events","type":"User","site_admin":false},"repo":{"id":30920039,"name":"rr","full_name":"dannas/rr","owner":{"login":"dannas","id":152178,"avatar_url":"https://avatars.githubusercontent.com/u/152178?v=3","gravatar_id":"","url":"https://api.github.com/users/dannas","html_url":"https://github.com/dannas","followers_url":"https://api.github.com/users/dannas/followers","following_url":"https://api.github.com/users/dannas/following{/other_user}","gists_url":"https://api.github.com/users/dannas/gists{/gist_id}","starred_url":"https://api.github.com/users/dannas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannas/subscriptions","organizations_url":"https://api.github.com/users/dannas/orgs","repos_url":"https://api.github.com/users/dannas/repos","events_url":"https://api.github.com/users/dannas/events{/privacy}","received_events_url":"https://api.github.com/users/dannas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dannas/rr","description":"Record and Replay Framework","fork":true,"url":"https://api.github.com/repos/dannas/rr","forks_url":"https://api.github.com/repos/dannas/rr/forks","keys_url":"https://api.github.com/repos/dannas/rr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dannas/rr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dannas/rr/teams","hooks_url":"https://api.github.com/repos/dannas/rr/hooks","issue_events_url":"https://api.github.com/repos/dannas/rr/issues/events{/number}","events_url":"https://api.github.com/repos/dannas/rr/events","assignees_url":"https://api.github.com/repos/dannas/rr/assignees{/user}","branches_url":"https://api.github.com/repos/dannas/rr/branches{/branch}","tags_url":"https://api.github.com/repos/dannas/rr/tags","blobs_url":"https://api.github.com/repos/dannas/rr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dannas/rr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dannas/rr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dannas/rr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dannas/rr/statuses/{sha}","languages_url":"https://api.github.com/repos/dannas/rr/languages","stargazers_url":"https://api.github.com/repos/dannas/rr/stargazers","contributors_url":"https://api.github.com/repos/dannas/rr/contributors","subscribers_url":"https://api.github.com/repos/dannas/rr/subscribers","subscription_url":"https://api.github.com/repos/dannas/rr/subscription","commits_url":"https://api.github.com/repos/dannas/rr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dannas/rr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dannas/rr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dannas/rr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dannas/rr/contents/{+path}","compare_url":"https://api.github.com/repos/dannas/rr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dannas/rr/merges","archive_url":"https://api.github.com/repos/dannas/rr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dannas/rr/downloads","issues_url":"https://api.github.com/repos/dannas/rr/issues{/number}","pulls_url":"https://api.github.com/repos/dannas/rr/pulls{/number}","milestones_url":"https://api.github.com/repos/dannas/rr/milestones{/number}","notifications_url":"https://api.github.com/repos/dannas/rr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dannas/rr/labels{/name}","releases_url":"https://api.github.com/repos/dannas/rr/releases{/id}","created_at":"2015-02-17T14:19:10Z","updated_at":"2015-03-11T13:12:52Z","pushed_at":"2015-03-16T20:18:27Z","git_url":"git://github.com/dannas/rr.git","ssh_url":"git@github.com:dannas/rr.git","clone_url":"https://github.com/dannas/rr.git","svn_url":"https://github.com/dannas/rr","homepage":"","size":37193,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"0817619be8640909ac1101570f012c0e64aeae15","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":2269868,"name":"rr","full_name":"mozilla/rr","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/rr","description":"Record and Replay Framework","fork":false,"url":"https://api.github.com/repos/mozilla/rr","forks_url":"https://api.github.com/repos/mozilla/rr/forks","keys_url":"https://api.github.com/repos/mozilla/rr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/rr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/rr/teams","hooks_url":"https://api.github.com/repos/mozilla/rr/hooks","issue_events_url":"https://api.github.com/repos/mozilla/rr/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/rr/events","assignees_url":"https://api.github.com/repos/mozilla/rr/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/rr/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/rr/tags","blobs_url":"https://api.github.com/repos/mozilla/rr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/rr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/rr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/rr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/rr/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/rr/languages","stargazers_url":"https://api.github.com/repos/mozilla/rr/stargazers","contributors_url":"https://api.github.com/repos/mozilla/rr/contributors","subscribers_url":"https://api.github.com/repos/mozilla/rr/subscribers","subscription_url":"https://api.github.com/repos/mozilla/rr/subscription","commits_url":"https://api.github.com/repos/mozilla/rr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/rr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/rr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/rr/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/rr/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/rr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/rr/merges","archive_url":"https://api.github.com/repos/mozilla/rr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/rr/downloads","issues_url":"https://api.github.com/repos/mozilla/rr/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/rr/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/rr/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/rr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/rr/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/rr/releases{/id}","created_at":"2011-08-25T18:59:32Z","updated_at":"2015-03-16T18:36:46Z","pushed_at":"2015-03-16T18:36:46Z","git_url":"git://github.com/mozilla/rr.git","ssh_url":"git@github.com:mozilla/rr.git","clone_url":"https://github.com/mozilla/rr.git","svn_url":"https://github.com/mozilla/rr","homepage":"","size":43431,"stargazers_count":764,"watchers_count":764,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":64,"mirror_url":null,"open_issues_count":131,"forks":64,"open_issues":131,"watchers":764,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/rr/pulls/1444"},"html":{"href":"https://github.com/mozilla/rr/pull/1444"},"issue":{"href":"https://api.github.com/repos/mozilla/rr/issues/1444"},"comments":{"href":"https://api.github.com/repos/mozilla/rr/issues/1444/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/rr/pulls/1444/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/rr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/rr/pulls/1444/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/rr/statuses/2a0129ab84ea7424c99d2d2af0f821e9f5d036de"}}}}