Skip to content

wchan: Fix wchan support

Peter Zijlstra linux-arch linux-hardening lkml stable 1 version Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 16 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/7Revert "proc/wchan: use printk format instead of lookup_symbol_name()"fs/proc/base.c+12 -90 replies
2/7leaking_addresses: Always print a trailing newlinescripts/leaking_addresses.pl+2 -10 replies
3/7proc: Use task_is_running() for wchan in /proc/$pid/statfs/proc/array.c+2 -50 replies
4/7x86: Fix get_wchan() to support the ORC unwinderarch/x86/kernel/process.c+3 -480 replies
5/7sched: Add wrapper for get_wchan() to keep task blockedarch/alpha/include/asm/processor.h arch/alpha/kernel/process.c arch/arc/include/asm/processor.h +47 more+80 -1123 replies
6/7arch: __get_wchan || STACKTRACE_SUPPORTarch/arc/include/asm/processor.h arch/arc/kernel/stacktrace.c arch/arm/include/asm/processor.h +37 more+16 -4768 replies
7/7arch: Fix STACKTRACE_SUPPORTarch/csky/kernel/stacktrace.c arch/mips/kernel/stacktrace.c arch/nds32/kernel/stacktrace.c+33 -222 replies

Reviews trailers per patch

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

PatchGeert UytterhoevenMark RutlandRussell King (Oracle)
1/7
2/7
3/7
4/7
5/7A-b T-b A-b
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/7] wchan: Fix wchan support

Hi,

This fixes up wchan which is various degrees of broken across the architectures.

Patch 4 fixes wchan for x86, which has been returning 0 for the past many releases.

Patch 5 fixes the fundamental race against scheduling.

Patch 6 deletes a lot and makes STACKTRACE unconditional

patch 7 fixes up a few STACKTRACE arch oddities

0day says all builds are good, so it must be perfect :-) I'm planning on queueing up at least the first 5 patches, but I'm hoping the last two patches can be too.

Also available here:

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wchan

---
 arch/alpha/include/asm/processor.h      |  2 +-
 arch/alpha/kernel/process.c             |  5 ++-
 arch/arc/include/asm/processor.h        |  2 --
 arch/arc/kernel/stacktrace.c            | 19 +---------
 arch/arm/include/asm/processor.h        |  2 --
 arch/arm/kernel/process.c               | 24 -------------
 arch/arm64/include/asm/processor.h      |  2 --
 arch/arm64/kernel/process.c             | 28 ---------------
 arch/csky/include/asm/processor.h       |  2 --
 arch/csky/kernel/stacktrace.c           | 26 ++++----------
 arch/h8300/include/asm/processor.h      |  2 +-
 arch/h8300/kernel/process.c             |  5 +--
 arch/hexagon/include/asm/processor.h    |  3 --
 arch/hexagon/kernel/process.c           | 28 ---------------
 arch/ia64/include/asm/processor.h       |  3 --
 arch/ia64/kernel/process.c              | 31 -----------------
 arch/m68k/include/asm/processor.h       |  2 +-
 arch/m68k/kernel/process.c              |  4 +--
 arch/microblaze/include/asm/processor.h |  2 --
 arch/microblaze/kernel/process.c        |  6 ----
 arch/mips/include/asm/processor.h       |  2 --
 arch/mips/kernel/process.c              | 31 +----------------
 arch/mips/kernel/stacktrace.c           | 27 ++++++++------
 arch/nds32/include/asm/processor.h      |  2 --
 arch/nds32/kernel/process.c             | 28 ---------------
 arch/nds32/kernel/stacktrace.c          | 21 +++++------
 arch/nios2/include/asm/processor.h      |  2 +-
 arch/nios2/kernel/process.c             |  5 +--
 arch/openrisc/include/asm/processor.h   |  1 -
 arch/openrisc/kernel/process.c          |  6 ----
 arch/parisc/include/asm/processor.h     |  2 --
 arch/parisc/kernel/process.c            | 27 --------------
 arch/powerpc/include/asm/processor.h    |  2 --
 arch/powerpc/kernel/process.c           | 40 ---------------------
 arch/riscv/include/asm/processor.h      |  3 --
 arch/riscv/kernel/stacktrace.c          | 23 ------------
 arch/s390/include/asm/processor.h       |  1 -
 arch/s390/kernel/process.c              | 29 ---------------
 arch/sh/include/asm/processor_32.h      |  2 --
 arch/sh/kernel/process_32.c             | 22 ------------
 arch/sparc/include/asm/processor_32.h   |  2 +-
 arch/sparc/include/asm/processor_64.h   |  2 --
 arch/sparc/kernel/process_32.c          |  5 +--
 arch/sparc/kernel/process_64.c          | 31 -----------------
 arch/um/include/asm/processor-generic.h |  1 -
 arch/um/kernel/process.c                | 35 -------------------
 arch/x86/include/asm/processor.h        |  2 --
 arch/x86/kernel/process.c               | 62 ---------------------------------
 arch/xtensa/include/asm/processor.h     |  2 --
 arch/xtensa/kernel/process.c            | 32 -----------------
 fs/proc/array.c                         |  7 ++--
 fs/proc/base.c                          | 19 +++++-----
 include/linux/sched.h                   |  1 +
 kernel/sched/core.c                     | 34 ++++++++++++++++++
 lib/Kconfig.debug                       |  7 +---
 scripts/leaking_addresses.pl            |  3 +-
 56 files changed, 97 insertions(+), 622 deletions(-)