Commit Graph

9 Commits

Author SHA1 Message Date
Ivan Orlov 125db341e2 docs, kprobes: Add riscv as supported architecture
Support of kprobes and kretprobes for riscv was introduced 3 years ago
by the following change:

commit c22b0bcb1d ("riscv: Add kprobes supported")

Add riscv to the list of supported architectures.

Signed-off-by: Ivan Orlov <ivan.orlov@codethink.co.uk>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240429155735.68781-1-ivan.orlov@codethink.co.uk
2024-05-02 10:05:25 -06:00
Tiezhu Yang ead8467f96 docs, kprobes: Add loongarch as supported architecture
After the following three changes at the beginning of the year:

  commit 6d4cc40fb5 ("LoongArch: Add kprobes support")
  commit 3f55368600 ("LoongArch: Add kretprobes support")
  commit 09e679c28a ("LoongArch: Add kprobes on ftrace support")

it is appropriate to add loongarch as supported architecture in
kprobes documentation.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231219062330.22813-3-yangtiezhu@loongson.cn
2024-01-11 09:36:37 -07:00
Tiezhu Yang b65a6b44f0 docs, kprobes: Update email address of Masami Hiramatsu
According to the latest authorship and Signed-off-by:

  Masami Hiramatsu (Google) <mhiramat@kernel.org>

Masami Hiramatsu is working at Google, so the current email @redhat.com
is out of date, it is better to use the email @kernel.org.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231219062330.22813-2-yangtiezhu@loongson.cn
2024-01-11 09:36:37 -07:00
Ard Biesheuvel 944834901a Documentation: Drop or replace remaining mentions of IA64
Drop or update mentions of IA64, as appropriate.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2023-09-11 08:13:18 +00:00
wuqiang 3b7ddab8a1 kprobes: kretprobe events missing on 2-core KVM guest
Default value of maxactive is set as num_possible_cpus() for nonpreemptable
systems. For a 2-core system, only 2 kretprobe instances would be allocated
in default, then these 2 instances for execve kretprobe are very likely to
be used up with a pipelined command.

Here's the testcase: a shell script was added to crontab, and the content
of the script is:

  #!/bin/sh
  do_something_magic `tr -dc a-z < /dev/urandom | head -c 10`

cron will trigger a series of program executions (4 times every hour). Then
events loss would be noticed normally after 3-4 hours of testings.

The issue is caused by a burst of series of execve requests. The best number
of kretprobe instances could be different case by case, and should be user's
duty to determine, but num_possible_cpus() as the default value is inadequate
especially for systems with small number of cpus.

This patch enables the logic for preemption as default, thus increases the
minimum of maxactive to 10 for nonpreemptable systems.

Link: https://lore.kernel.org/all/20221110081502.492289-1-wuqiang.matt@bytedance.com/

Signed-off-by: wuqiang <wuqiang.matt@bytedance.com>
Reviewed-by: Solar Designer <solar@openwall.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
2022-12-15 08:48:40 +09:00
Tiezhu Yang e94102e506 docs, kprobes: Fix the wrong location of Kprobes
After commit 22471e1313 ("kconfig: use a menu in arch/Kconfig to reduce
clutter"), the location of Kprobes is under "General architecture-dependent
options" rather than "General setup".

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Fixes: 22471e1313 ("kconfig: use a menu in arch/Kconfig to reduce clutter")
Link: https://lore.kernel.org/r/1663322106-12178-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:07:52 -06:00
Tiezhu Yang 438697a39f docs, kprobes: Remove invalid URL and add new reference
The following reference is invalid, remove it.
https://www.ibm.com/developerworks/library/l-kprobes/index.html

Add the following new reference "An introduction to KProbes":
https://lwn.net/Articles/132196/

Link: https://lkml.kernel.org/r/1635213091-24387-3-git-send-email-yangtiezhu@loongson.cn

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2021-10-26 17:23:46 -04:00
Peter Zijlstra ec6aba3d2b kprobes: Remove kprobe::fault_handler
The reason for kprobe::fault_handler(), as given by their comment:

 * We come here because instructions in the pre/post
 * handler caused the page_fault, this could happen
 * if handler tries to access user space by
 * copy_from_user(), get_user() etc. Let the
 * user-specified handler try to fix it first.

Is just plain bad. Those other handlers are ran from non-preemptible
context and had better use _nofault() functions. Also, there is no
upstream usage of this.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210525073213.561116662@infradead.org
2021-06-01 16:00:08 +02:00
Naveen N. Rao 2165b82fde docs: Move kprobes.rst from staging/ to trace/
Kprobes contitutes a dynamic tracing technology and as such can be
moved alongside documentation of other tracing technologies.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/8a09c01c64b2e003d5486c4f0c89740618f1bae4.1595331824.git.naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-07-23 14:01:24 -06:00