Skip to content

kprobes: Fix %p in kprobes

Masami Hiramatsu linux-arch lkml stable 4 versions – New

Get series with b4
b4 am 152491886943.9916.18051658590418236184.stgit@devbox

Versions newest first · linked by author and title

  1. v4 Latest7 patches 0 repliesNew
  2. v37 patches 11 repliesSuperseded
  3. v27 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches3 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7kprobes: Make list and blacklist root user read onlykernel/kprobes.c+2 -20 replies
2/7kprobes: Show blacklist addresses as same as kallsyms doeskernel/kprobes.c+10 -20 replies
3/7kprobes: Show address of kprobes if kallsyms doeskernel/kprobes.c+9 -50 replies
4/7kprobes: Replace %p with other pointer typeskernel/kprobes.c+10 -120 replies
5/7kprobes/x86: Fix %p uses in error messagesarch/x86/kernel/kprobes/core.c+4 -90 replies
6/7kprobes/arm: Fix %p uses in error messagesarch/arm/probes/kprobes/core.c arch/arm/probes/kprobes/test-core.c+5 -60 replies
7/7kprobes/arm64: Fix %p uses in error messagesarch/arm64/kernel/probes/kprobes.c+2 -20 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchWill Deacon
1/7
2/7
3/7
4/7
5/7
6/7
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/7] kprobes: Fix %p in kprobes

Hi,

This 4th version of the series which fixes %p uses in kprobes. Some by replacing with %pS, some by replacing with %px but masking with kallsyms_show_value().

I've read the thread about %pK and if I understand correctly we shouldn't print kernel addresses. However, kprobes debugfs interface can not stop to show the actual probe address because it should be compared with addresses in kallsyms for debugging. So, it depends on that kallsyms_show_value() allows to show address to user, because if it returns true, anyway that user can dump /proc/kallsyms.
Other error messages are replaced it with %pS or just removed.

This series also including fixes for arch ports too.

Changes in this version;
[1/7] Fix "list" file's mode too.
[2/7] Do not use local variables and fix comment. [4/7] Use WARN_ONCE() for single bug. [5/7] Just remove %p.

Thank you,

---

Masami Hiramatsu (7):
kprobes: Make list and blacklist root user read only
kprobes: Show blacklist addresses as same as kallsyms does
kprobes: Show address of kprobes if kallsyms does
kprobes: Replace %p with other pointer types kprobes/x86: Fix %p uses in error messages kprobes/arm: Fix %p uses in error messages kprobes/arm64: Fix %p uses in error messages

 arch/arm/probes/kprobes/core.c      |   10 +++----
 arch/arm/probes/kprobes/test-core.c |    1 -
 arch/arm64/kernel/probes/kprobes.c  |    4 +--
 arch/x86/kernel/kprobes/core.c      |   13 +++------
 kernel/kprobes.c                    |   52 +++++++++++++++++++++--------------
 5 files changed, 42 insertions(+), 38 deletions(-)