今天早上在 porting 2.6.20 的 kernel,porting 完之後發現 tunnel 的 memory mapping 又不會動了,有鑑於之前的經驗於是再將 polling.c 裡面的 offset 調成 0x000000,馬上 work..!!
那為什麼 2.6.19 系列版本需要 offset 呢?挖了 2.6.20 的 ChangeLog 發現下面 Developer 的說明:
Nadia Derbey has reported that mmap of /dev/kmem no longer works with the kernel virtual address as offset, and Franck has confirmed that his patch came from a misunderstanding of what an offset means to /dev/kmem - whereas his patch description seems to say that he was correcting the offset on a few plaforms, there was no such problem to correct, and his patch was in fact changing its API on all platforms.
看來 2.6.19 會回復到之前的作法純屬意外之舉呀..
延伸閱讀:
...《消息來源》

0 Comments:
Post a Comment