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: <20251030020746.967174-1-yanquanmin1@huawei.com>
Date: Thu, 30 Oct 2025 10:07:44 +0800
From: Quanmin Yan <yanquanmin1@...wei.com>
To: <sj@...nel.org>
CC: <akpm@...ux-foundation.org>, <damon@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
	<yanquanmin1@...wei.com>, <wangkefeng.wang@...wei.com>, <zuoze1@...wei.com>
Subject: [PATCH v2 0/2] mm/damon: fixes for the jiffies-related issues

On 32-bit systems, the kernel initializes jiffies to "-5 minutes" to
make jiffies wrap bugs appear earlier. However, this may cause the
time_before() series of functions to return unexpected values, resulting
in DAMON not functioning as intended. Meanwhile, similar issues exist
in some specific user operation scenarios.

This patchset addresses these issues. The first patch is about the
DAMON_STAT module, and the second patch is about the core layer's sysfs.

Changes from v1
(https://lore.kernel.org/all/20251028061927.1378746-1-yanquanmin1@huawei.com/)
- Added commit information describing another similar issue. (found by SJ)
- Making last_refresh_jiffies a global variable and initialize it on
  damon_stat_start(). (suggested by SJ)
- Added a new patch that fixes the same root cause issue in the core
  layer's sysfs. (found and suggested by SJ)

Quanmin Yan (2):
  mm/damon/stat: change last_refresh_jiffies to a global variable
  mm/damon/sysfs: change next_update_jiffies to a global variable

 mm/damon/stat.c  |  9 ++++++---
 mm/damon/sysfs.c | 10 +++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ