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: <20240309015311.45954-1-sj@kernel.org>
Date: Fri,  8 Mar 2024 17:53:11 -0800
From: SeongJae Park <sj@...nel.org>
To: SeongJae Park <sj@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	honggyu.kim@...com,
	hyeongtak.ji@...com,
	kernel_team@...ynix.com,
	damon@...ts.linux.dev,
	linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/3] mm/damon/paddr: support DAMOS filter type YOUNG

On Wed,  6 Mar 2024 19:00:13 -0800 SeongJae Park <sj@...nel.org> wrote:

> DAMOS filter of type YOUNG is defined, but not yet implemented by any
> DAMON operations set.  Add the implementation to the DAMON operations
> set for the physical address space, paddr.
> 
> Signed-off-by: SeongJae Park <sj@...nel.org>
> ---
>  mm/damon/paddr.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
> index deee0fdf2e5b..52e4be7351cc 100644
> --- a/mm/damon/paddr.c
> +++ b/mm/damon/paddr.c
> @@ -209,6 +209,9 @@ static bool __damos_pa_filter_out(struct damos_filter *filter,
>  			matched = filter->memcg_id == mem_cgroup_id(memcg);
>  		rcu_read_unlock();
>  		break;
> +	case DAMOS_FILTER_TYPE_YOUNG:
> +		matched = damon_folio_young(folio);
> +		break;

damon_folio_young() doesn't reset the Accessed bit of the folio.  Hence, unless
something is resetting the bit, this damon_folio_young() call will repeatedly
return true even if there was no access to the folio since last check.  We
should implement Accessed bit test-and-reset variant of this function and
replace this, or call damon_pa_mkold() when 'matched' is 'true'.

I will fix this in the next spin.


Thanks,
SJ


>  	default:
>  		break;
>  	}
> -- 
> 2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ