23 Jul, 2007

1 commit

  • Reenable kprobes and alternative patching when the kernel text is write
    protected by DEBUG_RODATA

    Add a general utility function to change write protected text. The new
    function remaps the code using vmap to write it and takes care of CPU
    synchronization. It also does CLFLUSH to make icache recovery faster.

    There are some limitations on when the function can be used, see the
    comment.

    This is a newer version that also changes the paravirt_ops code.
    text_poke also supports multi byte patching now.

    Contains bug fixes from Zach Amsden and suggestions from Mathieu
    Desnoyers.

    Cc: Jan Beulich
    Cc: Jeremy Fitzhardinge
    Cc: Mathieu Desnoyers
    Cc: Zach Amsden
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

13 Jul, 2007

1 commit


11 May, 2007

1 commit

  • A recent change makes my Dell 1501 hang on boot. It's an AMD MK-36. I use
    an x86_64 kernel. It is 100% reproducible.

    I debugged this problem a bit and my compiler[1]interprets the =A constraint
    as %rax instead of %edx:%eax on x86_64 which causes the problem. The appended
    patch provides a workaround for this and fixed the hang on my machine.

    [1] gcc version 4.1.3 20070429 (prerelease) (Debian 4.1.2-5)

    Signed-off-by: Joerg Roedel
    Cc: Andi Kleen
    Cc: Benny Halevy
    Cc: Pete Zaitcev
    Cc: "Joerg Roedel"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joerg Roedel
     

03 May, 2007

2 commits


07 Dec, 2006

1 commit

  • It turns out that the most called ops, by several orders of magnitude,
    are the interrupt manipulation ops. These are obvious candidates for
    patching, so mark them up and create infrastructure for it.

    The method used is that the ops structure has a patch function, which
    is called for each place which needs to be patched: this returns a
    number of instructions (the rest are NOP-padded).

    Usually we can spare a register (%eax) for the binary patched code to
    use, but in a couple of critical places in entry.S we can't: we make
    the clobbers explicit at the call site, and manually clobber the
    allowed registers in debug mode as an extra check.

    And:

    Don't abuse CONFIG_DEBUG_KERNEL, add CONFIG_DEBUG_PARAVIRT.

    And:

    AK: Fix warnings in x86-64 alternative.c build

    And:

    AK: Fix compilation with defconfig

    And:

    ^From: Andrew Morton

    Some binutlises still like to emit references to __stop_parainstructions and
    __start_parainstructions.

    And:

    AK: Fix warnings about unused variables when PARAVIRT is disabled.

    Signed-off-by: Rusty Russell
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Signed-off-by: Zachary Amsden
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton

    Rusty Russell
     

31 Aug, 2006

2 commits


02 Jul, 2006

1 commit


27 Jun, 2006

1 commit

  • Changes are largely identical to the i386 version:

    * alternative #define are moved to the new alternative.h file.
    * one new elf section with pointers to the lock prefixes which can be
    nop'ed out for non-smp.
    * two new elf sections simliar to the "classic" alternatives to
    replace SMP code with simpler UP code.
    * fixup headers to use alternative.h instead of defining their own
    LOCK / LOCK_PREFIX macros.

    The patch reuses the i386 version of the alternatives code to avoid code
    duplication. The code in alternatives.c was shuffled around a bit to
    reduce the number of #ifdefs needed. It also got some tweaks needed for
    x86_64 (vsyscall page handling) and new features (noreplacement option
    which was x86_64 only up to now). Debug printk's are changed from
    compile-time to runtime.

    Loosely based on a early version from Bastian Blank

    Signed-off-by: Gerd Hoffmann
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann