
{"id":18584,"date":"2010-07-20T01:20:20","date_gmt":"2010-07-19T19:50:20","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=2074"},"modified":"2010-07-20T01:20:20","modified_gmt":"2010-07-19T19:50:20","slug":"fast-transition-to-system-call-2","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/07\/20\/fast-transition-to-system-call-2\/","title":{"rendered":"What is a SYSENTER  instruction ?"},"content":{"rendered":"<p><u>ABOUT sysenter instruction<\/u><\/p>\n<pre>\nThe SYSENTER instruction is part of the \"Fast System Call\" facility introduced on the Pentium(R) II\nprocessor. The SYSENTER instruction is optimized to provide the maximum performance for transitions to\nprotection ring 0 (CPL  0). The SYSENTER instruction sets the following registers according to values\nspecified by the operating system in certain model-specific registers. CS register set to the value of\n(SYSENTER_CS_MSR) EIP register set to the value of  (SYSENTER_EIP_MSR) SS register set to the sum of (8\nplus the value in SYSENTER_CS_MSR) ESP register set to the value of (SYSENTER_ESP_MSR) The processor\ndoes not save user stack or return address information, and does not save any registers.\n<\/pre>\n<p>[bash]<br \/>\n(gdb) disass<br \/>\nDump of assembler code for function __kernel_vsyscall:<br \/>\n   0xb780b414 :\tpush   %ecx<br \/>\n   0xb780b415 :\tpush   %edx<br \/>\n   0xb780b416 :\tpush   %ebp<br \/>\n   0xb780b417 :\tmov    %esp,%ebp<br \/>\n   0xb780b419 :\tsysenter<br \/>\n   0xb780b41b :\tnop<br \/>\n   0xb780b41c :\tnop<br \/>\n   0xb780b41d :\tnop<br \/>\n   0xb780b41e :\tnop<br \/>\n   0xb780b41f :\tnop<br \/>\n   0xb780b420 :\tnop<br \/>\n   0xb780b421 :\tnop<br \/>\n   0xb780b422 :\tjmp    0xb780b417<br \/>\n=&amp;gt; 0xb780b424 :\tpop    %ebp<br \/>\n   0xb780b425 :\tpop    %edx<br \/>\n   0xb780b426 :\tpop    %ecx<br \/>\n   0xb780b427 :\tret<br \/>\nEnd of assembler dump.<br \/>\n(gdb)<\/p>\n<p>[\/bash]<br \/>\n<u>0xb780b419 :\tsysenter <\/u><br \/>\n<br \/>\nLINKS<br \/>\n<a href=\"https:\/\/wiki.osdev.org\/SYSENTER\">https:\/\/wiki.osdev.org\/SYSENTER<\/a><br \/>\n<a href=\"http:\/\/www.intel.com\/software\/products\/documentation \/vlin\/mergedprojects\/analyzer_ec\/mergedprojects\/reference _olh\/mergedprojects\/instructions\/instruct32_hh\/vc311.htm\">http:\/\/www.intel.com\/software\/products\/documentation \/vlin\/mergedprojects\/analyzer_ec\/mergedprojects\/reference _olh\/mergedprojects\/instructions\/instruct32_hh\/vc311.htm<\/a> (This link is either broken or not correct)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT sysenter instruction The SYSENTER instruction is part of the &#8220;Fast System Call&#8221; facility introduced on the Pentium(R) II processor. The SYSENTER instruction is optimized to provide the maximum performance for transitions to protection ring 0 (CPL 0). The SYSENTER instruction sets the following registers according to values specified by the operating system in certain &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/07\/20\/fast-transition-to-system-call-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;What is a SYSENTER  instruction ?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18584"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18584"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18584\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}