[LTP] [PATCH] security/dirtyc0w: fix typo

Yang Xu xuyang2018.jy@fujitsu.com
Thu Jul 7 12:46:00 CEST 2022


s/dirtyc0w/dirtycow/

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 runtest/cve                                                 | 2 +-
 runtest/syscalls                                            | 2 +-
 testcases/kernel/security/dirtyc0w/.gitignore               | 2 --
 testcases/kernel/security/dirtycow/.gitignore               | 2 ++
 testcases/kernel/security/{dirtyc0w => dirtycow}/Makefile   | 2 +-
 .../security/{dirtyc0w/dirtyc0w.c => dirtycow/dirtycow.c}   | 6 +++---
 .../dirtyc0w_child.c => dirtycow/dirtycow_child.c}          | 0
 7 files changed, 8 insertions(+), 8 deletions(-)
 delete mode 100644 testcases/kernel/security/dirtyc0w/.gitignore
 create mode 100644 testcases/kernel/security/dirtycow/.gitignore
 rename testcases/kernel/security/{dirtyc0w => dirtycow}/Makefile (86%)
 rename testcases/kernel/security/{dirtyc0w/dirtyc0w.c => dirtycow/dirtycow.c} (94%)
 rename testcases/kernel/security/{dirtyc0w/dirtyc0w_child.c => dirtycow/dirtycow_child.c} (100%)

diff --git a/runtest/cve b/runtest/cve
index 9ab6dc282..3727f58c3 100644
--- a/runtest/cve
+++ b/runtest/cve
@@ -9,7 +9,7 @@ cve-2015-7550 keyctl02
 cve-2016-4470 keyctl01.sh
 cve-2015-3290 cve-2015-3290
 cve-2016-4997 setsockopt03
-cve-2016-5195 dirtyc0w
+cve-2016-5195 dirtycow
 cve-2016-7042 cve-2016-7042
 cve-2016-7117 cve-2016-7117
 cve-2016-8655 setsockopt06
diff --git a/runtest/syscalls b/runtest/syscalls
index efef18136..111ef6f90 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -1034,7 +1034,7 @@ process_vm_writev01 process_vm01 -w
 process_vm_writev02 process_vm_writev02
 
 prot_hsymlinks prot_hsymlinks
-dirtyc0w dirtyc0w
+dirtycow dirtycow
 dirtypipe dirtypipe
 
 pselect01 pselect01
diff --git a/testcases/kernel/security/dirtyc0w/.gitignore b/testcases/kernel/security/dirtyc0w/.gitignore
deleted file mode 100644
index 7700d91a3..000000000
--- a/testcases/kernel/security/dirtyc0w/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-dirtyc0w
-dirtyc0w_child
diff --git a/testcases/kernel/security/dirtycow/.gitignore b/testcases/kernel/security/dirtycow/.gitignore
new file mode 100644
index 000000000..ad36ce53c
--- /dev/null
+++ b/testcases/kernel/security/dirtycow/.gitignore
@@ -0,0 +1,2 @@
+dirtycow
+dirtycow_child
diff --git a/testcases/kernel/security/dirtyc0w/Makefile b/testcases/kernel/security/dirtycow/Makefile
similarity index 86%
rename from testcases/kernel/security/dirtyc0w/Makefile
rename to testcases/kernel/security/dirtycow/Makefile
index bf26d9eb6..07759a0e3 100644
--- a/testcases/kernel/security/dirtyc0w/Makefile
+++ b/testcases/kernel/security/dirtycow/Makefile
@@ -4,5 +4,5 @@
 top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/testcases.mk
-dirtyc0w_child: CFLAGS+=-pthread
+dirtycow_child: CFLAGS+=-pthread
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w.c b/testcases/kernel/security/dirtycow/dirtycow.c
similarity index 94%
rename from testcases/kernel/security/dirtyc0w/dirtyc0w.c
rename to testcases/kernel/security/dirtycow/dirtycow.c
index 7924285a7..881e376c5 100644
--- a/testcases/kernel/security/dirtyc0w/dirtyc0w.c
+++ b/testcases/kernel/security/dirtycow/dirtycow.c
@@ -55,7 +55,7 @@ static void setup(void)
 	nobody_gid = pw->pw_gid;
 }
 
-void dirtyc0w_test(void)
+void dirtycow_test(void)
 {
 	int i, fd, pid, fail = 0;
 	char c;
@@ -70,7 +70,7 @@ void dirtyc0w_test(void)
 	if (!pid) {
 		SAFE_SETGID(nobody_gid);
 		SAFE_SETUID(nobody_uid);
-		SAFE_EXECLP("dirtyc0w_child", "dirtyc0w_child", NULL);
+		SAFE_EXECLP("dirtycow_child", "dirtycow_child", NULL);
 	}
 
 	TST_CHECKPOINT_WAIT(0);
@@ -100,7 +100,7 @@ static struct tst_test test = {
 	.forks_child = 1,
 	.needs_root = 1,
 	.setup = setup,
-	.test_all = dirtyc0w_test,
+	.test_all = dirtycow_test,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "4ceb5db9757a"},
 		{"linux-git", "19be0eaffa3a"},
diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c b/testcases/kernel/security/dirtycow/dirtycow_child.c
similarity index 100%
rename from testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
rename to testcases/kernel/security/dirtycow/dirtycow_child.c
-- 
2.27.0



More information about the ltp mailing list