Re: svn commit: r249605 - head/sys/vm
On 2013/04/18 13:34, Alan Cox wrote: Author: alc Date: Thu Apr 18 05:34:33 2013 New Revision: 249605 URL: http://svnweb.freebsd.org/changeset/base/249605 Log: When calculating the number of reserved nodes, discount the pages that will be used to store the nodes. Sponsored by:EMC / Isilon Storage Division Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c == --- head/sys/vm/vm_radix.c Thu Apr 18 05:12:11 2013(r249604) +++ head/sys/vm/vm_radix.c Thu Apr 18 05:34:33 2013(r249605) @@ -360,10 +360,17 @@ vm_radix_node_zone_init(void *mem, int s static void vm_radix_prealloc(void *arg __unused) { + int nodes; - if (!uma_zone_reserve_kva(vm_radix_node_zone, cnt.v_page_count)) + /* +* Calculate the number of reserved nodes, discounting the pages that +* are needed to store them. +*/ + nodes = ((vm_paddr_t)cnt.v_page_count * PAGE_SIZE) / (PAGE_SIZE + + sizeof(struct vm_radix_node)); + if (!uma_zone_reserve_kva(vm_radix_node_zone, nodes)) panic("%s: unable to create new zone", __func__); - uma_prealloc(vm_radix_node_zone, cnt.v_page_count); + uma_prealloc(vm_radix_node_zone, nodes); } SYSINIT(vm_radix_prealloc, SI_SUB_KMEM, SI_ORDER_SECOND, vm_radix_prealloc, NULL); FYI, after this change, my network card no longer works, the driver /sys/dev/if_msk.c reports watchdog timeout, backing out this change works again for me. Regards, David Xu ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250168 - in head: share/man/man4 sys/dev/e1000 sys/dev/ixgb
Author: eadler Date: Thu May 2 01:36:52 2013 New Revision: 250168 URL: http://svnweb.freebsd.org/changeset/base/250168 Log: Update Intel email address. PR: docs/175349 Submitted by: Lars Eggert Discussed with: jfv Modified: head/share/man/man4/em.4 head/share/man/man4/igb.4 head/share/man/man4/ixgb.4 head/share/man/man4/ixgbe.4 head/sys/dev/e1000/README head/sys/dev/ixgb/README Modified: head/share/man/man4/em.4 == --- head/share/man/man4/em.4Thu May 2 01:35:02 2013(r250167) +++ head/share/man/man4/em.4Thu May 2 01:36:52 2013(r250168) @@ -260,7 +260,7 @@ go to the Intel support website at: If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to -.Aq freebsd...@mailbox.intel.com . +.Aq free...@intel.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , @@ -280,7 +280,7 @@ device driver first appeared in The .Nm driver was written by -.An Intel Corporation Aq freebsd...@mailbox.intel.com . +.An Intel Corporation Aq free...@intel.com . .Sh BUGS Hardware-assisted VLAN processing is disabled by default. You can enable it on an Modified: head/share/man/man4/igb.4 == --- head/share/man/man4/igb.4 Thu May 2 01:35:02 2013(r250167) +++ head/share/man/man4/igb.4 Thu May 2 01:36:52 2013(r250168) @@ -205,7 +205,7 @@ go to the Intel support website at: If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to -.Aq freebsd...@mailbox.intel.com . +.Aq free...@intel.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , @@ -225,4 +225,4 @@ device driver first appeared in The .Nm driver was written by -.An Intel Corporation Aq freebsd...@mailbox.intel.com . +.An Intel Corporation Aq free...@intel.com . Modified: head/share/man/man4/ixgb.4 == --- head/share/man/man4/ixgb.4 Thu May 2 01:35:02 2013(r250167) +++ head/share/man/man4/ixgb.4 Thu May 2 01:36:52 2013(r250168) @@ -102,7 +102,7 @@ go to the Intel support website at: If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to -.Aq freebsd...@mailbox.intel.com . +.Aq free...@intel.com . .Sh SEE ALSO .Xr arp 4 , .Xr em 4 , @@ -122,4 +122,4 @@ and The .Nm driver was written by -.An Intel Corporation Aq freebsd...@mailbox.intel.com . +.An Intel Corporation Aq free...@intel.com . Modified: head/share/man/man4/ixgbe.4 == --- head/share/man/man4/ixgbe.4 Thu May 2 01:35:02 2013(r250167) +++ head/share/man/man4/ixgbe.4 Thu May 2 01:36:52 2013(r250168) @@ -105,7 +105,7 @@ go to the Intel support website at: If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to -.Aq freebsd...@mailbox.intel.com . +.Aq free...@intel.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , @@ -123,4 +123,4 @@ device driver first appeared in The .Nm driver was written by -.An Intel Corporation Aq freebsd...@mailbox.intel.com . +.An Intel Corporation Aq free...@intel.com . Modified: head/sys/dev/e1000/README == --- head/sys/dev/e1000/README Thu May 2 01:35:02 2013(r250167) +++ head/sys/dev/e1000/README Thu May 2 01:36:52 2013(r250168) @@ -389,7 +389,7 @@ For general information and support, go http://support.intel.com If an issue is identified, support is through email only at: -freebsd...@mailbox.intel.com +free...@intel.com License Modified: head/sys/dev/ixgb/README == --- head/sys/dev/ixgb/READMEThu May 2 01:35:02 2013(r250167) +++ head/sys/dev/ixgb/READMEThu May 2 01:36:52 2013(r250168) @@ -217,7 +217,7 @@ For general information and support, go If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to -the issue to freebsd...@mailbox.intel.com. +the issue to free...@intel.com. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250166 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath/ath_hal dev/ath/ath_hal/ar9003
Author: adrian Date: Thu May 2 00:59:39 2013 New Revision: 250166 URL: http://svnweb.freebsd.org/changeset/base/250166 Log: Add device identification and probe/attach support for the QCA9565. The QCA9565 is a 1x1 2.4GHz 11n chip with integrated on-chip bluetooth. The AR9300 HAL already has support for this chip; it just wasn't included in the probe/attach path. Tested: * This commit brought to you over a QCA9565 wifi connection from FreeBSD. * .. ie, basic STA, pings, no iperf or antenna diversity checking just yet. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_devid.h head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Thu May 2 00:40:45 2013(r250165) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Thu May 2 00:59:39 2013(r250166) @@ -4089,6 +4089,8 @@ ar9300_probe(uint16_t vendorid, uint16_t return "Atheros AR933x"; case AR9300_DEVID_QCA955X: /* Scorpion */ return "Qualcomm Atheros QCA955x"; +case AR9300_DEVID_QCA9565: /* Aphrodite */ + return "Qualcomm Atheros AR9565"; default: return AH_NULL; } Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Thu May 2 00:40:45 2013 (r250165) +++ head/sys/dev/ath/ath_hal/ah.c Thu May 2 00:59:39 2013 (r250166) @@ -139,6 +139,9 @@ ath_hal_mac_name(struct ath_hal *ah) return "9550"; case AR_SREV_VERSION_AR9485: return "9485"; + case AR_SREV_VERSION_QCA9565: + /* XXX should say QCA, not AR */ + return "9565"; } return ""; } Modified: head/sys/dev/ath/ath_hal/ah_devid.h == --- head/sys/dev/ath/ath_hal/ah_devid.h Thu May 2 00:40:45 2013 (r250165) +++ head/sys/dev/ath/ath_hal/ah_devid.h Thu May 2 00:59:39 2013 (r250166) @@ -91,6 +91,7 @@ #defineAR9300_DEVID_AR9580_PCIE0x0033 #defineAR9300_DEVID_AR946X_PCIE0x0034 #defineAR9300_DEVID_AR9330 0x0035 +#defineAR9300_DEVID_QCA95650x0036 #defineAR9300_DEVID_QCA955X0x0039 #defineAR_SUBVENDOR_ID_NOG 0x0e11 /* No 11G subvendor ID */ Modified: head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h == --- head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Thu May 2 00:40:45 2013(r250165) +++ head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Thu May 2 00:59:39 2013(r250166) @@ -48,6 +48,7 @@ #defineAR_SREV_VERSION_AR9380 0x1C0 #defineAR_SREV_VERSION_AR9580 0x1C0 #defineAR_SREV_VERSION_AR9460 0x280 +#defineAR_SREV_VERSION_QCA9565 0x2c0 #defineAR_SREV_VERSION_AR9330 0x200 #defineAR_SREV_VERSION_AR9340 0x300 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250165 - head/sys/mips/atheros
Author: adrian Date: Thu May 2 00:40:45 2013 New Revision: 250165 URL: http://svnweb.freebsd.org/changeset/base/250165 Log: Add the AR933x SoC GPIO pin count limitation. Modified: head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/mips/atheros/ar71xx_gpio.c == --- head/sys/mips/atheros/ar71xx_gpio.c Wed May 1 23:58:39 2013 (r250164) +++ head/sys/mips/atheros/ar71xx_gpio.c Thu May 2 00:40:45 2013 (r250165) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "gpio_if.h" @@ -136,6 +137,10 @@ ar71xx_gpio_pin_max(device_t dev, int *m case AR71XX_SOC_AR7242: *maxpin = AR724X_GPIO_PINS - 1; break; + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: + *maxpin = AR933X_GPIO_COUNT - 1; + break; default: *maxpin = AR71XX_GPIO_PINS - 1; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250164 - head/contrib/bmake
Author: sjg Date: Wed May 1 23:58:39 2013 New Revision: 250164 URL: http://svnweb.freebsd.org/changeset/base/250164 Log: Local hack to allow smooth transition for ports. bsd.port.mk can set .MAKE.FreeBSD_UL=yes to cause :L and :U to have their old behavior. This should be reverted when 8.3 is EOL. PR: 173299 Reviewed by: obrien Modified: head/contrib/bmake/var.c Modified: head/contrib/bmake/var.c == --- head/contrib/bmake/var.cWed May 1 23:04:29 2013(r250163) +++ head/contrib/bmake/var.cWed May 1 23:58:39 2013(r250164) @@ -140,6 +140,17 @@ __RCSID("$NetBSD: var.c,v 1.173 2013/02/ #include"job.h" /* + * XXX transition hack for FreeBSD ports. + * bsd.port.mk can set .MAKE.FreeBSD_UL=yes + * to cause us to treat :[LU] as aliases for :t[lu] + * To be reverted when ports converts to :t[lu] (when 8.3 is EOL) + */ +#define MAKE_FREEBSD_UL ".MAKE.FreeBSD_UL" +#ifdef MAKE_FREEBSD_UL +static int FreeBSD_UL = FALSE; +#endif + +/* * This lets us tell if we have replaced the original environ * (which we cannot free). */ @@ -965,6 +976,11 @@ Var_Set(const char *name, const char *va setenv(MAKE_LEVEL_SAFE, tmp, 1); #endif } +#ifdef MAKE_FREEBSD_UL +if (strcmp(MAKE_FREEBSD_UL, name) == 0) { + FreeBSD_UL = getBoolean(MAKE_FREEBSD_UL, FALSE); +} +#endif out: @@ -2660,8 +2676,24 @@ ApplyModifiers(char *nstr, const char *t free(loop.str); break; } - case 'D': case 'U': +#ifdef MAKE_FREEBSD_UL + if (FreeBSD_UL) { + int nc = tstr[1]; + + /* we have to be careful, since :U is used internally */ + if (nc == ':' || nc == endc) { + char *dp = bmake_strdup(nstr); + for (newStr = dp; *dp; dp++) + *dp = toupper((unsigned char)*dp); + cp = tstr + 1; + termc = *cp; + break; /* yes inside the conditional */ + } + /* FALLTHROUGH */ + } +#endif + case 'D': { Buffer buf;/* Buffer for patterns */ int wantit; /* want data in buffer */ @@ -2721,6 +2753,17 @@ ApplyModifiers(char *nstr, const char *t break; } case 'L': +#ifdef MAKE_FREEBSD_UL + if (FreeBSD_UL) { + char *dp = bmake_strdup(nstr); + for (newStr = dp; *dp; dp++) + *dp = tolower((unsigned char)*dp); + cp = tstr + 1; + termc = *cp; + break; + } + /* FALLTHROUGH */ +#endif { if ((v->flags & VAR_JUNK) != 0) v->flags |= VAR_KEEP; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250163 - head/sys/sys
Author: jilles Date: Wed May 1 23:04:29 2013 New Revision: 250163 URL: http://svnweb.freebsd.org/changeset/base/250163 Log: Bump __FreeBSD_version for accept4() and pipe2(). Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hWed May 1 22:50:45 2013(r250162) +++ head/sys/sys/param.hWed May 1 23:04:29 2013(r250163) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 131 /* Master, propagated to newvers */ +#define __FreeBSD_version 132 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250162 - head/usr.sbin/nfsd
Author: rmacklem Date: Wed May 1 22:50:45 2013 New Revision: 250162 URL: http://svnweb.freebsd.org/changeset/base/250162 Log: Document the fact that an NFSv4 mount against a volume on the same host can result in a hung NFS server and is not recommended. This is a content change. MFC after:2 weeks Modified: head/usr.sbin/nfsd/nfsv4.4 Modified: head/usr.sbin/nfsd/nfsv4.4 == --- head/usr.sbin/nfsd/nfsv4.4 Wed May 1 22:47:47 2013(r250161) +++ head/usr.sbin/nfsd/nfsv4.4 Wed May 1 22:50:45 2013(r250162) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 23, 2012 +.Dd May 1, 2013 .Dt NFSV4 4 .Os .Sh NAME @@ -287,6 +287,13 @@ and daemons at boot time via the ``nfsuserd_flags'' and ``nfscbd_flags'' .Xr rc.conf 5 variables. +.Pp +NFSv4 mount(s) against exported volume(s) on the same host are not recommended, +since this can result in a hung NFS server. +It occurs when an nfsd thread tries to do an NFSv4 VOP_RECLAIM()/Close RPC +as part of acquiring a new vnode. +If all other nfsd threads are blocked waiting for lock(s) held by this nfsd +thread, then there isn't an nfsd thread to service the Close RPC. .Sh FILES .Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250161 - head/lib/libc/sys
Author: jilles Date: Wed May 1 22:47:47 2013 New Revision: 250161 URL: http://svnweb.freebsd.org/changeset/base/250161 Log: accept(2), pipe(2): Fix .Dd. Modified: head/lib/libc/sys/accept.2 head/lib/libc/sys/pipe.2 Modified: head/lib/libc/sys/accept.2 == --- head/lib/libc/sys/accept.2 Wed May 1 22:45:04 2013(r250160) +++ head/lib/libc/sys/accept.2 Wed May 1 22:47:47 2013(r250161) @@ -28,7 +28,7 @@ .\" @(#)accept.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd April 22, 2013 +.Dd May 1, 2013 .Dt ACCEPT 2 .Os .Sh NAME Modified: head/lib/libc/sys/pipe.2 == --- head/lib/libc/sys/pipe.2Wed May 1 22:45:04 2013(r250160) +++ head/lib/libc/sys/pipe.2Wed May 1 22:47:47 2013(r250161) @@ -28,7 +28,7 @@ .\" @(#)pipe.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 31, 2013 +.Dd May 1, 2013 .Dt PIPE 2 .Os .Sh NAME ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250160 - in head/sys: compat/freebsd32 kern sys
Author: jilles Date: Wed May 1 22:45:04 2013 New Revision: 250160 URL: http://svnweb.freebsd.org/changeset/base/250160 Log: Regenerate files for pipe2(). Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h == --- head/sys/compat/freebsd32/freebsd32_proto.h Wed May 1 22:42:42 2013 (r250159) +++ head/sys/compat/freebsd32/freebsd32_proto.h Wed May 1 22:45:04 2013 (r250160) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250159 2013-05-01 22:42:42Z jilles */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Wed May 1 22:42:42 2013(r250159) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Wed May 1 22:45:04 2013(r250160) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250159 2013-05-01 22:42:42Z jilles */ #defineFREEBSD32_SYS_syscall 0 @@ -439,4 +439,5 @@ #defineFREEBSD32_SYS_connectat 539 #defineFREEBSD32_SYS_chflagsat 540 #defineFREEBSD32_SYS_accept4 541 -#defineFREEBSD32_SYS_MAXSYSCALL542 +#defineFREEBSD32_SYS_pipe2 542 +#defineFREEBSD32_SYS_MAXSYSCALL543 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 1 22:42:42 2013(r250159) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 1 22:45:04 2013(r250160) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250159 2013-05-01 22:42:42Z jilles */ const char *freebsd32_syscallnames[] = { @@ -565,4 +565,5 @@ const char *freebsd32_syscallnames[] = { "connectat",/* 539 = connectat */ "chflagsat",/* 540 = chflagsat */ "accept4", /* 541 = accept4 */ + "pipe2",/* 542 = pipe2 */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cWed May 1 22:42:42 2013(r250159) +++ head/sys/compat/freebsd32/freebsd32_sysent.cWed May 1 22:45:04 2013(r250160) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250159 2013-05-01 22:42:42Z jilles */ #include "opt_compat.h" @@ -602,4 +602,5 @@ struct sysent freebsd32_sysent[] = { { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, 0, SY_THR_STATIC },/* 539 = connectat */ { AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, 0, SY_THR_STATIC },/* 540 = chflagsat */ { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */ + { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = pipe2 */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c == --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed May 1 22:42:42 2013(r250159) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed May 1 22:45:04 2013(r250160) @@ -3170,6 +3170,14 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* pipe2 */ + case 542: { + struct pipe2_args *p = params; +
svn commit: r250159 - in head: include lib/libc/sys sys/compat/freebsd32 sys/kern
Author: jilles Date: Wed May 1 22:42:42 2013 New Revision: 250159 URL: http://svnweb.freebsd.org/changeset/base/250159 Log: Add pipe2() system call. The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and O_NONBLOCK (on both sides) as part of the function. If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p). If the pointer is not valid, behaviour differs: pipe2() writes into the array from the kernel like socketpair() does, while pipe() writes into the array from an architecture-specific assembler wrapper. Reviewed by: kan, kib Modified: head/include/unistd.h head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/lib/libc/sys/pipe.2 head/sys/compat/freebsd32/syscalls.master head/sys/kern/capabilities.conf head/sys/kern/sys_pipe.c head/sys/kern/syscalls.master Modified: head/include/unistd.h == --- head/include/unistd.h Wed May 1 22:16:29 2013(r250158) +++ head/include/unistd.h Wed May 1 22:42:42 2013(r250159) @@ -533,6 +533,7 @@ char*mktemp(char *); #endif int nfssvc(int, void *); int nlm_syscall(int, int, int, char **); +int pipe2(int *, int); int profil(char *, size_t, vm_offset_t, int); int rcmd(char **, int, const char *, const char *, const char *, int *); int rcmd_af(char **, int, const char *, Modified: head/lib/libc/sys/Makefile.inc == --- head/lib/libc/sys/Makefile.inc Wed May 1 22:16:29 2013 (r250158) +++ head/lib/libc/sys/Makefile.inc Wed May 1 22:42:42 2013 (r250159) @@ -352,6 +352,7 @@ MLINKS+=pathconf.2 lpathconf.2 MLINKS+=pdfork.2 pdgetpid.2\ pdfork.2 pdkill.2 \ pdfork.2 pdwait4.2 +MLINKS+=pipe.2 pipe2.2 MLINKS+=read.2 pread.2 \ read.2 preadv.2 \ read.2 readv.2 Modified: head/lib/libc/sys/Symbol.map == --- head/lib/libc/sys/Symbol.mapWed May 1 22:16:29 2013 (r250158) +++ head/lib/libc/sys/Symbol.mapWed May 1 22:42:42 2013 (r250159) @@ -393,6 +393,7 @@ FBSD_1.3 { ffclock_getcounter; ffclock_getestimate; ffclock_setestimate; + pipe2; posix_fadvise; wait6; }; Modified: head/lib/libc/sys/pipe.2 == --- head/lib/libc/sys/pipe.2Wed May 1 22:16:29 2013(r250158) +++ head/lib/libc/sys/pipe.2Wed May 1 22:42:42 2013(r250159) @@ -28,7 +28,7 @@ .\" @(#)pipe.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 30, 2006 +.Dd March 31, 2013 .Dt PIPE 2 .Os .Sh NAME @@ -40,6 +40,8 @@ .In unistd.h .Ft int .Fn pipe "int fildes[2]" +.Ft int +.Fn pipe2 "int fildes[2]" "int flags" .Sh DESCRIPTION The .Fn pipe @@ -50,6 +52,29 @@ which is an object allowing bidirectional data flow, and allocates a pair of file descriptors. .Pp +The +.Fn pipe2 +system call allows control over the attributes of the file descriptors +via the +.Fa flags +argument. +Values for +.Fa flags +are constructed by a bitwise-inclusive OR of flags from the following +list, defined in +.In fcntl.h : +.Bl -tag -width ".Dv O_NONBLOCK" +.It Dv O_CLOEXEC +Set the close-on-exec flag for the new file descriptors. +.It Dv O_NONBLOCK +Set the non-blocking flag for the ends of the pipe. +.El +.Pp +If the +.Fa flags +argument is 0, the behavior is identical to a call to +.Fn pipe . +.Pp By convention, the first descriptor is normally used as the .Em read end of the pipe, @@ -88,7 +113,9 @@ pipe in one direction. .Sh ERRORS The .Fn pipe -system call will fail if: +and +.Fn pipe2 +system calls will fail if: .Bl -tag -width Er .It Bq Er EMFILE Too many descriptors are active. @@ -97,6 +124,16 @@ The system file table is full. .It Bq Er ENOMEM Not enough kernel memory to establish a pipe. .El +.Pp +The +.Fn pipe2 +system call will also fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa flags +argument is invalid. +.El .Sh SEE ALSO .Xr sh 1 , .Xr fork 2 , @@ -111,3 +148,8 @@ function appeared in .Pp Bidirectional pipes were first used on .At V.4 . +.Pp +The +.Fn pipe2 +function appeared in +.Fx 10.0 . Modified: head/sys/compat/freebsd32/syscalls.master == --- head/sys/compat/freebsd32/syscalls.master Wed May 1 22:16:29 2013 (r250158) +++ head/sys/compat/freebsd32/syscalls.master Wed May 1 22:42:42 2013 (r250159) @@ -1026,3 +1026,4 @@ struct sockaddr * __restrict name, \ __socklen_t * __restrict anamelen, \ int flags); } +542AUE_PIPENOPROTO { int pipe2(int *fildes, int fl
svn commit: r250158 - head/usr.bin/nfsstat
Author: rmacklem Date: Wed May 1 22:16:29 2013 New Revision: 250158 URL: http://svnweb.freebsd.org/changeset/base/250158 Log: Document that the NFSv4 server statistics are operation counts and not RPC counts. This is a content change. MFC after:2 weeks Modified: head/usr.bin/nfsstat/nfsstat.1 Modified: head/usr.bin/nfsstat/nfsstat.1 == --- head/usr.bin/nfsstat/nfsstat.1 Wed May 1 22:07:55 2013 (r250157) +++ head/usr.bin/nfsstat/nfsstat.1 Wed May 1 22:16:29 2013 (r250158) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 14, 2012 +.Dd May 1, 2013 .Dt NFSSTAT 1 .Os .Sh NAME @@ -48,6 +48,10 @@ The command displays statistics kept about .Tn NFS client and server activity. +For the NFSv4 server, the statistics are for operations within the Compound +RPCs and not the count of RPCs. +If you wish to compare RPC counts between NFSv3 and NFSv4, you must use +statistics in the client(s). .Pp The options are as follows: .Bl -tag -width indent ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250157 - head/sys/kgssapi/krb5
Author: rmacklem Date: Wed May 1 22:07:55 2013 New Revision: 250157 URL: http://svnweb.freebsd.org/changeset/base/250157 Log: Isilon reported that sec=krb5p NFS mounts had a problem when m_len == 0 for the last mbuf of the list with an encrypted message. This patch replaces the KASSERT() with code that handles this case. Reported by: john.gemign...@isilon.com Reviewed by: jhb MFC after:2 weeks Modified: head/sys/kgssapi/krb5/krb5_mech.c Modified: head/sys/kgssapi/krb5/krb5_mech.c == --- head/sys/kgssapi/krb5/krb5_mech.c Wed May 1 21:53:38 2013 (r250156) +++ head/sys/kgssapi/krb5/krb5_mech.c Wed May 1 22:07:55 2013 (r250157) @@ -1585,6 +1585,8 @@ m_trim(struct mbuf *m, int len) struct mbuf *n; int off; + if (m == NULL) + return; n = m_getptr(m, len, &off); if (n) { n->m_len = off; @@ -1600,7 +1602,7 @@ krb5_unwrap_old(struct krb5_context *kc, uint8_t sgn_alg[2], uint8_t seal_alg[2]) { OM_uint32 res; - struct mbuf *m, *mlast, *hm, *cm; + struct mbuf *m, *mlast, *hm, *cm, *n; uint8_t *p, dir; size_t mlen, tlen, elen, datalen, padlen; size_t cklen; @@ -1702,9 +1704,25 @@ krb5_unwrap_old(struct krb5_context *kc, /* * Check the trailing pad bytes. +* RFC1964 specifies between 1<->8 bytes, each with a binary value +* equal to the number of bytes. */ - KASSERT(mlast->m_len > 0, ("Unexpected empty mbuf")); - padlen = mlast->m_data[mlast->m_len - 1]; + if (mlast->m_len > 0) + padlen = mlast->m_data[mlast->m_len - 1]; + else { + n = m_getptr(m, tlen + datalen - 1, &i); + /* +* When the position is exactly equal to the # of data bytes +* in the mbuf list, m_getptr() will return the last mbuf in +* the list and an off == m_len for that mbuf, so that case +* needs to be checked as well as a NULL return. +*/ + if (n == NULL || n->m_len == i) + return (GSS_S_DEFECTIVE_TOKEN); + padlen = n->m_data[i]; + } + if (padlen < 1 || padlen > 8 || padlen > tlen + datalen) + return (GSS_S_DEFECTIVE_TOKEN); m_copydata(m, tlen + datalen - padlen, padlen, buf); for (i = 0; i < padlen; i++) { if (buf[i] != padlen) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250155 - in head/sys: compat/freebsd32 kern sys
Author: jilles Date: Wed May 1 20:12:58 2013 New Revision: 250155 URL: http://svnweb.freebsd.org/changeset/base/250155 Log: Regenerate files for accept4(). Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h == --- head/sys/compat/freebsd32/freebsd32_proto.h Wed May 1 20:10:21 2013 (r250154) +++ head/sys/compat/freebsd32/freebsd32_proto.h Wed May 1 20:12:58 2013 (r250155) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Wed May 1 20:10:21 2013(r250154) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Wed May 1 20:12:58 2013(r250155) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles */ #defineFREEBSD32_SYS_syscall 0 @@ -438,4 +438,5 @@ #defineFREEBSD32_SYS_bindat538 #defineFREEBSD32_SYS_connectat 539 #defineFREEBSD32_SYS_chflagsat 540 -#defineFREEBSD32_SYS_MAXSYSCALL541 +#defineFREEBSD32_SYS_accept4 541 +#defineFREEBSD32_SYS_MAXSYSCALL542 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 1 20:10:21 2013(r250154) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 1 20:12:58 2013(r250155) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles */ const char *freebsd32_syscallnames[] = { @@ -564,4 +564,5 @@ const char *freebsd32_syscallnames[] = { "bindat", /* 538 = bindat */ "connectat",/* 539 = connectat */ "chflagsat",/* 540 = chflagsat */ + "accept4", /* 541 = accept4 */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cWed May 1 20:10:21 2013(r250154) +++ head/sys/compat/freebsd32/freebsd32_sysent.cWed May 1 20:12:58 2013(r250155) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 250154 2013-05-01 20:10:21Z jilles */ #include "opt_compat.h" @@ -601,4 +601,5 @@ struct sysent freebsd32_sysent[] = { { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 538 = bindat */ { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, 0, SY_THR_STATIC },/* 539 = connectat */ { AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, 0, SY_THR_STATIC },/* 540 = chflagsat */ + { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c == --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed May 1 20:10:21 2013(r250154) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed May 1 20:12:58 2013(r250155) @@ -3160,6 +3160,16 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* accept4 */ + case 541: { + struct accept4_args *p = params; + iarg[0] = p->s; /* int */ + uarg[1] = (intptr_t) p->name; /* struct sockaddr *__restrict */ + uarg[2] = (intptr_t) p->anamelen; /* __socklen_t *__restrict */ + iarg[3] = p->flags; /* int */ + *n_args = 4; + break; + }
svn commit: r250154 - in head: lib/libc/sys lib/libthr lib/libthr/thread sys/compat/freebsd32 sys/kern sys/sys
Author: jilles Date: Wed May 1 20:10:21 2013 New Revision: 250154 URL: http://svnweb.freebsd.org/changeset/base/250154 Log: Add accept4() system call. The accept4() function, compared to accept(), allows setting the new file descriptor atomically close-on-exec and explicitly controlling the non-blocking status on the new socket. (Note that the latter point means that accept() is not equivalent to any form of accept4().) The linuxulator's accept4 implementation leaves a race window where the new file descriptor is not close-on-exec because it calls sys_accept(). This implementation leaves no such race window (by using falloc() flags). The linuxulator could be fixed and simplified by using the new code. Like accept(), accept4() is async-signal-safe, a cancellation point and permitted in capability mode. Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/lib/libc/sys/accept.2 head/lib/libthr/pthread.map head/lib/libthr/thread/thr_syscalls.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/capabilities.conf head/sys/kern/syscalls.master head/sys/kern/uipc_syscalls.c head/sys/sys/socket.h head/sys/sys/syscallsubr.h Modified: head/lib/libc/sys/Makefile.inc == --- head/lib/libc/sys/Makefile.inc Wed May 1 20:08:33 2013 (r250153) +++ head/lib/libc/sys/Makefile.inc Wed May 1 20:10:21 2013 (r250154) @@ -270,6 +270,7 @@ MAN+= sctp_generic_recvmsg.2 \ wait.2 \ write.2 +MLINKS+=accept.2 accept4.2 MLINKS+=access.2 eaccess.2 \ access.2 faccessat.2 MLINKS+=brk.2 sbrk.2 Modified: head/lib/libc/sys/Symbol.map == --- head/lib/libc/sys/Symbol.mapWed May 1 20:08:33 2013 (r250153) +++ head/lib/libc/sys/Symbol.mapWed May 1 20:10:21 2013 (r250154) @@ -378,6 +378,7 @@ FBSD_1.2 { }; FBSD_1.3 { + accept4; bindat; cap_fcntls_get; cap_fcntls_limit; @@ -461,6 +462,8 @@ FBSDprivate_1.0 { __sys_abort2; _accept; __sys_accept; + _accept4; + __sys_accept4; _access; __sys_access; _acct; Modified: head/lib/libc/sys/accept.2 == --- head/lib/libc/sys/accept.2 Wed May 1 20:08:33 2013(r250153) +++ head/lib/libc/sys/accept.2 Wed May 1 20:10:21 2013(r250154) @@ -41,6 +41,8 @@ .In sys/socket.h .Ft int .Fn accept "int s" "struct sockaddr * restrict addr" "socklen_t * restrict addrlen" +.Ft int +.Fn accept4 "int s" "struct sockaddr * restrict addr" "socklen_t * restrict addrlen" "int flags" .Sh DESCRIPTION The argument .Fa s @@ -66,6 +68,26 @@ and signals from the original socket .Fa s . .Pp +The +.Fn accept4 +system call is similar, +but the +.Dv O_NONBLOCK +property of the new socket is instead determined by the +.Dv SOCK_NONBLOCK +flag in the +.Fa flags +argument, +the +.Dv O_ASYNC +property is cleared, +the signal destination is cleared +and the close-on-exec flag on the new file descriptor can be set via the +.Dv SOCK_CLOEXEC +flag in the +.Fa flags +argument. +.Pp If no pending connections are present on the queue, and the original socket is not marked as non-blocking, @@ -141,13 +163,15 @@ properties and the signal destination be but should set them explicitly using .Xr fcntl 2 . .Sh RETURN VALUES -The call returns \-1 on error. -If it succeeds, it returns a non-negative +These calls return \-1 on error. +If they succeed, they return a non-negative integer that is a descriptor for the accepted socket. .Sh ERRORS The .Fn accept -system call will fail if: +and +.Fn accept4 +system calls will fail if: .Bl -tag -width Er .It Bq Er EBADF The descriptor is invalid. @@ -176,6 +200,16 @@ are present to be accepted. A connection arrived, but it was closed while waiting on the listen queue. .El +.Pp +The +.Fn accept4 +system call will also fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa flags +argument is invalid. +.El .Sh SEE ALSO .Xr bind 2 , .Xr connect 2 , @@ -190,3 +224,8 @@ The .Fn accept system call appeared in .Bx 4.2 . +.Pp +The +.Fn accept4 +system call appeared in +.Fx 10.0 . Modified: head/lib/libthr/pthread.map == --- head/lib/libthr/pthread.map Wed May 1 20:08:33 2013(r250153) +++ head/lib/libthr/pthread.map Wed May 1 20:10:21 2013(r250154) @@ -181,6 +181,7 @@ FBSDprivate_1.0 { ___wait; ___waitpid; __accept; + __accept4; __aio_suspend; __close; __connect; @@ -408,3 +409,7 @@ FBSD_1.2 { setcontext; swapcontext; }; + +FBSD_1.3 { + accept4; +}; Modified: head/lib/libthr/thread/thr_syscalls.c
svn commit: r250153 - head/sys/amd64/amd64
Author: kib Date: Wed May 1 20:08:33 2013 New Revision: 250153 URL: http://svnweb.freebsd.org/changeset/base/250153 Log: Partially saved extended state must be handled always, i.e. for both fpu-owned context, and for pcb-saved one. More, the XSAVE could do partial save, same as XSAVEOPT, so qualifier for the handler should be use_xsave and not use_xsaveopt. Since xsave_area_desc is now needed regardless of the XSAVEOPT use, remove the write-only use_xsaveopt variable. In collaboration with:jhb MFC after:1 week Modified: head/sys/amd64/amd64/fpu.c Modified: head/sys/amd64/amd64/fpu.c == --- head/sys/amd64/amd64/fpu.c Wed May 1 20:03:50 2013(r250152) +++ head/sys/amd64/amd64/fpu.c Wed May 1 20:08:33 2013(r250153) @@ -132,7 +132,6 @@ static voidfpu_clean_state(void); SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, NULL, 1, "Floating point instructions executed in hardware"); -static int use_xsaveopt; int use_xsave; /* non-static for cpu_switch.S */ uint64_t xsave_mask; /* the same */ static uma_zone_t fpu_save_area_zone; @@ -198,7 +197,6 @@ fpuinit_bsp1(void) * REX byte, and set the bit 4 of the r/m byte. */ ctx_switch_xsave[3] |= 0x10; - use_xsaveopt = 1; } } @@ -296,7 +294,7 @@ fpuinitstate(void *arg __unused) * Create a table describing the layout of the CPU Extended * Save Area. */ - if (use_xsaveopt) { + if (use_xsave) { max_ext_n = flsl(xsave_mask); xsave_area_desc = malloc(max_ext_n * sizeof(struct xsave_area_elm_descr), M_DEVBUF, M_WAITOK | M_ZERO); @@ -661,7 +659,7 @@ fpugetregs(struct thread *td) struct pcb *pcb; uint64_t *xstate_bv, bit; char *sa; - int max_ext_n, i; + int max_ext_n, i, owned; pcb = td->td_pcb; if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { @@ -675,31 +673,31 @@ fpugetregs(struct thread *td) critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { fpusave(get_pcb_user_save_pcb(pcb)); - critical_exit(); - return (_MC_FPOWNED_FPU); + owned = _MC_FPOWNED_FPU; } else { - critical_exit(); - if (use_xsaveopt) { - /* -* Handle partially saved state. -*/ - sa = (char *)get_pcb_user_save_pcb(pcb); - xstate_bv = (uint64_t *)(sa + sizeof(struct savefpu) + - offsetof(struct xstate_hdr, xstate_bv)); - max_ext_n = flsl(xsave_mask); - for (i = 0; i < max_ext_n; i++) { - bit = 1 << i; - if ((*xstate_bv & bit) != 0) - continue; - bcopy((char *)fpu_initialstate + - xsave_area_desc[i].offset, - sa + xsave_area_desc[i].offset, - xsave_area_desc[i].size); - *xstate_bv |= bit; - } + owned = _MC_FPOWNED_PCB; + } + critical_exit(); + if (use_xsave) { + /* +* Handle partially saved state. +*/ + sa = (char *)get_pcb_user_save_pcb(pcb); + xstate_bv = (uint64_t *)(sa + sizeof(struct savefpu) + + offsetof(struct xstate_hdr, xstate_bv)); + max_ext_n = flsl(xsave_mask); + for (i = 0; i < max_ext_n; i++) { + bit = 1 << i; + if ((*xstate_bv & bit) != 0) + continue; + bcopy((char *)fpu_initialstate + + xsave_area_desc[i].offset, + sa + xsave_area_desc[i].offset, + xsave_area_desc[i].size); + *xstate_bv |= bit; } - return (_MC_FPOWNED_PCB); } + return (owned); } void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250152 - head/sys/amd64/amd64
Author: kib Date: Wed May 1 20:03:50 2013 New Revision: 250152 URL: http://svnweb.freebsd.org/changeset/base/250152 Log: The check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and XFEATURE_ENABLED_SSE bits set is not needed. CPU correctly handles any bitmask which is subset of the enabled bits in %XCR0. More, CPU instructions XSAVE and XSAVEOPT could write the mask without e.g. XFEATURE_ENABLED_SSE, after the VZEROALL. The check prevents the restoration of the otherwise valid FPU save area. In collaboration with:jhb MFC after:1 week Modified: head/sys/amd64/amd64/fpu.c Modified: head/sys/amd64/amd64/fpu.c == --- head/sys/amd64/amd64/fpu.c Wed May 1 18:06:53 2013(r250151) +++ head/sys/amd64/amd64/fpu.c Wed May 1 20:03:50 2013(r250152) @@ -743,9 +743,6 @@ fpusetxstate(struct thread *td, char *xf */ if (bv & ~xsave_mask) return (EINVAL); - if ((bv & (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) != - (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) - return (EINVAL); hdr = (struct xstate_hdr *)(get_pcb_user_save_td(td) + 1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250150 - head/share/misc
Author: zeising (doc,ports committer) Date: Wed May 1 17:59:41 2013 New Revision: 250150 URL: http://svnweb.freebsd.org/changeset/base/250150 Log: Add DragonFly BSD 3.4.1, released April 29 2013. Submitted by: Nikolai Lifanov Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Wed May 1 17:34:44 2013 (r250149) +++ head/share/misc/bsd-family-tree Wed May 1 17:59:41 2013 (r250150) @@ -261,7 +261,7 @@ FreeBSD 5.2 | | | FreeBSD | | | | |9.1 | | | | || | | | - || |OpenBSD 5.3 | + || |OpenBSD 5.3 DragonFly 3.4.1 || | | | || | | | || | | | @@ -562,6 +562,7 @@ NetBSD 6.0 2012-10-17 [NBD] OpenBSD 5.22012-11-01 [OBD] DragonFly 3.2.12012-11-02 [DFB] FreeBSD 9.12012-12-30 [FBD] +DragonFly 3.4.12013-04-29 [DFB] OpenBSD 5.32013-05-01 [OBD] Bibliography ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250149 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: davide Date: Wed May 1 17:34:44 2013 New Revision: 250149 URL: http://svnweb.freebsd.org/changeset/base/250149 Log: In case ZFS doesn't use UMA for buffers there's no need to waste memory creating zones that will remain empty. Reviewed by: pjd Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed May 1 17:29:42 2013(r250148) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed May 1 17:34:44 2013(r250149) @@ -154,6 +154,8 @@ zio_init(void) sizeof (zio_t), 0, NULL, NULL, NULL, NULL, NULL, 0); zio_link_cache = kmem_cache_create("zio_link_cache", sizeof (zio_link_t), 0, NULL, NULL, NULL, NULL, NULL, 0); + if (!zio_use_uma) + goto out; /* * For small buffers, we want a cache for each multiple of @@ -217,6 +219,7 @@ zio_init(void) if (zio_data_buf_cache[c - 1] == NULL) zio_data_buf_cache[c - 1] = zio_data_buf_cache[c]; } +out: /* * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250148 - head/share/misc
Author: zeising (doc,ports committer) Date: Wed May 1 17:29:42 2013 New Revision: 250148 URL: http://svnweb.freebsd.org/changeset/base/250148 Log: Add OpenBSD 5.3, released today, May 1 2013. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Wed May 1 15:02:58 2013 (r250147) +++ head/share/misc/bsd-family-tree Wed May 1 17:29:42 2013 (r250148) @@ -261,6 +261,10 @@ FreeBSD 5.2 | | | FreeBSD | | | | |9.1 | | | | || | | | + || |OpenBSD 5.3 | + || | | | + || | | | + || | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | || | | | vv v v v @@ -558,6 +562,7 @@ NetBSD 6.0 2012-10-17 [NBD] OpenBSD 5.22012-11-01 [OBD] DragonFly 3.2.12012-11-02 [DFB] FreeBSD 9.12012-12-30 [FBD] +OpenBSD 5.32013-05-01 [OBD] Bibliography ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250147 - head/lib/libprocstat
Author: trociny Date: Wed May 1 15:02:58 2013 New Revision: 250147 URL: http://svnweb.freebsd.org/changeset/base/250147 Log: procstat_getpathname: for kvm method, instead of returning the error that the method is not supported, return an empty string. This looks more handy for callers like procstat(1), which will not abort after the failed call and still output some useful information. MFC after:3 weeks Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c == --- head/lib/libprocstat/libprocstat.c Wed May 1 15:01:05 2013 (r250146) +++ head/lib/libprocstat/libprocstat.c Wed May 1 15:02:58 2013 (r250147) @@ -2114,8 +2114,10 @@ procstat_getpathname(struct procstat *pr { switch(procstat->type) { case PROCSTAT_KVM: - warnx("kvm method is not supported"); - return (-1); + /* XXX: Return empty string. */ + if (maxlen > 0) + pathname[0] = '\0'; + return (0); case PROCSTAT_SYSCTL: return (procstat_getpathname_sysctl(kp->ki_pid, pathname, maxlen)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250146 - head/lib/libprocstat
Author: trociny Date: Wed May 1 15:01:05 2013 New Revision: 250146 URL: http://svnweb.freebsd.org/changeset/base/250146 Log: KVM method support for procstat_getgroups, procstat_getumask, procstat_getrlimit, and procstat_getosrel. MFC after:3 weeks Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c == --- head/lib/libprocstat/libprocstat.c Wed May 1 14:59:16 2013 (r250145) +++ head/lib/libprocstat/libprocstat.c Wed May 1 15:01:05 2013 (r250146) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define_WANT_UCRED +#include +#undef _WANT_UCRED #include #include #include @@ -141,19 +144,30 @@ static intprocstat_get_vnode_info_sysct struct vnstat *vn, char *errbuf); static gid_t *procstat_getgroups_core(struct procstat_core *core, unsigned int *count); +static gid_t * procstat_getgroups_kvm(kvm_t *kd, struct kinfo_proc *kp, +unsigned int *count); static gid_t *procstat_getgroups_sysctl(pid_t pid, unsigned int *count); static struct kinfo_kstack *procstat_getkstack_sysctl(pid_t pid, int *cntp); +static int procstat_getosrel_core(struct procstat_core *core, +int *osrelp); +static int procstat_getosrel_kvm(kvm_t *kd, struct kinfo_proc *kp, +int *osrelp); +static int procstat_getosrel_sysctl(pid_t pid, int *osrelp); static int procstat_getpathname_core(struct procstat_core *core, char *pathname, size_t maxlen); static int procstat_getpathname_sysctl(pid_t pid, char *pathname, size_t maxlen); static int procstat_getrlimit_core(struct procstat_core *core, int which, struct rlimit* rlimit); +static int procstat_getrlimit_kvm(kvm_t *kd, struct kinfo_proc *kp, +int which, struct rlimit* rlimit); static int procstat_getrlimit_sysctl(pid_t pid, int which, struct rlimit* rlimit); static int procstat_getumask_core(struct procstat_core *core, unsigned short *maskp); +static int procstat_getumask_kvm(kvm_t *kd, struct kinfo_proc *kp, +unsigned short *maskp); static int procstat_getumask_sysctl(pid_t pid, unsigned short *maskp); static int vntype2psfsttype(int type); @@ -1790,6 +1804,46 @@ procstat_freevmmap(struct procstat *proc } static gid_t * +procstat_getgroups_kvm(kvm_t *kd, struct kinfo_proc *kp, unsigned int *cntp) +{ + struct proc proc; + struct ucred ucred; + gid_t *groups; + size_t len; + + assert(kd != NULL); + assert(kp != NULL); + if (!kvm_read_all(kd, (unsigned long)kp->ki_paddr, &proc, + sizeof(proc))) { + warnx("can't read proc struct at %p for pid %d", + kp->ki_paddr, kp->ki_pid); + return (NULL); + } + if (proc.p_ucred == NOCRED) + return (NULL); + if (!kvm_read_all(kd, (unsigned long)proc.p_ucred, &ucred, + sizeof(ucred))) { + warnx("can't read ucred struct at %p for pid %d", + proc.p_ucred, kp->ki_pid); + return (NULL); + } + len = ucred.cr_ngroups * sizeof(gid_t); + groups = malloc(len); + if (groups == NULL) { + warn("malloc(%zu)", len); + return (NULL); + } + if (!kvm_read_all(kd, (unsigned long)ucred.cr_groups, groups, len)) { + warnx("can't read groups at %p for pid %d", + ucred.cr_groups, kp->ki_pid); + free(groups); + return (NULL); + } + *cntp = ucred.cr_ngroups; + return (groups); +} + +static gid_t * procstat_getgroups_sysctl(pid_t pid, unsigned int *cntp) { int mib[4]; @@ -1834,8 +1888,7 @@ procstat_getgroups(struct procstat *proc { switch(procstat->type) { case PROCSTAT_KVM: - warnx("kvm method is not supported"); - return (NULL); + return (procstat_getgroups_kvm(procstat->kd, kp, cntp)); case PROCSTAT_SYSCTL: return (procstat_getgroups_sysctl(kp->ki_pid, cntp)); case PROCSTAT_CORE: @@ -1854,6 +1907,24 @@ procstat_freegroups(struct procstat *pro } static int +procstat_getumask_kvm(kvm_t *kd, struct kinfo_proc *kp, unsigned short *maskp) +{ + struct filedesc fd; + + assert(kd != NULL); + assert(kp != NULL); + if (kp->ki_fd == NULL) + return (-1); + if (!kvm_read_all(kd, (unsigned long)kp->ki_fd, &fd, sizeof(fd))) { + warnx("can't read filedesc at %p for pid %d", kp->ki_fd, + kp->ki_pid); + return (-1); + } + *maskp = fd.fd_cmask; + return (0); +} + +static int procstat_getumask_sysctl(pid_t pid, unsigned short *maskp) { int error; @@ -1895,8 +1966,7 @@ procstat_getumask(struct procstat *procs { switch(procstat->type) {
svn commit: r250145 - head/sys/kern
Author: trociny Date: Wed May 1 14:59:16 2013 New Revision: 250145 URL: http://svnweb.freebsd.org/changeset/base/250145 Log: Introduce a constant, ELF_NOTE_ROUNDSIZE, which evidently declare our intention to use 4-byte padding for elf notes. MFC after:3 weeks Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c == --- head/sys/kern/imgact_elf.c Wed May 1 11:10:15 2013(r250144) +++ head/sys/kern/imgact_elf.c Wed May 1 14:59:16 2013(r250145) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include +#define ELF_NOTE_ROUNDSIZE 4 #define OLD_EI_BRAND 8 static int __elfN(check_header)(const Elf_Ehdr *hdr); @@ -161,7 +162,7 @@ __elfN(freebsd_trans_osrel)(const Elf_No uintptr_t p; p = (uintptr_t)(note + 1); - p += roundup2(note->n_namesz, sizeof(Elf32_Addr)); + p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); *osrel = *(const int32_t *)(p); return (TRUE); @@ -186,7 +187,7 @@ kfreebsd_trans_osrel(const Elf_Note *not uintptr_t p; p = (uintptr_t)(note + 1); - p += roundup2(note->n_namesz, sizeof(Elf32_Addr)); + p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); desc = (const Elf32_Word *)p; if (desc[0] != GNU_KFREEBSD_ABI_DESC) @@ -1546,7 +1547,7 @@ __elfN(puthdr)(struct thread *td, void * phdr->p_filesz = notesz; phdr->p_memsz = 0; phdr->p_flags = PF_R; - phdr->p_align = sizeof(Elf32_Size); + phdr->p_align = ELF_NOTE_ROUNDSIZE; phdr++; /* All the writable segments from the program. */ @@ -1574,8 +1575,8 @@ register_note(struct note_info_list *lis return (size); notesize = sizeof(Elf_Note) + /* note header */ - roundup2(8, sizeof(Elf32_Size)) + /* note name ("FreeBSD") */ - roundup2(size, sizeof(Elf32_Size)); /* note description */ + roundup2(8, ELF_NOTE_ROUNDSIZE) + /* note name ("FreeBSD") */ + roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */ return (notesize); } @@ -1598,12 +1599,12 @@ __elfN(putnote)(struct note_info *ninfo, sbuf_bcat(sb, ¬e, sizeof(note)); sbuf_start_section(sb, &old_len); sbuf_bcat(sb, "FreeBSD", note.n_namesz); - sbuf_end_section(sb, old_len, sizeof(Elf32_Size), 0); + sbuf_end_section(sb, old_len, ELF_NOTE_ROUNDSIZE, 0); if (note.n_descsz == 0) return; sbuf_start_section(sb, &old_len); ninfo->outfunc(ninfo->outarg, sb, &ninfo->outsize); - sbuf_end_section(sb, old_len, sizeof(Elf32_Size), 0); + sbuf_end_section(sb, old_len, ELF_NOTE_ROUNDSIZE, 0); } /* @@ -2004,8 +2005,8 @@ __elfN(parse_notes)(struct image_params nextnote: note = (const Elf_Note *)((const char *)(note + 1) + - roundup2(note->n_namesz, sizeof(Elf32_Addr)) + - roundup2(note->n_descsz, sizeof(Elf32_Addr))); + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + + roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } return (FALSE); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r250105 - head/sys/dev/hwpmc
On Tue, Apr 30, 2013 at 08:10:17PM +0400, Sergey Kandaurov wrote: S> On 30 April 2013 19:59, Davide Italiano wrote: S> > Author: davide S> > Date: Tue Apr 30 15:59:22 2013 S> > New Revision: 250105 S> > URL: http://svnweb.freebsd.org/changeset/base/250105 S> > S> > Log: S> > malloc(9) cannot return NULL if M_WAITOK flag is specified. S> > S> > Modified: S> > head/sys/dev/hwpmc/hwpmc_mod.c S> > head/sys/dev/hwpmc/hwpmc_soft.c S> > S> > Modified: head/sys/dev/hwpmc/hwpmc_mod.c S> > == S> > --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Apr 30 15:38:31 2013 (r250104) S> > +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Apr 30 15:59:22 2013 (r250105) S> > @@ -2210,11 +2210,8 @@ pmc_allocate_pmc_descriptor(void) S> > struct pmc *pmc; S> > S> > pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); S> > - S> > - if (pmc != NULL) { S> > - pmc->pm_owner = NULL; S> > - LIST_INIT(&pmc->pm_targets); S> > - } S> > + pmc->pm_owner = NULL; S> > + LIST_INIT(&pmc->pm_targets); S> > S> > PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc); S> S> It looks like zeroing pm_owner can also be omitted with M_ZERO. LIST_INIT is also an assignment of zero. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250143 - head
Author: benno Date: Wed May 1 09:56:09 2013 New Revision: 250143 URL: http://svnweb.freebsd.org/changeset/base/250143 Log: Optimize SUBDIR_OVERRIDE such that SUBDIR isn't automatically defined if SUBDIR_OVERRIDE is defined. PR: conf/174071 Submitted by: Garrett Cooper Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 1 09:20:13 2013(r250142) +++ head/Makefile.inc1 Wed May 1 09:56:09 2013(r250143) @@ -58,6 +58,9 @@ # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # +.if defined(SUBDIR_OVERRIDE) +SUBDIR=${SUBDIR_OVERRIDE} +.else SUBDIR=share/info lib libexec SUBDIR+=bin .if ${MK_GAMES} != "no" @@ -96,9 +99,6 @@ SUBDIR+=etc SUBDIR+= ${_DIR} .endif .endfor - -.if defined(SUBDIR_OVERRIDE) -SUBDIR=${SUBDIR_OVERRIDE} .endif .if defined(NOCLEAN) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r250139 - head
Author: imp Date: Wed May 1 07:13:36 2013 New Revision: 250139 URL: http://svnweb.freebsd.org/changeset/base/250139 Log: Add a historic footnote. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Wed May 1 06:57:46 2013(r250138) +++ head/UPDATING Wed May 1 07:13:36 2013(r250139) @@ -291,7 +291,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 is now spelled mips64. mipsn32eb is now spelled mipsn32. mipseb is now spelled mips. This is to aid compatibility with third-party software that expects this naming scheme in uname(3). Little-endian - settings are unchanged. + settings are unchanged. If you are updating a big-endian mips64 machine + from before this change, you may need to set MACHINE_ARCH=mips64 in + your environment before the new build system will recognize your machine. 20120306: Disable by default the option VFS_ALLOW_NONMPSAFE for all supported ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"