lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141119112553.GC15985@arm.com>
Date:	Wed, 19 Nov 2014 11:25:53 +0000
From:	Will Deacon <will.deacon@....com>
To:	Sandeepa Prabhu <sandeepa.prabhu@...aro.org>
Cc:	David Long <dave.long@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Russell King <linux@....linux.org.uk>,
	William Cohen <wcohen@...hat.com>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"Jon Medhurst (Tixy)" <tixy@...aro.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/5] arm64: Kprobes with single stepping support

On Wed, Nov 19, 2014 at 11:21:24AM +0000, Sandeepa Prabhu wrote:
> On 18 November 2014 20:26, Will Deacon <will.deacon@....com> wrote:
> 
> > One thing I noticed looking through this patch is that we're effectively
> > reinventing a bunch of the instruction decoding logic that we already have
> > in the kernel (introduced since Sandeepa last sent his patch).
> >
> > Could you take a look at include/asm/insn.h and kernel/insn.c please, and
> > see if you can at least consolidate some of this? Some of it should be easy
> > (i.e. reusing masks, using existing #defines to construct BRK encodings),
> > but I appreciate there may be places where kprobes needs to add extra bits,
> > in which case I'd really like to keep this all together if at all possible.
> >
> > We're currently in a position where the module loader, BPF jit, ftrace and
> > the proposed alternative patching scheme are all using the same instruction
> > manipulation functions, so we should try to continue that trend if we can.
> Will,
> 
> kernel/insn.c support generating instruction encodings(forming opcodes
> with given specifications), so for kprobes, only BRK encoding can use
> this mechanism.
> For instruction simulation, the instruction behavior should be
> simulated on saved pt_regs, which is not supported on insn.c routines,
> so still need probes-simulate-insn.c. Please point me if I am missing
> something here.

I was thinking of the magic hex numbers in the kprobes decode tables, which
seem to correspond directly to the instruction classes described in insn.c

Keeping the actual emulation code separate makes sense.

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ