History

LSM: fix documentation for the sem_* hooks

The sem_* hooks were changed in the commit "sem/security: Pass kern_ipc_perm not sem_array into the sem security hooks" (aefad9593ec5). The type of the argument sma was changed from sem_array to kern_ipc_perm. This patch updates the documentation for the hooks accordingly.

Denis Efremov committed 7 years ago

Commit e9220bc1 parent ab012bc1 file · +16 −16Browse files

Unified · Split

include/linux/lsm_hooks.h+16−16
@@ -1190,34 +1190,34 @@ · 1189 unmodified lines
11901190 * Security hooks for System V Semaphores
11911191 *
11921192 * @sem_alloc_security:
1193− * Allocate and attach a security structure to the sma->sem_perm.security
1194− * field. The security field is initialized to NULL when the structure is
1193+ * Allocate and attach a security structure to the @perm->security
1194+ * field. The security field is initialized to NULL when the structure is
11951195 * first created.
1196− * @sma contains the semaphore structure
1196+ * @perm contains the IPC permissions of the semaphore.
11971197 * Return 0 if operation was successful and permission is granted.
11981198 * @sem_free_security:
1199− * deallocate security struct for this semaphore
1200− * @sma contains the semaphore structure.
1199+ * Deallocate security structure @perm->security for the semaphore.
1200+ * @perm contains the IPC permissions of the semaphore.
12011201 * @sem_associate:
12021202 * Check permission when a semaphore is requested through the semget
1203− * system call. This hook is only called when returning the semaphore
1203+ * system call. This hook is only called when returning the semaphore
12041204 * identifier for an existing semaphore, not when a new one must be
12051205 * created.
1206− * @sma contains the semaphore structure.
1206+ * @perm contains the IPC permissions of the semaphore.
12071207 * @semflg contains the operation control flags.
12081208 * Return 0 if permission is granted.
12091209 * @sem_semctl:
12101210 * Check permission when a semaphore operation specified by @cmd is to be
1211− * performed on the semaphore @sma. The @sma may be NULL, e.g. for
1211+ * performed on the semaphore. The @perm may be NULL, e.g. for
12121212 * IPC_INFO or SEM_INFO.
1213− * @sma contains the semaphore structure. May be NULL.
1213+ * @perm contains the IPC permissions of the semaphore. May be NULL.
12141214 * @cmd contains the operation to be performed.
12151215 * Return 0 if permission is granted.
12161216 * @sem_semop:
12171217 * Check permissions before performing operations on members of the
1218− * semaphore set @sma. If the @alter flag is nonzero, the semaphore set
1218+ * semaphore set. If the @alter flag is nonzero, the semaphore set
12191219 * may be modified.
1220− * @sma contains the semaphore structure.
1220+ * @perm contains the IPC permissions of the semaphore.
12211221 * @sops contains the operations to perform.
12221222 * @nsops contains the number of operations to perform.
12231223 * @alter contains the flag indicating whether changes are to be made.
@@ -1654,11 +1654,11 @@ union security_list_options { · 430 unmodified lines
16541654 int (*shm_shmat)(struct kern_ipc_perm *shp, char __user *shmaddr,
16551655 int shmflg);
16561656
1657− int (*sem_alloc_security)(struct kern_ipc_perm *sma);
1658− void (*sem_free_security)(struct kern_ipc_perm *sma);
1659− int (*sem_associate)(struct kern_ipc_perm *sma, int semflg);
1660− int (*sem_semctl)(struct kern_ipc_perm *sma, int cmd);
1661− int (*sem_semop)(struct kern_ipc_perm *sma, struct sembuf *sops,
1657+ int (*sem_alloc_security)(struct kern_ipc_perm *perm);
1658+ void (*sem_free_security)(struct kern_ipc_perm *perm);
1659+ int (*sem_associate)(struct kern_ipc_perm *perm, int semflg);
1660+ int (*sem_semctl)(struct kern_ipc_perm *perm, int cmd);
1661+ int (*sem_semop)(struct kern_ipc_perm *perm, struct sembuf *sops,
16621662 unsigned nsops, int alter);
16631663
16641664 int (*netlink_send)(struct sock *sk, struct sk_buff *skb);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t