<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/arm/kernel/kprobes-decode.c, branch v3.0.84</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: kprobes: Tidy-up kprobes-decode.c</title>
<updated>2011-04-29T03:41:01+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-19T09:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cdc253611582f08036ccb6e10efe95b8e760a7e2'/>
<id>cdc253611582f08036ccb6e10efe95b8e760a7e2</id>
<content type='text'>
- Remove coding standard violations reported by checkpatch.pl
- Delete comment about handling of conditional branches which is no
  longer true.
- Delete comment at end of file which lists all ARM instructions. This
  duplicates data available in the ARM ARM and seems like an
  unnecessary maintenance burden to keep this up to date and accurate.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove coding standard violations reported by checkpatch.pl
- Delete comment about handling of conditional branches which is no
  longer true.
- Delete comment at end of file which lists all ARM instructions. This
  duplicates data available in the ARM ARM and seems like an
  unnecessary maintenance burden to keep this up to date and accurate.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Add emulation of hint instructions like NOP and WFI</title>
<updated>2011-04-29T03:41:01+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-19T09:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94254930786216106100e9a28c9a244df58be61f'/>
<id>94254930786216106100e9a28c9a244df58be61f</id>
<content type='text'>
Being able to probe NOP instructions is useful for hard-coding probeable
locations and is used by the kprobes test code.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Being able to probe NOP instructions is useful for hard-coding probeable
locations and is used by the kprobes test code.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Add emulation of SBFX, UBFX, BFI and BFC instructions</title>
<updated>2011-04-29T03:41:00+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-19T09:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=20e8155e24ba5c04558780d0a8da13c39f98c002'/>
<id>20e8155e24ba5c04558780d0a8da13c39f98c002</id>
<content type='text'>
These bit field manipulation instructions occur several thousand
times in an ARMv7 kernel.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These bit field manipulation instructions occur several thousand
times in an ARMv7 kernel.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Add emulation of MOVW and MOVT instructions</title>
<updated>2011-04-29T03:40:59+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-19T09:52:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c9836777d5f22e64eefc759d682511560b6d6d78'/>
<id>c9836777d5f22e64eefc759d682511560b6d6d78</id>
<content type='text'>
The MOVW and MOVT instructions account for approximately 7% of all
instructions in a ARMv7 kernel as GCC uses them instead of a literal
pool.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MOVW and MOVT instructions account for approximately 7% of all
instructions in a ARMv7 kernel as GCC uses them instead of a literal
pool.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Reject probing of undefined data processing instructions</title>
<updated>2011-04-29T03:40:59+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-19T09:52:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f704a6e25bd07e1381af81f19fb1d123975807b1'/>
<id>f704a6e25bd07e1381af81f19fb1d123975807b1</id>
<content type='text'>
The instruction decoding in space_cccc_000x needs to reject probing of
instructions with undefined patterns as they may in future become
defined and then emulated faultily - as has already happened with the
SMC instruction.

This fix is achieved by testing for the instruction patterns we want to
probe and making the the default fall-through paths reject probes. This
also allows us to remove some explicit tests for instructions that we
wish to reject, as that is now the default action.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The instruction decoding in space_cccc_000x needs to reject probing of
instructions with undefined patterns as they may in future become
defined and then emulated faultily - as has already happened with the
SMC instruction.

This fix is achieved by testing for the instruction patterns we want to
probe and making the the default fall-through paths reject probes. This
also allows us to remove some explicit tests for instructions that we
wish to reject, as that is now the default action.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Remove redundant code in space_1111</title>
<updated>2011-04-29T03:40:59+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-18T07:53:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=72c2bab2be734d63dee4342e67b1754c54fded70'/>
<id>72c2bab2be734d63dee4342e67b1754c54fded70</id>
<content type='text'>
The tests to explicitly reject probing CPS, RFE and SRS instructions
are redundant as the default case is now to reject undecoded patterns.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tests to explicitly reject probing CPS, RFE and SRS instructions
are redundant as the default case is now to reject undecoded patterns.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Fix emulation of PLD instructions</title>
<updated>2011-04-29T03:40:59+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-18T07:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41713d1396312a027ec02abc4767041627c178ef'/>
<id>41713d1396312a027ec02abc4767041627c178ef</id>
<content type='text'>
The PLD instructions wasn't being decoded correctly and the emulation
code wasn't adjusting PC correctly.

As the PLD instruction is only a performance hint we emulate it as a
simple nop, and we can broaden the instruction decoding to take into
account newer PLI and PLDW instructions.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PLD instructions wasn't being decoded correctly and the emulation
code wasn't adjusting PC correctly.

As the PLD instruction is only a performance hint we emulate it as a
simple nop, and we can broaden the instruction decoding to take into
account newer PLI and PLDW instructions.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Reject probing of SETEND instructions</title>
<updated>2011-04-29T03:40:59+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-18T07:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f0aeb8bff0fe9de50e1e4093ef86ff8f17a9b1b0'/>
<id>f0aeb8bff0fe9de50e1e4093ef86ff8f17a9b1b0</id>
<content type='text'>
The emulation of SETEND was broken as it changed the endianess for
the running kprobes handling code. Rather than adding a new simulation
routine to fix this we'll just reject probing of SETEND as these should
be very rare in the kernel.

Note, the function emulate_none is now unused but it is left in the
source code as future patches will use it.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The emulation of SETEND was broken as it changed the endianess for
the running kprobes handling code. Rather than adding a new simulation
routine to fix this we'll just reject probing of SETEND as these should
be very rare in the kernel.

Note, the function emulate_none is now unused but it is left in the
source code as future patches will use it.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Consolidate stub decoding functions</title>
<updated>2011-04-29T03:40:59+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-18T07:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac211c6994fb5f1f282745054c00d29e53639cb1'/>
<id>ac211c6994fb5f1f282745054c00d29e53639cb1</id>
<content type='text'>
Following the change to remove support for coprocessor instructions
we are left with three stub functions which can be consolidated.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following the change to remove support for coprocessor instructions
we are left with three stub functions which can be consolidated.

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: Reject probing of all coprocessor instructions</title>
<updated>2011-04-29T03:40:58+00:00</updated>
<author>
<name>Jon Medhurst</name>
<email>tixy@yxit.co.uk</email>
</author>
<published>2011-04-18T07:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fa1a03b429b3fd5f28e7fdd20ce99ca572bfd236'/>
<id>fa1a03b429b3fd5f28e7fdd20ce99ca572bfd236</id>
<content type='text'>
The kernel doesn't currently support VFP or Neon code, and probing of
code with CP15 operations is fraught with bad consequences. Therefore we
don't need the ability to probe coprocessor instructions and the code to
support this can be removed.

The removed code also had at least two bugs:
 - MRC into R15 should set CPSR not trash PC
 - LDC and STC which use PC as base register needed the address offset by 8

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kernel doesn't currently support VFP or Neon code, and probing of
code with CP15 operations is fraught with bad consequences. Therefore we
don't need the ability to probe coprocessor instructions and the code to
support this can be removed.

The removed code also had at least two bugs:
 - MRC into R15 should set CPSR not trash PC
 - LDC and STC which use PC as base register needed the address offset by 8

Signed-off-by: Jon Medhurst &lt;tixy@yxit.co.uk&gt;
Signed-off-by: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
