November 2009



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個は必要だよね


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.


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

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


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 :-)


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

extern inline int strcmp(const char * cs,const char * ct)
register int __res __asm__("ax");
"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"
:"=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.


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

It's been like that for awhile.



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



2.4 はまだ保守されてるのね。
Unix domain socketのセキュリティ問題もバックポートされてる

I've just released Linux

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:

Git repository:

Git repository through the gitweb interface:


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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at


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

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

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


Suggested-by: Noriyuki Soda



今気づいたけど、2.6.32から ext4devの後方互換コード削除されてるね。もうユーザランドの対応おわったやろ?って見切りらしい。



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


PS あ、今日(昨日だったかも)から、書店にならんでいるはずです
PS2 編集さん曰く、Googleが一箇所typoでGooleになっているらしいので暇な人は探してみるといいかもしれません