lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Apr 2022 19:48:29 -0400
From:   Kent Overstreet <kent.overstreet@...il.com>
To:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-fsdevel@...r.kernel.org
Cc:     Kent Overstreet <kent.overstreet@...il.com>, hch@....de,
        hannes@...xchg.org, akpm@...ux-foundation.org,
        linux-clk@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-input@...r.kernel.org, roman.gushchin@...ux.dev
Subject: [PATCH v2 0/8] Printbufs & improved shrinker debugging

v1 of this patch series here:
https://lore.kernel.org/linux-mm/20220419203202.2670193-1-kent.overstreet@gmail.com/T/

Changes since v1:

 - Converted some, not all, seq_buf code to printbufs (thanks Christoph for
   pointing out seq_buf).

   The seq_buf code I didn't convert is arch specific code where the memory
   allocation context is unclear, and they're using seq_buf to do everything on
   the stack. I'm considering adding a mode to printbufs where we point it at an
   external buffer instead - it wouldn't be much code, but OTOH seq_buf isn't
   much code either and it seems to be somewhat tied to tracing infrastructure.
   Deferring a decision on what to do for now.

 - pr_human_readable_u64() now uses string_get_size() (thanks Matthew for
   pointing this one out)

 - added new helpers printbuf_str() for getting a guaranteed-null-terminated
   string, and printbuf_atomic_inc() and printbuf_atomic_dec() for marking
   sections where allocations must be GFP_ATOMIC.

 - Broke out shrinker_to_text(): this new helper could be used by new sysfs or
   debugfs code, for displaying information about a single shrinker (as Roman is
   working on)

 - Added new tracking, per shrinker, for # of objects requested to be freed and
   # actually freed. Shrinkers won't necessarily free all objects requested for
   perfectly legitimate reasons, but if the two numbers are wildly off then
   that's going to lead to memory reclaim issues - these are both also included
   in shrinker_to_text().

Kent Overstreet (8):
  lib/printbuf: New data structure for heap-allocated strings
  Input/joystick/analog: Convert from seq_buf -> printbuf
  mm/memcontrol.c: Convert to printbuf
  clk: tegra: bpmp: Convert to printbuf
  mm: Add a .to_text() method for shrinkers
  mm: Count requests to free & nr freed per shrinker
  mm: Move lib/show_mem.c to mm/
  mm: Centralize & improve oom reporting in show_mem.c

 drivers/clk/tegra/clk-bpmp.c    |  21 ++-
 drivers/input/joystick/analog.c |  37 +++--
 include/linux/printbuf.h        | 164 +++++++++++++++++++
 include/linux/shrinker.h        |   8 +
 lib/Makefile                    |   4 +-
 lib/printbuf.c                  | 274 ++++++++++++++++++++++++++++++++
 mm/Makefile                     |   2 +-
 mm/memcontrol.c                 |  68 ++++----
 mm/oom_kill.c                   |  23 ---
 {lib => mm}/show_mem.c          |  14 ++
 mm/slab.h                       |   6 +-
 mm/slab_common.c                |  53 +++++-
 mm/vmscan.c                     |  88 ++++++++++
 13 files changed, 666 insertions(+), 96 deletions(-)
 create mode 100644 include/linux/printbuf.h
 create mode 100644 lib/printbuf.c
 rename {lib => mm}/show_mem.c (77%)

-- 
2.35.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ