svn commit: r254646 - in projects/bhyve_npt_pmap: include lib/libc/gen lib/libc/net lib/libc/stdlib share/man/man9 sys/amd64/amd64 sys/amd64/conf sys/arm/conf sys/arm/samsung/exynos sys/cddl/dev/sd...
Neel Natu
neel at FreeBSD.org
Thu Aug 22 06:50:09 UTC 2013
Author: neel
Date: Thu Aug 22 06:50:04 2013
New Revision: 254646
URL: http://svnweb.freebsd.org/changeset/base/254646
Log:
IFC @254501
Added:
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_capability.c
- copied unchanged from r254501, head/sys/compat/freebsd32/freebsd32_capability.c
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.h
- copied unchanged from r254501, head/sys/compat/freebsd32/freebsd32_misc.h
Modified:
projects/bhyve_npt_pmap/include/dirent.h
projects/bhyve_npt_pmap/lib/libc/gen/Symbol.map
projects/bhyve_npt_pmap/lib/libc/gen/closedir.c
projects/bhyve_npt_pmap/lib/libc/gen/directory.3
projects/bhyve_npt_pmap/lib/libc/gen/dup3.3
projects/bhyve_npt_pmap/lib/libc/net/gethostbyname.3
projects/bhyve_npt_pmap/lib/libc/stdlib/strtonum.3
projects/bhyve_npt_pmap/share/man/man9/SDT.9
projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c
projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC
projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD
projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD2
projects/bhyve_npt_pmap/sys/arm/conf/EFIKA_MX
projects/bhyve_npt_pmap/sys/arm/conf/VERSATILEPB
projects/bhyve_npt_pmap/sys/arm/samsung/exynos/exynos5_machdep.c
projects/bhyve_npt_pmap/sys/cddl/dev/sdt/sdt.c
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.c
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_proto.h
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscall.h
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscalls.c
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_sysent.c
projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_systrace_args.c
projects/bhyve_npt_pmap/sys/compat/freebsd32/syscalls.master
projects/bhyve_npt_pmap/sys/compat/linux/linux_dtrace.h
projects/bhyve_npt_pmap/sys/conf/files
projects/bhyve_npt_pmap/sys/dev/hwpmc/hwpmc_core.c
projects/bhyve_npt_pmap/sys/dev/hwpmc/pmc_events.h
projects/bhyve_npt_pmap/sys/dev/sdhci/sdhci.c
projects/bhyve_npt_pmap/sys/dev/sdhci/sdhci.h
projects/bhyve_npt_pmap/sys/i386/conf/GENERIC
projects/bhyve_npt_pmap/sys/ia64/conf/GENERIC
projects/bhyve_npt_pmap/sys/kern/sys_capability.c
projects/bhyve_npt_pmap/sys/kern/uipc_mqueue.c
projects/bhyve_npt_pmap/sys/net80211/ieee80211_output.c
projects/bhyve_npt_pmap/sys/pc98/conf/GENERIC
projects/bhyve_npt_pmap/sys/powerpc/conf/GENERIC
projects/bhyve_npt_pmap/sys/sparc64/conf/GENERIC
projects/bhyve_npt_pmap/sys/sys/filedesc.h
projects/bhyve_npt_pmap/sys/sys/sdt.h
projects/bhyve_npt_pmap/sys/sys/stdatomic.h
projects/bhyve_npt_pmap/sys/sys/syscallsubr.h
projects/bhyve_npt_pmap/usr.bin/procstat/procstat_files.c
projects/bhyve_npt_pmap/usr.sbin/rtsold/probe.c
projects/bhyve_npt_pmap/usr.sbin/rwhod/rwhod.c
Directory Properties:
projects/bhyve_npt_pmap/ (props changed)
projects/bhyve_npt_pmap/lib/libc/ (props changed)
projects/bhyve_npt_pmap/sys/ (props changed)
projects/bhyve_npt_pmap/sys/conf/ (props changed)
projects/bhyve_npt_pmap/usr.bin/procstat/ (props changed)
projects/bhyve_npt_pmap/usr.sbin/rtsold/ (props changed)
Modified: projects/bhyve_npt_pmap/include/dirent.h
==============================================================================
--- projects/bhyve_npt_pmap/include/dirent.h Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/include/dirent.h Thu Aug 22 06:50:04 2013 (r254646)
@@ -79,6 +79,7 @@ int dirfd(DIR *);
#endif
#if __BSD_VISIBLE
DIR *__opendir2(const char *, int);
+int fdclosedir(DIR *);
int getdents(int, char *, int);
int getdirentries(int, char *, int, long *);
#endif
Modified: projects/bhyve_npt_pmap/lib/libc/gen/Symbol.map
==============================================================================
--- projects/bhyve_npt_pmap/lib/libc/gen/Symbol.map Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/lib/libc/gen/Symbol.map Thu Aug 22 06:50:04 2013 (r254646)
@@ -384,7 +384,8 @@ FBSD_1.3 {
clock_getcpuclockid;
dirfd;
dup3;
- fdlopen;
+ fdclosedir;
+ fdlopen;
__FreeBSD_libc_enter_restricted_mode;
getcontextx;
gid_from_group;
Modified: projects/bhyve_npt_pmap/lib/libc/gen/closedir.c
==============================================================================
--- projects/bhyve_npt_pmap/lib/libc/gen/closedir.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/lib/libc/gen/closedir.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
* close a directory.
*/
int
-closedir(DIR *dirp)
+fdclosedir(DIR *dirp)
{
int fd;
@@ -65,5 +65,12 @@ closedir(DIR *dirp)
_pthread_mutex_destroy(&dirp->dd_lock);
}
free((void *)dirp);
- return(_close(fd));
+ return (fd);
+}
+
+int
+closedir(DIR *dirp)
+{
+
+ return (_close(fdclosedir(dirp)));
}
Modified: projects/bhyve_npt_pmap/lib/libc/gen/directory.3
==============================================================================
--- projects/bhyve_npt_pmap/lib/libc/gen/directory.3 Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/lib/libc/gen/directory.3 Thu Aug 22 06:50:04 2013 (r254646)
@@ -28,7 +28,7 @@
.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd July 5, 2012
+.Dd August 18, 2013
.Dt DIRECTORY 3
.Os
.Sh NAME
@@ -40,6 +40,7 @@
.Nm seekdir ,
.Nm rewinddir ,
.Nm closedir ,
+.Nm fdclosedir ,
.Nm dirfd
.Nd directory operations
.Sh LIBRARY
@@ -64,6 +65,8 @@
.Ft int
.Fn closedir "DIR *dirp"
.Ft int
+.Fn fdclosedir "DIR *dirp"
+.Ft int
.Fn dirfd "DIR *dirp"
.Sh DESCRIPTION
The
@@ -208,6 +211,13 @@ On failure, \-1 is returned and the glob
is set to indicate the error.
.Pp
The
+.Fn fdclosedir
+function is equivalent to the
+.Fn closedir
+function except that this function returns directory file descriptor instead of
+closing it.
+.Pp
+The
.Fn dirfd
function
returns the integer file descriptor associated with the named
@@ -252,6 +262,9 @@ The
.Fn fdopendir
function appeared in
.Fx 8.0 .
+.Fn fdclosedir
+function appeared in
+.Fx 10.0 .
.Sh BUGS
The invalidation of
.Fn telldir
Modified: projects/bhyve_npt_pmap/lib/libc/gen/dup3.3
==============================================================================
--- projects/bhyve_npt_pmap/lib/libc/gen/dup3.3 Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/lib/libc/gen/dup3.3 Thu Aug 22 06:50:04 2013 (r254646)
@@ -1,5 +1,5 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
+.\" Copyright (c) 2013 Jilles Tjoelker
+.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -9,14 +9,11 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -25,7 +22,6 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)dup.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
.Dd August 16, 2013
Modified: projects/bhyve_npt_pmap/lib/libc/net/gethostbyname.3
==============================================================================
--- projects/bhyve_npt_pmap/lib/libc/net/gethostbyname.3 Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/lib/libc/net/gethostbyname.3 Thu Aug 22 06:50:04 2013 (r254646)
@@ -51,7 +51,7 @@
.Ft struct hostent *
.Fn gethostbyname2 "const char *name" "int af"
.Ft struct hostent *
-.Fn gethostbyaddr "const void *addr" "socklen_t len" "int type"
+.Fn gethostbyaddr "const void *addr" "socklen_t len" "int af"
.Ft struct hostent *
.Fn gethostent void
.Ft void
@@ -107,7 +107,7 @@ in binary form
.Tn ASCII
form).
The
-.Fa type
+.Fa af
argument specifies the address family
(e.g.\&
.Dv AF_INET , AF_INET6 ,
Modified: projects/bhyve_npt_pmap/lib/libc/stdlib/strtonum.3
==============================================================================
--- projects/bhyve_npt_pmap/lib/libc/stdlib/strtonum.3 Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/lib/libc/stdlib/strtonum.3 Thu Aug 22 06:50:04 2013 (r254646)
@@ -97,7 +97,7 @@ int iterations;
const char *errstr;
iterations = strtonum(optarg, 1, 64, &errstr);
-if (errstr)
+if (errstr != NULL)
errx(1, "number of iterations is %s: %s", errstr, optarg);
.Ed
.Pp
Modified: projects/bhyve_npt_pmap/share/man/man9/SDT.9
==============================================================================
--- projects/bhyve_npt_pmap/share/man/man9/SDT.9 Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/share/man/man9/SDT.9 Thu Aug 22 06:50:04 2013 (r254646)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 3, 2013
+.Dd August 17, 2013
.Dt SDT 9
.Os
.Sh NAME
@@ -45,6 +45,19 @@
.Fn SDT_PROBE_DEFINE6 prov mod func name sname arg0 arg1 arg2 arg3 arg4 arg5
.Fn SDT_PROBE_DEFINE7 prov mod func name sname arg0 arg1 arg2 arg3 arg4 arg5 \
arg6
+.Fn SDT_PROBE_DEFINE0_XLATE prov mod func name sname
+.Fn SDT_PROBE_DEFINE1_XLATE prov mod func name sname arg0 xarg0
+.Fn SDT_PROBE_DEFINE2_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1
+.Fn SDT_PROBE_DEFINE3_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \
+ arg2 xarg2
+.Fn SDT_PROBE_DEFINE4_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \
+ arg2 xarg2 arg3 xarg3
+.Fn SDT_PROBE_DEFINE5_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \
+ arg2 xarg2 arg3 xarg3 arg4 xarg4
+.Fn SDT_PROBE_DEFINE6_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \
+ arg2 xarg2 arg3 xarg3 arg4 xarg4 arg5 xarg5
+.Fn SDT_PROBE_DEFINE7_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \
+ arg2 xarg2 arg3 xarg3 arg4 xarg4 arg5 xarg5 arg6 xarg6
.Fn SDT_PROBE0 prov mod func name
.Fn SDT_PROBE1 prov mod func name arg0
.Fn SDT_PROBE2 prov mod func name arg0 arg1
@@ -150,6 +163,30 @@ It is strongly recommended that probe de
argument types.
.Pp
The
+.Fn SDT_PROBE_DEFINE*_XLATE
+macros are used for probes whose argument types are to be dynamically translated
+to the types specified by the corresponding
+.Ar xarg
+arguments.
+This is mainly useful when porting probe definitions from other operating
+systems.
+As seen by
+.Xr dtrace 1 ,
+the arguments of a probe defined using these macros will have types which match
+the
+.Ar xarg
+types in the probe definition.
+However, the arguments passed in at the trace point will have types matching the
+native argument types in the probe definition, and thus the native type is
+dynamically translated to the translated type.
+So long as an appropriate translator is defined in
+.Pa /usr/lib/dtrace ,
+scripts making use of the probe need not concern themselves with the underlying
+type of a given
+.Nm
+probe argument.
+.Pp
+The
.Fn SDT_PROBE*
macros are used to create
.Nm
@@ -164,21 +201,20 @@ of type Destination Unreachable:
.Bd -literal -offset indent
SDT_PROVIDER_DECLARE(icmp);
-SDT_PROBE_DEFINE2(icmp, , unreach, pkt_receive, pkt-receive,
- "struct mbuf *", "struct icmp *");
+SDT_PROBE_DEFINE1(icmp, , unreach, pkt_receive, pkt-receive,
+ "struct icmp *");
.Ed
-This particular probe would take two arguments: a pointer to the
-.Xr mbuf 9
-containing the incoming packet, and a pointer to the ICMP header for the packet.
+This particular probe would take a single argument: a pointer to the struct
+containing the ICMP header for the packet.
Note that the module name of this probe is not specified.
.Pp
Consider a DTrace probe which fires when the network stack receives an IP
packet.
Such a probe would be defined by multiple tracepoints:
.Bd -literal -offset indent
-SDT_PROBE_DEFINE2(ip, , , receive, receive, "struct mbuf *",
- "struct ifnet *", "struct ip *", "struct ip6_hdr *");
+SDT_PROBE_DEFINE3(ip, , , receive, receive, "struct ifnet *",
+ "struct ip *", "struct ip6_hdr *");
int
ip_input(struct mbuf *m)
@@ -186,7 +222,7 @@ ip_input(struct mbuf *m)
struct ip *ip;
...
ip = mtod(m, struct ip *);
- SDT_PROBE4(ip, , , receive, m, m->m_pkthdr.rcvif, ip, NULL);
+ SDT_PROBE3(ip, , , receive, m->m_pkthdr.rcvif, ip, NULL);
...
}
@@ -196,13 +232,46 @@ ip6_input(struct mbuf *m)
struct ip6_hdr *ip6;
...
ip6 = mtod(m, struct ip6_hdr *);
- SDT_PROBE4(ip, , , receive, m, m->m_pkthdr.rcvif, NULL, ip6);
+ SDT_PROBE3(ip, , , receive, m->m_pkthdr.rcvif, NULL, ip6);
...
}
.Ed
In particular, the probe should fire when the kernel receives either an IPv4
packet or an IPv6 packet.
+.Pp
+Consider the ICMP probe discussed above.
+We note that its second argument is of type
+.Ar struct icmp ,
+which is a type defined in the FreeBSD kernel to represent the ICMP header of
+an ICMP packet, defined in RFC 792.
+Linux has a corresponding type,
+.Ar struct icmphdr ,
+for the same purpose, but its field names differ from FreeBSD's
+.Ar struct icmp .
+Similarly, illumos defines the
+.Ar icmph_t
+type, again with different field names.
+Even with the
+.Ql icmp:::pkt-receive
+probes defined in all three operating systems,
+one would still have to write OS-specific scripts to extract a given field out
+of the ICMP header argument.
+Dynamically-translated types solve this problem: one can define an
+OS-independent
+.Xr c 7
+struct to represent an ICMP header, say
+.Ar struct icmp_hdr_dt ,
+and define translators from each of the three OS-specific types to
+.Ar struct icmp_hdr_dt ,
+all in the
+.Xr dtrace 1
+library path.
+Then the FreeBSD probe above can be defined with:
+.Bd -literal -offset indent
+SDT_PROBE_DEFINE1_XLATE(ip, , , receive, receive, "struct icmp *",
+ "struct icmp_hdr_dt *");
+.Ed
.Sh SEE ALSO
.Xr dtrace 1
.Sh AUTHORS
Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -2313,6 +2313,9 @@ pmap_release(pmap_t pmap)
KASSERT(vm_radix_is_empty(&pmap->pm_root),
("pmap_release: pmap has reserved page table page(s)"));
+ rw_wlock(&pvh_global_lock);
+ rw_wunlock(&pvh_global_lock);
+
m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4));
for (i = 0; i < NKPML4E; i++) /* KVA */
Modified: projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC
==============================================================================
--- projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC Thu Aug 22 06:50:04 2013 (r254646)
@@ -66,6 +66,7 @@ options HWPMC_HOOKS # Necessary kernel
options AUDIT # Security event auditing
options CAPABILITY_MODE # Capsicum capability mode
options CAPABILITIES # Capsicum capabilities
+options PROCDESC # Support for process descriptors
options MAC # TrustedBSD MAC Framework
options KDTRACE_FRAME # Ensure frames are compiled in
options KDTRACE_HOOKS # Kernel DTrace hooks
Modified: projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD
==============================================================================
--- projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD Thu Aug 22 06:50:04 2013 (r254646)
@@ -47,6 +47,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options PREEMPTION
options FREEBSD_BOOT_LOADER
+options VFP # vfp/neon
# Debugging
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
Modified: projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD2
==============================================================================
--- projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD2 Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/arm/conf/CUBIEBOARD2 Thu Aug 22 06:50:04 2013 (r254646)
@@ -47,6 +47,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options PREEMPTION
options FREEBSD_BOOT_LOADER
+options VFP # vfp/neon
# Debugging
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
Modified: projects/bhyve_npt_pmap/sys/arm/conf/EFIKA_MX
==============================================================================
--- projects/bhyve_npt_pmap/sys/arm/conf/EFIKA_MX Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/arm/conf/EFIKA_MX Thu Aug 22 06:50:04 2013 (r254646)
@@ -58,6 +58,7 @@ options SYSVMSG # SYSV-style message
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options INCLUDE_CONFIG_FILE # Include this file in kernel
+options VFP # vfp/neon
# required for netbooting
#options BOOTP
Modified: projects/bhyve_npt_pmap/sys/arm/conf/VERSATILEPB
==============================================================================
--- projects/bhyve_npt_pmap/sys/arm/conf/VERSATILEPB Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/arm/conf/VERSATILEPB Thu Aug 22 06:50:04 2013 (r254646)
@@ -54,6 +54,7 @@ options SYSVSEM #SYSV-style semaphore
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options ROOTDEVNAME=\"ufs:da0s2a\"
+options VFP # vfp/neon
options PREEMPTION
Modified: projects/bhyve_npt_pmap/sys/arm/samsung/exynos/exynos5_machdep.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/arm/samsung/exynos/exynos5_machdep.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/arm/samsung/exynos/exynos5_machdep.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
#include <dev/fdt/fdt_common.h>
-#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000
+#define DEVMAP_BOOTSTRAP_MAP_START 0xF0000000
extern int unmapped_buf_allowed;
@@ -83,7 +83,7 @@ platform_devmap_init(void)
int i;
i = 0;
- fdt_devmap[i].pd_va = 0xe2C00000;
+ fdt_devmap[i].pd_va = 0xf2C00000;
fdt_devmap[i].pd_pa = 0x12C00000;
fdt_devmap[i].pd_size = 0x100000;
fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
Modified: projects/bhyve_npt_pmap/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/cddl/dev/sdt/sdt.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/cddl/dev/sdt/sdt.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -201,11 +201,15 @@ sdt_getargdesc(void *arg, dtrace_id_t id
if (desc->dtargd_ndx < probe->n_args) {
TAILQ_FOREACH(argtype, &probe->argtype_list, argtype_entry) {
if (desc->dtargd_ndx == argtype->ndx) {
- /* XXX */
desc->dtargd_mapping = desc->dtargd_ndx;
strlcpy(desc->dtargd_native, argtype->type,
sizeof(desc->dtargd_native));
- desc->dtargd_xlate[0] = '\0'; /* XXX */
+ if (argtype->xtype != NULL)
+ strlcpy(desc->dtargd_xlate,
+ argtype->xtype,
+ sizeof(desc->dtargd_xlate));
+ else
+ desc->dtargd_xlate[0] = '\0';
}
}
} else
Copied: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_capability.c (from r254501, head/sys/compat/freebsd32/freebsd32_capability.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_capability.c Thu Aug 22 06:50:04 2013 (r254646, copy of r254501, head/sys/compat/freebsd32/freebsd32_capability.c)
@@ -0,0 +1,174 @@
+/*-
+ * Copyright (c) 2013 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Pawel Jakub Dawidek under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "opt_capsicum.h"
+
+#include <sys/param.h>
+#include <sys/capability.h>
+#include <sys/filedesc.h>
+#include <sys/malloc.h>
+#include <sys/proc.h>
+#include <sys/syscallsubr.h>
+#include <sys/sysproto.h>
+
+#include <security/audit/audit.h>
+
+#include <compat/freebsd32/freebsd32_misc.h>
+#include <compat/freebsd32/freebsd32_proto.h>
+
+#ifdef CAPABILITIES
+
+MALLOC_DECLARE(M_FILECAPS);
+
+int
+freebsd32_cap_rights_limit(struct thread *td,
+ struct freebsd32_cap_rights_limit_args *uap)
+{
+ struct cap_rights_limit_args ap;
+
+ ap.fd = uap->fd;
+ ap.rights = PAIR32TO64(uint64_t, uap->rights);
+ return (sys_cap_rights_limit(td, &ap));
+}
+
+int
+freebsd32_cap_ioctls_limit(struct thread *td,
+ struct freebsd32_cap_ioctls_limit_args *uap)
+{
+ u_long *cmds;
+ uint32_t *cmds32;
+ size_t ncmds;
+ u_int i;
+ int error;
+
+ ncmds = uap->ncmds;
+
+ if (ncmds > 256) /* XXX: Is 256 sane? */
+ return (EINVAL);
+
+ if (ncmds == 0) {
+ cmds = NULL;
+ } else {
+ cmds32 = malloc(sizeof(cmds32[0]) * ncmds, M_FILECAPS, M_WAITOK);
+ error = copyin(uap->cmds, cmds32, sizeof(cmds32[0]) * ncmds);
+ if (error != 0) {
+ free(cmds32, M_FILECAPS);
+ return (error);
+ }
+ cmds = malloc(sizeof(cmds[0]) * ncmds, M_FILECAPS, M_WAITOK);
+ for (i = 0; i < ncmds; i++)
+ cmds[i] = cmds32[i];
+ free(cmds32, M_FILECAPS);
+ }
+
+ return (kern_cap_ioctls_limit(td, uap->fd, cmds, ncmds));
+}
+
+int
+freebsd32_cap_ioctls_get(struct thread *td,
+ struct freebsd32_cap_ioctls_get_args *uap)
+{
+ struct filedesc *fdp;
+ struct filedescent *fdep;
+ uint32_t *cmds32;
+ u_long *cmds;
+ size_t maxcmds;
+ int error, fd;
+ u_int i;
+
+ fd = uap->fd;
+ cmds32 = uap->cmds;
+ maxcmds = uap->maxcmds;
+
+ AUDIT_ARG_FD(fd);
+
+ fdp = td->td_proc->p_fd;
+ FILEDESC_SLOCK(fdp);
+
+ if (fget_locked(fdp, fd) == NULL) {
+ error = EBADF;
+ goto out;
+ }
+
+ /*
+ * If all ioctls are allowed (fde_nioctls == -1 && fde_ioctls == NULL)
+ * the only sane thing we can do is to not populate the given array and
+ * return CAP_IOCTLS_ALL (actually, INT_MAX).
+ */
+
+ fdep = &fdp->fd_ofiles[fd];
+ cmds = fdep->fde_ioctls;
+ if (cmds32 != NULL && cmds != NULL) {
+ for (i = 0; i < MIN(fdep->fde_nioctls, maxcmds); i++) {
+ error = suword32(&cmds32[i], cmds[i]);
+ if (error != 0)
+ goto out;
+ }
+ }
+ if (fdep->fde_nioctls == -1)
+ td->td_retval[0] = INT_MAX;
+ else
+ td->td_retval[0] = fdep->fde_nioctls;
+
+ error = 0;
+out:
+ FILEDESC_SUNLOCK(fdp);
+ return (error);
+}
+
+#else /* !CAPABILITIES */
+
+int
+freebsd32_cap_rights_limit(struct thread *td,
+ struct freebsd32_cap_rights_limit_args *uap)
+{
+
+ return (ENOSYS);
+}
+
+int
+freebsd32_cap_ioctls_limit(struct thread *td,
+ struct freebsd32_cap_ioctls_limit_args *uap)
+{
+
+ return (ENOSYS);
+}
+
+int
+freebsd32_cap_ioctls_get(struct thread *td,
+ struct freebsd32_cap_ioctls_get_args *uap)
+{
+
+ return (ENOSYS);
+}
+
+#endif /* CAPABILITIES */
Modified: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -102,6 +102,7 @@ __FBSDID("$FreeBSD$");
#include <compat/freebsd32/freebsd32_util.h>
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_ipc.h>
+#include <compat/freebsd32/freebsd32_misc.h>
#include <compat/freebsd32/freebsd32_signal.h>
#include <compat/freebsd32/freebsd32_proto.h>
@@ -128,16 +129,6 @@ CTASSERT(sizeof(struct sigaction32) == 2
static int freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count);
static int freebsd32_kevent_copyin(void *arg, struct kevent *kevp, int count);
-#if BYTE_ORDER == BIG_ENDIAN
-#define PAIR32TO64(type, name) ((name ## 2) | ((type)(name ## 1) << 32))
-#define RETVAL_HI 0
-#define RETVAL_LO 1
-#else
-#define PAIR32TO64(type, name) ((name ## 1) | ((type)(name ## 2) << 32))
-#define RETVAL_HI 1
-#define RETVAL_LO 0
-#endif
-
void
freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32)
{
Copied: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.h (from r254501, head/sys/compat/freebsd32/freebsd32_misc.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_misc.h Thu Aug 22 06:50:04 2013 (r254646, copy of r254501, head/sys/compat/freebsd32/freebsd32_misc.h)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2013 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Pawel Jakub Dawidek under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _COMPAT_FREEBSD32_MISC_H_
+#define _COMPAT_FREEBSD32_MISC_H_
+
+#include <sys/endian.h>
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define PAIR32TO64(type, name) ((name ## 2) | ((type)(name ## 1) << 32))
+#define RETVAL_HI 0
+#define RETVAL_LO 1
+#else
+#define PAIR32TO64(type, name) ((name ## 1) | ((type)(name ## 2) << 32))
+#define RETVAL_HI 1
+#define RETVAL_LO 0
+#endif
+
+#endif /* !_COMPAT_FREEBSD32_MISC_H_ */
Modified: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_proto.h Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_proto.h Thu Aug 22 06:50:04 2013 (r254646)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254447 2013-08-17 14:17:13Z pjd
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd
*/
#ifndef _FREEBSD32_SYSPROTO_H_
@@ -627,6 +627,12 @@ struct freebsd32_wait6_args {
char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)];
char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)];
};
+struct freebsd32_cap_rights_limit_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+ char rights1_l_[PADL_(uint32_t)]; uint32_t rights1; char rights1_r_[PADR_(uint32_t)];
+ char rights2_l_[PADL_(uint32_t)]; uint32_t rights2; char rights2_r_[PADR_(uint32_t)];
+};
#else
struct freebsd32_posix_fallocate_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
@@ -652,7 +658,22 @@ struct freebsd32_wait6_args {
char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)];
char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)];
};
+struct freebsd32_cap_rights_limit_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char rights1_l_[PADL_(uint32_t)]; uint32_t rights1; char rights1_r_[PADR_(uint32_t)];
+ char rights2_l_[PADL_(uint32_t)]; uint32_t rights2; char rights2_r_[PADR_(uint32_t)];
+};
#endif
+struct freebsd32_cap_ioctls_limit_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char cmds_l_[PADL_(const uint32_t *)]; const uint32_t * cmds; char cmds_r_[PADR_(const uint32_t *)];
+ char ncmds_l_[PADL_(size_t)]; size_t ncmds; char ncmds_r_[PADR_(size_t)];
+};
+struct freebsd32_cap_ioctls_get_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char cmds_l_[PADL_(uint32_t *)]; uint32_t * cmds; char cmds_r_[PADR_(uint32_t *)];
+ char maxcmds_l_[PADL_(size_t)]; size_t maxcmds; char maxcmds_r_[PADR_(size_t)];
+};
struct freebsd32_aio_mlock_args {
char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
};
@@ -774,11 +795,15 @@ int freebsd32_pselect(struct thread *, s
int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *);
int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *);
int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *);
+int freebsd32_cap_rights_limit(struct thread *, struct freebsd32_cap_rights_limit_args *);
#else
int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *);
int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *);
int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *);
+int freebsd32_cap_rights_limit(struct thread *, struct freebsd32_cap_rights_limit_args *);
#endif
+int freebsd32_cap_ioctls_limit(struct thread *, struct freebsd32_cap_ioctls_limit_args *);
+int freebsd32_cap_ioctls_get(struct thread *, struct freebsd32_cap_ioctls_get_args *);
int freebsd32_aio_mlock(struct thread *, struct freebsd32_aio_mlock_args *);
#ifdef COMPAT_43
@@ -1174,9 +1199,13 @@ int freebsd7_freebsd32_shmctl(struct thr
#define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6
+#define FREEBSD32_SYS_AUE_freebsd32_cap_rights_limit AUE_CAP_RIGHTS_LIMIT
#define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6
+#define FREEBSD32_SYS_AUE_freebsd32_cap_rights_limit AUE_CAP_RIGHTS_LIMIT
+#define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_limit AUE_CAP_IOCTLS_LIMIT
+#define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_get AUE_CAP_IOCTLS_GET
#define FREEBSD32_SYS_AUE_freebsd32_aio_mlock AUE_NULL
#undef PAD_
Modified: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscall.h Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscall.h Thu Aug 22 06:50:04 2013 (r254646)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254447 2013-08-17 14:17:13Z pjd
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd
*/
#define FREEBSD32_SYS_syscall 0
@@ -438,12 +438,13 @@
#define FREEBSD32_SYS_freebsd32_posix_fallocate 530
#define FREEBSD32_SYS_freebsd32_posix_fadvise 531
#define FREEBSD32_SYS_freebsd32_wait6 532
+#define FREEBSD32_SYS_freebsd32_cap_rights_limit 533
#define FREEBSD32_SYS_freebsd32_posix_fallocate 530
#define FREEBSD32_SYS_freebsd32_posix_fadvise 531
#define FREEBSD32_SYS_freebsd32_wait6 532
-#define FREEBSD32_SYS_cap_rights_limit 533
-#define FREEBSD32_SYS_cap_ioctls_limit 534
-#define FREEBSD32_SYS_cap_ioctls_get 535
+#define FREEBSD32_SYS_freebsd32_cap_rights_limit 533
+#define FREEBSD32_SYS_freebsd32_cap_ioctls_limit 534
+#define FREEBSD32_SYS_freebsd32_cap_ioctls_get 535
#define FREEBSD32_SYS_cap_fcntls_limit 536
#define FREEBSD32_SYS_cap_fcntls_get 537
#define FREEBSD32_SYS_bindat 538
Modified: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscalls.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_syscalls.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254447 2013-08-17 14:17:13Z pjd
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd
*/
const char *freebsd32_syscallnames[] = {
@@ -557,14 +557,15 @@ const char *freebsd32_syscallnames[] = {
"freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */
"freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */
"freebsd32_wait6", /* 532 = freebsd32_wait6 */
+ "freebsd32_cap_rights_limit", /* 533 = freebsd32_cap_rights_limit */
#else
"freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */
"freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */
"freebsd32_wait6", /* 532 = freebsd32_wait6 */
+ "freebsd32_cap_rights_limit", /* 533 = freebsd32_cap_rights_limit */
#endif
- "cap_rights_limit", /* 533 = cap_rights_limit */
- "cap_ioctls_limit", /* 534 = cap_ioctls_limit */
- "cap_ioctls_get", /* 535 = cap_ioctls_get */
+ "freebsd32_cap_ioctls_limit", /* 534 = freebsd32_cap_ioctls_limit */
+ "freebsd32_cap_ioctls_get", /* 535 = freebsd32_cap_ioctls_get */
"cap_fcntls_limit", /* 536 = cap_fcntls_limit */
"cap_fcntls_get", /* 537 = cap_fcntls_get */
"bindat", /* 538 = bindat */
Modified: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_sysent.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_sysent.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254447 2013-08-17 14:17:13Z pjd
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd
*/
#include "opt_compat.h"
@@ -594,14 +594,15 @@ struct sysent freebsd32_sysent[] = {
{ AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */
{ AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */
{ AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */
+ { AS(freebsd32_cap_rights_limit_args), (sy_call_t *)freebsd32_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = freebsd32_cap_rights_limit */
#else
{ AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */
{ AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */
{ AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */
+ { AS(freebsd32_cap_rights_limit_args), (sy_call_t *)freebsd32_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = freebsd32_cap_rights_limit */
#endif
- { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = cap_rights_limit */
- { AS(cap_ioctls_limit_args), (sy_call_t *)sys_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = cap_ioctls_limit */
- { AS(cap_ioctls_get_args), (sy_call_t *)sys_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = cap_ioctls_get */
+ { AS(freebsd32_cap_ioctls_limit_args), (sy_call_t *)freebsd32_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */
+ { AS(freebsd32_cap_ioctls_get_args), (sy_call_t *)freebsd32_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */
{ AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */
{ AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 537 = cap_fcntls_get */
{ AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 538 = bindat */
Modified: projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_systrace_args.c
==============================================================================
--- projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Aug 22 06:30:06 2013 (r254645)
+++ projects/bhyve_npt_pmap/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Aug 22 06:50:04 2013 (r254646)
@@ -3159,6 +3159,16 @@ systrace_args(int sysnum, void *params,
*n_args = 8;
break;
}
+ /* freebsd32_cap_rights_limit */
+ case 533: {
+ struct freebsd32_cap_rights_limit_args *p = params;
+ iarg[0] = p->fd; /* int */
+ iarg[1] = p->pad; /* int */
+ uarg[2] = p->rights1; /* uint32_t */
+ uarg[3] = p->rights2; /* uint32_t */
+ *n_args = 4;
+ break;
+ }
#else
/* freebsd32_posix_fallocate */
case 530: {
@@ -3196,29 +3206,30 @@ systrace_args(int sysnum, void *params,
*n_args = 7;
break;
}
-#endif
- /* cap_rights_limit */
+ /* freebsd32_cap_rights_limit */
case 533: {
- struct cap_rights_limit_args *p = params;
+ struct freebsd32_cap_rights_limit_args *p = params;
iarg[0] = p->fd; /* int */
- uarg[1] = p->rights; /* uint64_t */
- *n_args = 2;
+ uarg[1] = p->rights1; /* uint32_t */
+ uarg[2] = p->rights2; /* uint32_t */
+ *n_args = 3;
break;
}
- /* cap_ioctls_limit */
+#endif
+ /* freebsd32_cap_ioctls_limit */
case 534: {
- struct cap_ioctls_limit_args *p = params;
+ struct freebsd32_cap_ioctls_limit_args *p = params;
iarg[0] = p->fd; /* int */
- uarg[1] = (intptr_t) p->cmds; /* const u_long * */
+ uarg[1] = (intptr_t) p->cmds; /* const uint32_t * */
uarg[2] = p->ncmds; /* size_t */
*n_args = 3;
break;
}
- /* cap_ioctls_get */
+ /* freebsd32_cap_ioctls_get */
case 535: {
- struct cap_ioctls_get_args *p = params;
+ struct freebsd32_cap_ioctls_get_args *p = params;
iarg[0] = p->fd; /* int */
- uarg[1] = (intptr_t) p->cmds; /* u_long * */
+ uarg[1] = (intptr_t) p->cmds; /* uint32_t * */
uarg[2] = p->maxcmds; /* size_t */
*n_args = 3;
break;
@@ -8572,6 +8583,25 @@ systrace_entry_setargdesc(int sysnum, in
break;
};
break;
+ /* freebsd32_cap_rights_limit */
+ case 533:
+ switch(ndx) {
+ case 0:
+ p = "int";
+ break;
+ case 1:
+ p = "int";
+ break;
+ case 2:
+ p = "uint32_t";
+ break;
+ case 3:
+ p = "uint32_t";
+ break;
+ default:
+ break;
+ };
+ break;
#else
/* freebsd32_posix_fallocate */
case 530:
@@ -8648,28 +8678,31 @@ systrace_entry_setargdesc(int sysnum, in
break;
};
break;
-#endif
- /* cap_rights_limit */
+ /* freebsd32_cap_rights_limit */
case 533:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
- p = "uint64_t";
+ p = "uint32_t";
+ break;
+ case 2:
+ p = "uint32_t";
break;
default:
break;
};
break;
- /* cap_ioctls_limit */
+#endif
+ /* freebsd32_cap_ioctls_limit */
case 534:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
- p = "const u_long *";
+ p = "const uint32_t *";
break;
case 2:
p = "size_t";
@@ -8678,14 +8711,14 @@ systrace_entry_setargdesc(int sysnum, in
break;
};
break;
- /* cap_ioctls_get */
+ /* freebsd32_cap_ioctls_get */
case 535:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
- p = "u_long *";
+ p = "uint32_t *";
break;
case 2:
p = "size_t";
@@ -10622,6 +10655,11 @@ systrace_return_setargdesc(int sysnum, i
if (ndx == 0 || ndx == 1)
p = "int";
break;
+ /* freebsd32_cap_rights_limit */
+ case 533:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
#else
/* freebsd32_posix_fallocate */
case 530:
@@ -10638,18 +10676,18 @@ systrace_return_setargdesc(int sysnum, i
if (ndx == 0 || ndx == 1)
p = "int";
break;
-#endif
- /* cap_rights_limit */
+ /* freebsd32_cap_rights_limit */
case 533:
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* cap_ioctls_limit */
+#endif
+ /* freebsd32_cap_ioctls_limit */
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list