FS#15362 - [klibc] problem with kinit-fix-init-cmdline.patch
Attached to Project:
Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Saturday, 04 July 2009, 04:45 GMT
Last edited by Aaron Griffin (phrakture) - Tuesday, 01 December 2009, 21:10 GMT
Opened by Gerardo Exequiel Pozzi (djgera) - Saturday, 04 July 2009, 04:45 GMT
Last edited by Aaron Griffin (phrakture) - Tuesday, 01 December 2009, 21:10 GMT
|
Details
Description: I am not sure if this can be problematic or
not, but the patch kinit-fix-init-cmdline.patch [#1] added
to solve
# cat /proc/1/cmdline <-- klibc-1.5.15-3 ini # cat /proc/1/cmdline <-- rebuiling klibc-1.5.15-3 without the patch init [3] Additional info: klibc-1.5.15-3 [#1] http://repos.archlinux.org/viewvc.cgi/klibc/repos/core-i686/kinit-fix-init-cmdline.patch?revision=43019&view=markup |
This task depends upon
Closed by Aaron Griffin (phrakture)
Tuesday, 01 December 2009, 21:10 GMT
Reason for closing: Deferred
Additional comments about closing: FS#17298
Tuesday, 01 December 2009, 21:10 GMT
Reason for closing: Deferred
Additional comments about closing:
What happens is the following: We pass no options at all to init by default. That means klibc calls /sbin/init with argc=1 and argv="init\0" (note that the array is allocated on the stack as continuous memory). If we were to pass "3" as an argument, this would be argv="init\03\0". Now, what I suspect to be an off-by-one error in sysvinit causes init to overwrite this by "ini\0\0". If we would change the command line to "/sbin/init\0" in kinit, then init would be able to write "init [5]\0\0\0" as it wants to.