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]
Date:   Thu, 16 Jun 2022 15:00:24 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Christoph Hellwig <hch@...radead.org>
CC:     <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>, <ying.huang@...el.com>,
        <willy@...radead.org>, <vbabka@...e.cz>, <surenb@...gle.com>,
        <peterx@...hat.com>, <neilb@...e.de>, <naoya.horiguchi@....com>,
        <minchan@...nel.org>, <louhongxiang@...wei.com>,
        <linfeilong@...wei.com>, liubo <liubo254@...wei.com>
Subject: Re: [PATCH v2 2/2] mm/swapfile: release swap info when swap device is
 unpluged

On 2022/6/15 19:22, Christoph Hellwig wrote:
> Sorry, but this is simply broken.  We can't just do d_path magic
> here.  That being said the problem is real, and I think the right
> answer is to offer a swapoff variant that doesn't need to open the
> underlying device or file, but useѕ some kind of handle.  I'm just

When swap device is unplugged, the swap_file->f_path.dentry will be in the
d_unlinked() status. Could we use it to detect the problem instead? IMHO, we
can found the unplugged swap devices this way and further get the right swap
device to swapoff through comparing the swap device name with @specialfile.
Or am I miss something?

> not sure what would be a good handle here.

Using handle sounds like a good idea too. :) But can the above solution be acceptable?

> .
> 

Thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ