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] [day] [month] [year] [list]
Message-Id: <20211019100336.5861-1-sj@kernel.org>
Date:   Tue, 19 Oct 2021 10:03:36 +0000
From:   SeongJae Park <sj@...nel.org>
To:     Xin Hao <xhao@...ux.alibaba.com>
Cc:     sjpark@...zon.de, akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/damon/core: Optimize kdamod.%d thread creation code

Hello Xin,

On Sun, 17 Oct 2021 00:59:14 +0800 Xin Hao <xhao@...ux.alibaba.com> wrote:

> When the ctx->adaptive_targets list is empty,
> i did some test on monitor_on interface like this.
> 
> echo on > /sys/kernel/debug/damon/monitor_on
> [  851.988307] damon: kdamond (5390) starts
> 
> Though the ctx->adaptive_targets list is empty, but the
> kthread_run still be called, and the kdamond.x thread still
> be created, this is meaningless.

Good finding, thank you!

> 
> So there adds a judgment. only if the ctx->adaptive_targets
> list is not empty, and ctx->kdamond pointer is NULL, then call
> the __damon_start function.

I think we cannot believe user-space users, but kernel-space API users.  How
about adding the check in 'dbgfs_monitor_on_write()' rather than
'__damon_start()'?

Also, apparently this patch is based on latest 'damon/next' branch of my tree.
Could you please rebase this on latest -mm tree?


Thanks,
SJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ