{"id":1316,"date":"2020-03-05T15:05:04","date_gmt":"2020-03-05T07:05:04","guid":{"rendered":"https:\/\/www.jarvisw.com\/?p=1316"},"modified":"2020-03-05T15:12:23","modified_gmt":"2020-03-05T07:12:23","slug":"%e5%b5%8c%e5%85%a5%e5%bc%8f%e7%b3%bb%e7%bb%9f%e4%b8%adlinux%e5%86%85%e6%a0%b8insmod%e6%97%b6%e5%87%ba%e7%8e%b0unable-to-handle-kernel-paging-request-at-virtual-address-xxxx%e5%8f%af%e8%83%bd%e7%9a%84","status":"publish","type":"post","link":"https:\/\/www.jarvisw.com\/?p=1316","title":{"rendered":"\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2dlinux\u5185\u6838insmod\u65f6\u51fa\u73b0Unable to handle kernel paging request at virtual address xxxx\u53ef\u80fd\u7684\u539f\u56e0"},"content":{"rendered":"\n<p>      \u6700\u8fd1\u7684\u7814\u7a76\u5f53\u4e2d\uff0c\u9700\u8981\u7ed9\u4e00\u4e2a\u5df2\u77e5\u7684linux\u7cfb\u7edf\u7f16\u8bd1\u5185\u6838\u6a21\u5757\uff0c\u4e0d\u8fc7\u6ca1\u6709\u5bf9\u65b9\u7684\u6e90\u7801\uff0c\u53ea\u77e5\u9053\u4e00\u4e2a\u5185\u6838\u7248\u672c\uff0c\u6240\u4ee5\u5c31\u60f3\u7740\u76f4\u63a5\u4ecekernel.org\u53bb\u4e0b\u8f7d\u5bf9\u5e94\u7248\u672c\u7684\u6e90\u7801\uff0c\u5148\u7f16\u8bd1\u5185\u6838\uff0c\u518d\u5229\u7528\u7f16\u8bd1\u597d\u7684\u5185\u6838\u4fe1\u606f\u53bb\u7f16\u8bd1\u5bf9\u5e94\u7684\u5185\u6838\u6a21\u5757\u3002\u4f46\u7f16\u8bd1\u5b8c\u5185\u6838\u6a21\u5757\u53d1\u73b0\uff0cinsmod\u5e76\u6ca1\u6709\u51fa\u73b0\u4e0d\u517c\u5bb9\u7684\u95ee\u9898\uff0c\u5374\u53d1\u751f\u4e86segment fault\u7684crash\uff0c\u5927\u6982\u957f\u8fd9\u6837\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"796\" src=\"https:\/\/www.jarvisw.com\/wp-content\/uploads\/2020\/03\/image-1024x796.png\" alt=\"\" class=\"wp-image-1317\" srcset=\"https:\/\/www.jarvisw.com\/wp-content\/uploads\/2020\/03\/image-1024x796.png 1024w, https:\/\/www.jarvisw.com\/wp-content\/uploads\/2020\/03\/image-300x233.png 300w, https:\/\/www.jarvisw.com\/wp-content\/uploads\/2020\/03\/image-768x597.png 768w, https:\/\/www.jarvisw.com\/wp-content\/uploads\/2020\/03\/image.png 1089w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u7ecf\u8fc7\u7814\u7a76\u53d1\u73b0\uff0c\u5176\u5b9emodule\u5df2\u7ecfload\u6210\u529f\u4e86\uff0c\u4f46\u662f\u5728\u505a\u4e00\u4e9b\u5904\u7406\u5de5\u4f5c\u7684\u65f6\u5019\u51fa\u73b0\u4e86\u95ee\u9898\u3002\u7ecf\u8fc7\u6d4b\u8bd5\u53d1\u73b0\uff0c\u5176\u5b9e\u662fkernel\u914d\u7f6e\u7684\u95ee\u9898\uff0c\u5982\u679ckernel\u914d\u7f6e\u7684\u65f6\u5019<\/p>\n\n\n\n<p>CONFIG_JUMP_LABEL\u9009\u9879\u662f\u6253\u5f00\u7684\uff0c\u7f16\u8bd1\u6a21\u5757\u6240\u4f7f\u7528\u7684kernel\u4e5f\u9700\u8981\u6253\u5f00\uff0c\u5426\u5219\u5c31\u4f1a\u51fa\u73b0\u56fe\u4e2d\u7684crash\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u9009\u9879\u5728\u7684\u8bf4\u660e\u662f\uff1a<\/p>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">CONFIG_JUMP_LABEL:                                                                                   \u2502  \n  \u2502                                                                                                      \u2502  \n  \u2502 This option enables a transparent branch optimization that                                           \u2502  \n  \u2502 makes certain almost-always-true or almost-always-false branch                                       \u2502  \n  \u2502 conditions even cheaper to execute within the kernel.                                                \u2502  \n  \u2502                                                                                                      \u2502  \n  \u2502 Certain performance-sensitive kernel code, such as trace points,                                     \u2502  \n  \u2502 scheduler functionality, networking code and KVM have such                                           \u2502  \n  \u2502 branches and include support for this optimization technique.                                        \u2502  \n  \u2502                                                                                                      \u2502  \n  \u2502 If it is detected that the compiler has support for \"asm goto\",                                      \u2502  \n  \u2502 the kernel will compile such branches with just a nop                                                \u2502  \n  \u2502 instruction. When the condition flag is toggled to true, the                                         \u2502  \n  \u2502 nop will be converted to a jump instruction to execute the                                           \u2502  \n  \u2502 conditional block of instructions.                                                                   \u2502  \n  \u2502                                                                                                      \u2502  \n  \u2502 This technique lowers overhead and stress on the branch prediction                                   \u2502  \n  \u2502 of the processor and generally makes the kernel faster. The update                                   \u2502  \n  \u2502 of the condition is slower, but those are always very rare.                                          \u2502  \n  \u2502                                                                                                      \u2502  \n  \u2502 ( On 32-bit x86, the necessary options added to the compiler                                         \u2502  \n  \u2502   flags may increase the size of the kernel slightly. )                                              \u2502  \n  \u2502                                                                                                      \u2502  \n  \u2502 Symbol: JUMP_LABEL [=y]                                                                              \u2502  \n  \u2502 Type  : boolean                                                                                      \u2502  \n  \u2502 Prompt: Optimize very unlikely\/likely branches                                                       \u2502  \n  \u2502   Location:                                                                                          \u2502  \n  \u2502     -&gt; General setup                                                                                 \u2502  \n  \u2502   Defined at arch\/Kconfig:49                                                                         \u2502  \n  \u2502   Depends on: HAVE_ARCH_JUMP_LABEL [=y]  <\/pre>\n<p><\/p>\n\n\n<p>\u5927\u6982\u5c31\u662f\u5185\u6838\u9488\u5bf9\u5206\u652f\u8df3\u8f6c\u7684\u4f18\u5316\u652f\u6301\uff0c\u5982\u679c\u5185\u6838\u4e0d\u652f\u6301\u8fd9\u4e2a\u7279\u6027\u800c\u6a21\u5757\u4f7f\u7528\u8fd9\u4e2a\u7279\u6027\u7684\u8bdd\uff0c\u6216\u8005\u662f\u6a21\u5757\u652f\u6301\u8fd9\u4e2a\u7279\u6027\u800c\u5185\u6838\u4e0d\u652f\u6301\u7684\u8bdd\uff0c\u5c31\u4f1a\u53d1\u751fcrash\u4e86\u3002\u6240\u4ee5\uff0c\u4fee\u6539\u5185\u6838\u914d\u7f6e\u91cd\u65b0\u7f16\u8bd1\uff0c\u95ee\u9898\u89e3\u51b3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u7684\u7814\u7a76\u5f53\u4e2d\uff0c\u9700\u8981\u7ed9\u4e00\u4e2a\u5df2\u77e5\u7684linux\u7cfb\u7edf\u7f16\u8bd1\u5185\u6838\u6a21\u5757\uff0c\u4e0d\u8fc7\u6ca1\u6709\u5bf9\u65b9\u7684\u6e90\u7801\uff0c\u53ea\u77e5\u9053\u4e00\u4e2a\u5185\u6838\u7248\u672c\uff0c\u6240\u4ee5\u5c31\u60f3\u7740 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[246,187,247],"class_list":["post-1316","post","type-post","status-publish","format-standard","hentry","category-iot","category-5","tag-linux","tag-187","tag-247"],"_links":{"self":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts\/1316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1316"}],"version-history":[{"count":3,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts\/1316\/revisions"}],"predecessor-version":[{"id":1320,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts\/1316\/revisions\/1320"}],"wp:attachment":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}