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:   Tue, 3 Mar 2020 11:32:33 +0100
From:   Miklos Szeredi <miklos@...redi.hu>
To:     Steven Whitehouse <swhiteho@...hat.com>
Cc:     David Howells <dhowells@...hat.com>, Ian Kent <raven@...maw.net>,
        Christian Brauner <christian.brauner@...ntu.com>,
        James Bottomley <James.Bottomley@...senpartnership.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>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17]

On Tue, Mar 3, 2020 at 11:22 AM Steven Whitehouse <swhiteho@...hat.com> wrote:
>
> Hi,
>
> On 03/03/2020 09:48, Miklos Szeredi wrote:
> > On Tue, Mar 3, 2020 at 10:26 AM Miklos Szeredi <miklos@...redi.hu> wrote:
> >> On Tue, Mar 3, 2020 at 10:13 AM David Howells <dhowells@...hat.com> wrote:
> >>> Miklos Szeredi <miklos@...redi.hu> wrote:
> >>>
> >>>> I'm doing a patch.   Let's see how it fares in the face of all these
> >>>> preconceptions.
> >>> Don't forget the efficiency criterion.  One reason for going with fsinfo(2) is
> >>> that scanning /proc/mounts when there are a lot of mounts in the system is
> >>> slow (not to mention the global lock that is held during the read).
> > BTW, I do feel that there's room for improvement in userspace code as
> > well.  Even quite big mount table could be scanned for *changes* very
> > efficiently.  l.e. cache previous contents of /proc/self/mountinfo and
> > compare with new contents, line-by-line.  Only need to parse the
> > changed/added/removed lines.
> >
> > Also it would be pretty easy to throttle the number of updates so
> > systemd et al. wouldn't hog the system with unnecessary processing.
> >
> > Thanks,
> > Miklos
> >
>
> At least having patches to compare would allow us to look at the
> performance here and gain some numbers, which would be helpful to frame
> the discussions. However I'm not seeing how it would be easy to throttle
> updates... they occur at whatever rate they are generated and this can
> be fairly high. Also I'm not sure that I follow how the notifications
> and the dumping of the whole table are synchronized in this case, either.

What I meant is optimizing current userspace without additional kernel
infrastructure.   Since currently there's only the monolithic
/proc/self/mountinfo, it's reasonable that if the rate of change is
very high, then we don't re-read this table on every change, only
within a reasonable time limit (e.g. 1s) to provide timely updates.
Re-reading the table on every change would (does?) slow down the
system so that the actual updates would even be slower, so throttling
in this case very much  makes sense.

Once we have per-mount information from the kernel, throttling updates
probably does not make sense.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ