<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/arm/kernel/kprobes-test-arm.c, branch v3.2.66</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and below</title>
<updated>2011-11-30T23:54:54+00:00</updated>
<author>
<name>Jon Medhurst (Tixy)</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-11-29T07:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b5bed7fe801d1460424b7aeb6b06464e23d2a1e6'/>
<id>b5bed7fe801d1460424b7aeb6b06464e23d2a1e6</id>
<content type='text'>
The SWP instruction is deprecated on ARMv6 and with ARMv7 it will be
UNDEFINED when CONFIG_SWP_EMULATE is selected. In this case, probing a
SWP instruction will cause an oops when the kprobes emulation code
executes an undefined instruction.

As the SWP instruction should be rare or non-existent in kernels for
ARMv6 and later, we can simply avoid these problems by not allowing
probing of these.

Reported-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Tested-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Acked-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SWP instruction is deprecated on ARMv6 and with ARMv7 it will be
UNDEFINED when CONFIG_SWP_EMULATE is selected. In this case, probing a
SWP instruction will cause an oops when the kprobes emulation code
executes an undefined instruction.

As the SWP instruction should be rare or non-existent in kernels for
ARMv6 and later, we can simply avoid these problems by not allowing
probing of these.

Reported-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Tested-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Acked-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 7180/1: Change kprobes testcase with unpredictable STRD instruction</title>
<updated>2011-11-30T23:54:53+00:00</updated>
<author>
<name>Jon Medhurst (Tixy)</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-11-29T07:14:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=14383c295ab48178c449336f5d74e9e615e36723'/>
<id>14383c295ab48178c449336f5d74e9e615e36723</id>
<content type='text'>
There is a kprobes testcase for the instruction "strd r2, [r3], r4".
This has unpredictable behaviour as it uses r3 for register writeback
addressing and also stores it to memory.

On a cortex A9, this testcase would fail because the instruction writes
the updated value of r3 to memory, whereas the kprobes emulation code
writes the original value.

Fix this by changing testcase to used r5 instead of r3.

Reported-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Tested-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Acked-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a kprobes testcase for the instruction "strd r2, [r3], r4".
This has unpredictable behaviour as it uses r3 for register writeback
addressing and also stores it to memory.

On a cortex A9, this testcase would fail because the instruction writes
the updated value of r3 to memory, whereas the kprobes emulation code
writes the original value.

Fix this by changing testcase to used r5 instead of r3.

Reported-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Tested-by: Leif Lindholm &lt;leif.lindholm@arm.com&gt;
Acked-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Add ARM instruction simulation test cases</title>
<updated>2011-09-20T18:17:43+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-08-27T11:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c0cc6df16394da020242a54d577848f9edd9dc50'/>
<id>c0cc6df16394da020242a54d577848f9edd9dc50</id>
<content type='text'>
Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Acked-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Acked-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
