November 2009

毎度毎度繰り返されてるネタがまた蒸し返し。

SLAB実装が4つもあるのは狂ってる、1つにしようぜ。いやいや、現状どれも一長一短なんだから単純にremoveは出来ない。SLQBをもっと改善するほが先だ。とか議論してる

On Tue, Nov 24, 2009 at 10:12:30PM +0100, Peter Zijlstra wrote:
> On Tue, 2009-11-24 at 13:03 -0800, David Rientjes wrote:
> > On Tue, 24 Nov 2009, Peter Zijlstra wrote:
> >
> > > Merge SLQB and rm mm/sl[ua]b.c include/linux/sl[ua]b.h for .33-rc1
> > >
> >
> > slqb still has a 5-10% performance regression compared to slab for
> > benchmarks such as netperf TCP_RR on machines with high cpu counts,
> > forcing that type of regression isn't acceptable.
>
> Having _4_ slab allocators is equally unacceptable.

I completely agree. We need at least ten. ;-)

Thanx, Paul


David Rientjes: slqbはまだSLABに比べて5-10%遅いケースがある、いまSLABを消すのはunacceptableなんだぜ
Peter Zijlstra: 4つもslab allocatorがあるのは同じようにunacceptableだよ
Paul E. McKenney: まったく同感だ。最低でも10個は必要だよね


そこ!増やしてどうするww
このエントリーをはてなブックマークに追加

Uwe Kleine-Konig(ARM系開発者)がstrcmpのインプリが間違っているとパッチを提出

strcmp("\x01", "\xef") returns 18 but it should return something < 0.
The reason is that the variable holding the result of the subtraction is
too small and overflows.

As strcmp is e.g. used to access data in squashfs this might result in
not finding files.

The same problem is fixed in strncmp.


Linuxが間違っとるわ。POSIX標準も知らんのか。と噛み付き、おれの実装が最高だもんねと別パッチをポスト

No. The reason is that whoever wrote that function is a moron and doesn't 
know the standard. And your fix is not correct _either_

The comparison should be done as *unsigned char*. As specified by POSIX

"The sign of a non-zero return value shall be determined by the sign of
the difference between the values of the first pair of bytes (both
interpreted as type unsigned char) that differ in the strings being
compared."

and both the original code and your change gets it wrong in different
ways.


Uweは大人なので素直にAck

OK, right.

Acked-by: Uwe Kleine-König

(BTW, this was already broken in 2.4.0, so I was unable to find out who
is the moron :-)


・・・とみせかけて、最後に壊れたは2.4.0以前なんだけど、池沼なのは誰なんだろうね。と最後っ屁


In fact, it goes back to at least 1.2.13.

And the copyright dates do imply that they could go back way further.

At least the comment says it all:

"These are buggy as well.."

so I can at least claim that back in the _original_ 0.01 release, it was
correct:

extern inline int strcmp(const char * cs,const char * ct)
{
register int __res __asm__("ax");
__asm__("cld\n"
"1:\tlodsb\n\t"
"scasb\n\t"
"jne 2f\n\t"
"testb %%al,%%al\n\t"
"jne 1b\n\t"
"xorl %%eax,%%eax\n\t"
"jmp 3f\n"
"2:\tmovl $1,%%eax\n\t"
"jl 3f\n\t"
"negl %%eax\n"
"3:"
:"=a" (__res):"D" (cs),"S" (ct):"si","di");
return __res;
}

and as far as I can tell, the above is actually correct, even if you have
to be a bit crazy to write 'strcmp' as gcc inline asm (hey, I wrote _all_
the string routines that way, and I made gcc do some of them built-in.
Because I was a MAN, dammit!).

So the bug was apparently introduced when we went portable.


Linusがどう考えても自分が犯人だと認めつつv0.0.1の時はあってたんだ、v1.1でコードをポータブルにするときにミスったに違いない。僕だって人間なんだ。と言い訳


Joe Perches がなぜか、そのときのパッチを探し出してくる。オマイすごすぎ

It's been like that for awhile.

http://www.linuxhq.com/kernel/v1.1/75/lib/string.c



こうして、Linux界の2chことLKMLの一日は流れていくのであった
このエントリーをはてなブックマークに追加

http://twitter.com/tnozaki/status/5593229159

ISO-2022軍曹「口でUTF-8たれる前と後に ESC % G と ESC % @ と言え 分かったか、ウジ虫ども!」


このエントリーをはてなブックマークに追加

http://twitter.com/tnozaki/status/5713648535

前も書いたけど、*BSDとかnviとか、何十年前もの古代遺跡を掘り出していじってるんだから、イデのひとつやふたつ発動したって何らおかしくない。



オープンソースは危険ですなー
このエントリーをはてなブックマークに追加

なんか、やたら人気なのでリンクを貼っておく

http://twitter.com/hyoshiok/status/5728946078

RT @kosaki55tea おもしろすぎる RT @yoshifuji_tokyo れんほうメソッドktkr RT @wideangle: 「わたしのこと、好き?」『大好きだよ』「どのくらい好き? 世界で一番好きでいてくれる?」『世界一を目指す理由は何か。2位ではだめなのか』


このエントリーをはてなブックマークに追加

Linuxではpsが/procを舐めているあいだにプロセスが生き死にしたりすると、色々とややこしい問題が発生するが、ふと他のOSがどうなっているかを知りたくなってFreeBSDのlibkvmを読む。

結論からいうと、sysctl()一発で、全プロセスのデータを一括採取してくれるので、無問題。ということらしい。うーむ
このエントリーをはてなブックマークに追加

2.4 はまだ保守されてるのね。
最近話題になったpipeもNULLポインタ問題、および、Sekiyamaさんの
Unix domain socketのセキュリティ問題もバックポートされてる



I've just released Linux 2.4.37.7.

It contains various fixes, among which a few null pointer
dereferences which may become security issues on systems where
mmap_min_addr is not set.

Systems with untrusted local users should upgrade, other ones
may wait.

The patch and changelog will appear soon at the following locations:
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/patch-2.4.37.7.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.37.7

Git repository:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.4.37.y.git
http://www.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.4.37.y.git

Git repository through the gitweb interface:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.4.37.y.git


Willy
---

Summary of changes from v2.4.37.6 to v2.4.37.7
============================================

Alan Cox (1):
tty: Mark generic_serial users as BROKEN

Arjan van de Ven (2):
net ax25: Fix signed comparison in the sockopt handler
net: Make the copy length in af_packet sockopt handler unsigned

Arnaldo Carvalho de Melo (1):
appletalk: Fix skb leak when ipddp interface is not loaded

Ben Hutchings (1):
drm/r128: Add test for initialisation to all ioctls that require it

Earl Chew (1):
fs: pipe.c null pointer dereference

Jaswinder Singh Rajput (2):
R8169: Fix compilation error when RTL8169_DEBUG is defined
net: Fix 64 bit DMA addressing for 8139cp and r8169

Jiri Bohac (1):
bonding: fix a race condition in calls to slave MII ioctls

Jiri Pirko (1):
netlink: fix typo in initialization

Stefan Seyfried (1):
Fix Kernel 2.4 build with bash 4

Tomoki Sekiyama (1):
AF_UNIX: Fix deadlock on connecting to shutdown socket

Willy Tarreau (1):
Change VERSION to 2.4.37.7


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


このエントリーをはてなブックマークに追加

えーと、Linuxのsetproctitle()サポートってlibc5時代はあったけど、glibc2になってから消えてたんですよね。
んで、勇気ある若者がUlrichにglibcに追加を要請、自分以外の提案は全部却下するUlrichにより却下されてたんだけど、そのときのUlrichの理由が「カーネルでサポートしたら、な」だったので、カーネルサポートを入れる事にしました。

という、いきさつで、-mm では現在setproctitle()のサポートコードが入っています。具体的にはprctl(PR_SET_PROCTITLE_AREA) を使って任意のポインタをカーネルに教えてあげると、psが
/proc/{pid}/cmdline を読んだ時に、そのポインタから文字列をとってくるというインターフェース。

これでLinuxもあやしげな、SPT_REUSEARGV スタイルのスタックレイプを卒業できます。

裏話としては、最初デベロッパで議論していたときは、この機能のサポートによって性能が落ちるのが嫌だからロックレスにしようぜ、この場合は簡単にできるよーとかいう方向に議論が進んでいたんですが、マージ直前にAndrew Morton が「保守性が悪いから、おれロックレス嫌いなんだよね」とか言い出したので、不詳わたくしが今までのレビューワ全員をあっさり裏切ってロックレスを捨てた普通実装を作って入れてしまった。ははは、みんな、ごめん。


なお、本機能の実装にあたっては、sodaさんには大変お世話になりました。説得のために各種アプリの実装や各OSの実装状況など調査して説得する必要があったのですが、必要な情報はほぼsodaさんから仕入れました。

Suggested-by: Noriyuki Soda

とか、パッチに入れようかと一瞬本気で考えたのですが、本人が喜びそうにないのと、今後マージやらなんやらのパッチの状況報告メールが何回も配信されてしまうので、ご迷惑になると思い諦めました。

ま、カーネルのmainlineに入るのが三ヶ月後で、glibc対応がその半年後、distroまで落ちてくるのは概算で約二年後と考えると先の長い話なんですが・・・
このエントリーをはてなブックマークに追加

今気づいたけど、2.6.32から ext4devの後方互換コード削除されてるね。もうユーザランドの対応おわったやろ?って見切りらしい。
ちょっと早くないか・・・
このエントリーをはてなブックマークに追加

まあ、色々なしがらみがあって、今回は日経さんに載せて頂く事に

http://itpro.nikkeibp.co.jp/article/MAG/20091106/340170/

にある

Linuxレポート
● Kernel Summitが日本初上陸,GoogleがLinuxの使い方を披露

という記事がそれです。てっきり後ろの方のNewsフラッシュに載るのかと思っていたのに巻頭カラーをぶんどっていてビックリ。いいのだろうか。

PS あ、今日(昨日だったかも)から、書店にならんでいるはずです
PS2 編集さん曰く、Googleが一箇所typoでGooleになっているらしいので暇な人は探してみるといいかもしれません
このエントリーをはてなブックマークに追加

↑このページのトップヘ