|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73340 SHMOP: Access to SHM_LOCK, SHM_UNLOCK
Submitted: 2016-10-18 18:11 UTC Modified: 2021-10-12 17:11 UTC
From: narf at devilix dot net Assigned:
Status: Open Package: *Extensibility Functions
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-10-18 18:11 UTC] narf at devilix dot net
I was looking for a way to store encryption keys in (guaranteed to be non-swap) memory, and apparently setting the SHM_LOCK flag on a shared memory segment seems to be the only way to do that.

Obviously, PHP doesn't expose shmctl() directly and that's probably for a good reason, but can we have something like shmop_lock(), or an optional parameter to shmop_open()?

(on a related note, shmop_stat() would be nice too)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-12 17:11 UTC]
-Package: POSIX related +Package: *Extensibility Functions
 [2021-10-12 17:11 UTC]
SHM_LOCK is not part of POSIX[1], so might not be available
everywhere, and I don't think there's anything like that on

[1] <>
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Jan 27 17:03:42 2023 UTC