syscalls/ipc/shmctl: Reformat doc comments
PATCH 1/1 syscalls/ipc/shmctl: Reformat doc comments
So that they are properly picked up by the docparser.
Signed-off-by Cyril Hrubis <[email protected]>
--- .../kernel/syscalls/ipc/shmctl/shmctl01.c | 11 ++++++---- .../kernel/syscalls/ipc/shmctl/shmctl02.c | 6 +++-- .../kernel/syscalls/ipc/shmctl/shmctl03.c | 7 ++++-- .../kernel/syscalls/ipc/shmctl/shmctl04.c | 7 ++++-- .../kernel/syscalls/ipc/shmctl/shmctl05.c | 22 +++++++++++-------- .../kernel/syscalls/ipc/shmctl/shmctl06.c | 8 +++++-- .../kernel/syscalls/ipc/shmctl/shmctl07.c | 7 ++++-- .../kernel/syscalls/ipc/shmctl/shmctl08.c | 7 ++++-- 8 files changed, 50 insertions(+), 25 deletions(-)
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +7 -4
@@ -3,16 +3,19 @@* Copyright (c) International Business Machines Corp., 2001 * Copyright (C) 2020 Cyril Hrubis <[email protected]> */ -/* + +/*\ +* [DESCRIPTION] +* * Verify that shmctl() IPC_STAT and SHM_STAT reports correct data. * * The shm_nattach is excercised by: * -* 1. forking() children that attach and detach SHM -* 2. attaching the SHM before fork and letting the children detach it +* - forking() children that attach and detach SHM +* - attaching the SHM before fork and letting the children detach it * * We check that the number shm_nattach is correct after each step we do. -*/ +\*/ #define _GNU_SOURCE#include <stdlib.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl02.c +4 -2
@@ -8,7 +8,9 @@* Copyright (C) 2020 Cyril Hrubis <[email protected]> */ -/* +/*\ +* [DESCRIPTION] +* * Test for EACCES, EFAULT and EINVAL errors. * * * EACCES - segment has no read or write permissions
@@ -23,7 +25,7 @@* * EPERM - attempt to change root-owned shm * * EPERM - attempt to lock root-owned shm * * EPERM - attempt to unlock root-owned shm -*/ +\*/ #include <pwd.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl03.c +5 -2
@@ -2,10 +2,13 @@/* * Copyright (C) 2020 Cyril Hrubis <[email protected]> */ -/* + +/*\ +* [DESCRIPTION] +* * Call shmctl() with IPC_INFO flag and check that the data are consistent with * /proc/sys/kernel/shm*. -*/ +\*/ #define _GNU_SOURCE#include "tst_test.h"
testcases/kernel/syscalls/ipc/shmctl/shmctl04.c +5 -2
@@ -2,7 +2,10 @@/* * Copyright (C) 2020 Cyril Hrubis <[email protected]> */ -/* + +/*\ +* [DESCRIPTION] +* * Call shmctl() with SHM_INFO flag and check that: * * * The returned index points to a valid SHM by calling SHM_STAT_ANY
@@ -15,7 +18,7 @@* * Note what we create a SHM segment in the test setup to make sure that there * is at least one during the testrun. -*/ +\*/ #define _GNU_SOURCE#include <stdio.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl05.c +13 -9
@@ -3,15 +3,19 @@* Copyright (c) 2018 Google, Inc. */ -/* -* Regression test for commit 3f05317d9889 ("ipc/shm: fix use-after-free of shm -* file via remap_file_pages()"). This bug allowed the remap_file_pages() -* syscall to use the file of a System V shared memory segment after its ID had -* been reallocated and the file freed. This test reproduces the bug as a NULL -* pointer dereference in touch_atime(), although it's a race condition so it's -* not guaranteed to work. This test is based on the reproducer provided in the -* fix's commit message. -*/ +/*\ +* [DESCRIPTION] +* +* Regression test for commit +* 3f05317d9889 (ipc/shm: fix use-after-free of shm file via remap_file_pages()). +* +* This bug allowed the remap_file_pages() syscall to use the file of a System +* V shared memory segment after its ID had been reallocated and the file +* freed. This test reproduces the bug as a NULL pointer dereference in +* touch_atime(), although it's a race condition so it's not guaranteed to +* work. This test is based on the reproducer provided in the fix's commit +* message. +\*/ #include "lapi/syscalls.h" #include "tst_test.h"
testcases/kernel/syscalls/ipc/shmctl/shmctl06.c +6 -2
@@ -1,10 +1,14 @@// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2020 Viresh Kumar <[email protected]> +*/ + +/*\ +* [DESCRIPTION] * -* Description: * Cross verify the _high fields being set to 0 by the kernel. -*/ +\*/ +#include <sys/shm.h> #include "lapi/shmbuf.h" #include "libnewipc.h"
testcases/kernel/syscalls/ipc/shmctl/shmctl07.c +5 -2
@@ -2,9 +2,12 @@/* * Copyright (C) 2020 Cyril Hrubis <[email protected]> */ -/* + +/*\ +* [DESCRIPTION] +* * Test for a SHM_LOCK and SHM_UNLOCK. -*/ +\*/ #define _GNU_SOURCE#include <stdio.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl08.c +5 -2
@@ -2,12 +2,15 @@/* * Copyright (C) 2020 Cyril Hrubis <[email protected]> */ -/* + +/*\ +* [DESCRIPTION] +* * Test for a SHM_SET. * * The test clears the group and others bits from the shm_perm.mode and checks * the result as well as if the ctime was updated correctly. -*/ +\*/ #define _GNU_SOURCE#include <stdio.h>
Signature · 1 line
2.26.2