<?xml version="1.0" encoding="utf-8" ?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" 
			xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" 
			xmlns:cc="http://web.resource.org/cc/" xml:lang="ja">
<channel rdf:about="http://mkosaki.blog46.fc2.com/?xml">
<title>革命の日々！</title>
<link>http://mkosaki.blog46.fc2.com/</link>
<description>５７は素数ですが何か？</description>
<dc:language>ja</dc:language>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://mkosaki.blog46.fc2.com/blog-entry-1048.html" />
<rdf:li rdf:resource="http://mkosaki.blog46.fc2.com/blog-entry-1047.html" />
<rdf:li rdf:resource="http://mkosaki.blog46.fc2.com/blog-entry-1046.html" />
<rdf:li rdf:resource="http://mkosaki.blog46.fc2.com/blog-entry-1045.html" />
<rdf:li rdf:resource="http://mkosaki.blog46.fc2.com/blog-entry-1044.html" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://mkosaki.blog46.fc2.com/blog-entry-1048.html">
<link>http://mkosaki.blog46.fc2.com/blog-entry-1048.html</link>
<title>[LKML名言集] Because I was a MAN</title>
<description> Uwe Kleine-Konig(ARM系開発者)がstrcmpのインプリが間違っているとパッチを提出strcmp(&quot;\x01&quot;, &quot;\xef&quot;) returns 18 but it should return something &lt; 0.The reason is that the variable holding the result of the subtraction istoo small and overflows.As strcmp is e.g. used to access data in squashfs this might result innot finding files.The same problem is fixed in strncmp.Linuxが間違っとるわ。POSIX標準も知
 </description>
<content:encoded>
<![CDATA[ Uwe Kleine-Konig(ARM系開発者)がstrcmpのインプリが間違っているとパッチを提出<br /><br /><blockquote><pre>strcmp("\x01", "\xef") returns 18 but it should return something < 0.<br />The reason is that the variable holding the result of the subtraction is<br />too small and overflows.<br /><br />As strcmp is e.g. used to access data in squashfs this might result in<br />not finding files.<br /><br />The same problem is fixed in strncmp.</pre></blockquote><br /><br />Linuxが間違っとるわ。POSIX標準も知らんのか。と噛み付き、おれの実装が最高だもんねと別パッチをポスト<br /><br /><blockquote><pre>No. The reason is that whoever wrote that function is a moron and doesn't <br />know the standard. And your fix is not correct _either_<br /><br />The comparison should be done as *unsigned char*. As specified by POSIX<br /><br />  "The sign of a non-zero return value shall be determined by the sign of <br />   the difference between the values of the first pair of bytes (both <br />   interpreted as type unsigned char) that differ in the strings being <br />   compared."<br /><br />and both the original code and your change gets it wrong in different <br />ways.</pre></blockquote><br /><br />Uweは大人なので素直にAck<br /><br /><blockquote><pre>OK, right.<br /><br />Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de><br /><br />(BTW, this was already broken in 2.4.0, so I was unable to find out who<br />is the moron :-) </pre></blockquote><br /><br />・・・とみせかけて、最後に壊れたは2.4.0以前なんだけど、池沼なのは誰なんだろうね。と最後っ屁<br /><br /><blockquote><pre><br />In fact, it goes back to at least 1.2.13.<br /><br />And the copyright dates do imply that they could go back way further. <br /><br />At least the comment says it all:<br /><br />	"These are buggy as well.."<br /><br />so I can at least claim that back in the _original_ 0.01 release, it was <br />correct:<br /><br />	extern inline int strcmp(const char * cs,const char * ct)<br />	{<br />	register int __res __asm__("ax");<br />	__asm__("cld\n"<br />	        "1:\tlodsb\n\t"<br />	        "scasb\n\t"<br />	        "jne 2f\n\t"<br />	        "testb %%al,%%al\n\t"<br />	        "jne 1b\n\t"<br />	        "xorl %%eax,%%eax\n\t"<br />	        "jmp 3f\n"<br />	        "2:\tmovl $1,%%eax\n\t"<br />	        "jl 3f\n\t"<br />	        "negl %%eax\n"<br />	        "3:"<br />	        :"=a" (__res):"D" (cs),"S" (ct):"si","di");<br />	return __res;<br />	}<br /><br />and as far as I can tell, the above is actually correct, even if you have <br />to be a bit crazy to write 'strcmp' as gcc inline asm (hey, I wrote _all_ <br />the string routines that way, and I made gcc do some of them built-in. <br />Because I was a MAN, dammit!).<br /><br />So the bug was apparently introduced when we went portable. </pre></blockquote><br /><br />Linusがどう考えても自分が犯人だと認めつつv0.0.1の時はあってたんだ、v1.1でコードをポータブルにするときにミスったに違いない。僕だって人間なんだ。と言い訳<br /><br /><br />Joe Perches がなぜか、そのときのパッチを探し出してくる。オマイすごすぎ<br /><blockquote><pre><br />It's been like that for awhile.<br /><br /><a href="http://www.linuxhq.com/kernel/v1.1/75/lib/string.c" target="_blank" title="http://www.linuxhq.com/kernel/v1.1/75/lib/string.c">http://www.linuxhq.com/kernel/v1.1/75/lib/string.c </a></rep></blockquote><br /><br /><br />こうして、Linux界の２ｃｈことLKMLの一日は流れていくのであった<br /><br /><br /><br /> ]]>
</content:encoded>
<dc:subject>linux</dc:subject>
<dc:date>2009-11-18T10:14:13+09:00</dc:date>
<dc:creator>kosaki</dc:creator>
<dc:publisher>FC2-BLOG</dc:publisher>
</item>
<item rdf:about="http://mkosaki.blog46.fc2.com/blog-entry-1047.html">
<link>http://mkosaki.blog46.fc2.com/blog-entry-1047.html</link>
<title>[twitter名言集] 分かったか、ウジ虫ども！</title>
<description> http://twitter.com/tnozaki/status/5593229159ISO-2022軍曹「口でUTF-8たれる前と後に ESC % G と ESC % @ と言え 分かったか、ウジ虫ども！」
 </description>
<content:encoded>
<![CDATA[ <a href="http://twitter.com/tnozaki/status/5593229159" target="_blank" title="http://twitter.com/tnozaki/status/5593229159">http://twitter.com/tnozaki/status/5593229159</a><br /><br /><blockquote><p>ISO-2022軍曹「口でUTF-8たれる前と後に ESC % G と ESC % @ と言え 分かったか、ウジ虫ども！」</p></blockquote> ]]>
</content:encoded>
<dc:subject>twitter</dc:subject>
<dc:date>2009-11-16T18:24:12+09:00</dc:date>
<dc:creator>kosaki</dc:creator>
<dc:publisher>FC2-BLOG</dc:publisher>
</item>
<item rdf:about="http://mkosaki.blog46.fc2.com/blog-entry-1046.html">
<link>http://mkosaki.blog46.fc2.com/blog-entry-1046.html</link>
<title>イデ</title>
<description> http://twitter.com/tnozaki/status/5713648535前も書いたけど、*BSDとかnviとか、何十年前もの古代遺跡を掘り出していじってるんだから、イデのひとつやふたつ発動したって何らおかしくない。オープンソースは危険ですなー
 </description>
<content:encoded>
<![CDATA[ <a href="http://twitter.com/tnozaki/status/5713648535" target="_blank" title="http://twitter.com/tnozaki/status/5713648535">http://twitter.com/tnozaki/status/5713648535</a><br /><br /><blockquote><p>前も書いたけど、*BSDとかnviとか、何十年前もの古代遺跡を掘り出していじってるんだから、イデのひとつやふたつ発動したって何らおかしくない。</p></blockquote><br /><br />オープンソースは危険ですなー ]]>
</content:encoded>
<dc:subject>twitter</dc:subject>
<dc:date>2009-11-16T18:18:05+09:00</dc:date>
<dc:creator>kosaki</dc:creator>
<dc:publisher>FC2-BLOG</dc:publisher>
</item>
<item rdf:about="http://mkosaki.blog46.fc2.com/blog-entry-1045.html">
<link>http://mkosaki.blog46.fc2.com/blog-entry-1045.html</link>
<title>れんほうメソッド</title>
<description> なんか、やたら人気なのでリンクを貼っておくhttp://twitter.com/hyoshiok/status/5728946078RT @kosaki55tea おもしろすぎる RT @yoshifuji_tokyo れんほうメソッドktkr RT @wideangle: 「わたしのこと、好き?」『大好きだよ』「どのくらい好き? 世界で一番好きでいてくれる?」『世界一を目指す理由は何か。２位ではだめなのか』
 </description>
<content:encoded>
<![CDATA[ なんか、やたら人気なのでリンクを貼っておく<br /><br /><a href="http://twitter.com/hyoshiok/status/5728946078" target="_blank" title="http://twitter.com/hyoshiok/status/5728946078">http://twitter.com/hyoshiok/status/5728946078</a><br /><br /><blockquote><p>RT @kosaki55tea おもしろすぎる RT @yoshifuji_tokyo れんほうメソッドktkr RT @wideangle: 「わたしのこと、好き?」『大好きだよ』「どのくらい好き? 世界で一番好きでいてくれる?」『世界一を目指す理由は何か。２位ではだめなのか』</p></blockquote> ]]>
</content:encoded>
<dc:subject>twitter</dc:subject>
<dc:date>2009-11-15T19:53:00+09:00</dc:date>
<dc:creator>kosaki</dc:creator>
<dc:publisher>FC2-BLOG</dc:publisher>
</item>
<item rdf:about="http://mkosaki.blog46.fc2.com/blog-entry-1044.html">
<link>http://mkosaki.blog46.fc2.com/blog-entry-1044.html</link>
<title>FreeBSDのkvm_open()</title>
<description> Linuxではpsが/procを舐めているあいだにプロセスが生き死にしたりすると、色々とややこしい問題が発生するが、ふと他のOSがどうなっているかを知りたくなってFreeBSDのlibkvmを読む。結論からいうと、sysctl()一発で、全プロセスのデータを一括採取してくれるので、無問題。ということらしい。うーむ
 </description>
<content:encoded>
<![CDATA[ Linuxではpsが/procを舐めているあいだにプロセスが生き死にしたりすると、色々とややこしい問題が発生するが、ふと他のOSがどうなっているかを知りたくなってFreeBSDのlibkvmを読む。<br /><br />結論からいうと、sysctl()一発で、全プロセスのデータを一括採取してくれるので、無問題。ということらしい。うーむ<br /> ]]>
</content:encoded>
<dc:subject>linux</dc:subject>
<dc:date>2009-11-10T23:36:35+09:00</dc:date>
<dc:creator>kosaki</dc:creator>
<dc:publisher>FC2-BLOG</dc:publisher>
</item>
</rdf:RDF>