{"action":"closed","number":544,"pull_request":{"url":"https://api.github.com/repos/dynup/kpatch/pulls/544","id":49609530,"html_url":"https://github.com/dynup/kpatch/pull/544","diff_url":"https://github.com/dynup/kpatch/pull/544.diff","patch_url":"https://github.com/dynup/kpatch/pull/544.patch","issue_url":"https://api.github.com/repos/dynup/kpatch/issues/544","number":544,"state":"closed","locked":false,"title":"kmod/core: fix crash with !CONFIG_DEBUG_SET_MODULE_RONX","user":{"login":"jpoimboe","id":1750978,"avatar_url":"https://avatars.githubusercontent.com/u/1750978?v=3","gravatar_id":"","url":"https://api.github.com/users/jpoimboe","html_url":"https://github.com/jpoimboe","followers_url":"https://api.github.com/users/jpoimboe/followers","following_url":"https://api.github.com/users/jpoimboe/following{/other_user}","gists_url":"https://api.github.com/users/jpoimboe/gists{/gist_id}","starred_url":"https://api.github.com/users/jpoimboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpoimboe/subscriptions","organizations_url":"https://api.github.com/users/jpoimboe/orgs","repos_url":"https://api.github.com/users/jpoimboe/repos","events_url":"https://api.github.com/users/jpoimboe/events{/privacy}","received_events_url":"https://api.github.com/users/jpoimboe/received_events","type":"User","site_admin":false},"body":"When loading a patch module on a kernel with\r\n!CONFIG_DEBUG_SET_MODULE_RONX, the following crash occurs:\r\n\r\n  loading core module: /root/src/kpatch/kpatch/../kmod/core/kpatch.ko\r\n  loading patch module: kpatch-meminfo-string.ko\r\n  BUG: unable to handle kernel paging request at ffffffffa0010cc0\r\n  IP: [<ffffffff8125ecb0>] do_init_module+0x84/0x1af\r\n  PGD 13d3067 PUD 13d4063 PMD 1e1ee067 PTE 1e1a0161\r\n  Oops: 0003 [#1]\r\n  Modules linked in: kpatch_meminfo_string(O+) kpatch(O)\r\n  CPU: 0 PID: 149 Comm: insmod Tainted: G           O  K 4.1.0+ #1\r\n  task: ffff88001e17b810 ti: ffff88001e1cc000 task.ti: ffff88001e1cc000\r\n  RIP: 0010:[<ffffffff8125ecb0>]  [<ffffffff8125ecb0>] do_init_module+0x84/0x1af\r\n  RSP: 0018:ffff88001e1cfda8  EFLAGS: 00010246\r\n  RAX: 0000000000000000 RBX: ffffffffa0010cc0 RCX: 0000000080a02001\r\n  RDX: 0000000000000024 RSI: 0000000000000000 RDI: ffffffff813fabe0\r\n  RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000d0000000\r\n  R10: ffffffffa000e000 R11: 0000000000000001 R12: ffff88001eb58638\r\n  R13: ffffffffa0010d10 R14: 0000000000000001 R15: 0000000000000000\r\n  FS:  00007f0ae00aa700(0000) GS:ffffffff813e1000(0000) knlGS:0000000000000000\r\n  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\r\n  CR2: ffffffffa0010cc0 CR3: 000000001e181000 CR4: 00000000000006b0\r\n  Stack:\r\n   ffff88001e1cfed8 0000000000000001 ffffffffa0010cc0 ffffffff81058aac\r\n   ffff88001e207680 00000000810a462f ffffc90000096890 0000000000000e00\r\n   ffffffff00000016 ffffffff8126cd40 ffff88001eaa6a08 ffff88001e1cfe48\r\n  Call Trace:\r\n   [<ffffffff81058aac>] ? load_module+0x18ad/0x18e9\r\n   [<ffffffff81056290>] ? copy_module_from_fd+0x86/0xdf\r\n   [<ffffffff81058c1e>] ? SyS_finit_module+0x56/0x61\r\n   [<ffffffff81261854>] ? system_call_fastpath+0x12/0x6a\r\n  Code: f8 00 00 00 74 23 49 c7 c0 80 ca 26 81 48 8d 53 18 89 c1 4c 89 c6 48 c7 c7 6d ef 36 81 31 c0 e8 16 fb ff ff e8 18 06 00 00 31 f6 <c7> 03 00 00 00 00 48 89 da 48 c7 c7 c0 c9 3f 81 e8 7e b3 dd ff\r\n  RIP  [<ffffffff8125ecb0>] do_init_module+0x84/0x1af\r\n   RSP <ffff88001e1cfda8>\r\n  CR2: ffffffffa0010cc0\r\n\r\nWith !CONFIG_DEBUG_SET_MODULE_RONX, module text and rodata pages are\r\nwritable, and the debug_align() macro allows the module struct to share\r\na page with executable text.  When klp_write_module_reloc() calls\r\nset_memory_ro() on the page, it effectively turns the module struct into\r\na read-only structure, resulting in a page fault when load_module() does\r\n\"mod->state = MODULE_STATE_LIVE\".\r\n\r\nFixes: #497","created_at":"2015-11-03T20:47:01Z","updated_at":"2015-11-04T19:51:13Z","closed_at":"2015-11-04T19:51:13Z","merged_at":"2015-11-04T19:51:12Z","merge_commit_sha":"5c3427c3996d9d48ec10e3346f30be8908cb384c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dynup/kpatch/pulls/544/commits","review_comments_url":"https://api.github.com/repos/dynup/kpatch/pulls/544/comments","review_comment_url":"https://api.github.com/repos/dynup/kpatch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dynup/kpatch/issues/544/comments","statuses_url":"https://api.github.com/repos/dynup/kpatch/statuses/a683f7da21dd603c5689e3cb3fb44d105c80c295","head":{"label":"jpoimboe:ronx-crash","ref":"ronx-crash","sha":"a683f7da21dd603c5689e3cb3fb44d105c80c295","user":{"login":"jpoimboe","id":1750978,"avatar_url":"https://avatars.githubusercontent.com/u/1750978?v=3","gravatar_id":"","url":"https://api.github.com/users/jpoimboe","html_url":"https://github.com/jpoimboe","followers_url":"https://api.github.com/users/jpoimboe/followers","following_url":"https://api.github.com/users/jpoimboe/following{/other_user}","gists_url":"https://api.github.com/users/jpoimboe/gists{/gist_id}","starred_url":"https://api.github.com/users/jpoimboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpoimboe/subscriptions","organizations_url":"https://api.github.com/users/jpoimboe/orgs","repos_url":"https://api.github.com/users/jpoimboe/repos","events_url":"https://api.github.com/users/jpoimboe/events{/privacy}","received_events_url":"https://api.github.com/users/jpoimboe/received_events","type":"User","site_admin":false},"repo":{"id":16748757,"name":"kpatch","full_name":"jpoimboe/kpatch","owner":{"login":"jpoimboe","id":1750978,"avatar_url":"https://avatars.githubusercontent.com/u/1750978?v=3","gravatar_id":"","url":"https://api.github.com/users/jpoimboe","html_url":"https://github.com/jpoimboe","followers_url":"https://api.github.com/users/jpoimboe/followers","following_url":"https://api.github.com/users/jpoimboe/following{/other_user}","gists_url":"https://api.github.com/users/jpoimboe/gists{/gist_id}","starred_url":"https://api.github.com/users/jpoimboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpoimboe/subscriptions","organizations_url":"https://api.github.com/users/jpoimboe/orgs","repos_url":"https://api.github.com/users/jpoimboe/repos","events_url":"https://api.github.com/users/jpoimboe/events{/privacy}","received_events_url":"https://api.github.com/users/jpoimboe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpoimboe/kpatch","description":"kpatch - dynamic kernel patching","fork":true,"url":"https://api.github.com/repos/jpoimboe/kpatch","forks_url":"https://api.github.com/repos/jpoimboe/kpatch/forks","keys_url":"https://api.github.com/repos/jpoimboe/kpatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpoimboe/kpatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpoimboe/kpatch/teams","hooks_url":"https://api.github.com/repos/jpoimboe/kpatch/hooks","issue_events_url":"https://api.github.com/repos/jpoimboe/kpatch/issues/events{/number}","events_url":"https://api.github.com/repos/jpoimboe/kpatch/events","assignees_url":"https://api.github.com/repos/jpoimboe/kpatch/assignees{/user}","branches_url":"https://api.github.com/repos/jpoimboe/kpatch/branches{/branch}","tags_url":"https://api.github.com/repos/jpoimboe/kpatch/tags","blobs_url":"https://api.github.com/repos/jpoimboe/kpatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpoimboe/kpatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpoimboe/kpatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpoimboe/kpatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpoimboe/kpatch/statuses/{sha}","languages_url":"https://api.github.com/repos/jpoimboe/kpatch/languages","stargazers_url":"https://api.github.com/repos/jpoimboe/kpatch/stargazers","contributors_url":"https://api.github.com/repos/jpoimboe/kpatch/contributors","subscribers_url":"https://api.github.com/repos/jpoimboe/kpatch/subscribers","subscription_url":"https://api.github.com/repos/jpoimboe/kpatch/subscription","commits_url":"https://api.github.com/repos/jpoimboe/kpatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpoimboe/kpatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpoimboe/kpatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpoimboe/kpatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpoimboe/kpatch/contents/{+path}","compare_url":"https://api.github.com/repos/jpoimboe/kpatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpoimboe/kpatch/merges","archive_url":"https://api.github.com/repos/jpoimboe/kpatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpoimboe/kpatch/downloads","issues_url":"https://api.github.com/repos/jpoimboe/kpatch/issues{/number}","pulls_url":"https://api.github.com/repos/jpoimboe/kpatch/pulls{/number}","milestones_url":"https://api.github.com/repos/jpoimboe/kpatch/milestones{/number}","notifications_url":"https://api.github.com/repos/jpoimboe/kpatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpoimboe/kpatch/labels{/name}","releases_url":"https://api.github.com/repos/jpoimboe/kpatch/releases{/id}","created_at":"2014-02-11T23:00:27Z","updated_at":"2015-02-24T05:47:56Z","pushed_at":"2015-11-04T18:12:12Z","git_url":"git://github.com/jpoimboe/kpatch.git","ssh_url":"git@github.com:jpoimboe/kpatch.git","clone_url":"https://github.com/jpoimboe/kpatch.git","svn_url":"https://github.com/jpoimboe/kpatch","homepage":null,"size":2569,"stargazers_count":5,"watchers_count":5,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"dynup:master","ref":"master","sha":"b2eeb59b8a0287373182ee8e3fc6de9cd6145ec1","user":{"login":"dynup","id":6643594,"avatar_url":"https://avatars.githubusercontent.com/u/6643594?v=3","gravatar_id":"","url":"https://api.github.com/users/dynup","html_url":"https://github.com/dynup","followers_url":"https://api.github.com/users/dynup/followers","following_url":"https://api.github.com/users/dynup/following{/other_user}","gists_url":"https://api.github.com/users/dynup/gists{/gist_id}","starred_url":"https://api.github.com/users/dynup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynup/subscriptions","organizations_url":"https://api.github.com/users/dynup/orgs","repos_url":"https://api.github.com/users/dynup/repos","events_url":"https://api.github.com/users/dynup/events{/privacy}","received_events_url":"https://api.github.com/users/dynup/received_events","type":"Organization","site_admin":false},"repo":{"id":16743039,"name":"kpatch","full_name":"dynup/kpatch","owner":{"login":"dynup","id":6643594,"avatar_url":"https://avatars.githubusercontent.com/u/6643594?v=3","gravatar_id":"","url":"https://api.github.com/users/dynup","html_url":"https://github.com/dynup","followers_url":"https://api.github.com/users/dynup/followers","following_url":"https://api.github.com/users/dynup/following{/other_user}","gists_url":"https://api.github.com/users/dynup/gists{/gist_id}","starred_url":"https://api.github.com/users/dynup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynup/subscriptions","organizations_url":"https://api.github.com/users/dynup/orgs","repos_url":"https://api.github.com/users/dynup/repos","events_url":"https://api.github.com/users/dynup/events{/privacy}","received_events_url":"https://api.github.com/users/dynup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dynup/kpatch","description":"kpatch - dynamic kernel patching","fork":false,"url":"https://api.github.com/repos/dynup/kpatch","forks_url":"https://api.github.com/repos/dynup/kpatch/forks","keys_url":"https://api.github.com/repos/dynup/kpatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dynup/kpatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dynup/kpatch/teams","hooks_url":"https://api.github.com/repos/dynup/kpatch/hooks","issue_events_url":"https://api.github.com/repos/dynup/kpatch/issues/events{/number}","events_url":"https://api.github.com/repos/dynup/kpatch/events","assignees_url":"https://api.github.com/repos/dynup/kpatch/assignees{/user}","branches_url":"https://api.github.com/repos/dynup/kpatch/branches{/branch}","tags_url":"https://api.github.com/repos/dynup/kpatch/tags","blobs_url":"https://api.github.com/repos/dynup/kpatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dynup/kpatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dynup/kpatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/dynup/kpatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dynup/kpatch/statuses/{sha}","languages_url":"https://api.github.com/repos/dynup/kpatch/languages","stargazers_url":"https://api.github.com/repos/dynup/kpatch/stargazers","contributors_url":"https://api.github.com/repos/dynup/kpatch/contributors","subscribers_url":"https://api.github.com/repos/dynup/kpatch/subscribers","subscription_url":"https://api.github.com/repos/dynup/kpatch/subscription","commits_url":"https://api.github.com/repos/dynup/kpatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/dynup/kpatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/dynup/kpatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/dynup/kpatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/dynup/kpatch/contents/{+path}","compare_url":"https://api.github.com/repos/dynup/kpatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dynup/kpatch/merges","archive_url":"https://api.github.com/repos/dynup/kpatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dynup/kpatch/downloads","issues_url":"https://api.github.com/repos/dynup/kpatch/issues{/number}","pulls_url":"https://api.github.com/repos/dynup/kpatch/pulls{/number}","milestones_url":"https://api.github.com/repos/dynup/kpatch/milestones{/number}","notifications_url":"https://api.github.com/repos/dynup/kpatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dynup/kpatch/labels{/name}","releases_url":"https://api.github.com/repos/dynup/kpatch/releases{/id}","created_at":"2014-02-11T19:47:52Z","updated_at":"2015-11-04T19:46:06Z","pushed_at":"2015-11-04T19:51:12Z","git_url":"git://github.com/dynup/kpatch.git","ssh_url":"git@github.com:dynup/kpatch.git","clone_url":"https://github.com/dynup/kpatch.git","svn_url":"https://github.com/dynup/kpatch","homepage":null,"size":3215,"stargazers_count":327,"watchers_count":327,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":13,"forks":70,"open_issues":13,"watchers":327,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dynup/kpatch/pulls/544"},"html":{"href":"https://github.com/dynup/kpatch/pull/544"},"issue":{"href":"https://api.github.com/repos/dynup/kpatch/issues/544"},"comments":{"href":"https://api.github.com/repos/dynup/kpatch/issues/544/comments"},"review_comments":{"href":"https://api.github.com/repos/dynup/kpatch/pulls/544/comments"},"review_comment":{"href":"https://api.github.com/repos/dynup/kpatch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dynup/kpatch/pulls/544/commits"},"statuses":{"href":"https://api.github.com/repos/dynup/kpatch/statuses/a683f7da21dd603c5689e3cb3fb44d105c80c295"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"spartacus06","id":493891,"avatar_url":"https://avatars.githubusercontent.com/u/493891?v=3","gravatar_id":"","url":"https://api.github.com/users/spartacus06","html_url":"https://github.com/spartacus06","followers_url":"https://api.github.com/users/spartacus06/followers","following_url":"https://api.github.com/users/spartacus06/following{/other_user}","gists_url":"https://api.github.com/users/spartacus06/gists{/gist_id}","starred_url":"https://api.github.com/users/spartacus06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spartacus06/subscriptions","organizations_url":"https://api.github.com/users/spartacus06/orgs","repos_url":"https://api.github.com/users/spartacus06/repos","events_url":"https://api.github.com/users/spartacus06/events{/privacy}","received_events_url":"https://api.github.com/users/spartacus06/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":6,"deletions":6,"changed_files":1}}