All of lore.kernel.org
 help / color / mirror / Atom feed
* [SPDK] Re: Change path of file lock in spdk_pci_device_claim
@ 2020-11-12  2:58 Weifeng Su
  0 siblings, 0 replies; 2+ messages in thread
From: Weifeng Su @ 2020-11-12  2:58 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

Hi Jim,

Thanks for your comment!
I wonder can we call file system interface like 'chattr +i' after lock the lock file,
That prevent user delete the file in ext4 file system. 

BR,
Weifeng Su

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [SPDK] Re: Change path of file lock in spdk_pci_device_claim
@ 2020-11-11 22:26 Harris, James R
  0 siblings, 0 replies; 2+ messages in thread
From: Harris, James R @ 2020-11-11 22:26 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]

Hi Weifeng,

There's no special reason to locate these files in /tmp.  /var/run or /var/tmp would be fine.  We already put the JSON-RPC domain socket in /var/tmp, so moving it there would make it more consistent.

Note that the lock files have same ownership as the SPDK process.  If someone has privileges to delete the lock file or remount tmpfs, there are many other things they could do to affect the running SPDK process.  They could even delete the lock file from the new location.

-Jim


On 11/11/20, 1:43 AM, "swf504(a)163.com" <swf504(a)163.com> wrote:

    Hi SPDK team,
        I notice that the posix lock file locate in '/tmp' directory which no safe in running linux system, 
    user maybe delete files in /tmp directory or remout the tmpfs, and that cause the posix lock inactive.
    This is a serious fatal because the application can't detect the file change, After a new application start and
    the spdk_pci_device_claim function still return true, that means multi application maybe probe same controller, 
    Unexpect behavior or controller init hung maybe happen during controller colliding.

    Is there special reason the need locate in '/tmp', if not, I suggest locate in '/var/run' directory.
    Need your comment!

    Br,
    Weifeng Su
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-12  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12  2:58 [SPDK] Re: Change path of file lock in spdk_pci_device_claim Weifeng Su
  -- strict thread matches above, loose matches on Subject: below --
2020-11-11 22:26 Harris, James R

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.