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:   Fri, 19 Aug 2022 10:12:34 +0800
From:   haoxin <xhao@...ux.alibaba.com>
To:     SeongJae Park <sj@...nel.org>
Cc:     akpm@...ux-foundation.org, damon@...ts.linux.dev,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 1/2] mm/damon/lru_sort: Move target memory region check
 to head of func


在 2022/8/19 上午1:11, SeongJae Park 写道:
> Hi Xin,
>
>
> On Thu, 18 Aug 2022 18:57:31 +0800 Xin Hao <xhao@...ux.alibaba.com> wrote:
>
>> In damon_lru_sort_apply_parameters(), if "monitor_region_start"
>> and "monitor_region_end" is not a valid physical address range,
>> There no need to run the remainder codes in it.
> The function, 'damon_lru_sort_apply_parameters()', checks validity of
> parameters and construct the DAMON context one by one.  For example,
> 'damon_set_attrs()' returns an error if the parameters are invalid.  So the
> intended flow is,
>
> 1. check DAMON attributes parameters,
> 2. apply DAMON attributes parameters,
> 3. check scheme parameters,
> 4. apply scheme parameters,
> 5. check target region parameters, and
> 6. apply target region parameters.
>
> Therefore what this patch does is making the target regions validity check to
> be done earlier than validity checks of other parameters.  There is no special
> reason to check the region earlier than others.  Also, this change makes the
> flow of the function a little bit weird in my humble opinion, as the flow will
> be
>
> 1. check target region parameters,
> 2. check DAMON attributes parameters,
> 3. apply DAMON attributes parameters,
> 4. check scheme parameters,
> 5. apply scheme parameters, and
> 6. apply target region parameters.

Ok, understand what you mean,   my fix looks ugly,  buy any apply above 
are not not necessary if one of them checks failed, why not check all 
fisrt and then apply them, like this:

1. check target region parameters,

2. check DAMON attributes parameters,

3. check scheme parameters,

>
> So I'd argue this patch seems not really needed, sorry.
>
>
> Thanks,
> SJ
>
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ