PERFORCE change 165895 for review
Scott Long
scottl at FreeBSD.org
Fri Jul 10 03:56:18 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165895
Change 165895 by scottl at scottl-y1 on 2009/07/10 03:55:29
IFC
Affected files ...
.. //depot/projects/scottl-camlock/src/bin/ps/ps.1#3 integrate
.. //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/head/thread.h#2 integrate
.. //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c#2 integrate
.. //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h#2 integrate
.. //depot/projects/scottl-camlock/src/include/unistd.h#4 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/sys/Makefile.inc#5 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/sys/Symbol.map#7 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/sys/pathconf.2#4 integrate
.. //depot/projects/scottl-camlock/src/share/man/man4/pcm.4#7 integrate
.. //depot/projects/scottl-camlock/src/share/man/man5/procfs.5#2 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/cpu_switch.S#11 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/exception.S#10 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/genassym.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/machdep.c#24 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/sys_machdep.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/vm_machdep.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/ia32/ia32_exception.S#5 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/ia32/ia32_reg.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/ia32/ia32_signal.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/include/pcb.h#9 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/linux32/linux32_sysvec.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/bsm/audit_kevents.h#12 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_proto.h#22 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_syscall.h#22 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_syscalls.c#22 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_sysent.c#22 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/freebsd32/syscalls.master#24 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/svr4/svr4_stat.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_sge.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_pciids.h#9 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/drm/r600_cp.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/drm/radeon_drv.h#10 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/pcm/feeder_rate.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/xl/if_xl.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/nfs/nfs_var.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/nfsclient/nfs_clrpcops.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/nfsclient/nfs_clstate.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/ibcs2/ibcs2_misc.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/init_sysent.c#20 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_exit.c#21 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_prot.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/syscalls.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/syscalls.master#20 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/systrace_args.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/tty.c#20 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/tty_pts.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_syscalls.c#26 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ageq.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/namei.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/syscall.h#19 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/syscall.mk#19 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/syscallsubr.h#16 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/sysproto.h#19 integrate
.. //depot/projects/scottl-camlock/src/tools/regression/usr.bin/jot/regress.dddd.out#1 branch
.. //depot/projects/scottl-camlock/src/tools/regression/usr.bin/jot/regress.sh#3 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/fstat/fstat.1#3 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/jot/jot.c#2 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/netstat/netstat.1#4 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/sockstat/sockstat.1#3 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/jail/jail.8#6 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/jls/jls.8#4 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/jls/jls.c#6 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/sysinstall/dispatch.c#4 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/sysinstall/install.c#3 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/sysinstall/menus.c#5 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/sysinstall/sysinstall.h#5 integrate
Differences ...
==== //depot/projects/scottl-camlock/src/bin/ps/ps.1#3 (text+ko) ====
@@ -27,9 +27,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
-.\" $FreeBSD: src/bin/ps/ps.1,v 1.91 2009/05/17 04:00:43 brian Exp $
+.\" $FreeBSD: src/bin/ps/ps.1,v 1.92 2009/07/09 16:40:00 trasz Exp $
.\"
-.Dd May 16, 2009
+.Dd July 9, 2009
.Dt PS 1
.Os
.Sh NAME
@@ -637,6 +637,7 @@
.Xr kill 1 ,
.Xr pgrep 1 ,
.Xr pkill 1 ,
+.Xr procstat 1 ,
.Xr w 1 ,
.Xr kvm 3 ,
.Xr strftime 3 ,
==== //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/head/thread.h#2 (text+ko) ====
@@ -53,7 +53,6 @@
#define mutex_lock(l) pthread_mutex_lock(l)
#define mutex_trylock(l) pthread_mutex_trylock(l)
#define mutex_unlock(l) pthread_mutex_unlock(l)
-#define mutex_owned(l) pthread_mutex_isowned_np(l)
#define rwlock_init(l,f,a) pthread_rwlock_init(l,NULL)
#define rwlock_destroy(l) pthread_rwlock_destroy(l)
#define rw_rdlock(l) pthread_rwlock_rdlock(l)
==== //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c#2 (text+ko) ====
@@ -115,6 +115,14 @@
mp->initialized = B_FALSE;
}
+int
+zmutex_owned(kmutex_t *mp)
+{
+ ASSERT(mp->initialized == B_TRUE);
+
+ return (mp->m_owner == curthread);
+}
+
void
mutex_enter(kmutex_t *mp)
{
==== //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h#2 (text+ko) ====
@@ -237,9 +237,11 @@
#define mutex_init(mp, b, c, d) zmutex_init((kmutex_t *)(mp))
#define mutex_destroy(mp) zmutex_destroy((kmutex_t *)(mp))
+#define mutex_owned(mp) zmutex_owned((kmutex_t *)(mp))
extern void zmutex_init(kmutex_t *mp);
extern void zmutex_destroy(kmutex_t *mp);
+extern int zmutex_owned(kmutex_t *mp);
extern void mutex_enter(kmutex_t *mp);
extern void mutex_exit(kmutex_t *mp);
extern int mutex_tryenter(kmutex_t *mp);
==== //depot/projects/scottl-camlock/src/include/unistd.h#4 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)unistd.h 8.12 (Berkeley) 4/27/95
- * $FreeBSD: src/include/unistd.h,v 1.94 2009/06/15 20:38:55 jhb Exp $
+ * $FreeBSD: src/include/unistd.h,v 1.95 2009/07/08 15:23:18 trasz Exp $
*/
#ifndef _UNISTD_H_
@@ -513,6 +513,7 @@
int iruserok(unsigned long, int, const char *, const char *);
int iruserok_sa(const void *, int, int, const char *, const char *);
int issetugid(void);
+long lpathconf(const char *, int);
#ifndef _MKDTEMP_DECLARED
char *mkdtemp(char *);
#define _MKDTEMP_DECLARED
==== //depot/projects/scottl-camlock/src/lib/libc/sys/Makefile.inc#5 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
-# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.140 2009/06/24 21:10:52 jhb Exp $
+# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.141 2009/07/08 15:23:18 trasz Exp $
# sys sources
.PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys
@@ -159,6 +159,7 @@
MLINKS+=ntp_adjtime.2 ntp_gettime.2
MLINKS+=open.2 openat.2
MLINKS+=pathconf.2 fpathconf.2
+MLINKS+=pathconf.2 lpathconf.2
MLINKS+=read.2 pread.2 read.2 preadv.2 read.2 readv.2
MLINKS+=readlink.2 readlinkat.2
MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
==== //depot/projects/scottl-camlock/src/lib/libc/sys/Symbol.map#7 (text) ====
@@ -1,5 +1,5 @@
/*
- * $FreeBSD: src/lib/libc/sys/Symbol.map,v 1.26 2009/06/29 01:33:59 kan Exp $
+ * $FreeBSD: src/lib/libc/sys/Symbol.map,v 1.27 2009/07/08 15:23:18 trasz Exp $
*/
/*
@@ -346,6 +346,7 @@
jail_set;
jail_remove;
linkat;
+ lpathconf;
mkdirat;
mkfifoat;
mknodat;
==== //depot/projects/scottl-camlock/src/lib/libc/sys/pathconf.2#4 (text+ko) ====
@@ -26,13 +26,14 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)pathconf.2 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/pathconf.2,v 1.23 2009/06/25 12:53:50 trasz Exp $
+.\" $FreeBSD: src/lib/libc/sys/pathconf.2,v 1.24 2009/07/08 15:23:18 trasz Exp $
.\"
-.Dd June 25, 2009
+.Dd July 7, 2009
.Dt PATHCONF 2
.Os
.Sh NAME
.Nm pathconf ,
+.Nm lpathconf ,
.Nm fpathconf
.Nd get configurable pathname variables
.Sh LIBRARY
@@ -42,10 +43,13 @@
.Ft long
.Fn pathconf "const char *path" "int name"
.Ft long
+.Fn lpathconf "const char *path" "int name"
+.Ft long
.Fn fpathconf "int fd" "int name"
.Sh DESCRIPTION
The
-.Fn pathconf
+.Fn pathconf ,
+.Fn lpathconf
and
.Fn fpathconf
system calls provide a method for applications to determine the current
@@ -53,7 +57,9 @@
with a pathname or file descriptor.
.Pp
For
-.Fn pathconf ,
+.Fn pathconf
+and
+.Fn lpathconf ,
the
.Fa path
argument is the name of a file or directory.
@@ -68,6 +74,18 @@
Symbolic constants for each name value are found in the include file
.Li <unistd.h> .
.Pp
+The
+.Fn lpathconf
+system call is like
+.Fn pathconf
+except in the case where the named file is a symbolic link,
+in which case
+.Fn lpathconf
+returns information about the link,
+while
+.Fn pathconf
+returns information about the file the link references.
+.Pp
The available values are as follows:
.Pp
.Bl -tag -width 6n
@@ -239,3 +257,7 @@
.Fn fpathconf
system calls first appeared in
.Bx 4.4 .
+The
+.Fn lpathconf
+system call first appeared in
+.Fx 8.0 .
==== //depot/projects/scottl-camlock/src/share/man/man4/pcm.4#7 (text+ko) ====
@@ -23,9 +23,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/pcm.4,v 1.58 2009/07/07 13:58:47 joel Exp $
+.\" $FreeBSD: src/share/man/man4/pcm.4,v 1.59 2009/07/09 16:59:29 joel Exp $
.\"
-.Dd July 7, 2009
+.Dd July 9, 2009
.Dt SOUND 4
.Os
.Sh NAME
@@ -210,10 +210,22 @@
are device specific.
.Bl -tag -width indent
.It Va hw.snd.compat_linux_mmap
-Enable to allow PROT_EXEC page mappings.
-All Linux applications using sound and
+Linux
+.Xr mmap 2
+compability.
+The following values are supported (default is 0):
+.Bl -tag -width 2n
+.It -1
+Force disabling/denying PROT_EXEC
+.Xr mmap 2
+requests.
+.It 0
+Auto detect proc/ABI type, allow
.Xr mmap 2
-require this.
+for Linux applications, and deny for everything else.
+.It 1
+Always allow PROT_EXEC page mappings.
+.El
.It Va hw.snd.default_auto
Enable to automatically assign default sound unit to the most recent
attached device.
@@ -240,6 +252,8 @@
.It Va hw.snd.feeder_rate_polyphase_max
Adjust to set the maximum number of allowed polyphase entries during the
process of building resampling filters.
+Disabling polyphase resampling has the benefit of reducing memory usage, at
+the expense of slower and lower quality conversion.
Only applicable when the SINC interpolator is used.
Default value is 183040.
Set to 0 to disable polyphase resampling.
==== //depot/projects/scottl-camlock/src/share/man/man5/procfs.5#2 (text+ko) ====
@@ -1,8 +1,8 @@
-.\" $FreeBSD: src/share/man/man5/procfs.5,v 1.33 2006/05/19 00:23:29 rodrigc Exp $
+.\" $FreeBSD: src/share/man/man5/procfs.5,v 1.34 2009/07/09 16:40:00 trasz Exp $
.\" Written by Garrett Wollman
.\" This file is in the public domain.
.\"
-.Dd September 3, 2004
+.Dd July 9, 2009
.Dt PROCFS 5
.Os
.Sh NAME
@@ -252,6 +252,7 @@
.Pp
.Dl "mount -t procfs proc /proc"
.Sh SEE ALSO
+.Xr procstat 1 ,
.Xr mount 2 ,
.Xr sigaction 2 ,
.Xr unmount 2 ,
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/cpu_switch.S#11 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.168 2009/04/01 13:09:26 kib Exp $
+ * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.169 2009/07/09 09:34:11 kib Exp $
*/
#include <machine/asmacros.h>
@@ -97,6 +97,7 @@
ENTRY(cpu_switch)
/* Switch to new thread. First, save context. */
movq TD_PCB(%rdi),%r8
+ movb $1,PCB_FULL_IRET(%r8)
movq (%rsp),%rax /* Hardware registers */
movq %r15,PCB_R15(%r8)
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/exception.S#10 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.138 2009/04/01 13:09:26 kib Exp $
+ * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.139 2009/07/09 09:34:11 kib Exp $
*/
#include "opt_atpic.h"
@@ -162,19 +162,20 @@
.globl alltraps
.type alltraps, at function
alltraps:
+ movq %rdi,TF_RDI(%rsp)
testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
jz alltraps_testi /* already running with kernel GS.base */
swapgs
+ movq PCPU(CURPCB),%rdi
+ movb $0,PCB_FULL_IRET(%rdi)
movw %fs,TF_FS(%rsp)
movw %gs,TF_GS(%rsp)
movw %es,TF_ES(%rsp)
movw %ds,TF_DS(%rsp)
alltraps_testi:
testl $PSL_I,TF_RFLAGS(%rsp)
- jz alltraps_pushregs
+ jz alltraps_pushregs_no_rdi
sti
-alltraps_pushregs:
- movq %rdi,TF_RDI(%rsp)
alltraps_pushregs_no_rdi:
movq %rsi,TF_RSI(%rsp)
movq %rdx,TF_RDX(%rsp)
@@ -233,14 +234,17 @@
.globl alltraps_noen
.type alltraps_noen, at function
alltraps_noen:
+ movq %rdi,TF_RDI(%rsp)
testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
jz 1f /* already running with kernel GS.base */
swapgs
+ movq PCPU(CURPCB),%rdi
+ movb $0,PCB_FULL_IRET(%rdi)
1: movw %fs,TF_FS(%rsp)
movw %gs,TF_GS(%rsp)
movw %es,TF_ES(%rsp)
movw %ds,TF_DS(%rsp)
- jmp alltraps_pushregs
+ jmp alltraps_pushregs_no_rdi
IDTVEC(dblfault)
subq $TF_ERR,%rsp
@@ -278,12 +282,13 @@
IDTVEC(page)
subq $TF_ERR,%rsp
movl $T_PAGEFLT,TF_TRAPNO(%rsp)
+ movq %rdi,TF_RDI(%rsp) /* free up a GP register */
testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
jz 1f /* already running with kernel GS.base */
swapgs
-1:
- movq %rdi,TF_RDI(%rsp) /* free up a GP register */
- movq %cr2,%rdi /* preserve %cr2 before .. */
+ movq PCPU(CURPCB),%rdi
+ movb $0,PCB_FULL_IRET(%rdi)
+1: movq %cr2,%rdi /* preserve %cr2 before .. */
movq %rdi,TF_ADDR(%rsp) /* enabling interrupts. */
movw %fs,TF_FS(%rsp)
movw %gs,TF_GS(%rsp)
@@ -311,7 +316,9 @@
testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
jz 2f /* already running with kernel GS.base */
1: swapgs
-2: movw %fs,TF_FS(%rsp)
+2: movq PCPU(CURPCB),%rdi
+ movb $1,PCB_FULL_IRET(%rdi) /* always full iret from GPF */
+ movw %fs,TF_FS(%rsp)
movw %gs,TF_GS(%rsp)
movw %es,TF_ES(%rsp)
movw %ds,TF_DS(%rsp)
@@ -341,6 +348,8 @@
movw %gs,TF_GS(%rsp)
movw %es,TF_ES(%rsp)
movw %ds,TF_DS(%rsp)
+ movq PCPU(CURPCB),%r11
+ movb $0,PCB_FULL_IRET(%r11)
sti
movq $KUDSEL,TF_SS(%rsp)
movq $KUCSEL,TF_CS(%rsp)
@@ -644,7 +653,8 @@
*/
testb $SEL_RPL_MASK,TF_CS(%rsp)
jz ld_regs
-
+ cmpb $0,PCB_FULL_IRET(%r8)
+ je ld_regs
testl $TF_HASSEGS,TF_FLAGS(%rsp)
je set_segs
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/genassym.c#13 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.176 2009/07/01 07:34:28 dfr Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.177 2009/07/09 09:34:11 kib Exp $");
#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
@@ -141,6 +141,7 @@
ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));
+ASSYM(PCB_FULL_IRET, offsetof(struct pcb, pcb_full_iret));
ASSYM(PCB_DBREGS, PCB_DBREGS);
ASSYM(PCB_32BIT, PCB_32BIT);
ASSYM(PCB_GS32BIT, PCB_GS32BIT);
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/machdep.c#24 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.704 2009/07/06 18:10:27 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.705 2009/07/09 09:34:11 kib Exp $");
#include "opt_atalk.h"
#include "opt_atpic.h"
@@ -382,6 +382,7 @@
regs->tf_fs = _ufssel;
regs->tf_gs = _ugssel;
regs->tf_flags = TF_HASSEGS;
+ td->td_pcb->pcb_full_iret = 1;
PROC_LOCK(p);
mtx_lock(&psp->ps_mtx);
}
@@ -483,6 +484,7 @@
signotify(td);
PROC_UNLOCK(p);
td->td_pcb->pcb_flags |= PCB_FULLCTX;
+ td->td_pcb->pcb_full_iret = 1;
return (EJUSTRETURN);
}
@@ -853,6 +855,7 @@
pcb->pcb_gsbase = 0;
pcb->pcb_flags &= ~(PCB_32BIT | PCB_GS32BIT);
pcb->pcb_initial_fpucw = __INITIAL_FPUCW__;
+ pcb->pcb_full_iret = 1;
bzero((char *)regs, sizeof(struct trapframe));
regs->tf_rip = entry;
@@ -2031,6 +2034,7 @@
td->td_pcb->pcb_gsbase = mcp->mc_gsbase;
}
td->td_pcb->pcb_flags |= PCB_FULLCTX;
+ td->td_pcb->pcb_full_iret = 1;
return (0);
}
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/sys_machdep.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/sys_machdep.c,v 1.93 2009/06/27 15:03:50 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/sys_machdep.c,v 1.94 2009/07/09 09:34:11 kib Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,6 +103,7 @@
error = amd64_get_ldt(td, largs);
break;
case I386_SET_LDT:
+ td->td_pcb->pcb_full_iret = 1;
if (largs->descs != NULL) {
lp = (struct user_segment_descriptor *)
kmem_alloc(kernel_map, largs->num *
@@ -132,6 +133,7 @@
if (td != curthread)
return;
+ td->td_pcb->pcb_full_iret = 1;
critical_enter();
sd = PCPU_GET(gs32p);
sd->sd_lobase = base & 0xffffff;
@@ -146,6 +148,7 @@
if (td != curthread)
return;
+ td->td_pcb->pcb_full_iret = 1;
critical_enter();
sd = PCPU_GET(fs32p);
sd->sd_lobase = base & 0xffffff;
@@ -201,6 +204,7 @@
if (!error) {
pcb->pcb_fsbase = i386base;
td->td_frame->tf_fs = _ufssel;
+ pcb->pcb_full_iret = 1;
update_gdt_fsbase(td, i386base);
}
break;
@@ -212,6 +216,7 @@
error = copyin(uap->parms, &i386base, sizeof(i386base));
if (!error) {
pcb->pcb_gsbase = i386base;
+ pcb->pcb_full_iret = 1;
td->td_frame->tf_gs = _ugssel;
update_gdt_gsbase(td, i386base);
}
@@ -225,6 +230,7 @@
if (!error) {
if (a64base < VM_MAXUSER_ADDRESS) {
pcb->pcb_fsbase = a64base;
+ pcb->pcb_full_iret = 1;
td->td_frame->tf_fs = _ufssel;
} else
error = EINVAL;
@@ -240,6 +246,7 @@
if (!error) {
if (a64base < VM_MAXUSER_ADDRESS) {
pcb->pcb_gsbase = a64base;
+ pcb->pcb_full_iret = 1;
td->td_frame->tf_gs = _ugssel;
} else
error = EINVAL;
@@ -525,6 +532,7 @@
uap->start, uap->num, (void *)uap->descs);
#endif
+ td->td_pcb->pcb_full_iret = 1;
p = td->td_proc;
if (descs == NULL) {
/* Free descriptors */
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/vm_machdep.c#13 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.263 2009/04/01 13:09:26 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.264 2009/07/09 09:34:11 kib Exp $");
#include "opt_isa.h"
#include "opt_cpu.h"
@@ -186,6 +186,9 @@
/* As an i386, do not copy io permission bitmap. */
pcb2->pcb_tssp = NULL;
+ /* New segment registers. */
+ pcb2->pcb_full_iret = 1;
+
/* Copy the LDT, if necessary. */
mdp1 = &td1->td_proc->p_md;
mdp2 = &p2->p_md;
@@ -336,6 +339,7 @@
*/
bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
pcb2->pcb_flags &= ~PCB_FPUINITDONE;
+ pcb2->pcb_full_iret = 1;
/*
* Create a new fresh stack for the new thread.
@@ -450,6 +454,7 @@
}
#endif
td->td_pcb->pcb_fsbase = (register_t)tls_base;
+ td->td_pcb->pcb_full_iret = 1;
return (0);
}
==== //depot/projects/scottl-camlock/src/sys/amd64/ia32/ia32_exception.S#5 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/ia32/ia32_exception.S,v 1.6 2009/04/01 13:09:26 kib Exp $
+ * $FreeBSD: src/sys/amd64/ia32/ia32_exception.S,v 1.7 2009/07/09 09:34:11 kib Exp $
*/
#include <machine/asmacros.h>
@@ -42,10 +42,16 @@
SUPERALIGN_TEXT
IDTVEC(int0x80_syscall)
swapgs
- sti
pushq $2 /* sizeof "int 0x80" */
subq $TF_ERR,%rsp /* skip over tf_trapno */
movq %rdi,TF_RDI(%rsp)
+ movq PCPU(CURPCB),%rdi
+ movb $0,PCB_FULL_IRET(%rdi)
+ movw %fs,TF_FS(%rsp)
+ movw %gs,TF_GS(%rsp)
+ movw %es,TF_ES(%rsp)
+ movw %ds,TF_DS(%rsp)
+ sti
movq %rsi,TF_RSI(%rsp)
movq %rdx,TF_RDX(%rsp)
movq %rcx,TF_RCX(%rsp)
@@ -60,10 +66,6 @@
movq %r13,TF_R13(%rsp)
movq %r14,TF_R14(%rsp)
movq %r15,TF_R15(%rsp)
- movw %fs,TF_FS(%rsp)
- movw %gs,TF_GS(%rsp)
- movw %es,TF_ES(%rsp)
- movw %ds,TF_DS(%rsp)
movl $TF_HASSEGS,TF_FLAGS(%rsp)
FAKE_MCOUNT(TF_RIP(%rsp))
movq %rsp, %rdi
==== //depot/projects/scottl-camlock/src/sys/amd64/ia32/ia32_reg.c#4 (text+ko) ====
@@ -23,11 +23,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/ia32/ia32_reg.c,v 1.4 2009/04/01 13:09:26 kib Exp $
+ * $FreeBSD: src/sys/amd64/ia32/ia32_reg.c,v 1.5 2009/07/09 09:34:11 kib Exp $
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_reg.c,v 1.4 2009/04/01 13:09:26 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_reg.c,v 1.5 2009/07/09 09:34:11 kib Exp $");
#include "opt_compat.h"
@@ -125,6 +125,7 @@
tp->tf_fs = regs->r_fs;
tp->tf_es = regs->r_es;
tp->tf_ds = regs->r_ds;
+ td->td_pcb->pcb_full_iret = 1;
tp->tf_flags = TF_HASSEGS;
tp->tf_rdi = regs->r_edi;
tp->tf_rsi = regs->r_esi;
==== //depot/projects/scottl-camlock/src/sys/amd64/ia32/ia32_signal.c#8 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.22 2009/04/01 13:09:26 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.23 2009/07/09 09:34:11 kib Exp $");
#include "opt_compat.h"
@@ -159,6 +159,7 @@
ia32_get_fpcontext(td, mcp);
mcp->mc_fsbase = td->td_pcb->pcb_fsbase;
mcp->mc_gsbase = td->td_pcb->pcb_gsbase;
+ td->td_pcb->pcb_full_iret = 1;
return (0);
}
@@ -201,6 +202,7 @@
tp->tf_rsp = mcp->mc_esp;
tp->tf_ss = mcp->mc_ss;
td->td_pcb->pcb_flags |= PCB_FULLCTX;
+ td->td_pcb->pcb_full_iret = 1;
return (0);
}
@@ -394,6 +396,7 @@
regs->tf_ss = _udatasel;
regs->tf_ds = _udatasel;
regs->tf_es = _udatasel;
+ td->td_pcb->pcb_full_iret = 1;
/* leave user %fs and %gs untouched */
PROC_LOCK(p);
mtx_lock(&psp->ps_mtx);
@@ -514,6 +517,7 @@
regs->tf_ss = _udatasel;
regs->tf_ds = _udatasel;
regs->tf_es = _udatasel;
+ td->td_pcb->pcb_full_iret = 1;
/* XXXKIB leave user %fs and %gs untouched */
PROC_LOCK(p);
mtx_lock(&psp->ps_mtx);
@@ -611,6 +615,7 @@
SIG_CANTMASK(td->td_sigmask);
signotify(td);
PROC_UNLOCK(p);
+ td->td_pcb->pcb_full_iret = 1;
return (EJUSTRETURN);
}
#endif /* COMPAT_FREEBSD4 */
@@ -702,6 +707,7 @@
SIG_CANTMASK(td->td_sigmask);
signotify(td);
PROC_UNLOCK(p);
+ td->td_pcb->pcb_full_iret = 1;
return (EJUSTRETURN);
}
@@ -747,5 +753,6 @@
/* Return via doreti so that we can change to a different %cs */
pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT;
pcb->pcb_flags &= ~PCB_GS32BIT;
+ td->td_pcb->pcb_full_iret = 1;
td->td_retval[1] = 0;
}
==== //depot/projects/scottl-camlock/src/sys/amd64/include/pcb.h#9 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)pcb.h 5.10 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.71 2009/04/01 16:24:24 jkim Exp $
+ * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.72 2009/07/09 09:34:11 kib Exp $
*/
#ifndef _AMD64_PCB_H_
@@ -72,12 +72,13 @@
struct savefpu pcb_save;
uint16_t pcb_initial_fpucw;
- caddr_t pcb_onfault; /* copyin/out fault recovery */
+ caddr_t pcb_onfault; /* copyin/out fault recovery */
/* 32-bit segment descriptor */
struct user_segment_descriptor pcb_gs32sd;
/* local tss, with i/o bitmap; NULL for common */
struct amd64tss *pcb_tssp;
+ char pcb_full_iret;
};
struct xpcb {
==== //depot/projects/scottl-camlock/src/sys/amd64/linux32/linux32_sysvec.c#16 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.51 2009/05/10 18:43:43 dchagin Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.52 2009/07/09 09:34:11 kib Exp $");
#include "opt_compat.h"
#ifndef COMPAT_IA32
@@ -423,6 +423,7 @@
regs->tf_fs = _ufssel;
regs->tf_gs = _ugssel;
regs->tf_flags = TF_HASSEGS;
+ td->td_pcb->pcb_full_iret = 1;
PROC_LOCK(p);
mtx_lock(&psp->ps_mtx);
}
@@ -545,6 +546,7 @@
regs->tf_fs = _ufssel;
regs->tf_gs = _ugssel;
regs->tf_flags = TF_HASSEGS;
+ td->td_pcb->pcb_full_iret = 1;
PROC_LOCK(p);
mtx_lock(&psp->ps_mtx);
}
@@ -645,6 +647,7 @@
regs->tf_rflags = eflags;
regs->tf_rsp = frame.sf_sc.sc_esp_at_signal;
regs->tf_ss = frame.sf_sc.sc_ss;
+ td->td_pcb->pcb_full_iret = 1;
return (EJUSTRETURN);
}
@@ -746,6 +749,7 @@
regs->tf_rflags = eflags;
regs->tf_rsp = context->sc_esp_at_signal;
regs->tf_ss = context->sc_ss;
+ td->td_pcb->pcb_full_iret = 1;
/*
* call sigaltstack & ignore results..
@@ -864,6 +868,7 @@
regs->tf_flags = TF_HASSEGS;
regs->tf_cs = _ucode32sel;
regs->tf_rbx = ps_strings;
+ td->td_pcb->pcb_full_iret = 1;
load_cr0(rcr0() | CR0_MP | CR0_TS);
fpstate_drop(td);
==== //depot/projects/scottl-camlock/src/sys/bsm/audit_kevents.h#12 (text+ko) ====
@@ -27,7 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#6
- * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.20 2009/04/19 14:53:17 rwatson Exp $
+ * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.21 2009/07/08 15:23:18 trasz Exp $
*/
#ifndef _BSM_AUDIT_KEVENTS_H_
@@ -597,6 +597,7 @@
#define AUE_PWRITE 43193 /* Darwin/FreeBSD. */
#define AUE_FSCTL 43194 /* Darwin. */
#define AUE_FFSCTL 43195 /* Darwin. */
+#define AUE_LPATHCONF 43196 /* FreeBSD. */
/*
* Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the
==== //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_proto.h#22 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.105 2009/06/24 21:54:08 jhb Exp $
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194910 2009-06-24 21:10:52Z jhb
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.106 2009/07/08 16:30:34 trasz Exp $
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 195468 2009-07-08 16:26:43Z trasz
*/
#ifndef _FREEBSD32_SYSPROTO_H_
==== //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_syscall.h#22 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.104 2009/06/24 21:54:08 jhb Exp $
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194910 2009-06-24 21:10:52Z jhb
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.105 2009/07/08 16:30:34 trasz Exp $
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 195468 2009-07-08 16:26:43Z trasz
*/
#define FREEBSD32_SYS_syscall 0
@@ -381,4 +381,5 @@
#define FREEBSD32_SYS_freebsd32_semctl 510
#define FREEBSD32_SYS_freebsd32_msgctl 511
#define FREEBSD32_SYS_freebsd32_shmctl 512
-#define FREEBSD32_SYS_MAXSYSCALL 513
+#define FREEBSD32_SYS_lpathconf 513
+#define FREEBSD32_SYS_MAXSYSCALL 514
==== //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_syscalls.c#22 (text+ko) ====
@@ -2,8 +2,8 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.95 2009/06/24 21:54:08 jhb Exp $
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194910 2009-06-24 21:10:52Z jhb
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.96 2009/07/08 16:30:34 trasz Exp $
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 195468 2009-07-08 16:26:43Z trasz
*/
const char *freebsd32_syscallnames[] = {
@@ -520,4 +520,5 @@
"freebsd32_semctl", /* 510 = freebsd32_semctl */
"freebsd32_msgctl", /* 511 = freebsd32_msgctl */
"freebsd32_shmctl", /* 512 = freebsd32_shmctl */
+ "lpathconf", /* 513 = lpathconf */
};
==== //depot/projects/scottl-camlock/src/sys/compat/freebsd32/freebsd32_sysent.c#22 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.106 2009/06/24 21:54:08 jhb Exp $
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194910 2009-06-24 21:10:52Z jhb
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.107 2009/07/08 16:30:34 trasz Exp $
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 195468 2009-07-08 16:26:43Z trasz
*/
#include "opt_compat.h"
@@ -557,4 +557,5 @@
{ AS(freebsd32_semctl_args), (sy_call_t *)freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0, 0 }, /* 510 = freebsd32_semctl */
{ AS(freebsd32_msgctl_args), (sy_call_t *)freebsd32_msgctl, AUE_MSGCTL, NULL, 0, 0, 0 }, /* 511 = freebsd32_msgctl */
{ AS(freebsd32_shmctl_args), (sy_call_t *)freebsd32_shmctl, AUE_SHMCTL, NULL, 0, 0, 0 }, /* 512 = freebsd32_shmctl */
+ { AS(lpathconf_args), (sy_call_t *)lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0 }, /* 513 = lpathconf */
};
==== //depot/projects/scottl-camlock/src/sys/compat/freebsd32/syscalls.master#24 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.121 2009/06/24 21:10:52 jhb Exp $
+ $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.123 2009/07/08 16:26:43 trasz Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; from: src/sys/kern/syscalls.master 1.107
;
@@ -900,3 +900,4 @@
struct msqid_ds32 *buf); }
512 AUE_SHMCTL STD { int freebsd32_shmctl(int shmid, int cmd, \
struct shmid_ds32 *buf); }
+513 AUE_LPATHCONF NOPROTO { int lpathconf(char *path, int name); }
==== //depot/projects/scottl-camlock/src/sys/compat/svr4/svr4_stat.c#9 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stat.c,v 1.32 2009/06/13 00:12:02 jamie Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stat.c,v 1.33 2009/07/08 15:23:18 trasz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -37,6 +37,7 @@
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
+#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/time.h>
#include <sys/syscallsubr.h>
@@ -669,7 +670,7 @@
return (0);
default:
CHECKALTEXIST(td, uap->path, &path);
- error = kern_pathconf(td, path, UIO_SYSSPACE, name);
+ error = kern_pathconf(td, path, UIO_SYSSPACE, name, FOLLOW);
free(path, M_TEMP);
return (error);
}
==== //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_sge.c#15 (text+ko) ====
@@ -28,7 +28,7 @@
***************************************************************************/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.76 2009/06/25 21:50:15 np Exp $");
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list