linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] wchan: Fix ORC support and leaky fallback
@ 2021-09-24  6:20 Kees Cook
  2021-09-24  6:20 ` [PATCH 1/3] Revert "proc/wchan: use printk format instead of lookup_symbol_name()" Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kees Cook @ 2021-09-24  6:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kees Cook, Helge Deller, Qi Zheng, Vito Caputo, Josh Poimboeuf,
	Jann Horn, Tobin C. Harding, Tycho Andersen, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H. Peter Anvin, Mark Rutland,
	Jens Axboe, Peter Zijlstra, Andy Lutomirski, Lai Jiangshan,
	Stefan Metzmacher, Dave Hansen, Christian Brauner, Michal Hocko,
	Eric W. Biederman, Randy Dunlap, Ohhoon Kwon, YiFei Zhu,
	kernel test robot, linux-kernel, stable, linux-hardening, x86,
	linux-fsdevel

Hi,

This attempts to solve the issues from the discussion
here[1]. Specifically:

1) wchan has been broken under ORC, seen as a failure to stack walk
   resulting in _usually_ a 0 value, since ee9f8fce9964 (v4.14).

2) wchan leaking raw addresses since 152c432b128c (v5.12).

Based on what I can see in the stack walking code, the fix should be
safe. Jann may have more thoughts, but from what I can see, the walker
pins the stack, decodes only a single step, etc.

I'd like Josh's review of Qi Zheng's patch, though. :)

It's also not clear to me what impact this had on kernel/sched/fair.c:
it would have also been seeing 0s, so this may be fixing a bug there too.

Thanks!

-Kees

[1] https://lore.kernel.org/lkml/20210924054647.v6x6risoa4jhuu6s@shells.gnugeneration.com/

Kees Cook (2):
  Revert "proc/wchan: use printk format instead of lookup_symbol_name()"
  leaking_addresses: Always print a trailing newline

Qi Zheng (1):
  x86: Fix get_wchan() to support the ORC unwinder

 arch/x86/kernel/process.c    | 51 +++---------------------------------
 fs/proc/base.c               | 19 ++++++++------
 scripts/leaking_addresses.pl |  3 ++-
 3 files changed, 16 insertions(+), 57 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-24  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24  6:20 [PATCH 0/3] wchan: Fix ORC support and leaky fallback Kees Cook
2021-09-24  6:20 ` [PATCH 1/3] Revert "proc/wchan: use printk format instead of lookup_symbol_name()" Kees Cook
2021-09-24  8:17   ` Helge Deller
2021-09-24  6:20 ` [PATCH 2/3] leaking_addresses: Always print a trailing newline Kees Cook
2021-09-24  6:20 ` [PATCH 3/3] x86: Fix get_wchan() to support the ORC unwinder Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).