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:   Thu, 10 Nov 2022 08:53:26 +0800
From:   JunChao Sun <sunjunchao2870@...il.com>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     linux-ext4@...r.kernel.org, tytso@....edu,
        adilger.kernel@...ger.ca, jack@...e.cz
Subject: Re: [PATCH] ext4: replace kmem_cache_create with KMEM_CACHE

Yeah, maybe we should remove the SLAB_RECLAIM_ACCOUNT flag for static
slab, and 16828088f9e51815 ("ext4: use KMEM_CACHE instead of
kmem_cache_create") have done so. But should we remove
SLAB_RECLAIM_ACCOUNT in this patch or belong to a separate patch?

Eric Biggers <ebiggers@...nel.org> 于2022年11月10日周四 02:00写道:
>
> On Wed, Nov 09, 2022 at 07:38:22AM -0800, JunChao Sun wrote:
> > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
> > index 3d21eae267fc..773176e7f9f5 100644
> > --- a/fs/ext4/readpage.c
> > +++ b/fs/ext4/readpage.c
> > @@ -410,9 +410,8 @@ int ext4_mpage_readpages(struct inode *inode,
> >
> >  int __init ext4_init_post_read_processing(void)
> >  {
> > -     bio_post_read_ctx_cache =
> > -             kmem_cache_create("ext4_bio_post_read_ctx",
> > -                               sizeof(struct bio_post_read_ctx), 0, 0, NULL);
> > +     bio_post_read_ctx_cache = KMEM_CACHE(bio_post_read_ctx, SLAB_RECLAIM_ACCOUNT);
> > +
>
> Why use SLAB_RECLAIM_ACCOUNT here?
>
> - Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ