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]
Message-Id: <20220223171341.29010-1-sj@kernel.org>
Date:   Wed, 23 Feb 2022 17:13:41 +0000
From:   SeongJae Park <sj@...nel.org>
To:     SeongJae Park <sj@...nel.org>
Cc:     Greg KH <gregkh@...uxfoundation.org>, akpm@...ux-foundation.org,
        corbet@....net, skhan@...uxfoundation.org, rientjes@...gle.com,
        xhao@...ux.alibaba.com, linux-damon@...zon.com, linux-mm@...ck.org,
        linux-doc@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/12] mm/damon: Implement a minimal stub for sysfs-based DAMON interface

On Wed, 23 Feb 2022 16:45:13 +0000 SeongJae Park <sj@...nel.org> wrote:

> On Wed, 23 Feb 2022 17:09:38 +0100 Greg KH <gregkh@...uxfoundation.org> wrote:
> 
> > On Wed, Feb 23, 2022 at 03:20:42PM +0000, SeongJae Park wrote:
> > > +static struct kobj_attribute damon_sysfs_ul_range_min_attr =
> > > +		__ATTR(min, 0600, damon_sysfs_ul_range_min_show,
> > > +				damon_sysfs_ul_range_min_store);
> > > +
> > > +static struct kobj_attribute damon_sysfs_ul_range_max_attr =
> > > +		__ATTR(max, 0600, damon_sysfs_ul_range_max_show,
> > > +				damon_sysfs_ul_range_max_store);
> > 
> > Can you use __ATTR_RW_MODE() instead here and elsewhere?
> 
> Sure, I will, in the next revision.

After thinking once more, I realized that it might not so simple.  First of
all, there are two files having same name in different directories
(kdamonds/<N>/pid and targets/<N>/pid).  The files work differently, so I need
to use different _show/_store callbacks for them but __ATTR_RW_MODE() wouldn't
support the case.

Secondly, I'd like to keep the file names short because the meaning of the
files can easily inferred from the hierarchy, but want to keep the _show/_store
callback names to have prefixes that allows us easily know their meaning and
usage even though it makes the name a little bit longer because I don't want to
have too much source files for DAMON sysfs interface.

Am I missing some of your point?


Thanks,
SJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ