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: <20211019115242.GH3255@quack2.suse.cz>
Date:   Tue, 19 Oct 2021 13:52:42 +0200
From:   Jan Kara <jack@...e.cz>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     Gabriel Krisman Bertazi <krisman@...labora.com>,
        Jan Kara <jack@...e.com>,
        "Darrick J. Wong" <djwong@...nel.org>,
        Theodore Tso <tytso@....edu>,
        Dave Chinner <david@...morbit.com>,
        David Howells <dhowells@...hat.com>,
        Khazhismel Kumykov <khazhy@...gle.com>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Ext4 <linux-ext4@...r.kernel.org>,
        Linux API <linux-api@...r.kernel.org>, kernel@...labora.com
Subject: Re: [PATCH v8 19/32] fanotify: Pre-allocate pool of error events

On Tue 19-10-21 08:38:34, Amir Goldstein wrote:
> On Tue, Oct 19, 2021 at 3:03 AM Gabriel Krisman Bertazi
> <krisman@...labora.com> wrote:
> >
> > Pre-allocate slots for file system errors to have greater chances of
> > succeeding, since error events can happen in GFP_NOFS context.  This
> > patch introduces a group-wide mempool of error events, shared by all
> > FAN_FS_ERROR marks in this group.
> >
> > For now, just allocate 128 positions.  A future patch allows this
> > array to be dynamically resized when a new mark is added.
> >
> > Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
> >
> > ---
> > Changes since v7:
> >   - Expand limit to 128. (Amir)
> 
> I am not sure if Jan was also on board with this request but otherwise
> 
> Reviewed-by: Amir Goldstein <amir73il@...il.com>

I don't really care. I don't see a strong reason to go above original 32
(so I'd slightly prefer that) but OTOH I also don't think those few KB per
notification group using FS_ERROR matter since I don't expect such groups
to be that common.

> > diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
> > index 66ee3c2805c7..f77581c5b97f 100644
> > --- a/fs/notify/fanotify/fanotify_user.c
> > +++ b/fs/notify/fanotify/fanotify_user.c
> > @@ -30,6 +30,7 @@
> >  #define FANOTIFY_DEFAULT_MAX_EVENTS    16384
> >  #define FANOTIFY_OLD_DEFAULT_MAX_MARKS 8192
> >  #define FANOTIFY_DEFAULT_MAX_GROUPS    128
> > +#define FANOTIFY_DEFAULT_MAX_FEE_POOL  128

Perhaps FANOTIFY_DEFAULT_FEE_POOL_SIZE would better describe what this
constant is about?

Otherwise feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ