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:   Fri, 04 May 2018 09:18:18 +0100
From:   David Woodhouse <dwmw2@...radead.org>
To:     yuyufen <yuyufen@...wei.com>
Cc:     Joakim.Tjernlund@...inera.com, viro@...iv.linux.org.uk,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] jffs2: safely remove obsolete dirent from the f->dents
 list



On Fri, 2018-05-04 at 16:06 +0800, yuyufen wrote:
> 
> > You've made JFFS2_INVALID_LIMIT 64, which is reasonable enough
> > (although it's a bit of a weird name and possibly wants to be more
> > specific — invalid *what*?).
>
> Thansk a lot for your suggestions.
> 
> Yes, it is really a bad name. How about JFFS2_OBS_DIRENT_LIMIT?  I am 
> not sure.

That'll do; at least it's a hint in the right direction :)

> >
> > So the maximum interesting value of ->obsolete_count is 64. Which means
> > it might as well be a uint8_t and sit in the padding after the
> > 'usercompr' field.
> >
> > It might be useful to look at putting the mutually exclusive fields in
> > struct jffs2_inode_info into a union, and then we don't need the
> > additional space of the atomic_t either; we'll never need that *and*
> > the fragtree at the same time... will we?
>
> You are right, thanks. But, obsolete_count may be large. So, I apply to 
> use uint16_t and it also sits in the padding after the 'usercompr' 
> field.

You can always just cap it. Once it reaches 64 it never changes again,
until you actually harvest them. Without that, a uint16_t could
overflow too.

Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5213 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ