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, 4 Mar 2020 18:55:56 +0100
From:   Karel Zak <kzak@...hat.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Ian Kent <raven@...maw.net>, Miklos Szeredi <miklos@...redi.hu>,
        David Howells <dhowells@...hat.com>,
        Christian Brauner <christian.brauner@...ntu.com>,
        James Bottomley <James.Bottomley@...senpartnership.com>,
        Steven Whitehouse <swhiteho@...hat.com>,
        Miklos Szeredi <mszeredi@...hat.com>,
        viro <viro@...iv.linux.org.uk>,
        Christian Brauner <christian@...uner.io>,
        Jann Horn <jannh@...gle.com>,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        Linux API <linux-api@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver
 #17]

On Wed, Mar 04, 2020 at 05:49:13PM +0100, Greg Kroah-Hartman wrote:
> On Wed, Mar 04, 2020 at 04:22:41PM +0100, Karel Zak wrote:
> > $ strace -e openat,read,close -c ps aux
> > ...
> > % time     seconds  usecs/call     calls    errors syscall
> > ------ ----------- ----------- --------- --------- ----------------
> >  43.32    0.004190           4       987           read
> >  31.42    0.003039           3       844         4 openat
> >  25.26    0.002443           2       842           close
> > ------ ----------- ----------- --------- --------- ----------------
> > 100.00    0.009672                  2673         4 total
> > 
> > $ strace -e openat,read,close -c lsns
> > ...
> > % time     seconds  usecs/call     calls    errors syscall
> > ------ ----------- ----------- --------- --------- ----------------
> >  39.95    0.001567           2       593           openat
> >  30.93    0.001213           2       597           close
> >  29.12    0.001142           3       365           read
> > ------ ----------- ----------- --------- --------- ----------------
> > 100.00    0.003922                  1555           total
> > 
> > 
> > $ strace -e openat,read,close -c lscpu
> > ...
> > % time     seconds  usecs/call     calls    errors syscall
> > ------ ----------- ----------- --------- --------- ----------------
> >  44.67    0.001480           7       189        52 openat
> >  34.77    0.001152           6       180           read
> >  20.56    0.000681           4       140           close
> > ------ ----------- ----------- --------- --------- ----------------
> > 100.00    0.003313                   509        52 total
> 
> As a "real-world" test, would you recommend me converting one of the
> above tools to my implementation of readfile to see how/if it actually
> makes sense, or do you have some other tool you would rather see me try?

See lib/path.c and lib/sysfs.c in util-linux (https://github.com/karelzak/util-linux). 
For example ul_path_read() and ul_path_scanf(). 

We use it for lsblk, lsmem, lscpu, etc.

 $ git grep -c ul_path_read misc-utils/lsblk.c sys-utils/lscpu.c
 misc-utils/lsblk.c:30
 sys-utils/lscpu.c:31

We're probably a little bit off-topic here, no problem to continue on
util-linux@...r.kernel.org or by private mails. Thanks!

    Karel

-- 
 Karel Zak  <kzak@...hat.com>
 http://karelzak.blogspot.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ