<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What is kernel mode?</title><link>http://blogs.msdn.com/ce_base/archive/2007/01/29/What-is-kernel-mode.aspx</link><description>Posted by: Sue Loh I've talked about this before but I want to really highlight it because I still see people wrestling with it. In Windows CE 5.0 and earlier, "kernel mode" is an access level attached to a thread. If a thread is "in kernel mode" it can</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: What is kernel mode?</title><link>http://blogs.msdn.com/ce_base/archive/2007/01/29/What-is-kernel-mode.aspx#1571671</link><pubDate>Thu, 01 Feb 2007 13:13:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1571671</guid><dc:creator>Mukesh Modi</dc:creator><description>&lt;p&gt;Nice article&lt;/p&gt;
&lt;p&gt;thank you very much loh&lt;/p&gt;
</description></item><item><title>re: What is kernel mode?</title><link>http://blogs.msdn.com/ce_base/archive/2007/01/29/What-is-kernel-mode.aspx#1580928</link><pubDate>Fri, 02 Feb 2007 11:14:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1580928</guid><dc:creator>TM Ningen</dc:creator><description>&lt;p&gt;I actually have a question about the safety of 5.0 kernel mode. It looks like when an (untrusted) app makes a system call, e.g., FS_CreateFileW, the thread will execute in kernel mode (or with the premission of a priviledged process) but still uses the user stack. I presume the user stack is writable by the user code, since it lives in the application's &amp;quot;memory slot&amp;quot;.&lt;/p&gt;
&lt;p&gt;Wouldn't it be possible for the user application to corrupt the stack (using another concurrent user thread) while one of its threads is in a system call? This seems quite scary to me. If you manage to modify a return address, you can start executing in kernel mode (or at least with the permissions of filesys.exe, in the case of FS_CreateFileW).&lt;/p&gt;
</description></item><item><title>re: What is kernel mode?</title><link>http://blogs.msdn.com/ce_base/archive/2007/01/29/What-is-kernel-mode.aspx#1583920</link><pubDate>Fri, 02 Feb 2007 20:40:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1583920</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;Excellent question!&lt;/p&gt;
&lt;p&gt;I haven't actually mentioned this fact before, but when a thread &amp;quot;jumps&amp;quot; into a system process to call an API, the kernel actually allocates a new stack inside the system process in order to execute the API call. &amp;nbsp;To prevent the caller from tampering with the stack asynchronously during the API call. &amp;nbsp;It switches back to the caller's stack when the API call returns.&lt;/p&gt;
&lt;p&gt;This was not always true. &amp;nbsp;I had to ask Bor-Ming, our primary kernel developer, about it, and he tells me that this stack-switching was added in Windows CE 4.0.&lt;/p&gt;
&lt;p&gt;Sue&lt;/p&gt;
</description></item><item><title>re: What is kernel mode?</title><link>http://blogs.msdn.com/ce_base/archive/2007/01/29/What-is-kernel-mode.aspx#1629525</link><pubDate>Thu, 08 Feb 2007 23:31:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1629525</guid><dc:creator>Dean Ramsier</dc:creator><description>&lt;p&gt;Actually, in CE kernel mode threads do run with elevated processor privileges although you're correct in saying that's not how the term is normally used in CE.&lt;/p&gt;
&lt;p&gt;Exactly how kernel mode is implemented is processor architecture dependent. &amp;nbsp;On ARM processors, all processor modes except for the user mode are privileged. &amp;nbsp;The different privileged modes are not more or less privileged than the others, they are just different modes that allow fast switching between different contexts (interrupts, exceptions etc). &amp;nbsp;The privileged modes allow the caller to execute instructions that aren't valid in the normal user mode.&lt;/p&gt;
&lt;p&gt;The vast majority of the time we are correct in saying that &amp;quot;kernel mode&amp;quot; just means having privileges in the upper 2GB of memory space, but there really is more to it than that and the differences are cpu architecture specific. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Dean&lt;/p&gt;
</description></item><item><title>re: What is kernel mode?</title><link>http://blogs.msdn.com/ce_base/archive/2007/01/29/What-is-kernel-mode.aspx#1629786</link><pubDate>Fri, 09 Feb 2007 00:07:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1629786</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;Fair enough, thanks for the correction Dean!&lt;/p&gt;
&lt;p&gt;Sue&lt;/p&gt;
</description></item></channel></rss>