summaryrefslogtreecommitdiff
path: root/include/linux/timerfd.h
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2026-06-05 20:22:30 +0300
committerMimi Zohar <zohar@linux.ibm.com>2026-06-08 18:43:07 +0300
commit51bedcd803e0f140ee39e70a930d01223e1afb58 (patch)
tree2965bcfe100e6fe2015ca5e5632c56514c89e796 /include/linux/timerfd.h
parentcb431ff6a92fc62d91ba64f04c7af3bb54017a1d (diff)
downloadlinux-51bedcd803e0f140ee39e70a930d01223e1afb58.tar.xz
ima: Mediate open/release method of the measurements list
Introduce the ima_measure_users counter, to implement a semaphore-like locking scheme where the binary and ASCII measurements list interfaces can be concurrently opened by multiple readers, or alternatively by a single writer. In addition, allow the same writer to open the other interfaces for write or read/write, so that it can see the same measurement state across all the interfaces. A semaphore cannot be used because the kernel cannot return to user space with a lock held. Introduce the ima_measure_lock() and ima_measure_unlock() primitives, to respectively lock/unlock the interfaces (safely with the ima_measure_users counter, without holding a lock). Finally, introduce _ima_measurements_open() to lock the interface before seq_open(), and call it from ima_measurements_open() and ima_ascii_measurements_open(). And, introduce ima_measurements_release(), to unlock the interface. Require CAP_SYS_ADMIN if the interface is opened for write (not possible for the current measurements interfaces, since they only have read permission). No functional changes: multiple readers are allowed as before. Link: https://github.com/linux-integrity/linux/issues/1 Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'include/linux/timerfd.h')
0 files changed, 0 insertions, 0 deletions