lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 22 Sep 2020 12:57:29 +0530
From:   Piyush Goyal <piyushgoyaliit@...il.com>
To:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] stress-shm-sysv: exercise shmat with all possible flags

Exercise shmat syscall with all possible flags resulting in more kernel
coverage.

Signed-off-by: Piyush Goyal <piyushgoyaliit@...il.com>
---
 stress-shm-sysv.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/stress-shm-sysv.c b/stress-shm-sysv.c
index 5a3e0cc1..9efaa091 100644
--- a/stress-shm-sysv.c
+++ b/stress-shm-sysv.c
@@ -139,6 +139,16 @@ static void exercise_shmat(int shm_id)
 	/* Exercise shmat syscall with invalid flags */
 	addr = shmat(shm_id, NULL, ~0);
 	(void)addr;
+
+	/* Exercise shmat with all possible values of flags */
+	addr = shmat(shm_id, NULL, SHM_RDONLY);
+	(void)addr;
+
+	addr = shmat(shm_id, NULL, SHM_EXEC);
+	(void)addr;
+
+	addr = shmat(shm_id, NULL, SHM_RND);
+	(void)addr;
 }
 
 #if defined(__linux__)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ