android_kernel_xiaomi_sm8350/arch/i386/kernel
Prasanna S.P d28c4393a7 [PATCH] x86: error_code is not safe for kprobes
This patch moves the entry.S:error_entry to .kprobes.text section,
since code marked unsafe for kprobes jumps directly to entry.S::error_entry,
that must be marked unsafe as well.
This patch also moves all the ".previous.text" asm directives to ".previous"
for kprobes section.

AK: Following a similar i386 patch from Chuck Ebbert
AK: Also merged Jeremy's fix in.

+From: Jeremy Fitzhardinge <jeremy@goop.org>

KPROBE_ENTRY does a .section .kprobes.text, and expects its users to
do a .previous at the end of the function.

Unfortunately, if any code within the function switches sections, for
example .fixup, then the .previous ends up putting all subsequent code
into .fixup.  Worse, any subsequent .fixup code gets intermingled with
the code its supposed to be fixing (which is also in .fixup).  It's
surprising this didn't cause more havok.

The fix is to use .pushsection/.popsection, so this stuff nests
properly.  A further cleanup would be to get rid of all
.section/.previous pairs, since they're inherently fragile.

+From: Chuck Ebbert <76306.1226@compuserve.com>

Because code marked unsafe for kprobes jumps directly to
entry.S::error_code, that must be marked unsafe as well.
The easiest way to do that is to move the page fault entry
point to just before error_code and let it inherit the same
section.

Also moved all the ".previous" asm directives for kprobes
sections to column 1 and removed ".text" from them.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andi Kleen <ak@suse.de>
2006-09-26 10:52:34 +02:00
..
acpi [PATCH] x86: Remove unneeded externs in acpi/boot.c 2006-09-26 10:52:33 +02:00
cpu [PATCH] i386: fix dubious segment register clear in cpu_init() 2006-09-26 10:52:34 +02:00
.gitignore
alternative.c [PATCH] lockdep: x86 smp alternatives workaround 2006-07-03 15:27:04 -07:00
apic.c [PATCH] i386: Replace i386 open-coded cmdline parsing with 2006-09-26 10:52:32 +02:00
apm.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
asm-offsets.c [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
bootflag.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpuid.c [PATCH] Fix modular cpuid.ko 2006-07-03 21:25:20 -07:00
crash_dump.c
crash.c [PATCH] i386: Kdump i386 nmi event notification fix 2006-09-26 10:52:27 +02:00
doublefault.c [PATCH] i386: cpu_relax() in crash.c and doublefault.c 2006-06-25 10:00:55 -07:00
early_printk.c
efi_stub.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
efi.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
entry.S [PATCH] x86: error_code is not safe for kprobes 2006-09-26 10:52:34 +02:00
head.S [PATCH] i386: Add kernel thread stack frame termination for properly stopping stack unwinds. 2006-08-30 16:05:15 -07:00
hpet.c [PATCH] Fix faulty HPET clocksource usage (fix for bug #7062) 2006-09-01 11:39:08 -07:00
i386_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i387.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i8237.c
i8253.c [PATCH] time: fix time going backward w/ clock=pit 2006-06-26 09:58:21 -07:00
i8259.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
init_task.c
io_apic.c [PATCH] i386: Replace i386 open-coded cmdline parsing with 2006-09-26 10:52:32 +02:00
ioport.c [PATCH] i386: use thread_info flags for debug regs and IO bitmaps 2006-07-09 18:47:12 -07:00
irq.c [PATCH] i386: Fix stack switching in do_IRQ 2006-08-30 16:05:16 -07:00
kprobes.c [PATCH] kprobe-booster: disable in preemptible kernel 2006-07-31 13:28:38 -07:00
ldt.c
machine_kexec.c [PATCH] i386: Replace i386 open-coded cmdline parsing with 2006-09-26 10:52:32 +02:00
Makefile [PATCH] i386: Do stacktracer conversion too 2006-09-26 10:52:34 +02:00
mca.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
microcode.c [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed 2006-06-26 12:25:08 -07:00
module.c [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
mpparse.c [PATCH] i386: Clean up code style in mpparse.c ACPI code 2006-09-26 10:52:30 +02:00
msr.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
nmi.c [PATCH] x86: i386/x86-64 Add nmi watchdog support for new Intel CPUs 2006-09-26 10:52:27 +02:00
numaq.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pci-dma.c
process.c [PATCH] i386/x86-64: Don't randomize stack top when no randomization personality is set 2006-09-26 10:52:28 +02:00
ptrace.c [PATCH] i386/x86-64: rename is_at_popf(), add iret to tests and fix 2006-09-26 10:52:33 +02:00
quirks.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
reboot_fixups.c [PATCH] i386: Remove printk about reboot fixups at reboot 2006-04-09 11:53:53 -07:00
reboot.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
relocate_kernel.S
scx200.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup.c [PATCH] i386/x86-64: Move acpi_disabled variables into acpi/boot.c 2006-09-26 10:52:33 +02:00
sigframe.h
signal.c [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
smp.c [PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR 2006-06-26 10:48:22 -07:00
smpboot.c [PATCH] i386: don't taint UP K7's running SMP kernels. 2006-09-26 10:52:34 +02:00
srat.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
summit.c
sys_i386.c [PATCH] Uninline sys_mmap common code (reduce binary size) 2006-03-22 07:54:02 -08:00
syscall_table.S [PATCH] x86: Add portable getcpu call 2006-09-26 10:52:28 +02:00
sysenter.c [PATCH] small fix for not releasing the mmap semaphore in i386/arch_setup_additional_pages 2006-06-28 12:05:50 -07:00
time_hpet.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
time.c [PATCH] i386: Account spinlocks to the caller during profiling for !FP kernels 2006-09-26 10:52:28 +02:00
topology.c [PATCH] node hotplug: register cpu: remove node struct 2006-06-27 17:32:37 -07:00
trampoline.S
traps.c [PATCH] i386: Get ebp from unwinder state when continuing fallback backtrace 2006-09-26 10:52:34 +02:00
tsc.c [PATCH] generic-time: add macro to simplify/hide mask constants 2006-06-26 09:58:21 -07:00
vm86.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vmlinux.lds.S [PATCH] i386: reliable stack trace support (i386) 2006-06-26 10:48:17 -07:00
vsyscall-int80.S
vsyscall-note.S
vsyscall-sigreturn.S [PATCH] Mark unwind info for signal trampolines in vDSOs 2006-03-31 12:18:52 -08:00
vsyscall-sysenter.S [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
vsyscall.lds.S [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
vsyscall.S