summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-07-19 11:28:18 -0300
committerRenato Botelho <renato@netgate.com>2016-07-19 11:28:18 -0300
commita3c20a378f7a9fa76e9301a43ac64ed07057d01e (patch)
treed14045c61b471f327f487431e05b0c4fe0cd8d76 /sys/amd64
parent3a4027cfafa37c1a0c0b05987c0edb1452c7bd2b (diff)
parent3f1f4f0e73b6d12c01e8cad4791d23e8e56127db (diff)
downloadFreeBSD-src-a3c20a378f7a9fa76e9301a43ac64ed07057d01e.zip
FreeBSD-src-a3c20a378f7a9fa76e9301a43ac64ed07057d01e.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/linux/linux.h7
-rw-r--r--sys/amd64/linux/linux_machdep.c169
-rw-r--r--sys/amd64/linux/linux_proto.h4
-rw-r--r--sys/amd64/linux/linux_syscall.h2
-rw-r--r--sys/amd64/linux/linux_syscalls.c2
-rw-r--r--sys/amd64/linux/linux_sysent.c2
-rw-r--r--sys/amd64/linux/linux_systrace_args.c4
-rw-r--r--sys/amd64/linux/syscalls.master2
-rw-r--r--sys/amd64/linux32/linux.h7
-rw-r--r--sys/amd64/linux32/linux32_machdep.c184
-rw-r--r--sys/amd64/linux32/linux32_proto.h4
-rw-r--r--sys/amd64/linux32/linux32_syscall.h2
-rw-r--r--sys/amd64/linux32/linux32_syscalls.c2
-rw-r--r--sys/amd64/linux32/linux32_sysent.c2
-rw-r--r--sys/amd64/linux32/linux32_systrace_args.c4
-rw-r--r--sys/amd64/linux32/syscalls.master2
16 files changed, 23 insertions, 376 deletions
diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
index 639499a..b30568f 100644
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -139,13 +139,6 @@ struct l_rlimit {
l_ulong rlim_max;
};
-/* mmap options */
-#define LINUX_MAP_SHARED 0x0001
-#define LINUX_MAP_PRIVATE 0x0002
-#define LINUX_MAP_FIXED 0x0010
-#define LINUX_MAP_ANON 0x0020
-#define LINUX_MAP_GROWSDOWN 0x0100
-
/*
* stat family of syscalls
*/
diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c
index 9664dac..80c48aa 100644
--- a/sys/amd64/linux/linux_machdep.c
+++ b/sys/amd64/linux/linux_machdep.c
@@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_ipc.h>
#include <compat/linux/linux_file.h>
#include <compat/linux/linux_misc.h>
+#include <compat/linux/linux_mmap.h>
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_emul.h>
@@ -122,181 +123,19 @@ linux_set_upcall_kse(struct thread *td, register_t stack)
return (0);
}
-#define STACK_SIZE (2 * 1024 * 1024)
-#define GUARD_SIZE (4 * PAGE_SIZE)
-
int
linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
{
- struct proc *p = td->td_proc;
- struct mmap_args /* {
- caddr_t addr;
- size_t len;
- int prot;
- int flags;
- int fd;
- long pad;
- off_t pos;
- } */ bsd_args;
- int error;
- struct file *fp;
- cap_rights_t rights;
-
- LINUX_CTR6(mmap2, "0x%lx, %ld, %ld, 0x%08lx, %ld, 0x%lx",
- args->addr, args->len, args->prot,
- args->flags, args->fd, args->pgoff);
-
- error = 0;
- bsd_args.flags = 0;
- fp = NULL;
-
- /*
- * Linux mmap(2):
- * You must specify exactly one of MAP_SHARED and MAP_PRIVATE
- */
- if (! ((args->flags & LINUX_MAP_SHARED) ^
- (args->flags & LINUX_MAP_PRIVATE)))
- return (EINVAL);
-
- if (args->flags & LINUX_MAP_SHARED)
- bsd_args.flags |= MAP_SHARED;
- if (args->flags & LINUX_MAP_PRIVATE)
- bsd_args.flags |= MAP_PRIVATE;
- if (args->flags & LINUX_MAP_FIXED)
- bsd_args.flags |= MAP_FIXED;
- if (args->flags & LINUX_MAP_ANON)
- bsd_args.flags |= MAP_ANON;
- else
- bsd_args.flags |= MAP_NOSYNC;
- if (args->flags & LINUX_MAP_GROWSDOWN)
- bsd_args.flags |= MAP_STACK;
- /*
- * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC
- * on Linux/i386. We do this to ensure maximum compatibility.
- * Linux/ia64 does the same in i386 emulation mode.
- */
- bsd_args.prot = args->prot;
- if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
- bsd_args.prot |= PROT_READ | PROT_EXEC;
-
- /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
- bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : args->fd;
- if (bsd_args.fd != -1) {
- /*
- * Linux follows Solaris mmap(2) description:
- * The file descriptor fildes is opened with
- * read permission, regardless of the
- * protection options specified.
- */
-
- error = fget(td, bsd_args.fd,
- cap_rights_init(&rights, CAP_MMAP), &fp);
- if (error != 0 )
- return (error);
- if (fp->f_type != DTYPE_VNODE) {
- fdrop(fp, td);
- return (EINVAL);
- }
-
- /* Linux mmap() just fails for O_WRONLY files */
- if (!(fp->f_flag & FREAD)) {
- fdrop(fp, td);
- return (EACCES);
- }
-
- fdrop(fp, td);
- }
-
- if (args->flags & LINUX_MAP_GROWSDOWN) {
- /*
- * The Linux MAP_GROWSDOWN option does not limit auto
- * growth of the region. Linux mmap with this option
- * takes as addr the inital BOS, and as len, the initial
- * region size. It can then grow down from addr without
- * limit. However, Linux threads has an implicit internal
- * limit to stack size of STACK_SIZE. Its just not
- * enforced explicitly in Linux. But, here we impose
- * a limit of (STACK_SIZE - GUARD_SIZE) on the stack
- * region, since we can do this with our mmap.
- *
- * Our mmap with MAP_STACK takes addr as the maximum
- * downsize limit on BOS, and as len the max size of
- * the region. It then maps the top SGROWSIZ bytes,
- * and auto grows the region down, up to the limit
- * in addr.
- *
- * If we don't use the MAP_STACK option, the effect
- * of this code is to allocate a stack region of a
- * fixed size of (STACK_SIZE - GUARD_SIZE).
- */
-
- if ((caddr_t)PTRIN(args->addr) + args->len >
- p->p_vmspace->vm_maxsaddr) {
- /*
- * Some Linux apps will attempt to mmap
- * thread stacks near the top of their
- * address space. If their TOS is greater
- * than vm_maxsaddr, vm_map_growstack()
- * will confuse the thread stack with the
- * process stack and deliver a SEGV if they
- * attempt to grow the thread stack past their
- * current stacksize rlimit. To avoid this,
- * adjust vm_maxsaddr upwards to reflect
- * the current stacksize rlimit rather
- * than the maximum possible stacksize.
- * It would be better to adjust the
- * mmap'ed region, but some apps do not check
- * mmap's return value.
- */
- PROC_LOCK(p);
- p->p_vmspace->vm_maxsaddr = (char *)USRSTACK -
- lim_cur(p, RLIMIT_STACK);
- PROC_UNLOCK(p);
- }
-
- /*
- * This gives us our maximum stack size and a new BOS.
- * If we're using VM_STACK, then mmap will just map
- * the top SGROWSIZ bytes, and let the stack grow down
- * to the limit at BOS. If we're not using VM_STACK
- * we map the full stack, since we don't have a way
- * to autogrow it.
- */
- if (args->len > STACK_SIZE - GUARD_SIZE) {
- bsd_args.addr = (caddr_t)PTRIN(args->addr);
- bsd_args.len = args->len;
- } else {
- bsd_args.addr = (caddr_t)PTRIN(args->addr) -
- (STACK_SIZE - GUARD_SIZE - args->len);
- bsd_args.len = STACK_SIZE - GUARD_SIZE;
- }
- } else {
- bsd_args.addr = (caddr_t)PTRIN(args->addr);
- bsd_args.len = args->len;
- }
- bsd_args.pos = (off_t)args->pgoff;
-
- error = sys_mmap(td, &bsd_args);
-
- LINUX_CTR2(mmap2, "return: %d (%p)",
- error, td->td_retval[0]);
- return (error);
+ return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot,
+ args->flags, args->fd, args->pgoff));
}
int
linux_mprotect(struct thread *td, struct linux_mprotect_args *uap)
{
- struct mprotect_args bsd_args;
-
- LINUX_CTR(mprotect);
- bsd_args.addr = uap->addr;
- bsd_args.len = uap->len;
- bsd_args.prot = uap->prot;
- if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
- bsd_args.prot |= PROT_READ | PROT_EXEC;
- return (sys_mprotect(td, &bsd_args));
+ return (linux_mprotect_common(td, PTROUT(uap->addr), uap->len, uap->prot));
}
int
diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index 4946805..4651788 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
#ifndef _LINUX_SYSPROTO_H_
@@ -499,7 +499,7 @@ struct linux_mknod_args {
char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)];
};
struct linux_personality_args {
- char per_l_[PADL_(l_ulong)]; l_ulong per; char per_r_[PADR_(l_ulong)];
+ char per_l_[PADL_(l_uint)]; l_uint per; char per_r_[PADR_(l_uint)];
};
struct linux_ustat_args {
char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)];
diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h
index 874651c..88fa022 100644
--- a/sys/amd64/linux/linux_syscall.h
+++ b/sys/amd64/linux/linux_syscall.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
#define LINUX_SYS_read 0
diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c
index fcea91e..1b71749 100644
--- a/sys/amd64/linux/linux_syscalls.c
+++ b/sys/amd64/linux/linux_syscalls.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
const char *linux_syscallnames[] = {
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
index 14d5c87..50302e8 100644
--- a/sys/amd64/linux/linux_sysent.c
+++ b/sys/amd64/linux/linux_sysent.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
#include <sys/param.h>
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
index 5dcdd55..be99518 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -1120,7 +1120,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
/* linux_personality */
case 135: {
struct linux_personality_args *p = params;
- iarg[0] = p->per; /* l_ulong */
+ iarg[0] = p->per; /* l_uint */
*n_args = 1;
break;
}
@@ -4112,7 +4112,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 135:
switch(ndx) {
case 0:
- p = "l_ulong";
+ p = "l_uint";
break;
default:
break;
diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
index 50ddd92..a2c4a0b 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -270,7 +270,7 @@
133 AUE_MKNOD STD { int linux_mknod(char *path, l_int mode, \
l_dev_t dev); }
134 AUE_USELIB UNIMPL uselib
-135 AUE_PERSONALITY STD { int linux_personality(l_ulong per); }
+135 AUE_PERSONALITY STD { int linux_personality(l_uint per); }
136 AUE_NULL STD { int linux_ustat(l_dev_t dev, \
struct l_ustat *ubuf); }
137 AUE_STATFS STD { int linux_statfs(char *path, \
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 02d12f5..97da878 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -165,13 +165,6 @@ struct l_rusage {
l_long ru_nivcsw;
} __packed;
-/* mmap options */
-#define LINUX_MAP_SHARED 0x0001
-#define LINUX_MAP_PRIVATE 0x0002
-#define LINUX_MAP_FIXED 0x0010
-#define LINUX_MAP_ANON 0x0020
-#define LINUX_MAP_GROWSDOWN 0x0100
-
struct l_mmap_argv {
l_uintptr_t addr;
l_size_t len;
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index b38afb3..187ec15 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$");
#include <amd64/linux32/linux32_proto.h>
#include <compat/linux/linux_ipc.h>
#include <compat/linux/linux_misc.h>
+#include <compat/linux/linux_mmap.h>
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_emul.h>
@@ -84,9 +85,6 @@ struct l_old_select_argv {
l_uintptr_t timeout;
} __packed;
-static int linux_mmap_common(struct thread *td, l_uintptr_t addr,
- l_size_t len, l_int prot, l_int flags, l_int fd,
- l_loff_t pos);
static void
bsd_to_linux_rusage(struct rusage *ru, struct l_rusage *lru)
@@ -448,9 +446,6 @@ linux_set_upcall_kse(struct thread *td, register_t stack)
return (0);
}
-#define STACK_SIZE (2 * 1024 * 1024)
-#define GUARD_SIZE (4 * PAGE_SIZE)
-
int
linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
{
@@ -489,184 +484,11 @@ linux_mmap(struct thread *td, struct linux_mmap_args *args)
(uint32_t)linux_args.pgoff));
}
-static int
-linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
- l_int flags, l_int fd, l_loff_t pos)
-{
- struct proc *p = td->td_proc;
- struct mmap_args /* {
- caddr_t addr;
- size_t len;
- int prot;
- int flags;
- int fd;
- long pad;
- off_t pos;
- } */ bsd_args;
- int error;
- struct file *fp;
- cap_rights_t rights;
-
- error = 0;
- bsd_args.flags = 0;
- fp = NULL;
-
- /*
- * Linux mmap(2):
- * You must specify exactly one of MAP_SHARED and MAP_PRIVATE
- */
- if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE)))
- return (EINVAL);
-
- if (flags & LINUX_MAP_SHARED)
- bsd_args.flags |= MAP_SHARED;
- if (flags & LINUX_MAP_PRIVATE)
- bsd_args.flags |= MAP_PRIVATE;
- if (flags & LINUX_MAP_FIXED)
- bsd_args.flags |= MAP_FIXED;
- if (flags & LINUX_MAP_ANON) {
- /* Enforce pos to be on page boundary, then ignore. */
- if ((pos & PAGE_MASK) != 0)
- return (EINVAL);
- pos = 0;
- bsd_args.flags |= MAP_ANON;
- } else
- bsd_args.flags |= MAP_NOSYNC;
- if (flags & LINUX_MAP_GROWSDOWN)
- bsd_args.flags |= MAP_STACK;
-
- /*
- * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC
- * on Linux/i386. We do this to ensure maximum compatibility.
- * Linux/ia64 does the same in i386 emulation mode.
- */
- bsd_args.prot = prot;
- if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
- bsd_args.prot |= PROT_READ | PROT_EXEC;
-
- /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
- bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd;
- if (bsd_args.fd != -1) {
- /*
- * Linux follows Solaris mmap(2) description:
- * The file descriptor fildes is opened with
- * read permission, regardless of the
- * protection options specified.
- */
-
- error = fget(td, bsd_args.fd,
- cap_rights_init(&rights, CAP_MMAP), &fp);
- if (error != 0)
- return (error);
- if (fp->f_type != DTYPE_VNODE) {
- fdrop(fp, td);
- return (EINVAL);
- }
-
- /* Linux mmap() just fails for O_WRONLY files */
- if (!(fp->f_flag & FREAD)) {
- fdrop(fp, td);
- return (EACCES);
- }
-
- fdrop(fp, td);
- }
-
- if (flags & LINUX_MAP_GROWSDOWN) {
- /*
- * The Linux MAP_GROWSDOWN option does not limit auto
- * growth of the region. Linux mmap with this option
- * takes as addr the inital BOS, and as len, the initial
- * region size. It can then grow down from addr without
- * limit. However, Linux threads has an implicit internal
- * limit to stack size of STACK_SIZE. Its just not
- * enforced explicitly in Linux. But, here we impose
- * a limit of (STACK_SIZE - GUARD_SIZE) on the stack
- * region, since we can do this with our mmap.
- *
- * Our mmap with MAP_STACK takes addr as the maximum
- * downsize limit on BOS, and as len the max size of
- * the region. It then maps the top SGROWSIZ bytes,
- * and auto grows the region down, up to the limit
- * in addr.
- *
- * If we don't use the MAP_STACK option, the effect
- * of this code is to allocate a stack region of a
- * fixed size of (STACK_SIZE - GUARD_SIZE).
- */
-
- if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) {
- /*
- * Some Linux apps will attempt to mmap
- * thread stacks near the top of their
- * address space. If their TOS is greater
- * than vm_maxsaddr, vm_map_growstack()
- * will confuse the thread stack with the
- * process stack and deliver a SEGV if they
- * attempt to grow the thread stack past their
- * current stacksize rlimit. To avoid this,
- * adjust vm_maxsaddr upwards to reflect
- * the current stacksize rlimit rather
- * than the maximum possible stacksize.
- * It would be better to adjust the
- * mmap'ed region, but some apps do not check
- * mmap's return value.
- */
- PROC_LOCK(p);
- p->p_vmspace->vm_maxsaddr = (char *)LINUX32_USRSTACK -
- lim_cur(p, RLIMIT_STACK);
- PROC_UNLOCK(p);
- }
-
- /*
- * This gives us our maximum stack size and a new BOS.
- * If we're using VM_STACK, then mmap will just map
- * the top SGROWSIZ bytes, and let the stack grow down
- * to the limit at BOS. If we're not using VM_STACK
- * we map the full stack, since we don't have a way
- * to autogrow it.
- */
- if (len > STACK_SIZE - GUARD_SIZE) {
- bsd_args.addr = (caddr_t)PTRIN(addr);
- bsd_args.len = len;
- } else {
- bsd_args.addr = (caddr_t)PTRIN(addr) -
- (STACK_SIZE - GUARD_SIZE - len);
- bsd_args.len = STACK_SIZE - GUARD_SIZE;
- }
- } else {
- bsd_args.addr = (caddr_t)PTRIN(addr);
- bsd_args.len = len;
- }
- bsd_args.pos = pos;
-
-#ifdef DEBUG
- if (ldebug(mmap))
- printf("-> %s(%p, %d, %d, 0x%08x, %d, 0x%x)\n",
- __func__,
- (void *)bsd_args.addr, (int)bsd_args.len, bsd_args.prot,
- bsd_args.flags, bsd_args.fd, (int)bsd_args.pos);
-#endif
- error = sys_mmap(td, &bsd_args);
-#ifdef DEBUG
- if (ldebug(mmap))
- printf("-> %s() return: 0x%x (0x%08x)\n",
- __func__, error, (u_int)td->td_retval[0]);
-#endif
- return (error);
-}
-
int
linux_mprotect(struct thread *td, struct linux_mprotect_args *uap)
{
- struct mprotect_args bsd_args;
-
- bsd_args.addr = uap->addr;
- bsd_args.len = uap->len;
- bsd_args.prot = uap->prot;
- if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
- bsd_args.prot |= PROT_READ | PROT_EXEC;
- return (sys_mprotect(td, &bsd_args));
+
+ return (linux_mprotect_common(td, PTROUT(uap->addr), uap->len, uap->prot));
}
int
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
index a960c09..b2d1a7e 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin
+ * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
#ifndef _LINUX32_SYSPROTO_H_
@@ -427,7 +427,7 @@ struct linux_sysfs_args {
char arg2_l_[PADL_(l_ulong)]; l_ulong arg2; char arg2_r_[PADR_(l_ulong)];
};
struct linux_personality_args {
- char per_l_[PADL_(l_ulong)]; l_ulong per; char per_r_[PADR_(l_ulong)];
+ char per_l_[PADL_(l_uint)]; l_uint per; char per_r_[PADR_(l_uint)];
};
struct linux_setfsuid16_args {
char uid_l_[PADL_(l_uid16_t)]; l_uid16_t uid; char uid_r_[PADR_(l_uid16_t)];
diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h
index 25747e4..82764d0 100644
--- a/sys/amd64/linux32/linux32_syscall.h
+++ b/sys/amd64/linux32/linux32_syscall.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin
+ * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
#define LINUX32_SYS_linux_exit 1
diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c
index ef965d7..0d995c3 100644
--- a/sys/amd64/linux32/linux32_syscalls.c
+++ b/sys/amd64/linux32/linux32_syscalls.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin
+ * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
const char *linux32_syscallnames[] = {
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
index 6eb215e..ee766d7 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin
+ * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin
*/
#include "opt_compat.h"
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
index cabfab7..f3bde85 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -910,7 +910,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
/* linux_personality */
case 136: {
struct linux_personality_args *p = params;
- iarg[0] = p->per; /* l_ulong */
+ iarg[0] = p->per; /* l_uint */
*n_args = 1;
break;
}
@@ -3715,7 +3715,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 136:
switch(ndx) {
case 0:
- p = "l_ulong";
+ p = "l_uint";
break;
default:
break;
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index 79cd2c8..20aa3c4 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -238,7 +238,7 @@
134 AUE_BDFLUSH STD { int linux_bdflush(void); }
135 AUE_NULL STD { int linux_sysfs(l_int option, \
l_ulong arg1, l_ulong arg2); }
-136 AUE_PERSONALITY STD { int linux_personality(l_ulong per); }
+136 AUE_PERSONALITY STD { int linux_personality(l_uint per); }
137 AUE_NULL UNIMPL afs_syscall
138 AUE_SETFSUID STD { int linux_setfsuid16(l_uid16_t uid); }
139 AUE_SETFSGID STD { int linux_setfsgid16(l_gid16_t gid); }
OpenPOWER on IntegriCloud