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>] [day] [month] [year] [list]
Date:   Tue, 19 Jan 2021 21:27:36 +0000
From:   "Chiappero, Marco" <marco.chiappero@...el.com>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Linux FS Devel" <linux-fsdevel@...r.kernel.org>
CC:     "Cabiddu, Giovanni" <giovanni.cabiddu@...el.com>
Subject: Correct debugfs file removal pattern

Hi,

I'm looking to expose some information through a debugfs file, however I'm not entirely clear with the correct steps for file removal upon module unloading. I'm asking this because I would expect debugfs_remove() to wait until every open file has been closed when using debugfs_create_file (not debugfs_create_file_unsafe), as per debugfs_file_put() documentation:

 * Up to a matching call to debugfs_file_put(), any successive call
 * into the file removing functions debugfs_remove() and
 * debugfs_remove_recursive() will block.

Unfortunately it's not what I'm seeing when removing the module with one file kept open (leading to a page fault when eventually closing the file). So, is this the expected behaviour? If so, what is the right approach for waiting, inotify or fsnotify? Any suggestion on what the best pattern would be?

Thank you,
Marco

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ