/*
 * Here's a sample kernel module showing the use of jprobes to dump
 * the arguments of _do_fork().
 *
 * For more information on theory of operation of jprobes, see
 * Documentation/kprobes.txt
 *
 * Build and insert the kernel module as done in the kprobe example.
 * You will see the trace data in /var/log/messages and on the
 * console whenever _do_fork() is invoked to create a new process.
 * (Some messages may be suppressed if syslogd is configured to
 * eliminate duplicate messages.)
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kprobes.h>

/*
 * Jumper probe for _do_fork.
 * Mirror principle enables access to arguments of the probed routine
 * from the probe handler.
 */

/* Proxy routine having the same arguments as actual _do_fork() routine */
static long j_do_fork(unsigned long clone_flags, unsigned long stack_start,
	      unsigned long stack_size, int __user *parent_tidptr,
	      int __user *child_tidptr, unsigned long tls)
{
	pr_info("jprobe: clone_flags = 0x%lx, stack_start = 0x%lx "
		"stack_size = 0x%lx\n", clone_flags, stack_start, stack_size);

	/* Always end with a call to jprobe_return(). */
	jprobe_return();
	return 0;
}

static struct jprobe my_jprobe = {
	.entry			= j_do_fork,
	.kp = {
		.symbol_name	= "_do_fork",
	},
};

static int __init jprobe_init(void)
{
	int ret;

	ret = register_jprobe(&my_jprobe);
	if (ret < 0) {
		pr_err("register_jprobe failed, returned %d\n", ret);
		return -1;
	}
	pr_info("Planted jprobe at %p, handler addr %p\n",
	       my_jprobe.kp.addr, my_jprobe.entry);
	return 0;
}

static void __exit jprobe_exit(void)
{
	unregister_jprobe(&my_jprobe);
	pr_info("jprobe at %p unregistered\n", my_jprobe.kp.addr);
}

module_init(jprobe_init)
module_exit(jprobe_exit)
MODULE_LICENSE("GPL");
30db1bdb254e4b50d366010b219286b8c937'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/ipv4/cipso_ipv4.c'>
<input type='hidden' name='id' value='d07830db1bdb254e4b50d366010b219286b8c937'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=d07830db1bdb254e4b50d366010b219286b8c937'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net?id=d07830db1bdb254e4b50d366010b219286b8c937'>net</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/ipv4?id=d07830db1bdb254e4b50d366010b219286b8c937'>ipv4</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937'>cipso_ipv4.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='d07830db1bdb254e4b50d366010b219286b8c937'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Marcel J.E. Mol &lt;marcel@mesa.nl&gt;</td><td class='right'>2017-01-30 19:26:40 +0100</td></tr>
<tr><th>committer</th><td>Johan Hovold &lt;johan@kernel.org&gt;</td><td class='right'>2017-01-31 17:27:04 +0100</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937'>d07830db1bdb254e4b50d366010b219286b8c937</a> (<a href='/cgit.cgi/linux/net-next.git/patch/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=d07830db1bdb254e4b50d366010b219286b8c937'>354d7fca237fa3d7e7e63c2196eaa4e1086838ea</a> /<a href='/cgit.cgi/linux/net-next.git/tree/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937'>net/ipv4/cipso_ipv4.c</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/ipv4/cipso_ipv4.c?id=5d03a2fd2292e71936c4235885c35ccc3c94695b'>5d03a2fd2292e71936c4235885c35ccc3c94695b</a> (<a href='/cgit.cgi/linux/net-next.git/diff/net/ipv4/cipso_ipv4.c?id=d07830db1bdb254e4b50d366010b219286b8c937&amp;id2=5d03a2fd2292e71936c4235885c35ccc3c94695b'>diff</a>)</td></tr></table>
<div class='commit-subject'>USB: serial: pl2303: add ATEN device ID</div><div class='commit-msg'>Seems that ATEN serial-to-usb devices using pl2303 exist with
different device ids. This patch adds a missing device ID so it
is recognised by the driver.

Signed-off-by: Marcel J.E. Mol &lt;marcel@mesa.nl&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=d07830db1bdb254e4b50d366010b219286b8c937'>Diffstat</a> (limited to 'net/ipv4/cipso_ipv4.c')</div><table summary='diffstat' class='diffstat'>