<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/arch/arm/kernel/kprobes.c, branch v6.2-rc1</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v6.2-rc1</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v6.2-rc1'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-01-09T09:36:50+00:00</updated>
<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='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fca08f326ae0423f03b097ff54de432fe77b95d0'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ARM: probes: fix instruction fetch order with &lt;asm/opcodes.h&gt;</title>
<updated>2014-04-01T13:45:19+00:00</updated>
<author>
<name>Ben Dooks</name>
<email>ben.dooks@codethink.co.uk</email>
</author>
<published>2013-11-08T18:29:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=888be25402021a425da3e85e2d5a954d7509286e'/>
<id>urn:sha1:888be25402021a425da3e85e2d5a954d7509286e</id>
<content type='text'>
If we are running BE8, the data and instruction endianness do not
match, so use &lt;asm/opcodes.h&gt; to correctly translate memory accesses
into ARM instructions.

Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
[taras.kondratiuk@linaro.org: fixed Thumb instruction fetch order]
Signed-off-by: Taras Kondratiuk &lt;taras.kondratiuk@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: Add an emulate flag to the kprobes/uprobes instruction decode functions</title>
<updated>2014-03-18T20:39:39+00:00</updated>
<author>
<name>David A. Long</name>
<email>dave.long@linaro.org</email>
</author>
<published>2014-03-06T02:40:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=602cd2609eee92d338a83e400774e97c60535ba2'/>
<id>urn:sha1:602cd2609eee92d338a83e400774e97c60535ba2</id>
<content type='text'>
Add an emulate flag into the instruction interpreter, primarily for uprobes
support.

Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: Change the remaining shared kprobes/uprobes symbols to something generic</title>
<updated>2014-03-18T20:39:39+00:00</updated>
<author>
<name>David A. Long</name>
<email>dave.long@linaro.org</email>
</author>
<published>2014-03-06T23:12:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=47e190fafde49ff8ca732fa137e39cb2b8baba8c'/>
<id>urn:sha1:47e190fafde49ff8ca732fa137e39cb2b8baba8c</id>
<content type='text'>
Any more ARM kprobes/uprobes symbols which have "kprobe" in the name must be
changed to the more generic "probes" or other non-kprobes specific symbol.

Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: Change more ARM kprobes symbol names to something more generic</title>
<updated>2014-03-18T20:39:38+00:00</updated>
<author>
<name>David A. Long</name>
<email>dave.long@linaro.org</email>
</author>
<published>2014-03-06T02:20:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=eb73ea97e63bb06bf98ff052615ce181bc7f69ec'/>
<id>urn:sha1:eb73ea97e63bb06bf98ff052615ce181bc7f69ec</id>
<content type='text'>
Change kprobe_emulate_none, kprobe_simulate_nop, and arm_kprobe_decode_init
function names to something more appropriate for code being shared
outside of the kprobes subsystem. Also, move the new arm_probes_decode_init
declaration out of the kprobes.h include file and into the probes.h include file.

Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: Remove use of struct kprobe from generic probes code</title>
<updated>2014-03-18T20:39:37+00:00</updated>
<author>
<name>David A. Long</name>
<email>dave.long@linaro.org</email>
</author>
<published>2014-03-07T16:19:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7579f4b3764337b39087d10496af0e741cbfe570'/>
<id>urn:sha1:7579f4b3764337b39087d10496af0e741cbfe570</id>
<content type='text'>
Change the generic ARM probes code to pass in the opcode and architecture-specific
structure separately instead of using struct kprobe, so we do not pollute
code being used only for uprobes or other non-kprobes instruction
interpretation.

Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: use a function table for determining instruction interpreter action</title>
<updated>2014-03-18T20:39:36+00:00</updated>
<author>
<name>David A. Long</name>
<email>dave.long@linaro.org</email>
</author>
<published>2014-03-06T23:06:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3e6cd394bb10c2d65322e5f5d2ff0a9074d903a1'/>
<id>urn:sha1:3e6cd394bb10c2d65322e5f5d2ff0a9074d903a1</id>
<content type='text'>
Make the instruction interpreter call back to semantic action functions
through a function pointer array provided by the invoker.  The interpreter
decodes the instructions into groups and uses the group number to index
into the supplied array.  kprobes and uprobes code will each supply their
own array of functions.

Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: Fix missing includes in kprobes sources</title>
<updated>2014-03-18T20:39:34+00:00</updated>
<author>
<name>David A. Long</name>
<email>dave.long@linaro.org</email>
</author>
<published>2014-03-06T23:17:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=21254ebc9e509967317ad8c6922797e21137ad53'/>
<id>urn:sha1:21254ebc9e509967317ad8c6922797e21137ad53</id>
<content type='text'>
Make sure includes in ARM kprobes sources are done explicitly. Do not
rely on includes from other includes.

Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Jon Medhurst &lt;tixy@linaro.org&gt;
</content>
</entry>
<entry>
<title>ARM: 7862/1: pcpu: replace __get_cpu_var_uses</title>
<updated>2013-10-29T11:06:27+00:00</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-10-21T12:17:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1436c1aa626d0bc0e35c5c5231127086e80ab24a'/>
<id>urn:sha1:1436c1aa626d0bc0e35c5c5231127086e80ab24a</id>
<content type='text'>
This is the ARM part of Christoph's patchset cleaning up the various
uses of __get_cpu_var across the tree.

The idea is to convert __get_cpu_var into either an explicit address
calculation using this_cpu_ptr() or into a use of this_cpu operations
that use the offset. Thereby address calculations are avoided and fewer
registers are used when code is generated.

[will: fixed debug ref counting checks and pcpu array accesses]

Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>hlist: drop the node parameter from iterators</title>
<updated>2013-02-28T03:10:24+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2013-02-28T01:06:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b67bfe0d42cac56c512dd5da4b1b347a23f4b70a'/>
<id>urn:sha1:b67bfe0d42cac56c512dd5da4b1b347a23f4b70a</id>
<content type='text'>
I'm not sure why, but the hlist for each entry iterators were conceived

        list_for_each_entry(pos, head, member)

The hlist ones were greedy and wanted an extra parameter:

        hlist_for_each_entry(tpos, pos, head, member)

Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.

Besides the semantic patch, there was some manual work required:

 - Fix up the actual hlist iterators in linux/list.h
 - Fix up the declaration of other iterators based on the hlist ones.
 - A very small amount of places were using the 'node' parameter, this
 was modified to use 'obj-&gt;member' instead.
 - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
 properly, so those had to be fixed up manually.

The semantic patch which is mostly the work of Peter Senna Tschudin is here:

@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

type T;
expression a,c,d,e;
identifier b;
statement S;
@@

-T b;
    &lt;+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
    ...+&gt;

[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
