Page MenuHomeFreeBSD

D56975.diff
No OneTemporary

D56975.diff

diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -78,6 +78,10 @@
char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
char prot_l_[PADL_(l_ulong)]; l_ulong prot; char prot_r_[PADR_(l_ulong)];
};
+struct linux_munmap_args {
+ char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+ char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
+};
struct linux_brk_args {
char dsend_l_[PADL_(l_ulong)]; l_ulong dsend; char dsend_r_[PADR_(l_ulong)];
};
@@ -1450,6 +1454,7 @@
int linux_lseek(struct thread *, struct linux_lseek_args *);
int linux_mmap2(struct thread *, struct linux_mmap2_args *);
int linux_mprotect(struct thread *, struct linux_mprotect_args *);
+int linux_munmap(struct thread *, struct linux_munmap_args *);
int linux_brk(struct thread *, struct linux_brk_args *);
int linux_rt_sigaction(struct thread *, struct linux_rt_sigaction_args *);
int linux_rt_sigprocmask(struct thread *, struct linux_rt_sigprocmask_args *);
@@ -1760,6 +1765,7 @@
#define LINUX_SYS_AUE_linux_lseek AUE_LSEEK
#define LINUX_SYS_AUE_linux_mmap2 AUE_MMAP
#define LINUX_SYS_AUE_linux_mprotect AUE_MPROTECT
+#define LINUX_SYS_AUE_linux_munmap AUE_MUNMAP
#define LINUX_SYS_AUE_linux_brk AUE_NULL
#define LINUX_SYS_AUE_linux_rt_sigaction AUE_NULL
#define LINUX_SYS_AUE_linux_rt_sigprocmask AUE_NULL
diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h
--- a/sys/amd64/linux/linux_syscall.h
+++ b/sys/amd64/linux/linux_syscall.h
@@ -15,7 +15,7 @@
#define LINUX_SYS_linux_lseek 8
#define LINUX_SYS_linux_mmap2 9
#define LINUX_SYS_linux_mprotect 10
-#define LINUX_SYS_munmap 11
+#define LINUX_SYS_linux_munmap 11
#define LINUX_SYS_linux_brk 12
#define LINUX_SYS_linux_rt_sigaction 13
#define LINUX_SYS_linux_rt_sigprocmask 14
diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c
--- a/sys/amd64/linux/linux_syscalls.c
+++ b/sys/amd64/linux/linux_syscalls.c
@@ -16,7 +16,7 @@
"linux_lseek", /* 8 = linux_lseek */
"linux_mmap2", /* 9 = linux_mmap2 */
"linux_mprotect", /* 10 = linux_mprotect */
- "munmap", /* 11 = munmap */
+ "linux_munmap", /* 11 = linux_munmap */
"linux_brk", /* 12 = linux_brk */
"linux_rt_sigaction", /* 13 = linux_rt_sigaction */
"linux_rt_sigprocmask", /* 14 = linux_rt_sigprocmask */
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
--- a/sys/amd64/linux/linux_sysent.c
+++ b/sys/amd64/linux/linux_sysent.c
@@ -25,7 +25,7 @@
{ .sy_narg = AS(linux_lseek_args), .sy_call = (sy_call_t *)linux_lseek, .sy_auevent = AUE_LSEEK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 8 = linux_lseek */
{ .sy_narg = AS(linux_mmap2_args), .sy_call = (sy_call_t *)linux_mmap2, .sy_auevent = AUE_MMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 9 = linux_mmap2 */
{ .sy_narg = AS(linux_mprotect_args), .sy_call = (sy_call_t *)linux_mprotect, .sy_auevent = AUE_MPROTECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 10 = linux_mprotect */
- { .sy_narg = AS(munmap_args), .sy_call = (sy_call_t *)sys_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 11 = munmap */
+ { .sy_narg = AS(linux_munmap_args), .sy_call = (sy_call_t *)linux_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 11 = linux_munmap */
{ .sy_narg = AS(linux_brk_args), .sy_call = (sy_call_t *)linux_brk, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 12 = linux_brk */
{ .sy_narg = AS(linux_rt_sigaction_args), .sy_call = (sy_call_t *)linux_rt_sigaction, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 13 = linux_rt_sigaction */
{ .sy_narg = AS(linux_rt_sigprocmask_args), .sy_call = (sy_call_t *)linux_rt_sigprocmask, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 14 = linux_rt_sigprocmask */
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -109,9 +109,9 @@
*n_args = 3;
break;
}
- /* munmap */
+ /* linux_munmap */
case 11: {
- struct munmap_args *p = params;
+ struct linux_munmap_args *p = params;
uarg[a++] = (intptr_t)p->addr; /* void * */
iarg[a++] = p->len; /* l_size_t */
*n_args = 2;
@@ -2994,7 +2994,7 @@
break;
};
break;
- /* munmap */
+ /* linux_munmap */
case 11:
switch (ndx) {
case 0:
@@ -7368,7 +7368,7 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* munmap */
+ /* linux_munmap */
case 11:
if (ndx == 0 || ndx == 1)
p = "int";
diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -109,8 +109,8 @@
l_ulong prot
);
}
-11 AUE_MUNMAP NOPROTO {
- int munmap(
+11 AUE_MUNMAP STD {
+ int linux_munmap(
void *addr,
l_size_t len
);
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -297,6 +297,10 @@
struct linux_mmap_args {
char ptr_l_[PADL_(struct l_mmap_argv *)]; struct l_mmap_argv * ptr; char ptr_r_[PADR_(struct l_mmap_argv *)];
};
+struct linux_munmap_args {
+ char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
+ char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)];
+};
struct linux_truncate_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char length_l_[PADL_(l_ulong)]; l_ulong length; char length_r_[PADR_(l_ulong)];
@@ -1807,6 +1811,7 @@
int linux_reboot(struct thread *, struct linux_reboot_args *);
int linux_readdir(struct thread *, struct linux_readdir_args *);
int linux_mmap(struct thread *, struct linux_mmap_args *);
+int linux_munmap(struct thread *, struct linux_munmap_args *);
int linux_truncate(struct thread *, struct linux_truncate_args *);
int linux_ftruncate(struct thread *, struct linux_ftruncate_args *);
int linux_getpriority(struct thread *, struct linux_getpriority_args *);
@@ -2181,6 +2186,7 @@
#define LINUX32_SYS_AUE_linux_reboot AUE_REBOOT
#define LINUX32_SYS_AUE_linux_readdir AUE_GETDIRENTRIES
#define LINUX32_SYS_AUE_linux_mmap AUE_MMAP
+#define LINUX32_SYS_AUE_linux_munmap AUE_MUNMAP
#define LINUX32_SYS_AUE_linux_truncate AUE_TRUNCATE
#define LINUX32_SYS_AUE_linux_ftruncate AUE_FTRUNCATE
#define LINUX32_SYS_AUE_linux_getpriority AUE_GETPRIORITY
diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h
--- a/sys/amd64/linux32/linux32_syscall.h
+++ b/sys/amd64/linux32/linux32_syscall.h
@@ -84,7 +84,7 @@
#define LINUX32_SYS_linux_reboot 88
#define LINUX32_SYS_linux_readdir 89
#define LINUX32_SYS_linux_mmap 90
-#define LINUX32_SYS_munmap 91
+#define LINUX32_SYS_linux_munmap 91
#define LINUX32_SYS_linux_truncate 92
#define LINUX32_SYS_linux_ftruncate 93
#define LINUX32_SYS_fchmod 94
diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c
--- a/sys/amd64/linux32/linux32_syscalls.c
+++ b/sys/amd64/linux32/linux32_syscalls.c
@@ -96,7 +96,7 @@
"linux_reboot", /* 88 = linux_reboot */
"linux_readdir", /* 89 = linux_readdir */
"linux_mmap", /* 90 = linux_mmap */
- "munmap", /* 91 = munmap */
+ "linux_munmap", /* 91 = linux_munmap */
"linux_truncate", /* 92 = linux_truncate */
"linux_ftruncate", /* 93 = linux_ftruncate */
"fchmod", /* 94 = fchmod */
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -106,7 +106,7 @@
{ .sy_narg = AS(linux_reboot_args), .sy_call = (sy_call_t *)linux_reboot, .sy_auevent = AUE_REBOOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = linux_reboot */
{ .sy_narg = AS(linux_readdir_args), .sy_call = (sy_call_t *)linux_readdir, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 89 = linux_readdir */
{ .sy_narg = AS(linux_mmap_args), .sy_call = (sy_call_t *)linux_mmap, .sy_auevent = AUE_MMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 90 = linux_mmap */
- { .sy_narg = AS(munmap_args), .sy_call = (sy_call_t *)sys_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 91 = munmap */
+ { .sy_narg = AS(linux_munmap_args), .sy_call = (sy_call_t *)linux_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 91 = linux_munmap */
{ .sy_narg = AS(linux_truncate_args), .sy_call = (sy_call_t *)linux_truncate, .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 92 = linux_truncate */
{ .sy_narg = AS(linux_ftruncate_args), .sy_call = (sy_call_t *)linux_ftruncate, .sy_auevent = AUE_FTRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 93 = linux_ftruncate */
{ .sy_narg = AS(fchmod_args), .sy_call = (sy_call_t *)sys_fchmod, .sy_auevent = AUE_FCHMOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 94 = fchmod */
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -608,9 +608,9 @@
*n_args = 1;
break;
}
- /* munmap */
+ /* linux_munmap */
case 91: {
- struct munmap_args *p = params;
+ struct linux_munmap_args *p = params;
uarg[a++] = (intptr_t)p->addr; /* caddr_t */
iarg[a++] = p->len; /* int */
*n_args = 2;
@@ -4229,7 +4229,7 @@
break;
};
break;
- /* munmap */
+ /* linux_munmap */
case 91:
switch (ndx) {
case 0:
@@ -9051,7 +9051,7 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* munmap */
+ /* linux_munmap */
case 91:
if (ndx == 0 || ndx == 1)
p = "int";
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -485,8 +485,8 @@
struct l_mmap_argv *ptr
);
}
-91 AUE_MUNMAP NOPROTO {
- int munmap(
+91 AUE_MUNMAP STD {
+ int linux_munmap(
caddr_t addr,
int len
);
diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h
--- a/sys/arm64/linux/linux_proto.h
+++ b/sys/arm64/linux/linux_proto.h
@@ -855,6 +855,10 @@
struct linux_brk_args {
char dsend_l_[PADL_(l_ulong)]; l_ulong dsend; char dsend_r_[PADR_(l_ulong)];
};
+struct linux_munmap_args {
+ char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+ char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
+};
struct linux_mremap_args {
char addr_l_[PADL_(l_ulong)]; l_ulong addr; char addr_r_[PADR_(l_ulong)];
char old_len_l_[PADL_(l_ulong)]; l_ulong old_len; char old_len_r_[PADR_(l_ulong)];
@@ -1421,6 +1425,7 @@
int linux_sendmsg(struct thread *, struct linux_sendmsg_args *);
int linux_recvmsg(struct thread *, struct linux_recvmsg_args *);
int linux_brk(struct thread *, struct linux_brk_args *);
+int linux_munmap(struct thread *, struct linux_munmap_args *);
int linux_mremap(struct thread *, struct linux_mremap_args *);
int linux_add_key(struct thread *, struct linux_add_key_args *);
int linux_request_key(struct thread *, struct linux_request_key_args *);
@@ -1681,6 +1686,7 @@
#define LINUX_SYS_AUE_linux_sendmsg AUE_SENDMSG
#define LINUX_SYS_AUE_linux_recvmsg AUE_RECVMSG
#define LINUX_SYS_AUE_linux_brk AUE_NULL
+#define LINUX_SYS_AUE_linux_munmap AUE_MUNMAP
#define LINUX_SYS_AUE_linux_mremap AUE_NULL
#define LINUX_SYS_AUE_linux_add_key AUE_NULL
#define LINUX_SYS_AUE_linux_request_key AUE_NULL
diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h
--- a/sys/arm64/linux/linux_syscall.h
+++ b/sys/arm64/linux/linux_syscall.h
@@ -208,7 +208,7 @@
#define LINUX_SYS_linux_sendmsg 211
#define LINUX_SYS_linux_recvmsg 212
#define LINUX_SYS_linux_brk 214
-#define LINUX_SYS_munmap 215
+#define LINUX_SYS_linux_munmap 215
#define LINUX_SYS_linux_mremap 216
#define LINUX_SYS_linux_add_key 217
#define LINUX_SYS_linux_request_key 218
diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c
--- a/sys/arm64/linux/linux_syscalls.c
+++ b/sys/arm64/linux/linux_syscalls.c
@@ -220,7 +220,7 @@
"linux_recvmsg", /* 212 = linux_recvmsg */
"#213", /* 213 = linux_readahead */
"linux_brk", /* 214 = linux_brk */
- "munmap", /* 215 = munmap */
+ "linux_munmap", /* 215 = linux_munmap */
"linux_mremap", /* 216 = linux_mremap */
"linux_add_key", /* 217 = linux_add_key */
"linux_request_key", /* 218 = linux_request_key */
diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c
--- a/sys/arm64/linux/linux_sysent.c
+++ b/sys/arm64/linux/linux_sysent.c
@@ -229,7 +229,7 @@
{ .sy_narg = AS(linux_recvmsg_args), .sy_call = (sy_call_t *)linux_recvmsg, .sy_auevent = AUE_RECVMSG, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 212 = linux_recvmsg */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 213 = linux_readahead */
{ .sy_narg = AS(linux_brk_args), .sy_call = (sy_call_t *)linux_brk, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 214 = linux_brk */
- { .sy_narg = AS(munmap_args), .sy_call = (sy_call_t *)sys_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 215 = munmap */
+ { .sy_narg = AS(linux_munmap_args), .sy_call = (sy_call_t *)linux_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 215 = linux_munmap */
{ .sy_narg = AS(linux_mremap_args), .sy_call = (sy_call_t *)linux_mremap, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 216 = linux_mremap */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_add_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 217 = linux_add_key */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_request_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 218 = linux_request_key */
diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c
--- a/sys/arm64/linux/linux_systrace_args.c
+++ b/sys/arm64/linux/linux_systrace_args.c
@@ -1727,9 +1727,9 @@
*n_args = 1;
break;
}
- /* munmap */
+ /* linux_munmap */
case 215: {
- struct munmap_args *p = params;
+ struct linux_munmap_args *p = params;
uarg[a++] = (intptr_t)p->addr; /* void * */
iarg[a++] = p->len; /* l_size_t */
*n_args = 2;
@@ -5321,7 +5321,7 @@
break;
};
break;
- /* munmap */
+ /* linux_munmap */
case 215:
switch (ndx) {
case 0:
@@ -7337,7 +7337,7 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* munmap */
+ /* linux_munmap */
case 215:
if (ndx == 0 || ndx == 1)
p = "int";
diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master
--- a/sys/arm64/linux/syscalls.master
+++ b/sys/arm64/linux/syscalls.master
@@ -1330,8 +1330,8 @@
l_ulong dsend
);
}
-215 AUE_MUNMAP NOPROTO {
- int munmap(
+215 AUE_MUNMAP STD {
+ int linux_munmap(
void *addr,
l_size_t len
);
diff --git a/sys/compat/linux/linux_mmap.c b/sys/compat/linux/linux_mmap.c
--- a/sys/compat/linux/linux_mmap.c
+++ b/sys/compat/linux/linux_mmap.c
@@ -52,6 +52,17 @@
#include <compat/linux/linux_persona.h>
#include <compat/linux/linux_util.h>
+#if defined(__amd64__)
+#include <amd64/linux/linux.h>
+#include <amd64/linux/linux_proto.h>
+#elif defined(__i386__)
+#include <i386/linux/linux.h>
+#include <i386/linux/linux_proto.h>
+#elif defined(__aarch64__)
+#include <arm64/linux/linux.h>
+#include <arm64/linux/linux_proto.h>
+#endif
+
#define STACK_SIZE (2 * 1024 * 1024)
#define GUARD_SIZE (4 * PAGE_SIZE)
@@ -423,3 +434,14 @@
}
#endif
+
+int
+linux_munmap(struct thread *td, struct linux_munmap_args *args)
+{
+
+ /* Linux requires addresses to be page aligned */
+ if ((uintptr_t)args->addr & PAGE_MASK)
+ return (EINVAL);
+
+ return (kern_munmap(td, (uintptr_t) args->addr, args->len));
+}
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -288,6 +288,10 @@
struct linux_mmap_args {
char ptr_l_[PADL_(struct l_mmap_argv *)]; struct l_mmap_argv * ptr; char ptr_r_[PADR_(struct l_mmap_argv *)];
};
+struct linux_munmap_args {
+ char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
+ char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)];
+};
struct linux_truncate_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char length_l_[PADL_(l_ulong)]; l_ulong length; char length_r_[PADR_(l_ulong)];
@@ -1799,6 +1803,7 @@
int linux_reboot(struct thread *, struct linux_reboot_args *);
int linux_readdir(struct thread *, struct linux_readdir_args *);
int linux_mmap(struct thread *, struct linux_mmap_args *);
+int linux_munmap(struct thread *, struct linux_munmap_args *);
int linux_truncate(struct thread *, struct linux_truncate_args *);
int linux_ftruncate(struct thread *, struct linux_ftruncate_args *);
int linux_getpriority(struct thread *, struct linux_getpriority_args *);
@@ -2175,6 +2180,7 @@
#define LINUX_SYS_AUE_linux_reboot AUE_REBOOT
#define LINUX_SYS_AUE_linux_readdir AUE_GETDIRENTRIES
#define LINUX_SYS_AUE_linux_mmap AUE_MMAP
+#define LINUX_SYS_AUE_linux_munmap AUE_MUNMAP
#define LINUX_SYS_AUE_linux_truncate AUE_TRUNCATE
#define LINUX_SYS_AUE_linux_ftruncate AUE_FTRUNCATE
#define LINUX_SYS_AUE_linux_getpriority AUE_GETPRIORITY
diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h
--- a/sys/i386/linux/linux_syscall.h
+++ b/sys/i386/linux/linux_syscall.h
@@ -85,7 +85,7 @@
#define LINUX_SYS_linux_reboot 88
#define LINUX_SYS_linux_readdir 89
#define LINUX_SYS_linux_mmap 90
-#define LINUX_SYS_munmap 91
+#define LINUX_SYS_linux_munmap 91
#define LINUX_SYS_linux_truncate 92
#define LINUX_SYS_linux_ftruncate 93
#define LINUX_SYS_fchmod 94
diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c
--- a/sys/i386/linux/linux_syscalls.c
+++ b/sys/i386/linux/linux_syscalls.c
@@ -96,7 +96,7 @@
"linux_reboot", /* 88 = linux_reboot */
"linux_readdir", /* 89 = linux_readdir */
"linux_mmap", /* 90 = linux_mmap */
- "munmap", /* 91 = munmap */
+ "linux_munmap", /* 91 = linux_munmap */
"linux_truncate", /* 92 = linux_truncate */
"linux_ftruncate", /* 93 = linux_ftruncate */
"fchmod", /* 94 = fchmod */
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -105,7 +105,7 @@
{ .sy_narg = AS(linux_reboot_args), .sy_call = (sy_call_t *)linux_reboot, .sy_auevent = AUE_REBOOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = linux_reboot */
{ .sy_narg = AS(linux_readdir_args), .sy_call = (sy_call_t *)linux_readdir, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 89 = linux_readdir */
{ .sy_narg = AS(linux_mmap_args), .sy_call = (sy_call_t *)linux_mmap, .sy_auevent = AUE_MMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 90 = linux_mmap */
- { .sy_narg = AS(munmap_args), .sy_call = (sy_call_t *)sys_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 91 = munmap */
+ { .sy_narg = AS(linux_munmap_args), .sy_call = (sy_call_t *)linux_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 91 = linux_munmap */
{ .sy_narg = AS(linux_truncate_args), .sy_call = (sy_call_t *)linux_truncate, .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 92 = linux_truncate */
{ .sy_narg = AS(linux_ftruncate_args), .sy_call = (sy_call_t *)linux_ftruncate, .sy_auevent = AUE_FTRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 93 = linux_ftruncate */
{ .sy_narg = AS(fchmod_args), .sy_call = (sy_call_t *)sys_fchmod, .sy_auevent = AUE_FCHMOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 94 = fchmod */
diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -615,9 +615,9 @@
*n_args = 1;
break;
}
- /* munmap */
+ /* linux_munmap */
case 91: {
- struct munmap_args *p = params;
+ struct linux_munmap_args *p = params;
uarg[a++] = (intptr_t)p->addr; /* caddr_t */
iarg[a++] = p->len; /* int */
*n_args = 2;
@@ -4270,7 +4270,7 @@
break;
};
break;
- /* munmap */
+ /* linux_munmap */
case 91:
switch (ndx) {
case 0:
@@ -9112,7 +9112,7 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* munmap */
+ /* linux_munmap */
case 91:
if (ndx == 0 || ndx == 1)
p = "int";
diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -488,8 +488,8 @@
struct l_mmap_argv *ptr
);
}
-91 AUE_MUNMAP NOPROTO {
- int munmap(
+91 AUE_MUNMAP STD {
+ int linux_munmap(
caddr_t addr,
int len
);

File Metadata

Mime Type
text/plain
Expires
Mon, May 18, 10:31 PM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33272559
Default Alt Text
D56975.diff (20 KB)

Event Timeline