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:   Wed, 24 Mar 2021 00:10:18 -0700
From:   John Hubbard <jhubbard@...dia.com>
To:     Minchan Kim <minchan@...nel.org>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        <gregkh@...uxfoundation.org>, <surenb@...gle.com>,
        <joaodias@...gle.com>, <willy@...radead.org>, <digetx@...il.com>
Subject: Re: [PATCH v6] mm: cma: support sysfs

On 3/23/21 11:57 PM, Minchan Kim wrote:
...
>> , how about approximately this:
>>
>> struct cma_kobject_wrapper {
>> 	struct cma *parent;
>> 	struct kobject kobj;
>> };
>>
>> struct cma {
>> ...
>> 	struct cma_kobject_wrapper *cma_kobj_wrapper;
>> };
>>
>>
>> ...thus allowing readers of cma_sysfs.c to read that file more easily.
> 
> I agree cma->kobj->kobj is awkward but personally, I don't like the
> naming: cma_kobject_wrapper parent pointer. cma_kobject is alredy
> wrapper so it sounds me redundant and it's not a parent in same
> hierarchy.
> 
> Since the kobj->kobj is just one line in the code(I don't imagine
> it could grow up in cma_sysfs in future), I don't think it would
> be a problem. If we really want to make it more clear, maybe?
> 
>     cma->cma_kobj->kobj
> 
> It would be consistent with other variables in cma_sysfs_init.
> 

OK, that's at least better than it was.

thanks,
-- 
John Hubbard
NVIDIA

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ