<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/arm/kernel/jump_label.c, branch v4.10</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>jump_label: Rename JUMP_LABEL_{EN,DIS}ABLE to JUMP_LABEL_{JMP,NOP}</title>
<updated>2015-08-03T09:34:12+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2015-07-24T12:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=76b235c6bcb16062d663e2ee96db0b69f2e6bc14'/>
<id>76b235c6bcb16062d663e2ee96db0b69f2e6bc14</id>
<content type='text'>
Since we've already stepped away from ENABLE is a JMP and DISABLE is a
NOP with the branch_default bits, and are going to make it even worse,
rename it to make it all clearer.

This way we don't mix multiple levels of logic attributes, but have a
plain 'physical' name for what the current instruction patching status
of a jump label is.

This is a first step in removing the naming confusion that has led to
a stream of avoidable bugs such as:

  a833581e372a ("x86, perf: Fix static_key bug in load_mm_cr4()")

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
[ Beefed up the changelog. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we've already stepped away from ENABLE is a JMP and DISABLE is a
NOP with the branch_default bits, and are going to make it even worse,
rename it to make it all clearer.

This way we don't mix multiple levels of logic attributes, but have a
plain 'physical' name for what the current instruction patching status
of a jump label is.

This is a first step in removing the naming confusion that has led to
a stream of avoidable bugs such as:

  a833581e372a ("x86, perf: Fix static_key bug in load_mm_cr4()")

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
[ Beefed up the changelog. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: kprobes: enable OPTPROBES for ARM 32</title>
<updated>2015-01-13T16:10:17+00:00</updated>
<author>
<name>Wang Nan</name>
<email>wangnan0@huawei.com</email>
</author>
<published>2015-01-09T06:37:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0dc016dbd820260b8ea74337980735b8c88d4ef2'/>
<id>0dc016dbd820260b8ea74337980735b8c88d4ef2</id>
<content type='text'>
This patch introduce kprobeopt for ARM 32.

Limitations:
 - Currently only kernel compiled with ARM ISA is supported.

 - Offset between probe point and optinsn slot must not larger than
   32MiB. Masami Hiramatsu suggests replacing 2 words, it will make
   things complex. Futher patch can make such optimization.

Kprobe opt on ARM is relatively simpler than kprobe opt on x86 because
ARM instruction is always 4 bytes aligned and 4 bytes long. This patch
replace probed instruction by a 'b', branch to trampoline code and then
calls optimized_callback(). optimized_callback() calls opt_pre_handler()
to execute kprobe handler. It also emulate/simulate replaced instruction.

When unregistering kprobe, the deferred manner of unoptimizer may leave
branch instruction before optimizer is called. Different from x86_64,
which only copy the probed insn after optprobe_template_end and
reexecute them, this patch call singlestep to emulate/simulate the insn
directly. Futher patch can optimize this behavior.

Signed-off-by: Wang Nan &lt;wangnan0@huawei.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Reviewed-by: Jon Medhurst (Tixy) &lt;tixy@linaro.org&gt;
Signed-off-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduce kprobeopt for ARM 32.

Limitations:
 - Currently only kernel compiled with ARM ISA is supported.

 - Offset between probe point and optinsn slot must not larger than
   32MiB. Masami Hiramatsu suggests replacing 2 words, it will make
   things complex. Futher patch can make such optimization.

Kprobe opt on ARM is relatively simpler than kprobe opt on x86 because
ARM instruction is always 4 bytes aligned and 4 bytes long. This patch
replace probed instruction by a 'b', branch to trampoline code and then
calls optimized_callback(). optimized_callback() calls opt_pre_handler()
to execute kprobe handler. It also emulate/simulate replaced instruction.

When unregistering kprobe, the deferred manner of unoptimizer may leave
branch instruction before optimizer is called. Different from x86_64,
which only copy the probed insn after optprobe_template_end and
reexecute them, this patch call singlestep to emulate/simulate the insn
directly. Futher patch can optimize this behavior.

Signed-off-by: Wang Nan &lt;wangnan0@huawei.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Reviewed-by: Jon Medhurst (Tixy) &lt;tixy@linaro.org&gt;
Signed-off-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: probes: move all probe code to dedicate directory</title>
<updated>2015-01-09T09:36:50+00:00</updated>
<author>
<name>Wang Nan</name>
<email>wangnan0@huawei.com</email>
</author>
<published>2015-01-09T02:19:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fca08f326ae0423f03b097ff54de432fe77b95d0'/>
<id>fca08f326ae0423f03b097ff54de432fe77b95d0</id>
<content type='text'>
In discussion on LKML (https://lkml.org/lkml/2014/11/28/158), Russell
King suggests to move all probe related code to arch/arm/probes. This
patch does the work. Due to dependency on 'arch/arm/kernel/patch.h', this
patch also moves patch.h to 'arch/arm/include/asm/patch.h', and related
'#include' directives are also midified to '#include &lt;asm/patch.h&gt;'.

Following is an overview of this patch:

 ./arch/arm/kernel/               ./arch/arm/probes/
 |-- Makefile                     |-- Makefile
 |-- probes-arm.c          ==&gt;    |-- decode-arm.c
 |-- probes-arm.h          ==&gt;    |-- decode-arm.h
 |-- probes-thumb.c        ==&gt;    |-- decode-thumb.c
 |-- probes-thumb.h        ==&gt;    |-- decode-thumb.h
 |-- probes.c              ==&gt;    |-- decode.c
 |-- probes.h              ==&gt;    |-- decode.h
 |                                |-- kprobes
 |                                |   |-- Makefile
 |-- kprobes-arm.c         ==&gt;    |   |-- actions-arm.c
 |-- kprobes-common.c      ==&gt;    |   |-- actions-common.c
 |-- kprobes-thumb.c       ==&gt;    |   |-- actions-thumb.c
 |-- kprobes.c             ==&gt;    |   |-- core.c
 |-- kprobes.h             ==&gt;    |   |-- core.h
 |-- kprobes-test-arm.c    ==&gt;    |   |-- test-arm.c
 |-- kprobes-test.c        ==&gt;    |   |-- test-core.c
 |-- kprobes-test.h        ==&gt;    |   |-- test-core.h
 |-- kprobes-test-thumb.c  ==&gt;    |   `-- test-thumb.c
 |                                `-- uprobes
 |                                    |-- Makefile
 |-- uprobes-arm.c         ==&gt;        |-- actions-arm.c
 |-- uprobes.c             ==&gt;        |-- core.c
 |-- uprobes.h             ==&gt;        `-- core.h
 |
 `-- patch.h               ==&gt;    arch/arm/include/asm/patch.h

Signed-off-by: Wang Nan &lt;wangnan0@huawei.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In discussion on LKML (https://lkml.org/lkml/2014/11/28/158), Russell
King suggests to move all probe related code to arch/arm/probes. This
patch does the work. Due to dependency on 'arch/arm/kernel/patch.h', this
patch also moves patch.h to 'arch/arm/include/asm/patch.h', and related
'#include' directives are also midified to '#include &lt;asm/patch.h&gt;'.

Following is an overview of this patch:

 ./arch/arm/kernel/               ./arch/arm/probes/
 |-- Makefile                     |-- Makefile
 |-- probes-arm.c          ==&gt;    |-- decode-arm.c
 |-- probes-arm.h          ==&gt;    |-- decode-arm.h
 |-- probes-thumb.c        ==&gt;    |-- decode-thumb.c
 |-- probes-thumb.h        ==&gt;    |-- decode-thumb.h
 |-- probes.c              ==&gt;    |-- decode.c
 |-- probes.h              ==&gt;    |-- decode.h
 |                                |-- kprobes
 |                                |   |-- Makefile
 |-- kprobes-arm.c         ==&gt;    |   |-- actions-arm.c
 |-- kprobes-common.c      ==&gt;    |   |-- actions-common.c
 |-- kprobes-thumb.c       ==&gt;    |   |-- actions-thumb.c
 |-- kprobes.c             ==&gt;    |   |-- core.c
 |-- kprobes.h             ==&gt;    |   |-- core.h
 |-- kprobes-test-arm.c    ==&gt;    |   |-- test-arm.c
 |-- kprobes-test.c        ==&gt;    |   |-- test-core.c
 |-- kprobes-test.h        ==&gt;    |   |-- test-core.h
 |-- kprobes-test-thumb.c  ==&gt;    |   `-- test-thumb.c
 |                                `-- uprobes
 |                                    |-- Makefile
 |-- uprobes-arm.c         ==&gt;        |-- actions-arm.c
 |-- uprobes.c             ==&gt;        |-- core.c
 |-- uprobes.h             ==&gt;        `-- core.h
 |
 `-- patch.h               ==&gt;    arch/arm/include/asm/patch.h

Signed-off-by: Wang Nan &lt;wangnan0@huawei.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arm: use fixmap for text patching when text is RO</title>
<updated>2014-10-16T21:38:53+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2014-04-24T21:28:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab0615e2d6fb074764a3e4d05f1326fa2fdb4627'/>
<id>ab0615e2d6fb074764a3e4d05f1326fa2fdb4627</id>
<content type='text'>
Use fixmaps for text patching when the kernel text is read-only,
inspired by x86.  This makes jump labels and kprobes work with the
currently available CONFIG_DEBUG_SET_MODULE_RONX and the upcoming
CONFIG_DEBUG_RODATA options.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
[kees: fixed up for merge with "arm: use generic fixmap.h"]
[kees: added parse acquire/release annotations to pass C=1 builds]
[kees: always use stop_machine to keep TLB flushing local]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Nicolas Pitre &lt;nico@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use fixmaps for text patching when the kernel text is read-only,
inspired by x86.  This makes jump labels and kprobes work with the
currently available CONFIG_DEBUG_SET_MODULE_RONX and the upcoming
CONFIG_DEBUG_RODATA options.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
[kees: fixed up for merge with "arm: use generic fixmap.h"]
[kees: added parse acquire/release annotations to pass C=1 builds]
[kees: always use stop_machine to keep TLB flushing local]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Nicolas Pitre &lt;nico@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 7334/1: add jump label support</title>
<updated>2012-03-24T09:38:56+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2012-02-18T16:52:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=09f05d8529ff4aa92311c1a55ce35ac98cb59b8c'/>
<id>09f05d8529ff4aa92311c1a55ce35ac98cb59b8c</id>
<content type='text'>
Add the arch-specific code to support jump labels for ARM and Thumb-2.

This code will only be activated on compilers that are capable of
building it.  It has been tested with GCC 4.6 patched with the patch
from GCC bug 48637.

Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&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>
Add the arch-specific code to support jump labels for ARM and Thumb-2.

This code will only be activated on compilers that are capable of
building it.  It has been tested with GCC 4.6 patched with the patch
from GCC bug 48637.

Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
