public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] kprobes: add new dma insn slot cache for s390
@ 2013-08-23 11:04 Heiko Carstens
  2013-08-23 11:04 ` [Patch v2 1/3] kprobes: unify insn caches Heiko Carstens
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Heiko Carstens @ 2013-08-23 11:04 UTC (permalink / raw)
  To: Andrew Morton, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Ingo Molnar, Martin Schwidefsky
  Cc: linux-kernel, Heiko Carstens

The current kpropes insn caches allocate memory areas for insn slots with
module_alloc().  The assumption is that the kernel image and module area
are both within the same +/- 2GB memory area.

This however is not true for s390 where the kernel image resides within
the first 2GB (DMA memory area), but the module area is far away in the
vmalloc area, usually somewhere close below the 4TB area.

For new pc relative instructions s390 needs insn slots that are within +/-
2GB of each area.  That way we can patch displacements of pc-relative
instructions within the insn slots just like x86 and powerpc.

The module area works already with the normal insn slot allocator, however
there is currently no way to get insn slots that are within the first 2GB
on s390 (aka DMA area).

Therefore this patch set modifies the kprobes insn slot cache code in order
to allow to specify a custom allocator for the insn slot cache pages.
In addition architecure can now have private insn slot caches withhout the
need to modify common code.

Patch 1 unifies and simplifies the current insn and optinsn caches
        implementation. This is a preparation which allows to add more
        insn caches in a simple way.

Patch 2 adds the possibility to specify a custom allocator.

Patch 3 makes s390 use the new insn slot mechanisms and adds support for
        pc-relative instructions with long displacements.

v1->v2: add possibility to specifiy a custom allocator and move the new
        dmainsn cache into s390 code and leave common code alone.

Heiko Carstens (3):
  kprobes: unify insn caches
  kprobes: allow to specify custum allocator for insn caches
  s390/kprobes: add support for pc-relative long displacement instructions

 arch/s390/include/asm/kprobes.h |    4 +-
 arch/s390/kernel/kprobes.c      |  144 +++++++++++++++++++++++++++++++++++++--
 include/linux/kprobes.h         |   34 +++++++--
 kernel/kprobes.c                |   95 +++++++++++---------------
 4 files changed, 209 insertions(+), 68 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-26  2:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23 11:04 [PATCH v2 0/3] kprobes: add new dma insn slot cache for s390 Heiko Carstens
2013-08-23 11:04 ` [Patch v2 1/3] kprobes: unify insn caches Heiko Carstens
2013-08-26  1:49   ` Masami Hiramatsu
2013-08-23 11:04 ` [Patch v2 2/3] kprobes: allow to specify custum allocator for " Heiko Carstens
2013-08-26  2:21   ` Masami Hiramatsu
2013-08-23 11:04 ` [Patch v2 3/3] s390/kprobes: add support for pc-relative long displacement instructions Heiko Carstens
2013-08-26  2:36   ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox