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: <5E6B11BD.3070700@samsung.com>
Date:   Fri, 13 Mar 2020 13:53:17 +0900
From:   Jaewon Kim <jaewon31.kim@...sung.com>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     akpm@...ux-foundation.org, labbott@...hat.com,
        sumit.semwal@...aro.org, minchan@...nel.org, ngupta@...are.org,
        sergey.senozhatsky.work@...il.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, jaewon31.kim@...il.com
Subject: Re: [RFC PATCH 1/3] proc/meminfo: introduce extra meminfo



On 2020년 03월 12일 02:35, Alexey Dobriyan wrote:
> On Wed, Mar 11, 2020 at 12:44:39PM +0900, Jaewon Kim wrote:
>> Provide APIs to drivers so that they can show its memory usage on
>> /proc/meminfo.
>>
>> int register_extra_meminfo(atomic_long_t *val, int shift,
>> 			   const char *name);
>> int unregister_extra_meminfo(atomic_long_t *val);
>> +			show_val_kb(m, memtemp->name_pad, nr_page);
> I have 3 issues.
>
> Can this be printed without "KB" piece and without useless whitespace,
> like /proc/vmstat does?
>
> I don't know how do you parse /proc/meminfo.
> Do you search for specific string or do you use some kind of map[k] = v
> interface?
If need, I can remove KB. but show_free_areas also seems to print KB for some stats.
And I intentionally added : and space to be same format like others in /proc/meminfo.
show_val_kb(m, "MemTotal:       ", i.totalram);
>
> 2) zsmalloc can create top-level symlink and resolve it to necessary value.
> It will be only 1 readlink(2) system call to fetch it.
Yes it could be done by userspace readlink systemcall. But I wanted to see
all huge memory stats on one node of /proc/meminfo.
>
> 3) android can do the same
>
> For simple values there is no need to register stuff and create
> mini subsystems.
>
> 	/proc/alexey
OK as Leon Romanovsky said, I may be able to move other node of /proc/meminfo_extra.
Please let me know if it still have a point to be reviewed.

Thank you
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ