Announcement

Collapse
No announcement yet.

Linux 4.6 Will Try To Make It Easier To Find Assembly Code Bugs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ardje
    replied
    Originally posted by CrystalGamma View Post
    I honestly don't even know what all that ASM does. I mean, the only things that come to mind for me are boot sequence, interrupt preamble/register saving, and page table remapping/TLB invalidation, all of which are architecture-dependent.
    Crypto and raid calculations come to mind.
    There is not a lot of assembly in the kernel. But that what's in the kernel usually has a reason to be there and from time to time gets re-evaluated.
    Just like the routing cache has been re-evaluated and thrown out because it caused more problems and used more resources than the very tiny amount of speed increase waranted.
    And yes, it's all architecture dependent, because that's the nature of assembly ;-).

    Leave a comment:


  • Ardje
    replied
    Originally posted by CrystalGamma View Post
    But locks probably only need atomics, which are standardised in C11.
    (kernel) Atomics are cpu architecture specifics, which probably are implemented in assembly anyway. It can involve cache invalidation, buslocks or other constructs, and usually they are implemented using (spin)locks and turning of irq's.

    Leave a comment:


  • duby229
    replied
    Originally posted by smitty3268 View Post

    A kernel written in perl.
    To be fair, that's not what perl is intended for. It saved me from having to interpret regular expressions.

    Leave a comment:


  • smitty3268
    replied
    Originally posted by devtry View Post

    Please do not say that ever again

    Just jocking, but I cannot think of something worse than a kernel writtern in Java
    A kernel written in perl.

    Leave a comment:


  • zman0900
    replied
    Originally posted by devtry View Post

    Please do not say that ever again

    Just jocking, but I cannot think of something worse than a kernel writtern in Java
    I'm sure this wouldn't work with the kernel, but people have tried compiling C to java byte code. Certainly would be an interesting project to try at least. For example: https://github.com/davidar/lljvm

    Leave a comment:


  • devtry
    replied
    Originally posted by yacc143 View Post
    Anyway, first step to port the kernel to a JVM [as code verification of that ilk is typical for Java]
    Please do not say that ever again

    Just jocking, but I cannot think of something worse than a kernel writtern in Java

    Leave a comment:


  • curaga
    replied
    But locks probably only need atomics, which are standardised in C11.
    That's cute and all, but the kernel supports gcc 3.2 minimum, released in 2003. That's not going to have C11 support, and even if they wanted to limit compilers to recent gcc/llvm only, would they trust the code it generates vs hand-tuned and perfected over-the-years results?

    Leave a comment:


  • CrystalGamma
    replied
    Originally posted by yacc143 View Post


    Lock implementations would also come to mind.
    But locks probably only need atomics, which are standardised in C11.

    Leave a comment:


  • yacc143
    replied
    Originally posted by CrystalGamma View Post

    I honestly don't even know what all that ASM does. I mean, the only things that come to mind for me are boot sequence, interrupt preamble/register saving, and page table remapping/TLB invalidation, all of which are architecture-dependent.

    Lock implementations would also come to mind.

    And technically speaking quite a bit of this could be hidden in commonly used preprocessor macros, so it might be more common than one would assume.

    Anyway, first step to port the kernel to a JVM [as code verification of that ilk is typical for Java]

    Leave a comment:


  • CrystalGamma
    replied
    Originally posted by uid313 View Post
    Throw out as much old architecture-specific Assembly code and port it to architecture-independent, portable C code instead.
    I honestly don't even know what all that ASM does. I mean, the only things that come to mind for me are boot sequence, interrupt preamble/register saving, and page table remapping/TLB invalidation, all of which are architecture-dependent.

    Leave a comment:

Working...
X