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] [day] [month] [year] [list]
Message-ID: <1683588.PnVoaTFAp1@blindfold>
Date:   Thu, 13 Dec 2018 23:08:08 +0100
From:   Richard Weinberger <richard@....at>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     zhangjun <openzhangj@...il.com>,
        Artem Bityutskiy <dedekind1@...il.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kirill.shutemov@...ux.intel.com, hch@....de,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2] ubifs: fix page_count in ->ubifs_migrate_page()

Am Donnerstag, 13. Dezember 2018, 23:00:00 CET schrieb Kirill A. Shutemov:
> > Let's wait a few days to give Kirill a chance to review, then I'll apply the patch.
> 
> I don't remmeber much context now...
> 
> Could you remind me why ubifs doesn't take additional pin when sets
> PG_private?

Because it does not use set_page_private(), it just sets the flag for
internal accounting purposes.

>From UBIFS docs:
 * UBIFS uses 2 page flags: @PG_private and @PG_checked. @PG_private is set if
 * the page is dirty and is used for optimization purposes - dirty pages are
 * not budgeted so the flag shows that 'ubifs_write_end()' should not release
 * the budget for this page. The @PG_checked flag is set if full budgeting is
 * required for the page e.g., when it corresponds to a file hole or it is
 * beyond the file size. The budgeting is done in 'ubifs_write_begin()', because
 * it is OK to fail in this function, and the budget is released in
 * 'ubifs_write_end()'. So the @PG_private and @PG_checked flags carry
 * information about how the page was budgeted, to make it possible to release
 * the budget properly.

> Migration is not the only place where the additional pin is implied.
> See all users of page_has_private() helper. Notably reclaim path.

Hmmm, I need to dig into that.
I this is a problem then f2fs suffers from it too.
At least from what I can tell from reading f2fs_migrate_page().

Thanks,
//richard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ