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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 21 Jan 2014 11:51:22 -0500
From:	David Long <dave.long@...aro.org>
To:	"Jon Medhurst (Tixy)" <tixy@...aro.org>
CC:	linux-arm-kernel@...ts.infradead.org,
	Russell King <linux@....linux.org.uk>,
	Rabin Vincent <rabin@....in>, Oleg Nesterov <oleg@...hat.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...hat.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	davem@...emloft.net, Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 15/16] ARM: add uprobes support

On 12/20/13 13:34, Jon Medhurst (Tixy) wrote:
> On Sun, 2013-12-15 at 23:08 -0500, David Long wrote:
>> From: "David A. Long" <dave.long@...aro.org>
>>
>> Using Rabin Vincent's ARM uprobes patches as a base, enable uprobes
>> support on ARM.
>>
>> Caveats:
>>
>>   - Thumb is not supported
>>   - XOL abort/trap handling is not implemented
>
> I shall repeat my comment from version one of the patch...
>
> What are the consequences of this, e.g. is it possible for a probe to
> get stuck in an infinite loop of faulting? I hope there are no integrity
> issues for the kernel itself.
>
> Would be good if someone familiar with uprobes working could answer
> that.

Testing shows it does indeed get stuck continuously trapping. The 
process is killable.  Fortunately all the infrastructure is already 
there for fixing this.  I've patched the code to detect the trap and 
allow it to be processed, using the powerpc uprobes code as a model. 
The changes required are fairly small and entirely in the 
architecture-specific code.

As mentioned before, thumb support is a follow-on project.

> I've a few other comments...

[snip]

>
>
>> +const union decode_item uprobes_probes_actions[] = {
>> +	[PROBES_EMULATE_NONE] {.handler = probes_simulate_nop},
>
> There is a missing '=' in the line above. Interesting that GCC doesn't
> complain (I tried compiling this patch and it didn't).
>

That is indeed odd.  I have fixed it (my code, not the compiler).

[snip]

>> +bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
>> +{
>> +	void *addr;
>
> 'addr' is not used so this line can be deleted
>
>> +	probes_opcode_t opcode;
>> +
>> +	if (!auprobe->simulate)
>> +		return false;
>> +
>> +	addr = (void *) regs->ARM_pc;
>
> and so can this line ^^^

Fixed.

>
>> +	opcode = __mem_to_opcode_arm(*(unsigned int *) auprobe->insn);
>> +
>> +	auprobe->asi.insn_singlestep(opcode, &auprobe->asi, regs);
>> +
>> +	return true;
>> +}
>> +
>

Fixed.

> [rest of patch snipped]
>


-dl

--
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