Thursday, March 24, 2011

I am now a Linux Kernel Developer

No joke.

On Sunday, March 20th, I submitted a patch to the Linux Kernel Mailing List, to fix a compile problem that began when the "binutils" package, that handles programs written in assembly, was updated such that something that was never a problem before became a problem.

The file linux-2.6.38/arch/x86/kernel/entry_32.S had two places where the "END(foo)" did not match the "foo" in its "ENTRY(foo)". The file dates back to 1992, so this problem has been there the whole time and no one noticed because it didn't cause an error until now.

I have no idea if the patch will be accepted, or even noticed, but I've done it and now anyone who gets the compile error...


arch/x86/kernel/entry_32.S: Assembler messages:
arch/x86/kernel/entry_32.S:1422: Error: .size expression does not evaluate to a constant make[3]: *** [arch/x86/kernel/entry_32.o] Error 1


...will know what it is about and how to fix it if my patch doesn't make it into the kernel.

https://lkml.org/lkml/2011/3/20/49


--- entry_32.S.original 2011-03-18 08:21:51.000000000 -0400
+++ entry_32.S  2011-03-20 10:37:00.000000000 -0400
@@ -343,7 +343,7 @@
                                        # int/exception return?
        jne work_pending
        jmp restore_all
-END(ret_from_exception)
+END(resume_userspace)


 #ifdef CONFIG_PREEMPT
 ENTRY(resume_kernel)
@@ -1413,7 +1413,7 @@
        CFI_ADJUST_CFA_OFFSET 4
        jmp error_code
        CFI_ENDPROC
-END(apf_page_fault)
+END(async_page_fault)
 #endif


 /*


This is yet another example of why anarchy does not lead to chaos. People solve the problems they run into, and so long as there are no artificial barriers to entry, "anarchy", those answers can reach others with the least possible resistance.

Voluntary cooperation by interested individuals works!

5 comments:

  1. You forgot a Signed-off-by: line.

    ReplyDelete
  2. Have you used scripts/checkpatch.pl and scripts/get_maintaner.pl? They are both in kernel source and are very useful...

    ReplyDelete
  3. Thanks for the suggestions. Maintainers found, Signed-off-by line added, sent to maintainers.

    ReplyDelete