From 476ec393c309a4b22fc323b88fd8883060acc617 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 8 Dec 2015 18:13:58 +0000 Subject: [PATCH] Fix mmap syscall entries Change syscall names to match kernel __NR_* constants. * linux/avr32/syscallent.h [90]: Rename "mmap" to "mmap2". * linux/bfin/syscallent.h [90]: Rename "old_mmap" to "mmap". * linux/i386/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/microblaze/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * tests/mmap.c (main): Remove old_mmap from expected output. * tests/mmap.test: Remove old_mmap from the list of mmap syscalls. --- linux/avr32/syscallent.h | 2 +- linux/bfin/syscallent.h | 2 +- linux/i386/syscallent.h | 2 +- linux/m68k/syscallent.h | 2 +- linux/microblaze/syscallent.h | 2 +- linux/sh/syscallent.h | 2 +- linux/sh64/syscallent.h | 2 +- tests/mmap.c | 2 +- tests/mmap.test | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h index 05892e78..bcc60c69 100644 --- a/linux/avr32/syscallent.h +++ b/linux/avr32/syscallent.h @@ -115,7 +115,7 @@ [ 87] = { 5, TD, SEN(pwrite), "pwrite" }, [ 88] = { 2, TF, SEN(swapon), "swapon" }, [ 89] = { 4, 0, SEN(reboot), "reboot" }, -[ 90] = { 6, TD|TM|SI, SEN(mmap_pgoff), "mmap" }, +[ 90] = { 6, TD|TM|SI, SEN(mmap_pgoff), "mmap2" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h index 31bfbd9e..c30e7318 100644 --- a/linux/bfin/syscallent.h +++ b/linux/bfin/syscallent.h @@ -116,7 +116,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(printargs), "old_mmap" }, /*not implemented in kernel */ +[ 90] = { 6, TD|TM|SI, SEN(printargs), "mmap" }, /*not implemented in kernel */ [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index 4a7f52f3..20ba789f 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -116,7 +116,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(old_mmap), "old_mmap" }, +[ 90] = { 6, TD|TM|SI, SEN(old_mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index ef675acd..ead6a3f4 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -116,7 +116,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 1, TD|TM|SI, SEN(old_mmap), "old_mmap" }, +[ 90] = { 1, TD|TM|SI, SEN(old_mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h index c7cf2478..0336a563 100644 --- a/linux/microblaze/syscallent.h +++ b/linux/microblaze/syscallent.h @@ -116,7 +116,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(mmap), "old_mmap" }, +[ 90] = { 6, TD|TM|SI, SEN(mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index 0a63d58b..9fdae9d0 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -118,7 +118,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(mmap), "old_mmap" }, +[ 90] = { 6, TD|TM|SI, SEN(mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index e2ec231d..a842addf 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -116,7 +116,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(mmap), "old_mmap" }, +[ 90] = { 6, TD|TM|SI, SEN(mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, diff --git a/tests/mmap.c b/tests/mmap.c index d4d3e664..43fcdd8a 100644 --- a/tests/mmap.c +++ b/tests/mmap.c @@ -33,7 +33,7 @@ main(void) return 77; if (sizeof(offset) == sizeof(int)) - printf("(mmap2?|old_mmap)\\(%p, %lu, PROT_READ\\|PROT_WRITE, " + printf("mmap2?\\(%p, %lu, PROT_READ\\|PROT_WRITE, " "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#x\\) = %p\n", addr, length, fd, (unsigned int) offset, p); else diff --git a/tests/mmap.test b/tests/mmap.test index e9c9b3ab..e24e7366 100755 --- a/tests/mmap.test +++ b/tests/mmap.test @@ -5,7 +5,7 @@ . "${srcdir=.}/init.sh" syscall=mprotect,munmap -for n in mmap mmap2 old_mmap; do +for n in mmap mmap2; do $STRACE -e$n -h > /dev/null && syscall=$syscall,$n done -- 2.40.0