23 Jul, 2007
1 commit
-
Reenable kprobes and alternative patching when the kernel text is write
protected by DEBUG_RODATAAdd 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
13 Jul, 2007
1 commit
-
Unify the handling of the CPU features vectors between i386 and x86-64.
This also adopts the collapsing of features which are required at
compile-time into constant tests from x86-64 to i386.Signed-off-by: H. Peter Anvin
Signed-off-by: Linus Torvalds
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
03 May, 2007
2 commits
-
The other symbols used to delineate the alt-instructions sections have the
form __foo/__foo_end. Rename parainstructions to match.Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Andi Kleen
Cc: Andi Kleen
Cc: Rusty Russell
Signed-off-by: Andrew Morton -
Most of asm-x86_64/bugs.h is code which should be in a C file, so put it there.
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Andi Kleen
Cc: Andi Kleen
Cc: Linus Torvalds
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
31 Aug, 2006
2 commits
-
The .fill causes miscompilations with some binutils version.
Instead just patch the lock prefix in the lock constructs. That is the
majority of the cost and should be good enough.Signed-off-by: Andi Kleen
Signed-off-by: Linus Torvalds -
By hard-coding the cpuid keys for alternative_smp() rather than using
the symbolic constant it turned out that incorrect values were used on
both i386 (0x68 instead of 0x69) and x86-64 (0x66 instead of 0x68).Signed-off-by: Jan Beulich
Signed-off-by: Andi Kleen
Signed-off-by: Linus Torvalds
02 Jul, 2006
1 commit
-
Hide the magic in alternative.h and provide some dummy inline functions
for the UP case (gcc should manage to optimize away these calls). No
changes in module.c.Cc: Dave Jones
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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