<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/arch/csky/kernel/ftrace.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/arch/csky/kernel/ftrace.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/arch/csky/kernel/ftrace.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-31T14:15:42Z</updated>
<entry>
<title>csky/ftrace: Fixup ftrace_modify_code deadlock without CPU_HAS_ICACHE_INS</title>
<updated>2020-03-31T14:15:42Z</updated>
<author>
<name>Guo Ren</name>
<email>guoren@linux.alibaba.com</email>
</author>
<published>2020-03-31T14:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dd7c983e78a28ff0b22f8bcf32a303b4f79cb318'/>
<id>urn:sha1:dd7c983e78a28ff0b22f8bcf32a303b4f79cb318</id>
<content type='text'>
If ICACHE_INS is not supported, we use IPI to sync icache on each
core. But ftrace_modify_code is called from stop_machine from default
implementation of arch_ftrace_update_code and stop_machine callback
is irq_disabled. When you call ipi with irq_disabled, a deadlock will
happen.

We couldn't use icache_flush with irq_disabled, but startup make_nop
is specific case and it needn't ipi other cores.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: Implement ftrace with regs</title>
<updated>2020-03-08T12:55:14Z</updated>
<author>
<name>Guo Ren</name>
<email>guoren@linux.alibaba.com</email>
</author>
<published>2020-02-18T12:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=89a3927a775c0a7212e2e3c4e2d42cd48895bee0'/>
<id>urn:sha1:89a3927a775c0a7212e2e3c4e2d42cd48895bee0</id>
<content type='text'>
This patch implements FTRACE_WITH_REGS for csky, which allows a traced
function's arguments (and some other registers) to be captured into a
struct pt_regs, allowing these to be inspected and/or modified.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky/ftrace: Add dynamic function tracer (include graph tracer)</title>
<updated>2019-04-22T05:44:57Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2019-03-01T00:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=28bb030f93334495ddc64ade0bff18721bf7023d'/>
<id>urn:sha1:28bb030f93334495ddc64ade0bff18721bf7023d</id>
<content type='text'>
Support dynamic ftrace including dynamic graph tracer. Gcc-csky with -pg
will produce call site in every function prologue and we can use these
call site to hook trace function.

gcc with -pg origin call site:
	push	lr
	jbsr	_mcount
	nop32
	nop32

If the (callee - caller)'s offset is in range of bsr instruction, we'll
modify code with:
	push	lr
	bsr	_mcount
	nop32
	nop32
Else if the (callee - caller)'s offset is out of bsr instrunction, we'll
modify code with:
	push	lr
	movih	r26, ...
	ori	r26, ...
	jsr	r26

(r26 is reserved for jsr link reg in csky abiv2 spec.)

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
</content>
</entry>
<entry>
<title>csky: ftrace call graph supported.</title>
<updated>2018-12-31T15:17:23Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2018-12-15T13:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d7950be145c84ca5094c52bc1ad1e7f1893d0f19'/>
<id>urn:sha1:d7950be145c84ca5094c52bc1ad1e7f1893d0f19</id>
<content type='text'>
With csky-gcc -pg -mbacktrace, ftrace call graph supported.

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
</content>
</entry>
<entry>
<title>csky: basic ftrace supported</title>
<updated>2018-12-31T15:16:46Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2018-12-09T06:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=230c77a5e92a29bf21e98ee35e22b0537f61c55b'/>
<id>urn:sha1:230c77a5e92a29bf21e98ee35e22b0537f61c55b</id>
<content type='text'>
When gcc with -pg, it'll add _mcount stub in every function. We need
implement the _mcount in kernel and ftrace depends on stackstrace.

To do: call-graph, dynamic ftrace

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
</content>
</entry>
</feed>
