<?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>A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx</link><description>This and that.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382649</link><pubDate>Sun, 06 Jan 2013 06:00:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382649</guid><dc:creator>Alexander Sklar</dc:creator><description>&lt;p&gt;re:&amp;quot;MS should make it more prominent which KBs support hotpatching. It is an under-used feature.&amp;quot;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not under-used, we don&amp;#39;t use it (well, haven&amp;#39;t really). Not all fixes are hot-patchable, and it takes only one hotfix/GDR to force a reboot for the whole batch in a patch Tuesday. The likelihood of being able to avoid a reboot due to hot-patching is close to zero.&lt;/p&gt;
&lt;p&gt;[Due disclosure] I work in the team that issues hotfixes/security updates/service packs, etc.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382649" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382619</link><pubDate>Sat, 05 Jan 2013 22:04:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382619</guid><dc:creator>Jeroen Mostert</dc:creator><description>&lt;p&gt;Well, I&amp;#39;m glad I checked back on this discussion, even though the popcorn is stale by now. What a performance.&lt;/p&gt;
&lt;p&gt;@Dave: if you want to get technical, there isn&amp;#39;t really any difference between those two. Since the processor doesn&amp;#39;t stop, a NOP does *something*, regardless of how its implemented -- at the bare minimum, it increments the instruction pointer. Selecting a &amp;quot;good&amp;quot; NOP is harder than expected because 1. it must do nothing observable to a program, 2. it must work on all processor models we want to support, 3. if it slows down the program, it should do so to the least extent possible. As the discussion here shows, doing nothing well can be surprisingly hard. Perhaps the Tao Te Ching should be consulted, in addition to any processor manuals.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382619" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382314</link><pubDate>Fri, 04 Jan 2013 09:47:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382314</guid><dc:creator>Dave Oldcorn</dc:creator><description>&lt;p&gt;One interesting aspect is that you could potentially split nop into two different things: &amp;quot;some code that does nothing&amp;quot; and &amp;quot;an instruction to the processor to do nothing&amp;quot;. The former implies using as few resources as possible, and the latter implies using a fixed amount of resource.&lt;/p&gt;
&lt;p&gt;Microsoft&amp;#39;s desire in this case is explicitly for the former, and it&amp;#39;s certain that NOP itself has (at least at some points in the past, and maybe on some architectures now) had the semantics of the latter.&lt;/p&gt;
&lt;p&gt;MOV EDI,EDI makes sense for this in that on a renaming CPU it uses only decode resources and rename resources (the rename potentially inducing a stall to wait for a previous EDI computation to complete). It&amp;#39;s probable that no execution resources will be required at all.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382314" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382308</link><pubDate>Fri, 04 Jan 2013 09:26:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382308</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;&amp;quot;It goes through absolutely different uops than a register XCHG&amp;quot;&lt;/p&gt;
&lt;p&gt;Like 66 90 then.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382308" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382280</link><pubDate>Fri, 04 Jan 2013 06:24:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382280</guid><dc:creator>xpclient</dc:creator><description>&lt;p&gt;MS should make it more prominent which KBs support hotpatching. It is an under-used feature.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382280" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382262</link><pubDate>Fri, 04 Jan 2013 03:05:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382262</guid><dc:creator>alegr1</dc:creator><description>&lt;p&gt;@cheong00:&lt;/p&gt;
&lt;p&gt;The cyrix problem is related to XCHG with memory operand (and possibly unaligned). It goes through absolutely different uops than a register XCHG, and also involves an implicit LOCK.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382262" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382253</link><pubDate>Fri, 04 Jan 2013 01:23:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382253</guid><dc:creator>cheong00</dc:creator><description>&lt;p&gt;[According to this web page, it raises #UD on CPUs prior to family 6 (Pentium Pro). Note also that there are CPU manufacturers other than Intel. Do you know for sure that the Cyrix 6x86 can handle 66 90? -Raymond]&lt;/p&gt;
&lt;p&gt;Indeed. According to this [ &lt;a rel="nofollow" target="_new" href="http://en.wikipedia.org/wiki/Cyrix_coma_bug"&gt;en.wikipedia.org/.../Cyrix_coma_bug&lt;/a&gt; ] Wiki page, XCHG instruction can leave Cyrix 6x86 processors in uninterruptable state forever. The fix is to insert NOP if you need to use XCHG at all.&lt;/p&gt;
&lt;p&gt;Therefore if you know your code will run on Cyrix processors, you&amp;#39;ll want to avoid using it as NOP.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382253" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382250</link><pubDate>Fri, 04 Jan 2013 00:56:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382250</guid><dc:creator>ShakeASpear</dc:creator><description>&lt;p&gt;Much Ado About Nopping&lt;/p&gt;
&lt;p&gt;*funny, no? &amp;nbsp;punny? &amp;nbsp;yes*&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382250" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382193</link><pubDate>Thu, 03 Jan 2013 20:32:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382193</guid><dc:creator>JDP</dc:creator><description>&lt;p&gt;I like that the conversation&amp;#39;s gone from &amp;quot;Well, what about THIS OPCODE?&amp;quot; to &amp;quot;Let&amp;#39;s look at what intel&amp;#39;s documentation says.&amp;quot; Eventually people will check with AMD and get tenuously close to &amp;quot;after consulting with CPU manufacturers for their recommendations&amp;quot; as Raymond first wrote. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382193" width="1" height="1"&gt;</description></item><item><title>re: A few stray notes on Windows patching and hot patching</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2013/01/02/10381672.aspx#10382188</link><pubDate>Thu, 03 Jan 2013 20:14:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10382188</guid><dc:creator>alegr1</dc:creator><description>&lt;p&gt;[According to this web page, it raises #UD on CPUs prior to family 6 (Pentium Pro). Note also that there are CPU manufacturers other than Intel. Do you know for sure that the Cyrix 6x86 can handle 66 90? -Raymond]&lt;/p&gt;
&lt;p&gt;This page says that UD is only thrown for 0f 1f opcode.&lt;/p&gt;
&lt;div class="post"&gt;[&lt;em&gt;You&amp;#39;re right, I misread the table. But I wouldn&amp;#39;t be surprised if it was suboptimal on older processors. -Raymond&lt;/em&gt;]&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382188" width="1" height="1"&gt;</description></item></channel></rss>