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-next>] [day] [month] [year] [list]
Message-Id: <20250220194646.37726-1-sj@kernel.org>
Date: Thu, 20 Feb 2025 11:46:38 -0800
From: SeongJae Park <sj@...nel.org>
To: 
Cc: SeongJae Park <sj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jonathan Corbet <corbet@....net>,
	damon@...ts.linux.dev,
	kernel-team@...a.com,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: [PATCH 0/8] mm/damon: add sysfs dirs for managing DAMOS filters based on handling layers

DAMOS filters are categorized into two groups based on their handling
layers, namely core and operations layers.  The categorization affects
when each filter is evaluated.  Core layer handled filters are evaluated
first.  The order meant nothing before, but introduction of allow
filters changed that.

DAMOS sysfs interface provides single directory for filters, namely
'filters'.  Users can install any filters in any order there.  DAMON
will internally categorize those into core and operations layer handled
ones, and apply the evaluation order rule.  The ordering rule is clearly
documented.  But the interface could still confuse users since it is
allowed to install filters on the directory in mixed ways.

Add two sysfs directories for managing filters by handling layer, namely
'core_filters' and 'ops_filters' for filters that handled by core and
operations layer, respectively.  Those are avoided to be used for
installing filters that not handled by the assumed layer.

For backward compatibility, keep 'filters' directory with its curernt
behavior.  Filters installed in the directory will be added to DAMON
after those of 'core_filters' and 'ops_filters' directories, with the
automatic categorizations.  Also recommend users to use the new
directories, and noticee 'filters' directory could be deprecated in
future.

Note that new directories provide all features that were provided with
'filters', but just in a more clear way.  Deprecating 'filters' is not
expected to make an irreversal breakge.

Also note that this patch series depend on filters default
behavior change patch series[1].

[1] https://lore.kernel.org/20250220193509.36379-1-sj@kernel.org

SeongJae Park (8):
  mm/damon/sysfs-schemes: let damon_sysfs_scheme_set_filters() be used
    for different named directories
  mm/damon/sysfs-schemes: implement core_filters and ops_filters
    directories
  mm/damon/sysfs-schemes: commit filters in {core,ops}_filters
    directories
  mm/damon/core: expose damos_filter_for_ops() to DAMON kernel API
    callers
  mm/damon/sysfs-schemes: set filters handling layer of directories
  mm/damon/sysfs-schemes: return error for wrong filter type on given
    directory
  Docs/ABI/damon: document {core,ops}_filters directories
  Docs/admin-guide/mm/damon/usage: update for {core,ops}_filters
    directories

 .../ABI/testing/sysfs-kernel-mm-damon         |  16 +++
 Documentation/admin-guide/mm/damon/usage.rst  |  31 +++--
 include/linux/damon.h                         |   1 +
 mm/damon/core.c                               |   9 +-
 mm/damon/sysfs-schemes.c                      | 119 ++++++++++++++++--
 5 files changed, 153 insertions(+), 23 deletions(-)


base-commit: c6ff92c642d665270c718aece87bc33d264d2c00
-- 
2.39.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ