svn commit: r240689 - in head/share/man: man4 man5
Author: zeising (doc,ports committer) Date: Wed Sep 19 09:34:21 2012 New Revision: 240689 URL: http://svn.freebsd.org/changeset/base/240689 Log: Do not install pf related man pages if WITHOUT_PF is set. PR: bin/171767 Submitted by: zeising Approved by: joel (mentor), glebius Modified: head/share/man/man4/Makefile head/share/man/man5/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileWed Sep 19 06:20:25 2012 (r240688) +++ head/share/man/man4/MakefileWed Sep 19 09:34:21 2012 (r240689) @@ -1,6 +1,8 @@ # @(#)Makefile8.1 (Berkeley) 6/18/93 # $FreeBSD$ +.include + MAN= aac.4 \ acpi.4 \ ${_acpi_asus.4} \ @@ -354,9 +356,9 @@ MAN=aac.4 \ pcii.4 \ pcm.4 \ pcn.4 \ - pf.4 \ - pflog.4 \ - pfsync.4 \ + ${_pf.4} \ + ${_pflog.4} \ + ${_pfsync.4} \ pim.4 \ polling.4 \ ppbus.4 \ @@ -798,4 +800,10 @@ _nvram2env.4= nvram2env.4 SUBDIR=man4.${MACHINE_CPUARCH} .endif +.if ${MK_PF} != "no" +_pf.4= pf.4 +_pflog.4= pflog.4 +_pfsync.4= pfsync.4 +.endif + .include Modified: head/share/man/man5/Makefile == --- head/share/man/man5/MakefileWed Sep 19 06:20:25 2012 (r240688) +++ head/share/man/man5/MakefileWed Sep 19 09:34:21 2012 (r240689) @@ -50,8 +50,6 @@ MAN= acct.5 \ passwd.5 \ pbm.5 \ periodic.conf.5 \ - pf.conf.5 \ - pf.os.5 \ phones.5 \ portindex.5 \ portsnap.conf.5 \ @@ -91,6 +89,11 @@ MAN+=hesiod.conf.5 MAN+= nandfs.5 .endif +.if ${MK_PF} != "no" +MAN+= pf.conf.5 \ + pf.os.5 +.endif + .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _boot.config.5=boot.config.5 .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240690 - head/tools/build/options
Author: zeising (doc,ports committer) Date: Wed Sep 19 11:38:37 2012 New Revision: 240690 URL: http://svn.freebsd.org/changeset/base/240690 Log: Add documentation for the WITHOUT_KDUMP switch. This swtich was introduced in r240404 Approved by: joel (mentor) Added: head/tools/build/options/WITHOUT_KDUMP (contents, props changed) Added: head/tools/build/options/WITHOUT_KDUMP == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_KDUMP Wed Sep 19 11:38:37 2012 (r240690) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build +.Xr kdump 1 +and +.Xr truss 1 . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240691 - head/share/man/man5
Author: zeising (doc,ports committer) Date: Wed Sep 19 11:40:17 2012 New Revision: 240691 URL: http://svn.freebsd.org/changeset/base/240691 Log: Regen for r240690 Approved by: joel (mentor) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Sep 19 11:38:37 2012 (r240690) +++ head/share/man/man5/src.conf.5 Wed Sep 19 11:40:17 2012 (r240691) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd September 8, 2012 +.Dd September 19, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -551,6 +551,12 @@ Set to build some programs without IPX s .\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam Set to not build tools for the support of jails; e.g. .Xr jail 8 . +.It Va WITHOUT_KDUMP +.\" $FreeBSD$ +Set to not build +.Xr kdump 1 +and +.Xr truss 1 . .It Va WITHOUT_KERBEROS .\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240692 - head/sys/dev/amr
Author: jhb Date: Wed Sep 19 11:54:32 2012 New Revision: 240692 URL: http://svn.freebsd.org/changeset/base/240692 Log: As a followup to r234501, ensure that the native ioctl path always allocates a 4kb buffer if a request uses a buffer size of 0. (The Linux ioctl path already did this.) PR: kern/155658 Submitted by: Andreas Longwitz MFC after:1 week Modified: head/sys/dev/amr/amr.c Modified: head/sys/dev/amr/amr.c == --- head/sys/dev/amr/amr.c Wed Sep 19 11:40:17 2012(r240691) +++ head/sys/dev/amr/amr.c Wed Sep 19 11:54:32 2012(r240692) @@ -846,11 +846,8 @@ amr_ioctl(struct cdev *dev, u_long cmd, /* handle inbound data buffer */ real_length = amr_ioctl_buffer_length(au_length); +dp = malloc(real_length, M_AMR, M_WAITOK|M_ZERO); if (au_length != 0 && au_cmd[0] != 0x06) { - if ((dp = malloc(real_length, M_AMR, M_WAITOK|M_ZERO)) == NULL) { - error = ENOMEM; - goto out; - } if ((error = copyin(au_buffer, dp, au_length)) != 0) { free(dp, M_AMR); return (error); @@ -920,8 +917,7 @@ amr_ioctl(struct cdev *dev, u_long cmd, error = copyout(dp, au_buffer, au_length); } debug(2, "copyout %ld bytes from %p -> %p", au_length, dp, au_buffer); -if (dp != NULL) - debug(2, "%p status 0x%x", dp, ac->ac_status); +debug(2, "%p status 0x%x", dp, ac->ac_status); *au_statusp = ac->ac_status; out: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240693 - in head/sys/dev: ahci alc cxgbe e1000 re
Author: gavin Date: Wed Sep 19 12:27:23 2012 New Revision: 240693 URL: http://svn.freebsd.org/changeset/base/240693 Log: Switch some PCI register reads from using magic numbers to using the names defined in pcireg.h MFC after:1 week Modified: head/sys/dev/ahci/ahci.c head/sys/dev/alc/if_alc.c head/sys/dev/cxgbe/osdep.h head/sys/dev/e1000/if_em.c head/sys/dev/re/if_re.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cWed Sep 19 11:54:32 2012(r240692) +++ head/sys/dev/ahci/ahci.cWed Sep 19 12:27:23 2012(r240693) @@ -543,7 +543,7 @@ ahci_ctlr_reset(device_t dev) struct ahci_controller *ctlr = device_get_softc(dev); int timeout; - if (pci_read_config(dev, 0x00, 4) == 0x28298086 && + if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == 0x28298086 && (pci_read_config(dev, 0x92, 1) & 0xfe) == 0x04) pci_write_config(dev, 0x92, 0x01, 1); /* Enable AHCI mode */ Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Wed Sep 19 11:54:32 2012(r240692) +++ head/sys/dev/alc/if_alc.c Wed Sep 19 12:27:23 2012(r240693) @@ -694,10 +694,10 @@ alc_aspm(struct alc_softc *sc, int media if ((sc->alc_flags & ALC_FLAG_APS) != 0) { /* Disable extended sync except AR8152 B v1.0 */ - linkcfg &= ~0x80; + linkcfg &= ~PCIEM_LINK_CTL_EXTENDED_SYNC; if (sc->alc_ident->deviceid == DEVICEID_ATHEROS_AR8152_B && sc->alc_rev == ATHEROS_AR8152_B_V10) - linkcfg |= 0x80; + linkcfg |= PCIEM_LINK_CTL_EXTENDED_SYNC; CSR_WRITE_2(sc, sc->alc_expcap + PCIER_LINK_CTL, linkcfg); pmcfg &= ~(PM_CFG_EN_BUFS_RX_L0S | PM_CFG_SA_DLY_ENB | @@ -834,15 +834,15 @@ alc_attach(device_t dev) cap = CSR_READ_2(sc, base + PCIER_LINK_CAP); if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { ctl = CSR_READ_2(sc, base + PCIER_LINK_CTL); - if ((ctl & 0x08) != 0) + if ((ctl & PCIEM_LINK_CTL_RCB) != 0) sc->alc_rcb = DMA_CFG_RCB_128; if (bootverbose) device_printf(dev, "RCB %u bytes\n", sc->alc_rcb == DMA_CFG_RCB_64 ? 64 : 128); - state = ctl & 0x03; - if (state & 0x01) + state = ctl & PCIEM_LINK_CTL_ASPMC; + if (state & PCIEM_LINK_CTL_ASPMC_L0S) sc->alc_flags |= ALC_FLAG_L0S; - if (state & 0x02) + if (state & PCIEM_LINK_CTL_ASPMC_L1) sc->alc_flags |= ALC_FLAG_L1S; if (bootverbose) device_printf(sc->alc_dev, "ASPM %s %s\n", Modified: head/sys/dev/cxgbe/osdep.h == --- head/sys/dev/cxgbe/osdep.h Wed Sep 19 11:54:32 2012(r240692) +++ head/sys/dev/cxgbe/osdep.h Wed Sep 19 12:27:23 2012(r240693) @@ -125,7 +125,7 @@ typedef boolean_t bool; #define PCI_EXP_LNKSTA PCIER_LINK_STA #define PCI_EXP_LNKSTA_CLS PCIEM_LINK_STA_SPEED #define PCI_EXP_LNKSTA_NLW PCIEM_LINK_STA_WIDTH -#define PCI_EXP_DEVCTL20x28 +#define PCI_EXP_DEVCTL2PCIER_DEVICE_CTL2 static inline int ilog2(long x) Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Wed Sep 19 11:54:32 2012(r240692) +++ head/sys/dev/e1000/if_em.c Wed Sep 19 12:27:23 2012(r240693) @@ -5119,7 +5119,7 @@ em_disable_aspm(struct adapter *adapter) return; reg = base + PCIER_LINK_CTL; link_ctrl = pci_read_config(dev, reg, 2); - link_ctrl &= 0xFFFC; /* turn off bit 1 and 2 */ + link_ctrl &= ~PCIEM_LINK_CTL_ASPMC; pci_write_config(dev, reg, link_ctrl, 2); return; } Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Wed Sep 19 11:54:32 2012(r240692) +++ head/sys/dev/re/if_re.c Wed Sep 19 12:27:23 2012(r240693) @@ -1347,8 +1347,8 @@ re_attach(device_t dev) if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { ctl = pci_read_config(dev, sc->rl_expcap + PCIER_LINK_CTL, 2); - if ((ctl & 0x0003) != 0) { - ctl &= ~0x0003; + if ((ctl & PCIEM_LINK_CTL_ASPMC)
svn commit: r240694 - head/sys/dev/pci
Author: gavin Date: Wed Sep 19 12:54:25 2012 New Revision: 240694 URL: http://svn.freebsd.org/changeset/base/240694 Log: Add PCI subclass for NVM Express devices. Reference: http://www.nvmexpress.org/index.php/download_file/view/42/1/NVM_Express_1_0b.pdf section 2.1.5. MFC after:1 week Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h == --- head/sys/dev/pci/pcireg.h Wed Sep 19 12:27:23 2012(r240693) +++ head/sys/dev/pci/pcireg.h Wed Sep 19 12:54:25 2012(r240694) @@ -275,6 +275,7 @@ #definePCIS_STORAGE_SATA 0x06 #definePCIP_STORAGE_SATA_AHCI_1_0 0x01 #definePCIS_STORAGE_SAS0x07 +#definePCIS_STORAGE_NVM0x08 #definePCIS_STORAGE_OTHER 0x80 #definePCIC_NETWORK0x02 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240695 - head/sys/dev/pci
Author: jimharris Date: Wed Sep 19 15:43:30 2012 New Revision: 240695 URL: http://svn.freebsd.org/changeset/base/240695 Log: Add constants for programming interfaces for NVM/solid state storage controller sub-class code. Reference: PCI Code and ID Assignment Specification Rev 1.2 Sponsored by: Intel Inspired by: gavin MFC after:1 week X-MFC-With: r240694 Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h == --- head/sys/dev/pci/pcireg.h Wed Sep 19 12:54:25 2012(r240694) +++ head/sys/dev/pci/pcireg.h Wed Sep 19 15:43:30 2012(r240695) @@ -276,6 +276,8 @@ #definePCIP_STORAGE_SATA_AHCI_1_0 0x01 #definePCIS_STORAGE_SAS0x07 #definePCIS_STORAGE_NVM0x08 +#definePCIP_STORAGE_NVM_NVMHCI_1_0 0x01 +#definePCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0 0x02 #definePCIS_STORAGE_OTHER 0x80 #definePCIC_NETWORK0x02 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240696 - in head/cddl: contrib/opensolaris/cmd/zfs sbin/zfs
Author: bapt Date: Wed Sep 19 16:20:49 2012 New Revision: 240696 URL: http://svn.freebsd.org/changeset/base/240696 Log: Allow zfs jail and zfs unjail to use both jailnames and jailid Reviewed by: pjd MFC after:1 month Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/sbin/zfs/Makefile Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 19 15:43:30 2012 (r240695) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 19 16:20:49 2012 (r240696) @@ -256,10 +256,10 @@ .Op Ar snapshot Ns | Ns Ar filesystem .Nm .Cm jail -.Ar jailid filesystem +.Ar jailid Ns | Ns Ar jailname filesystem .Nm .Cm unjail -.Ar jailid filesystem +.Ar jailid Ns | Ns Ar jailname filesystem .Sh DESCRIPTION The .Nm Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cWed Sep 19 15:43:30 2012(r240695) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cWed Sep 19 16:20:49 2012(r240696) @@ -6300,9 +6300,9 @@ do_jail(int argc, char **argv, int attac usage(B_FALSE); } - jailid = atoi(argv[1]); - if (jailid == 0) { - (void) fprintf(stderr, gettext("invalid jailid\n")); + jailid = jail_getid(argv[1]); + if (jailid < 0) { + (void) fprintf(stderr, gettext("invalid jail id or name\n")); usage(B_FALSE); } Modified: head/cddl/sbin/zfs/Makefile == --- head/cddl/sbin/zfs/Makefile Wed Sep 19 15:43:30 2012(r240695) +++ head/cddl/sbin/zfs/Makefile Wed Sep 19 16:20:49 2012(r240696) @@ -21,8 +21,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -DPADD= ${LIBGEOM} ${LIBNVPAIR} ${LIBUMEM} \ +DPADD= ${LIBGEOM} ${LIBJAIL} ${LIBNVPAIR} ${LIBUMEM} \ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lgeom -lnvpair -lumem -lutil -luutil -lzfs +LDADD= -lgeom -ljail -lnvpair -lumem -lutil -luutil -lzfs .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240697 - head/sys/dev/nvme
Author: jimharris Date: Wed Sep 19 16:21:23 2012 New Revision: 240697 URL: http://svn.freebsd.org/changeset/base/240697 Log: Report nvme(4) as a generic driver for NVMe devices if PCI class, subclass and programming interface codes match. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme.c Modified: head/sys/dev/nvme/nvme.c == --- head/sys/dev/nvme/nvme.cWed Sep 19 16:20:49 2012(r240696) +++ head/sys/dev/nvme/nvme.cWed Sep 19 16:21:23 2012(r240697) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "nvme_private.h" @@ -82,17 +83,29 @@ static struct _pcsid static int nvme_probe (device_t device) { - u_int32_t type = pci_get_devid(device); - struct _pcsid *ep = pci_ids; + struct _pcsid *ep; + int probe_val = ENXIO; + u_int32_t type; + + type = pci_get_devid(device); + ep = pci_ids; + +#if defined(PCIS_STORAGE_NVM) + if (pci_get_class(device)== PCIC_STORAGE && + pci_get_subclass(device) == PCIS_STORAGE_NVM && + pci_get_progif(device) == PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0) + probe_val = BUS_PROBE_GENERIC; +#endif while (ep->type && ep->type != type) ++ep; if (ep->desc) { device_set_desc(device, ep->desc); - return (BUS_PROBE_DEFAULT); - } else - return (ENXIO); + probe_val = BUS_PROBE_DEFAULT; + } + + return (probe_val); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240698 - head/cddl/contrib/opensolaris/cmd/zfs
Author: bapt Date: Wed Sep 19 16:28:38 2012 New Revision: 240698 URL: http://svn.freebsd.org/changeset/base/240698 Log: Update usage to show the possiblity to use jail name Reported by: bdrewery MFC after:1 month Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cWed Sep 19 16:21:23 2012(r240697) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cWed Sep 19 16:28:38 2012(r240698) @@ -240,9 +240,9 @@ get_usage(zfs_help_t idx) return (gettext("\tupgrade [-v]\n" "\tupgrade [-r] [-V version] <-a | filesystem ...>\n")); case HELP_JAIL: - return (gettext("\tjail \n")); + return (gettext("\tjail \n")); case HELP_UNJAIL: - return (gettext("\tunjail \n")); + return (gettext("\tunjail \n")); case HELP_LIST: return (gettext("\tlist [-rH][-d max] " "[-o property[,...]] [-t type[,...]] [-s property] ...\n" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r240697 - head/sys/dev/nvme
On Wednesday, September 19, 2012 12:21:24 pm Jim Harris wrote: > Author: jimharris > Date: Wed Sep 19 16:21:23 2012 > New Revision: 240697 > URL: http://svn.freebsd.org/changeset/base/240697 > > Log: > Report nvme(4) as a generic driver for NVMe devices if PCI class, subclass > and programming interface codes match. You need to set a description in the generic case. I would suggest doing something like: while (ep->type && ep->type != type) ++ep; if (ep->desc) { device_set_desc(device, ep->desc); return (BUS_PROBE_DEFAULT); } #ifdef PCIS_STORAGE_NVM if (pci_get_class(device) == PCIC_STORAGE && ...) { device_set_desc(device, "blah blah"); return (BUS_PROBE_GENERIC); } #endif return (ENXIO); I think that might be a bit clearer to the reader. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240699 - in head: sys/dev/pci usr.sbin/pciconf
Author: gavin Date: Wed Sep 19 18:22:14 2012 New Revision: 240699 URL: http://svn.freebsd.org/changeset/base/240699 Log: Recognise NVM Express devices and pretty-print their name. MFC after:1 week Modified: head/sys/dev/pci/pci.c head/usr.sbin/pciconf/pciconf.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed Sep 19 16:28:38 2012(r240698) +++ head/sys/dev/pci/pci.c Wed Sep 19 18:22:14 2012(r240699) @@ -3661,6 +3661,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM Express"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, Modified: head/usr.sbin/pciconf/pciconf.c == --- head/usr.sbin/pciconf/pciconf.c Wed Sep 19 16:28:38 2012 (r240698) +++ head/usr.sbin/pciconf/pciconf.c Wed Sep 19 18:22:14 2012 (r240699) @@ -345,6 +345,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM Express"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240700 - head/sys/dev/nvme
Author: jimharris Date: Wed Sep 19 18:25:25 2012 New Revision: 240700 URL: http://svn.freebsd.org/changeset/base/240700 Log: In nvme(4), set device description for BUS_PROBE_GENERIC case. Reported by: jhb Modified: head/sys/dev/nvme/nvme.c Modified: head/sys/dev/nvme/nvme.c == --- head/sys/dev/nvme/nvme.cWed Sep 19 18:22:14 2012(r240699) +++ head/sys/dev/nvme/nvme.cWed Sep 19 18:25:25 2012(r240700) @@ -84,28 +84,29 @@ static int nvme_probe (device_t device) { struct _pcsid *ep; - int probe_val = ENXIO; u_int32_t type; type = pci_get_devid(device); ep = pci_ids; -#if defined(PCIS_STORAGE_NVM) - if (pci_get_class(device)== PCIC_STORAGE && - pci_get_subclass(device) == PCIS_STORAGE_NVM && - pci_get_progif(device) == PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0) - probe_val = BUS_PROBE_GENERIC; -#endif - while (ep->type && ep->type != type) ++ep; if (ep->desc) { device_set_desc(device, ep->desc); - probe_val = BUS_PROBE_DEFAULT; + return (BUS_PROBE_DEFAULT); } - return (probe_val); +#if defined(PCIS_STORAGE_NVM) + if (pci_get_class(device)== PCIC_STORAGE && + pci_get_subclass(device) == PCIS_STORAGE_NVM && + pci_get_progif(device) == PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0) { + device_set_desc(device, "Generic NVMe Device"); + return (BUS_PROBE_GENERIC); + } +#endif + + return (ENXIO); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240701 - head/sys/cam/scsi
Author: tijl Date: Wed Sep 19 18:42:31 2012 New Revision: 240701 URL: http://svn.freebsd.org/changeset/base/240701 Log: Fix a panic when trying to play invalid audio tracks. Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c == --- head/sys/cam/scsi/scsi_cd.c Wed Sep 19 18:25:25 2012(r240700) +++ head/sys/cam/scsi/scsi_cd.c Wed Sep 19 18:42:31 2012(r240701) @@ -2080,6 +2080,7 @@ cdioctl(struct disk *dp, u_long cmd, voi || (st > (softc->toc.header.ending_track - softc->toc.header.starting_track))) { error = EINVAL; + cam_periph_unlock(periph); break; } sentry = &softc->toc.entries[st].addr; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240702 - in releng/9.1/usr.sbin/pkg_install: add lib
Author: jkim Date: Wed Sep 19 19:14:21 2012 New Revision: 240702 URL: http://svn.freebsd.org/changeset/base/240702 Log: MFC: r240476 Do not change owner, group, or mode when package database directory and its contents are created with pkg_add(1). It may happen when the packing list contains @owner, @group, or @mode. Approved by: re (kib), portmgr (bapt) Modified: releng/9.1/usr.sbin/pkg_install/add/add.h releng/9.1/usr.sbin/pkg_install/add/extract.c releng/9.1/usr.sbin/pkg_install/add/futil.c releng/9.1/usr.sbin/pkg_install/add/perform.c releng/9.1/usr.sbin/pkg_install/lib/lib.h Directory Properties: releng/9.1/usr.sbin/pkg_install/ (props changed) releng/9.1/usr.sbin/pkg_install/add/ (props changed) Modified: releng/9.1/usr.sbin/pkg_install/add/add.h == --- releng/9.1/usr.sbin/pkg_install/add/add.h Wed Sep 19 18:42:31 2012 (r240701) +++ releng/9.1/usr.sbin/pkg_install/add/add.h Wed Sep 19 19:14:21 2012 (r240702) @@ -41,7 +41,7 @@ extern char *PkgAddCmd; extern charFirstPen[]; extern add_mode_t AddMode; -intmake_hierarchy(char *); +intmake_hierarchy(char *, Boolean); void extract_plist(const char *, Package *); void apply_perms(const char *, const char *); Modified: releng/9.1/usr.sbin/pkg_install/add/extract.c == --- releng/9.1/usr.sbin/pkg_install/add/extract.c Wed Sep 19 18:42:31 2012(r240701) +++ releng/9.1/usr.sbin/pkg_install/add/extract.c Wed Sep 19 19:14:21 2012(r240702) @@ -225,7 +225,7 @@ extract_plist(const char *home, Package printf("extract: CWD to %s\n", p->name); PUSHOUT(Directory); if (strcmp(p->name, ".")) { - if (!Fake && make_hierarchy(p->name) == FAIL) { + if (!Fake && make_hierarchy(p->name, TRUE) == FAIL) { cleanup(0); errx(2, "%s: unable to cwd to '%s'", __func__, p->name); } Modified: releng/9.1/usr.sbin/pkg_install/add/futil.c == --- releng/9.1/usr.sbin/pkg_install/add/futil.c Wed Sep 19 18:42:31 2012 (r240701) +++ releng/9.1/usr.sbin/pkg_install/add/futil.c Wed Sep 19 19:14:21 2012 (r240702) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); */ int -make_hierarchy(char *dir) +make_hierarchy(char *dir, Boolean set_perm) { char *cp1, *cp2; @@ -55,7 +55,8 @@ make_hierarchy(char *dir) *cp2 = '/'; return FAIL; } - apply_perms(NULL, dir); + if (set_perm) + apply_perms(NULL, dir); } /* Put it back */ if (cp2) { Modified: releng/9.1/usr.sbin/pkg_install/add/perform.c == --- releng/9.1/usr.sbin/pkg_install/add/perform.c Wed Sep 19 18:42:31 2012(r240701) +++ releng/9.1/usr.sbin/pkg_install/add/perform.c Wed Sep 19 19:14:21 2012(r240702) @@ -511,7 +511,7 @@ pkg_do(char *pkg) zapLogDir = 1; if (Verbose) printf("Attempting to record package into %s..\n", LogDir); - if (make_hierarchy(LogDir)) { + if (make_hierarchy(LogDir, FALSE)) { warnx("can't record package into '%s', you're on your own!", LogDir); bzero(LogDir, FILENAME_MAX); Modified: releng/9.1/usr.sbin/pkg_install/lib/lib.h == --- releng/9.1/usr.sbin/pkg_install/lib/lib.h Wed Sep 19 18:42:31 2012 (r240701) +++ releng/9.1/usr.sbin/pkg_install/lib/lib.h Wed Sep 19 19:14:21 2012 (r240702) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION20120530 +#define PKG_INSTALL_VERSION20120913 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240704 - head/lib/libc/string
Author: jilles Date: Wed Sep 19 19:21:22 2012 New Revision: 240704 URL: http://svn.freebsd.org/changeset/base/240704 Log: strsignal(): Do not append signal numbers to messages for known signals. Messages for known signals looked like "Terminated: 15" instead of "Terminated". Modified: head/lib/libc/string/strsignal.c Modified: head/lib/libc/string/strsignal.c == --- head/lib/libc/string/strsignal.cWed Sep 19 19:16:08 2012 (r240703) +++ head/lib/libc/string/strsignal.cWed Sep 19 19:21:22 2012 (r240704) @@ -120,7 +120,6 @@ strsignal(int num) UPREFIX, #endif sizeof(sig_ebuf)); - } signum = num; if (num < 0) @@ -143,6 +142,7 @@ strsignal(int num) break; } *p = '\0'; + } #if defined(NLS) catclose(catd); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240705 - head/lib/libc/string
Author: jilles Date: Wed Sep 19 19:22:24 2012 New Revision: 240705 URL: http://svn.freebsd.org/changeset/base/240705 Log: strsignal(): Reindent. Modified: head/lib/libc/string/strsignal.c Modified: head/lib/libc/string/strsignal.c == --- head/lib/libc/string/strsignal.cWed Sep 19 19:21:22 2012 (r240704) +++ head/lib/libc/string/strsignal.cWed Sep 19 19:22:24 2012 (r240705) @@ -121,27 +121,27 @@ strsignal(int num) #endif sizeof(sig_ebuf)); - signum = num; - if (num < 0) - signum = -signum; + signum = num; + if (num < 0) + signum = -signum; - t = tmp; - do { - *t++ = "0123456789"[signum % 10]; - } while (signum /= 10); - if (num < 0) - *t++ = '-'; + t = tmp; + do { + *t++ = "0123456789"[signum % 10]; + } while (signum /= 10); + if (num < 0) + *t++ = '-'; - p = (ebuf + n); - *p++ = ':'; - *p++ = ' '; + p = (ebuf + n); + *p++ = ':'; + *p++ = ' '; - for (;;) { - *p++ = *--t; - if (t <= tmp) - break; - } - *p = '\0'; + for (;;) { + *p++ = *--t; + if (t <= tmp) + break; + } + *p = '\0'; } #if defined(NLS) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r240699 - in head: sys/dev/pci usr.sbin/pciconf
On Wed, Sep 19, 2012 at 11:22 AM, Gavin Atkinson wrote: > Author: gavin > Date: Wed Sep 19 18:22:14 2012 > New Revision: 240699 > URL: http://svn.freebsd.org/changeset/base/240699 > > Log: > Recognise NVM Express devices and pretty-print their name. > > MFC after:1 week > > Modified: > head/sys/dev/pci/pci.c > head/usr.sbin/pciconf/pciconf.c > > Modified: head/sys/dev/pci/pci.c > == > --- head/sys/dev/pci/pci.c Wed Sep 19 16:28:38 2012(r240698) > +++ head/sys/dev/pci/pci.c Wed Sep 19 18:22:14 2012(r240699) > @@ -3661,6 +3661,7 @@ static struct > {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, > {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, > {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, > + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM Express"}, Hi Gavin, This should really read "NVM", not "NVM Express". NVM Express should be reserved for NVM subclass devices with the NVM Express PI (Programming Interface). PCI SIG refers to this PI as "Enterprise NVMHCI", but it's the same thing. Regards, -Jim > {PCIC_NETWORK, -1, "network"}, > {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, > {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, > > Modified: head/usr.sbin/pciconf/pciconf.c > == > --- head/usr.sbin/pciconf/pciconf.c Wed Sep 19 16:28:38 2012 > (r240698) > +++ head/usr.sbin/pciconf/pciconf.c Wed Sep 19 18:22:14 2012 > (r240699) > @@ -345,6 +345,7 @@ static struct > {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, > {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, > {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, > + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM Express"}, > {PCIC_NETWORK, -1, "network"}, > {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, > {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240707 - in stable/8: share/man/man4 sys/dev/filemon sys/modules sys/modules/filemon tools/regression/filemon
Author: obrien Date: Wed Sep 19 20:11:47 2012 New Revision: 240707 URL: http://svn.freebsd.org/changeset/base/240707 Log: MF9: r237795 MFC: r236592 r236593 r236594 r236620 r236621 r236622 r236637 r237794: filemon(4) Added: stable/8/share/man/man4/filemon.4 - copied unchanged from r237795, stable/9/share/man/man4/filemon.4 stable/8/sys/dev/filemon/ - copied from r237795, stable/9/sys/dev/filemon/ stable/8/sys/modules/filemon/ - copied from r237795, stable/9/sys/modules/filemon/ stable/8/tools/regression/filemon/ - copied from r237795, stable/9/tools/regression/filemon/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/modules/Makefile Directory Properties: stable/8/ (props changed) stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/modules/ (props changed) stable/8/tools/ (props changed) Modified: stable/8/share/man/man4/Makefile == --- stable/8/share/man/man4/MakefileWed Sep 19 19:59:15 2012 (r240706) +++ stable/8/share/man/man4/MakefileWed Sep 19 20:11:47 2012 (r240707) @@ -118,6 +118,7 @@ MAN=aac.4 \ fatm.4 \ fd.4 \ fdc.4 \ + filemon.4 \ firewire.4 \ fpa.4 \ fwe.4 \ Copied: stable/8/share/man/man4/filemon.4 (from r237795, stable/9/share/man/man4/filemon.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/filemon.4 Wed Sep 19 20:11:47 2012 (r240707, copy of r237795, stable/9/share/man/man4/filemon.4) @@ -0,0 +1,176 @@ +.\" Copyright (c) 2012 +.\"David E. O'Brien . All rights reserved. +.\" +.\" 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. +.\" 3. All advertising materials mentioning features or use of this software +.\"must display the following acknowledgement: +.\"This product includes software developed by David E. O'Brien and +.\"contributors. +.\" 4. Neither the name of the author 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 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 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) +.\" 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$ +.\" +.Dd May 30, 2012 +.Dt FILEMON 4 +.Os +.Sh NAME +.Nm filemon +.Nd the filemon device +.Sh SYNOPSIS +.In dev/filemon/filemon.h +.Sh DESCRIPTION +The +.Nm +device allows a process to collect file operations data of its children. +The device +.Pa /dev/filemon +responds to two +.Xr ioctl 2 +calls. +.Pp +System calls are denoted using the following single letters: +.Pp +.Bl -tag -width indent -compact +.It Ql C +.Xr chdir 2 +.It Ql D +.Xr unlink 2 +.It Ql E +.Xr exec 2 +.It Ql F +.Xr fork 2 , +.Xr vfork 2 +.It Ql L +.Xr link 2 , +.Xr linkat 2 , +.Xr symlink 2 , +.Xr symlinkat 2 +.It Ql M +.Xr rename 2 +.It Ql R +.Xr open 2 +for read +.It Ql S +.Xr stat 2 +.It Ql W +.Xr open 2 +for write +.It Ql X +.Xr _exit 2 +.El +.Pp +Note that +.Ql R +following +.Ql W +records can represent a single +.Xr open 2 +for R/W, +or two seperate +.Xr open 2 +calls, one for +.Ql R +and one for +.Ql W . +.Sh IOCTLS +User mode programs communicate with the +.Nm +driver through a number of ioctls which are described below. +Each takes a single argument. +.Bl -tag -width ".Dv FILEMON_SET_PID" +.It Dv FILEMON_SET_FD +Write the internal tracing buffer to the supplied open file descriptor. +.It Dv FILEMON_SET_PID +Child process ID to trace. +.El +.Sh RETURN VALUES +.\" .Rv -std ioctl +The
svn commit: r240708 - head/share/man/man4
Author: obrien Date: Wed Sep 19 20:42:55 2012 New Revision: 240708 URL: http://svn.freebsd.org/changeset/base/240708 Log: Add Intel RdRand. Modified: head/share/man/man4/random.4 Modified: head/share/man/man4/random.4 == --- head/share/man/man4/random.4Wed Sep 19 20:11:47 2012 (r240707) +++ head/share/man/man4/random.4Wed Sep 19 20:42:55 2012 (r240708) @@ -315,11 +315,16 @@ and is an implementation of the .Em Yarrow algorithm by Bruce Schneier, .Em et al . -The only hardware implementation -currently is for the +The only hardware implementations +currently are for the .Tn VIA C3 Nehemiah (stepping 3 or greater) -CPU. +CPU +and the +.Tn Intel +.Dq Bull Mountain +.Em RdRand +instruction and underlying random number generator (RNG). More will be added in the future. .Pp The author gratefully acknowledges ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240712 - in stable/9: share/man/man4 sys/dev/arcmsr
Author: delphij Date: Wed Sep 19 22:12:57 2012 New Revision: 240712 URL: http://svn.freebsd.org/changeset/base/240712 Log: MFC r240079: Update arcmsr(4) to vendor version 1.20.00.25. Many thanks to Areca for continuing to support FreeBSD. Submitted by: Ching-Lung Huang Modified: stable/9/share/man/man4/arcmsr.4 stable/9/sys/dev/arcmsr/arcmsr.c stable/9/sys/dev/arcmsr/arcmsr.h Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/arcmsr.4 == --- stable/9/share/man/man4/arcmsr.4Wed Sep 19 21:50:18 2012 (r240711) +++ stable/9/share/man/man4/arcmsr.4Wed Sep 19 22:12:57 2012 (r240712) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 25, 2010 +.Dd September 3, 2012 .Dt ARCMSR 4 .Os .Sh NAME @@ -98,10 +98,14 @@ ARC-1210 .It ARC-1212 .It +ARC-1213 +.It ARC-1220 .It ARC-1222 .It +ARC-1223 +.It ARC-1230 .It ARC-1231 @@ -133,6 +137,8 @@ ARC-1680 ARC-1681 .It ARC-1880 +.It +ARC-1882 .El .Sh FILES .Bl -tag -width ".Pa /dev/arcmsr?" -compact Modified: stable/9/sys/dev/arcmsr/arcmsr.c == --- stable/9/sys/dev/arcmsr/arcmsr.cWed Sep 19 21:50:18 2012 (r240711) +++ stable/9/sys/dev/arcmsr/arcmsr.cWed Sep 19 22:12:57 2012 (r240712) @@ -37,38 +37,43 @@ ** ** History ** -**REV# DATENAME DESCRIPTION -** 1.00.00.00 03/31/2004 Erich Chen First release -** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error -** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support +**REV# DATE NAME DESCRIPTION +** 1.00.00.00 03/31/2004 Erich Chen First release +** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error +** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support ** clean unused function -** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, +** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, ** firmware version check ** and firmware update notify for hardware bug fix ** handling if none zero high part physical address ** of srb resource -** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy +** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy ** add iop message xfer ** with scsi pass-through command ** add new device id of sas raid adapters ** code fit for SPARC64 & PPC -** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report +** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report ** and cause g_vfs_done() read write error -** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x -** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x +** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x +** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x ** bus_dmamem_alloc() with BUS_DMA_ZERO -** 1.20.00.17 07/15/2010 Ching Huang Added support ARC1880 -** report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed, -** prevent cam_periph_error removing all LUN devices of one Target id -**
svn commit: r240713 - stable/9/sys/dev/isp
Author: mjacob Date: Wed Sep 19 22:24:09 2012 New Revision: 240713 URL: http://svn.freebsd.org/changeset/base/240713 Log: MFC of 240580 and 240590- correct some comments. Modified: stable/9/sys/dev/isp/isp_freebsd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c == --- stable/9/sys/dev/isp/isp_freebsd.c Wed Sep 19 22:12:57 2012 (r240712) +++ stable/9/sys/dev/isp/isp_freebsd.c Wed Sep 19 22:24:09 2012 (r240713) @@ -1735,10 +1735,10 @@ isp_target_start_ctio(ispsoftc_t *isp, u /* * Mode 1, status, no data. Only possible when we are sending status, have -* no data to transfer, and any sense length can fit in the ct7_entry. +* no data to transfer, and any sense data can fit into a ct7_entry_t. * -* Mode 2, status, no data. We have to use this in the case sense data -* won't fit into a ct7_entry_t. +* Mode 2, status, no data. We have to use this in the case that +* the sense data won't fit into a ct7_entry_t. * */ if (sendstatus && xfrlen == 0) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240715 - in stable/8: share/man/man4 sys/dev/arcmsr
Author: delphij Date: Wed Sep 19 23:03:54 2012 New Revision: 240715 URL: http://svn.freebsd.org/changeset/base/240715 Log: MFC r240079,215837: Update arcmsr(4) to vendor version 1.20.00.25. Many thanks to Areca for continuing to support FreeBSD. Submitted by: Ching-Lung Huang Modified: stable/8/share/man/man4/arcmsr.4 stable/8/sys/dev/arcmsr/arcmsr.c stable/8/sys/dev/arcmsr/arcmsr.h Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/arcmsr/ (props changed) Modified: stable/8/share/man/man4/arcmsr.4 == --- stable/8/share/man/man4/arcmsr.4Wed Sep 19 22:26:05 2012 (r240714) +++ stable/8/share/man/man4/arcmsr.4Wed Sep 19 23:03:54 2012 (r240715) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2008 +.Dd September 3, 2012 .Dt ARCMSR 4 .Os .Sh NAME .Nm arcmsr -.Nd Areca SATA II RAID Controller driver +.Nd Areca RAID Controller driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,11 +50,11 @@ arcmsr_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the Areca ARC-11xx and ARC-12xx series of SATA II -RAID controllers. +driver provides support for the Areca ARC-11xx, ARC-12xx, ARC-13xx, +ARC-16xx and ARC-18xx series of SAS and SATA RAID controllers. These controllers feature RAID-0, 1, 3, 5, 6, and 10 and JBOD acceleration for up to 16 SATA drives. -Raid level and stripe level +RAID level and stripe level migration, online capacity expansion, hot insertion/removal, automatic failover and rebuild, and SMART are also supported. Access to the arrays is provided @@ -82,8 +82,6 @@ ARC-1160 .It ARC-1170 .It -ARC-1180 -.It ARC-1110ML .It ARC-1120ML @@ -92,14 +90,32 @@ ARC-1130ML .It ARC-1160ML .It +ARC-1200 +.It +ARC-1201 +.It ARC-1210 .It +ARC-1212 +.It +ARC-1213 +.It ARC-1220 .It +ARC-1222 +.It +ARC-1223 +.It ARC-1230 .It +ARC-1231 +.It ARC-1260 .It +ARC-1261 +.It +ARC-1270 +.It ARC-1280 .It ARC-1210ML @@ -111,6 +127,18 @@ ARC-1231ML ARC-1261ML .It ARC-1280ML +.It +ARC-1380 +.It +ARC-1381 +.It +ARC-1680 +.It +ARC-1681 +.It +ARC-1880 +.It +ARC-1882 .El .Sh FILES .Bl -tag -width ".Pa /dev/arcmsr?" -compact Modified: stable/8/sys/dev/arcmsr/arcmsr.c == --- stable/8/sys/dev/arcmsr/arcmsr.cWed Sep 19 22:26:05 2012 (r240714) +++ stable/8/sys/dev/arcmsr/arcmsr.cWed Sep 19 23:03:54 2012 (r240715) @@ -37,38 +37,43 @@ ** ** History ** -**REV# DATENAME DESCRIPTION -** 1.00.00.00 03/31/2004 Erich Chen First release -** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error -** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support +**REV# DATE NAME DESCRIPTION +** 1.00.00.00 03/31/2004 Erich Chen First release +** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error +** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support ** clean unused function -** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, +** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, ** firmware version check ** and firmware update notify for hardware bug fix ** handling if none zero high part physical address ** of srb resource -** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy +** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy ** add iop message xfer ** with scsi pass-through command ** add new device id of sas raid adapters ** code fit for SPARC64 & PPC -** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report +** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report **
svn commit: r240716 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/tables include
Author: jkim Date: Wed Sep 19 23:25:24 2012 New Revision: 240716 URL: http://svn.freebsd.org/changeset/base/240716 Log: Merge ACPICA 20120913. Modified: head/sys/contrib/dev/acpica/changes.txt (contents, props changed) head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actbl1.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/common/ (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/disassembler/ (props changed) head/sys/contrib/dev/acpica/components/tables/ (props changed) head/sys/contrib/dev/acpica/include/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt == --- head/sys/contrib/dev/acpica/changes.txt Wed Sep 19 23:03:54 2012 (r240715) +++ head/sys/contrib/dev/acpica/changes.txt Wed Sep 19 23:25:24 2012 (r240716) @@ -1,4 +1,75 @@ +13 September 2012. Summary of changes for version 20120913: + +This release is available at https://www.acpica.org/downloads The ACPI 5.0 +specification is available at www.acpi.info + +1) ACPICA Kernel-resident Subsystem: + +ACPI 5.0: Added two new notify types for the Hardware Error Notification +Structure within the Hardware Error Source Table (HEST) table -- CMCI(5) and +MCE(6). + +Table Manager: Merged/removed duplicate code in the root table resize +functions. One function is external, the other is internal. Lv Zheng, ACPICA +BZ 846. + +Makefiles: Completely removed the obsolete "Linux" makefiles under +acpica/generate/linux. These makefiles are obsolete and have been replaced by +the generic unix makefiles under acpica/generate/unix. + +Makefiles: Ensure that binary files always copied properly. Minor rule change +to ensure that the final binary output files are always copied up to the +appropriate binary directory (bin32 or bin64.) + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug +version of the code includes the debug output trace mechanism and has a much +larger code and data size. + + Previous Release: +Non-Debug Version: 93.8K Code, 25.3K Data, 119.1K Total +Debug Version: 175.7K Code, 74.8K Data, 250.5K Total + Current Release: +Non-Debug Version: 93.7K Code, 25.3K Data, 119.0K Total +Debug Version: 175.0K Code, 74.4K Data, 249.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a possible fault during the disassembly of resource +descriptors when a second parse is required because of the invocation of +external control methods within the table. With assistance from +a...@lidskialf.net. ACPICA BZ 976. + +iASL: Fixed a namepath optimization problem. An error can occur if the parse +node that contains the namepath to be optimized does not have a parent node +that is a named object. This change fixes the problem. + +iASL: Fixed a regression where the AML file is not deleted on errors. The AML +output file should be deleted if there are any errors during the compiler. The +only exception is if the -f (force output) option is used. ACPICA BZ 974. + +iASL: Added a feature to automatically increase internal line buffer sizes. +Via realloc(), automatically increase the internal line
svn commit: r240717 - stable/9/sys/dev/isp
Author: mjacob Date: Thu Sep 20 00:51:09 2012 New Revision: 240717 URL: http://svn.freebsd.org/changeset/base/240717 Log: MFC of 239502: Remove dependence on MAXPHYS. Modified: stable/9/sys/dev/isp/isp_freebsd.h stable/9/sys/dev/isp/isp_pci.c stable/9/sys/dev/isp/isp_sbus.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.h == --- stable/9/sys/dev/isp/isp_freebsd.h Wed Sep 19 23:25:24 2012 (r240716) +++ stable/9/sys/dev/isp/isp_freebsd.h Thu Sep 20 00:51:09 2012 (r240717) @@ -726,9 +726,6 @@ int isp_fcp_next_crn(ispsoftc_t *, uint8 #defineisp_sim_alloc(a, b, c, d, e, f, g, h) \ cam_sim_alloc(a, b, c, d, e, &(d)->isp_osinfo.lock, f, g, h) -/* Should be BUS_SPACE_MAXSIZE, but MAXPHYS is larger than BUS_SPACE_MAXSIZE */ -#define ISP_NSEGS ((MAXPHYS / PAGE_SIZE) + 1) - #defineISP_PATH_PRT(i, l, p, ...) \ if ((l) == ISP_LOGALL || ((l)& (i)->isp_dblev) != 0) { \ xpt_print(p, __VA_ARGS__); \ Modified: stable/9/sys/dev/isp/isp_pci.c == --- stable/9/sys/dev/isp/isp_pci.c Wed Sep 19 23:25:24 2012 (r240716) +++ stable/9/sys/dev/isp/isp_pci.c Thu Sep 20 00:51:09 2012 (r240717) @@ -1525,7 +1525,7 @@ static int isp_pci_mbxdma(ispsoftc_t *isp) { caddr_t base; - uint32_t len; + uint32_t len, nsegs; int i, error, ns, cmap = 0; bus_size_t slim;/* segment size */ bus_addr_t llim;/* low limit of unavailable dma */ @@ -1567,6 +1567,11 @@ isp_pci_mbxdma(ispsoftc_t *isp) return (1); } + if (isp->isp_osinfo.sixtyfourbit) { + nsegs = ISP_NSEG64_MAX; + } else { + nsegs = ISP_NSEG_MAX; + } #ifdef ISP_TARGET_MODE /* * XXX: We don't really support 64 bit target mode for parallel scsi yet @@ -1579,7 +1584,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) } #endif - if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &isp->isp_osinfo.dmat)) { + if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, &isp->isp_osinfo.dmat)) { free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); ISP_LOCK(isp); isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); Modified: stable/9/sys/dev/isp/isp_sbus.c == --- stable/9/sys/dev/isp/isp_sbus.c Wed Sep 19 23:25:24 2012 (r240716) +++ stable/9/sys/dev/isp/isp_sbus.c Thu Sep 20 00:51:09 2012 (r240717) @@ -497,7 +497,7 @@ isp_sbus_mbxdma(ispsoftc_t *isp) if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_SBD(isp)), 1, BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR_32BIT, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, - ISP_NSEGS, BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_osinfo.dmat)) { + ISP_NSEG_MAX, BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_osinfo.dmat)) { isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); free(isp->isp_xflist, M_DEVBUF); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240718 - stable/9/sys/dev/ixgbe
Author: scottl Date: Thu Sep 20 01:23:54 2012 New Revision: 240718 URL: http://svn.freebsd.org/changeset/base/240718 Log: Sync the ixgbe driver from HEAD to stable/9 r236627 - Fix driver deadlock due to OACTIVE flag r236729 - Fix prefetch programming typo r239940 - Improve small RX packet performance r240155 - Fix missing braces in PHY configuration r240366 - Remove a prefetch directive that hurts performance Approved by: jfv Obtained from:Netflix, inc. Modified: stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixgbe.h stable/9/sys/dev/ixgbe/ixgbe_osdep.h Directory Properties: stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Sep 20 00:51:09 2012 (r240717) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Sep 20 01:23:54 2012 (r240718) @@ -1145,7 +1145,7 @@ ixgbe_init_locked(struct adapter *adapte * from the Intel linux driver 3.8.21. * Prefetching enables tx line rate even with 1 queue. */ - txdctl |= (16 << 0) | (1 << 8); + txdctl |= (32 << 0) | (1 << 8); IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); } @@ -1390,7 +1390,7 @@ ixgbe_handle_que(void *context, int pend ixgbe_start_locked(txr, ifp); #endif IXGBE_TX_UNLOCK(txr); - if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + if (more) { taskqueue_enqueue(que->tq, &que->que_task); return; } @@ -3698,21 +3698,30 @@ no_split: mp = rxbuf->m_pack; mp->m_pkthdr.len = mp->m_len = adapter->rx_mbuf_sz; - /* Get the memory mapping */ - error = bus_dmamap_load_mbuf_sg(rxr->ptag, - rxbuf->pmap, mp, pseg, &nsegs, BUS_DMA_NOWAIT); - if (error != 0) { - printf("Refresh mbufs: payload dmamap load" - " failure - %d\n", error); - m_free(mp); - rxbuf->m_pack = NULL; - goto update; + + /* If we're dealing with an mbuf that was copied rather +* than replaced, there's no need to go through busdma. +*/ + if ((rxbuf->flags & IXGBE_RX_COPY) == 0) { + /* Get the memory mapping */ + error = bus_dmamap_load_mbuf_sg(rxr->ptag, + rxbuf->pmap, mp, pseg, &nsegs, BUS_DMA_NOWAIT); + if (error != 0) { + printf("Refresh mbufs: payload dmamap load" + " failure - %d\n", error); + m_free(mp); + rxbuf->m_pack = NULL; + goto update; + } + rxbuf->m_pack = mp; + bus_dmamap_sync(rxr->ptag, rxbuf->pmap, + BUS_DMASYNC_PREREAD); + rxbuf->paddr = rxr->rx_base[i].read.pkt_addr = + htole64(pseg[0].ds_addr); + } else { + rxr->rx_base[i].read.pkt_addr = rxbuf->paddr; + rxbuf->flags &= ~IXGBE_RX_COPY; } - rxbuf->m_pack = mp; - bus_dmamap_sync(rxr->ptag, rxbuf->pmap, - BUS_DMASYNC_PREREAD); - rxr->rx_base[i].read.pkt_addr = - htole64(pseg[0].ds_addr); refreshed = TRUE; /* Next is precalculated */ @@ -4025,6 +4034,7 @@ skip_head: rxr->next_to_refresh = 0; rxr->lro_enabled = FALSE; rxr->rx_split_packets = 0; + rxr->rx_copies = 0; rxr->rx_bytes = 0; rxr->discard = FALSE; rxr->vtag_strip = FALSE; @@ -4580,14 +4590,36 @@ ixgbe_rxeof(struct ix_queue *que, int co ** that determines what we are */ sendmp = rbuf->fmp; - rbuf->m_pack = rbuf->fmp = NULL; if (sendmp != NULL) { /* secondary frag */ + rbuf->m_pack = rbuf->fmp = NULL; mp->m_flags &= ~M_PKTHDR; sendmp->m_pkthdr.len += mp->m_len; } else { + /* +* Optimize. This might be a small packet, +* maybe just a TCP ACK. Do a fast copy that +* is cache aligned into a new mbuf, and +* leave the old mbuf+cluster for re-use. +
svn commit: r240719 - head/lib/libc/sys
Author: kevlo Date: Thu Sep 20 02:25:18 2012 New Revision: 240719 URL: http://svn.freebsd.org/changeset/base/240719 Log: Remove the restrict qualifier to match function prototype. Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 == --- head/lib/libc/sys/recv.2Thu Sep 20 01:23:54 2012(r240718) +++ head/lib/libc/sys/recv.2Thu Sep 20 02:25:18 2012(r240719) @@ -44,7 +44,7 @@ .Ft ssize_t .Fn recv "int s" "void *buf" "size_t len" "int flags" .Ft ssize_t -.Fn recvfrom "int s" "void * restrict buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" +.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" .Ft ssize_t .Fn recvmsg "int s" "struct msghdr *msg" "int flags" .Sh DESCRIPTION ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240720 - in head/sys/fs: nfs nfsclient nfsserver
Author: rmacklem Date: Thu Sep 20 02:49:25 2012 New Revision: 240720 URL: http://svn.freebsd.org/changeset/base/240720 Log: Modify the NFSv4 client so that it can handle owner and owner_group strings that consist entirely of digits, interpreting them as the uid/gid number. This change was needed since new (>= 3.3) Linux servers reply with these strings by default. This change is mandated by the rfc3530bis draft. Reported on freebsd-stable@ under the Subject heading "Problem with Linux >= 3.3 as NFSv4 server" by Norbert Aschendorff on Aug. 20, 2012. Tested by:norbert.aschendorff at yahoo.de Reviewed by: jhb MFC after:2 weeks Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfs/nfs_commonacl.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs.h == --- head/sys/fs/nfs/nfs.h Thu Sep 20 02:25:18 2012(r240719) +++ head/sys/fs/nfs/nfs.h Thu Sep 20 02:49:25 2012(r240720) @@ -559,6 +559,7 @@ struct nfsrv_descript { #defineND_EXGSSINTEGRITY 0x0020 #defineND_EXGSSPRIVACY 0x0040 #defineND_INCRSEQID0x0080 +#defineND_NFSCL0x0100 /* * ND_GSS should be the "or" of all GSS type authentications. Modified: head/sys/fs/nfs/nfs_commonacl.c == --- head/sys/fs/nfs/nfs_commonacl.c Thu Sep 20 02:25:18 2012 (r240719) +++ head/sys/fs/nfs/nfs_commonacl.c Thu Sep 20 02:49:25 2012 (r240720) @@ -101,12 +101,12 @@ nfsrv_dissectace(struct nfsrv_descript * if (gotid == 0) { if (flag & NFSV4ACE_IDENTIFIERGROUP) { acep->ae_tag = ACL_GROUP; - aceerr = nfsv4_strtogid(name, len, &gid, p); + aceerr = nfsv4_strtogid(nd, name, len, &gid, p); if (aceerr == 0) acep->ae_id = (uid_t)gid; } else { acep->ae_tag = ACL_USER; - aceerr = nfsv4_strtouid(name, len, &uid, p); + aceerr = nfsv4_strtouid(nd, name, len, &uid, p); if (aceerr == 0) acep->ae_id = uid; } Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cThu Sep 20 02:25:18 2012 (r240719) +++ head/sys/fs/nfs/nfs_commonsubs.cThu Sep 20 02:49:25 2012 (r240720) @@ -1401,12 +1401,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtouid(cp, j, &uid, p) || + if (nfsv4_strtouid(nd, cp, j, &uid, p) || nap->na_uid != uid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtouid(cp, j, &uid, p)) + if (nfsv4_strtouid(nd, cp, j, &uid, p)) nap->na_uid = nfsrv_defaultuid; else nap->na_uid = uid; @@ -1434,12 +1434,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtogid(cp, j, &gid, p) || + if (nfsv4_strtogid(nd, cp, j, &gid, p) || nap->na_gid != gid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtogid(cp, j, &gid, p)) + if (nfsv4_strtogid(nd, cp, j, &gid, p)) nap->na_gid = nfsrv_defaultgid; else nap->na_gid = gid; @@ -2594,27 +2594,41 @@ tryagain: * Convert a string to a uid. * If no conversion is possible return NFSERR_BADOWNER, otherwise * return 0. + * If this is called from a client side mount using AUTH_SYS and the + * string is made up entirely of digits, just convert the string to + * a number. */ APPLESTATIC int -nfsv4_strtouid(u_char *str, int len, uid_t *uidp, NFSPROC_T *p) +nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp, +NFSPROC_T *p) { int i; - u_char *cp; + char *cp, *endstr,
svn commit: r240721 - head/sys/dev/ath
Author: adrian Date: Thu Sep 20 03:03:01 2012 New Revision: 240721 URL: http://svn.freebsd.org/changeset/base/240721 Log: Add a work-around for some strange net80211 BAR races in the wireless stack. There are unfortunately quite a few odd cases in BAR TX and BAR TX retransmission that I haven't yet fully diagnosed. So for now, add this work-around so the resume() function isn't called too often, decrementing pause to -1 (and causing things to stay paused.) Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cThu Sep 20 02:49:25 2012 (r240720) +++ head/sys/dev/ath/if_ath_tx.cThu Sep 20 03:03:01 2012 (r240721) @@ -5043,10 +5043,19 @@ ath_bar_response(struct ieee80211_node * * XXX if this is attempt=50, the TID will be downgraded * XXX to a non-aggregate session. So we must unpause the * XXX TID here or it'll never be done. +* +* Also, don't call it if bar_tx/bar_wait are 0; something +* has beaten us to the punch? (XXX figure out what?) */ if (status == 0 || attempts == 50) { ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); - ath_tx_tid_bar_unsuspend(sc, atid); + if (atid->bar_tx == 0 || atid->bar_wait == 0) + device_printf(sc->sc_dev, + "%s: huh? bar_tx=%d, bar_wait=%d\n", + __func__, + atid->bar_tx, atid->bar_wait); + else + ath_tx_tid_bar_unsuspend(sc, atid); ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240722 - head/sys/dev/ath
Author: adrian Date: Thu Sep 20 03:04:19 2012 New Revision: 240722 URL: http://svn.freebsd.org/changeset/base/240722 Log: Place the comment where it should be. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cThu Sep 20 03:03:01 2012 (r240721) +++ head/sys/dev/ath/if_ath_tx.cThu Sep 20 03:04:19 2012 (r240722) @@ -1289,8 +1289,18 @@ ath_tx_xmit_normal(struct ath_softc *sc, ath_tx_handoff(sc, txq, bf); } - - +/* + * Do the basic frame setup stuff that's required before the frame + * is added to a software queue. + * + * All frames get mostly the same treatment and it's done once. + * Retransmits fiddle with things like the rate control setup, + * setting the retransmit bit in the packet; doing relevant DMA/bus + * syncing and relinking it (back) into the hardware TX queue. + * + * Note that this may cause the mbuf to be reallocated, so + * m0 may not be valid. + */ static int ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq) @@ -2701,20 +2711,6 @@ ath_tx_swq(struct ath_softc *sc, struct } /* - * Do the basic frame setup stuff that's required before the frame - * is added to a software queue. - * - * All frames get mostly the same treatment and it's done once. - * Retransmits fiddle with things like the rate control setup, - * setting the retransmit bit in the packet; doing relevant DMA/bus - * syncing and relinking it (back) into the hardware TX queue. - * - * Note that this may cause the mbuf to be reallocated, so - * m0 may not be valid. - */ - - -/* * Configure the per-TID node state. * * This likely belongs in if_ath_node.c but I can't think of anywhere ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240723 - head/sys/net
Author: glebius Date: Thu Sep 20 03:09:58 2012 New Revision: 240723 URL: http://svn.freebsd.org/changeset/base/240723 Log: Add missing break. Pointy hat to:glebius Modified: head/sys/net/pfvar.h Modified: head/sys/net/pfvar.h == --- head/sys/net/pfvar.hThu Sep 20 03:04:19 2012(r240722) +++ head/sys/net/pfvar.hThu Sep 20 03:09:58 2012(r240723) @@ -1743,6 +1743,7 @@ pf_hashsrc(struct pf_addr *addr, sa_fami break; case AF_INET6: h = ADDR_HASH(addr->v6.__u6_addr.__u6_addr32[3]); + break; default: panic("%s: unknown address family %u", __func__, af); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240724 - head/sys/dev/ath
Author: adrian Date: Thu Sep 20 03:13:20 2012 New Revision: 240724 URL: http://svn.freebsd.org/changeset/base/240724 Log: Introduce the CLRDMASK gating based on tid->clrdmask, enabling filtered frames to occur. * Create a new function which will set the bf_flags CLRDMASK bit if required. * For raw frames, always set CLRDMASK. * For BAR, ADDBA frames, always set CLRDMASK. * For everything else, check if CLRDMASK needs to be set before calling tx_setds() or tx_setds11n(). * When unpausing a queue or drain/resetting it, set tid->clrdmask=1 just to ensure traffic starts flowing. What I need to do: * Modify that function to _clear_ the CLRDMASK if it's not required, or retried frames may have CLRDMASK set when they don't need to. (Which isn't a huge deal, but..) Whilst I'm here: * ath_tx_normal_xmit() should really act like the AMPDU session TX functions - any incomplete frames will end up being assigned ath_tx_normal_comp() which will decrement tid->hwq_depth - but that won't have been incremented. So whilst I'm here, add a comment to do that. * Fix the debug print function to be slightly clearer about things; it's not a good sign when I can't interpret my own debugging output. I've done some testing on AR9280/AR5416/AR9160 STA and AP modes. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cThu Sep 20 03:09:58 2012 (r240723) +++ head/sys/dev/ath/if_ath_tx.cThu Sep 20 03:13:20 2012 (r240724) @@ -1285,6 +1285,9 @@ ath_tx_xmit_normal(struct ath_softc *sc, ath_tx_rate_fill_rcflags(sc, bf); ath_tx_setds(sc, bf); + /* XXX Bump TID HWQ counter */ + /* XXX Assign a completion handler */ + /* Hand off to hardware */ ath_tx_handoff(sc, txq, bf); } @@ -1384,7 +1387,8 @@ ath_tx_normal_setup(struct ath_softc *sc } an = ATH_NODE(ni); - flags = HAL_TXDESC_CLRDMASK;/* XXX needed for crypto errs */ + //flags = HAL_TXDESC_CLRDMASK; /* XXX needed for crypto errs */ + flags = 0; ismrr = 0; /* default no multi-rate retry*/ pri = M_WME_GETAC(m0); /* honor classification */ /* XXX use txparams instead of fixed values */ @@ -1598,12 +1602,15 @@ ath_tx_normal_setup(struct ath_softc *sc } /* - * Direct-dispatch the current frame to the hardware. + * Queue a frame to the hardware or software queue. * * This can be called by the net80211 code. * * XXX what about locking? Or, push the seqno assign into the * XXX aggregate scheduler so its serialised? + * + * XXX When sending management frames via ath_raw_xmit(), + * should CLRDMASK be set unconditionally? */ int ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, @@ -1774,11 +1781,13 @@ ath_tx_start(struct ath_softc *sc, struc if (txq == &avp->av_mcastq) { DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: bf=%p: mcastq: TX'ing\n", __func__, bf); + bf->bf_state.bfs_txflags |= HAL_TXDESC_CLRDMASK; ath_tx_xmit_normal(sc, txq, bf); } else if (type == IEEE80211_FC0_TYPE_CTL && subtype == IEEE80211_FC0_SUBTYPE_BAR) { DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: BAR: TX'ing direct\n", __func__); + bf->bf_state.bfs_txflags |= HAL_TXDESC_CLRDMASK; ath_tx_xmit_normal(sc, txq, bf); } else { /* add to software queue */ @@ -1791,6 +1800,7 @@ ath_tx_start(struct ath_softc *sc, struc * For now, since there's no software queue, * direct-dispatch to the hardware. */ + bf->bf_state.bfs_txflags |= HAL_TXDESC_CLRDMASK; ath_tx_xmit_normal(sc, txq, bf); #endif done: @@ -1874,6 +1884,7 @@ ath_tx_raw_start(struct ath_softc *sc, s wh = mtod(m0, struct ieee80211_frame *); bf->bf_node = ni; /* NB: held reference */ + /* Always enable CLRDMASK for raw frames for now.. */ flags = HAL_TXDESC_CLRDMASK;/* XXX needed for crypto errs */ flags |= HAL_TXDESC_INTREQ; /* force interrupt */ if (params->ibp_flags & IEEE80211_BPF_RTS) @@ -2002,6 +2013,7 @@ ath_tx_raw_start(struct ath_softc *sc, s __func__, do_override); if (do_override) { + bf->bf_state.bfs_txflags |= HAL_TXDESC_CLRDMASK; ath_tx_xmit_normal(sc, sc->sc_ac2q[pri], bf); } else { /* Queue to software queue */ @@ -2467,6 +2479,22 @@ ath_tx_tid_unsched(struct ath_softc *sc, } /* + * Update the CLRDMASK bit in the ath_buf if it needs to be set. + */ +static void +ath_tx_update_clrdmask(struct ath_softc *sc, struct ath_tid *tid, +
svn commit: r240725 - in head: contrib/libpcap sys/contrib/ipfilter/netinet sys/netinet/libalias
Author: kevlo Date: Thu Sep 20 03:29:43 2012 New Revision: 240725 URL: http://svn.freebsd.org/changeset/base/240725 Log: Fix typo: s/pakcet/packet Modified: head/contrib/libpcap/pcap-snoop.c head/sys/contrib/ipfilter/netinet/ip_auth.c head/sys/netinet/libalias/alias_skinny.c Modified: head/contrib/libpcap/pcap-snoop.c == --- head/contrib/libpcap/pcap-snoop.c Thu Sep 20 03:13:20 2012 (r240724) +++ head/contrib/libpcap/pcap-snoop.c Thu Sep 20 03:29:43 2012 (r240725) @@ -100,7 +100,7 @@ again: /* * XXX - Sigh, snoop_packetlen is a 16 bit quantity. If we -* got a short length, but read a full sized snoop pakcet, +* got a short length, but read a full sized snoop packet, * assume we overflowed and add back the 64K... */ if (cc == (p->snapshot + sizeof(struct snoopheader)) && Modified: head/sys/contrib/ipfilter/netinet/ip_auth.c == --- head/sys/contrib/ipfilter/netinet/ip_auth.c Thu Sep 20 03:13:20 2012 (r240724) +++ head/sys/contrib/ipfilter/netinet/ip_auth.c Thu Sep 20 03:29:43 2012 (r240725) @@ -712,7 +712,7 @@ int fr_authflush() /* */ /* Function:fr_auth_waiting */ -/* Returns: int - 0 = no pakcets wiating, 1 = packets waiting. */ +/* Returns: int - 0 = no packets waiting, 1 = packets waiting. */ /* Parameters: None*/ /* */ /* Simple truth check to see if there are any packets waiting in the auth */ Modified: head/sys/netinet/libalias/alias_skinny.c == --- head/sys/netinet/libalias/alias_skinny.cThu Sep 20 03:13:20 2012 (r240724) +++ head/sys/netinet/libalias/alias_skinny.cThu Sep 20 03:29:43 2012 (r240725) @@ -340,7 +340,7 @@ AliasHandleSkinny(struct libalias *la, s * through the packet using len to determine message boundaries. * This comes into play big time with port messages being in the * same packet as register messages. Also, open receive channel -* acks are usually buried in a pakcet some 400 bytes long. +* acks are usually buried in a packet some 400 bytes long. */ while (dlen >= skinny_hdr_len) { len = (sd->len); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240726 - in vendor/bind9/dist: . lib/dns lib/dns/include/dns
Author: dougb Date: Thu Sep 20 03:38:28 2012 New Revision: 240726 URL: http://svn.freebsd.org/changeset/base/240726 Log: Vendor import of BIND 9.8.3-P3 Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/lib/dns/include/dns/rdata.h vendor/bind9/dist/lib/dns/master.c vendor/bind9/dist/lib/dns/rdata.c vendor/bind9/dist/lib/dns/rdataslab.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES == --- vendor/bind9/dist/CHANGES Thu Sep 20 03:29:43 2012(r240725) +++ vendor/bind9/dist/CHANGES Thu Sep 20 03:38:28 2012(r240726) @@ -1,3 +1,8 @@ + --- 9.8.3-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + --- 9.8.3-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: vendor/bind9/dist/lib/dns/include/dns/rdata.h == --- vendor/bind9/dist/lib/dns/include/dns/rdata.h Thu Sep 20 03:29:43 2012(r240725) +++ vendor/bind9/dist/lib/dns/include/dns/rdata.h Thu Sep 20 03:38:28 2012(r240726) @@ -147,6 +147,17 @@ struct dns_rdata { (((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0) /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH65512U + +/* * Flags affecting rdata formatting style. Flags 0x * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: vendor/bind9/dist/lib/dns/master.c == --- vendor/bind9/dist/lib/dns/master.c Thu Sep 20 03:29:43 2012 (r240725) +++ vendor/bind9/dist/lib/dns/master.c Thu Sep 20 03:38:28 2012 (r240726) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: vendor/bind9/dist/lib/dns/rdata.c == --- vendor/bind9/dist/lib/dns/rdata.c Thu Sep 20 03:29:43 2012 (r240725) +++ vendor/bind9/dist/lib/dns/rdata.c Thu Sep 20 03:38:28 2012 (r240726) @@ -429,6 +429,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d isc_buffer_t st; isc_boolean_t use_default = ISC_FALSE; isc_uint32_t activelength; + size_t length; REQUIRE(dctx != NULL); if (rdata != NULL) { @@ -459,6 +460,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d } /* +* Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH +* as we cannot transmit it. +*/ + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = DNS_R_FORMERR; + + /* * We should have consumed all of our buffer. */ if (result == ISC_R_SUCCESS && !buffer_empty(source)) @@ -466,8 +475,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } @@ -602,6 +610,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d unsigned long line; void (*callback)(dns_rdatacallbacks_t *, const char *, ...); isc_result_t tresult; + size_t length; REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE); if (rdata != NULL) { @@ -673,10 +682,13 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d } } while (1); + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) { @@ -804,6 +816,
svn commit: r240727 - vendor/bind9/9.8.3-P3
Author: dougb Date: Thu Sep 20 03:42:14 2012 New Revision: 240727 URL: http://svn.freebsd.org/changeset/base/240727 Log: Tag the 9.8.3-P3 release Added: vendor/bind9/9.8.3-P3/ - copied from r240726, vendor/bind9/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240728 - head/share/man/man7
Author: eadler Date: Thu Sep 20 03:48:36 2012 New Revision: 240728 URL: http://svn.freebsd.org/changeset/base/240728 Log: Rewrite portions of development.7 to make sense in the world of subversion. Approved by: gjb MFC after:2 weeks Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 == --- head/share/man/man7/development.7 Thu Sep 20 03:42:14 2012 (r240727) +++ head/share/man/man7/development.7 Thu Sep 20 03:48:36 2012 (r240728) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2012 +.Dd September 19, 2012 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -48,7 +48,7 @@ kernel. The methods described here are as applicable to production installations as it is to development environments. -You need a good 12-17GB of disk space on one machine to make this work +You need approximately 10GB of disk space on one machine to make this work conveniently. .Sh SETTING UP THE ENVIRONMENT ON THE MASTER SERVER Your master server should always run a stable, production version of the @@ -62,9 +62,9 @@ where you lose the environment and/or ca .Pp Create a huge partition called .Pa /FreeBSD . -8-12GB is recommended. +Approximately 7GB is recommended. This partition will contain nearly all the development environment, -including the CVS tree, broken-out source, and possibly even object files. +including the subversion tree, broken-out source, and possibly even object files. You are going to export this partition to your other machines via a READ-ONLY NFS export so do not mix it with other more security-sensitive partitions. @@ -89,70 +89,19 @@ I recommend a partition of at least 5GB. .Pp On the master server, use -.Xr csup 1 -to automatically pull down and maintain +.Xr svn 1 +to pull down and maintain the .Fx -CVS archive once a day. +source. The first pull will take a long time, it is several gigabytes, but once you have it, -the daily synchronizations will be quite small. -.Bd -literal -offset 4n -mkdir /FreeBSD/FreeBSD-CVS -rm -rf /home/ncvs -ln -s /FreeBSD/FreeBSD-CVS /home/ncvs -.Ed -.Pp -The -.Xr cron 8 -job should look something like this (please randomize the time of -day!). -Note that you can use the -.Xr csup 1 -configuration file example directly from -.Pa /usr/share/examples -without modification by supplying appropriate arguments -to -.Xr csup 1 . -.Bd -literal -offset 4n -33 6 * * * /usr/bin/csup -r 20 -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup/cvs-supfile -.Ed -.Pp -Run the -.Xr csup 1 -manually the first time to pull down the archive. -It could take -all day depending on how fast your connection is! -You will run all -.Xr csup 1 -and -.Xr cvs 1 +the updates will be quite small. +Run all +.Xr svn 1 operations as .Dq Li root -and you need to set up a -.Pa ~/.cvsrc -.Pq Pa /root/.cvsrc -file, as shown below, for proper -.Xr cvs 1 -operation. -Using -.Pa ~/.cvsrc -to specify -.Xr cvs 1 -defaults is an excellent way to -.Dq "file and forget" , -but you should never forget that you put them in there. -.Bd -literal -offset 4n -# cvs -q -diff -u -update -Pd -checkout -P -.Ed -.Pp -Now use -.Xr cvs 1 -to check out a -STABLE source tree and a -CURRENT source tree, -as well as ports and docs, to create your initial source environment. +.Pp Keeping the broken-out source and ports in .Pa /FreeBSD allows you to export @@ -160,71 +109,16 @@ it to other machines via read-only NFS. This also means you only need to edit/maintain files in one place and all your clients automatically pick up the changes. .Bd -literal -offset 4n -mkdir /FreeBSD/FreeBSD-4.x -mkdir /FreeBSD/FreeBSD-current - -cd /FreeBSD/FreeBSD-4.x -cvs -d /home/ncvs checkout -rRELENG_4 src - -cd /FreeBSD/FreeBSD-current -cvs -d /home/ncvs checkout src -cvs -d /home/ncvs checkout ports -cvs -d /home/ncvs checkout doc -.Ed -.Pp -Now create a softlink for -.Pa /usr/src -and -.Pa /usr/src2 . -On the main server I always point -.Pa /usr/src -at -STABLE and -.Pa /usr/src2 -at -CURRENT. -On client machines I usually do not have a -.Pa /usr/src2 -and I make -.Pa /usr/src -point at whatever version of -.Fx -the client box is intended to -run. -.Bd -literal -offset 4n +mkdir /FreeBSD +cd /FreeBSD +svn co svn://svn.freebsd.org/ports/head ports +svn co svn://svn.freebsd.org/doc/head doc +svn co svn://svn.freebsd.org/base/head src cd /usr -rm -rf src src2 -ln -s /FreeBSD/FreeBSD-4.x/src src (could be -CURRENT on a client) -ln -s /FreeBSD/FreeBSD-current/src src2(MASTER SERVER ONLY) +rm -rf src +ln -s /FreeBSD/src src .Ed .Pp -Now you have to make a choice for -.Pa /usr/obj . -Well, hopefully you made it already and chose the partition method. -If you -chose poorly you probably intend to put it in -.Pa /FreeBSD -and, if so, this is -what you want to do: -.Bd -literal -offset 4n -(ONLY IF YOU MADE A POOR CHOICE AND PUT /usr/obj in /FreeBSD!) -mkdir /FreeBSD/obj -cd /usr -rm -
svn commit: r240729 - in head/contrib/bind9: . lib/dns lib/dns/include/dns
Author: dougb Date: Thu Sep 20 04:12:09 2012 New Revision: 240729 URL: http://svn.freebsd.org/changeset/base/240729 Log: Upgrade to 9.8.3-P3: Prevents a crash when queried for a record whose RDATA exceeds 65535 bytes. Prevents a crash when validating caused by using "Bad cache" data before it has been initialized. ISC_QUEUE handling for recursive clients was updated to address a race condition that could cause a memory leak. This rarely occurred with UDP clients, but could be a significant problem for a server handling a steady rate of TCP queries. A condition has been corrected where improper handling of zero-length RDATA could cause undesirable behavior, including termination of the named process. For more information: https://kb.isc.org/article/AA-00788 Modified: head/contrib/bind9/CHANGES head/contrib/bind9/lib/dns/include/dns/rdata.h head/contrib/bind9/lib/dns/master.c head/contrib/bind9/lib/dns/rdata.c head/contrib/bind9/lib/dns/rdataslab.c head/contrib/bind9/version Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES == --- head/contrib/bind9/CHANGES Thu Sep 20 03:48:36 2012(r240728) +++ head/contrib/bind9/CHANGES Thu Sep 20 04:12:09 2012(r240729) @@ -1,3 +1,8 @@ + --- 9.8.3-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + --- 9.8.3-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: head/contrib/bind9/lib/dns/include/dns/rdata.h == --- head/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 03:48:36 2012(r240728) +++ head/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 04:12:09 2012(r240729) @@ -147,6 +147,17 @@ struct dns_rdata { (((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0) /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH65512U + +/* * Flags affecting rdata formatting style. Flags 0x * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: head/contrib/bind9/lib/dns/master.c == --- head/contrib/bind9/lib/dns/master.c Thu Sep 20 03:48:36 2012 (r240728) +++ head/contrib/bind9/lib/dns/master.c Thu Sep 20 04:12:09 2012 (r240729) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: head/contrib/bind9/lib/dns/rdata.c == --- head/contrib/bind9/lib/dns/rdata.c Thu Sep 20 03:48:36 2012 (r240728) +++ head/contrib/bind9/lib/dns/rdata.c Thu Sep 20 04:12:09 2012 (r240729) @@ -429,6 +429,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d isc_buffer_t st; isc_boolean_t use_default = ISC_FALSE; isc_uint32_t activelength; + size_t length; REQUIRE(dctx != NULL); if (rdata != NULL) { @@ -459,6 +460,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d } /* +* Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH +* as we cannot transmit it. +*/ + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = DNS_R_FORMERR; + + /* * We should have consumed all of our buffer. */ if (result == ISC_R_SUCCESS && !buffer_empty(source)) @@ -466,8 +475,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } @@ -602,6 +610,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d unsigned long line; void (*callback)(dns_rdatacallbacks_t *, const char *, ...); isc_result_t tresult; + size_t length; REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE
svn commit: r240730 - in vendor/bind9/dist-9.6: . bin/named bin/nsupdate lib/dns lib/dns/include/dns
Author: dougb Date: Thu Sep 20 04:21:05 2012 New Revision: 240730 URL: http://svn.freebsd.org/changeset/base/240730 Log: Vendor import of BIND 9.6-ESV-R7-P3 Modified: vendor/bind9/dist-9.6/CHANGES vendor/bind9/dist-9.6/bin/named/server.c vendor/bind9/dist-9.6/bin/nsupdate/nsupdate.c vendor/bind9/dist-9.6/lib/dns/include/dns/rdata.h vendor/bind9/dist-9.6/lib/dns/master.c vendor/bind9/dist-9.6/lib/dns/rdata.c vendor/bind9/dist-9.6/lib/dns/rdataslab.c vendor/bind9/dist-9.6/version Modified: vendor/bind9/dist-9.6/CHANGES == --- vendor/bind9/dist-9.6/CHANGES Thu Sep 20 04:12:09 2012 (r240729) +++ vendor/bind9/dist-9.6/CHANGES Thu Sep 20 04:21:05 2012 (r240730) @@ -1,3 +1,11 @@ + --- 9.6-ESV-R7-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + +3358 [bug] Fix declaration of fatal in bin/named/server.c + and bin/nsupdate/main.c. [RT #30522] + --- 9.6-ESV-R7-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: vendor/bind9/dist-9.6/bin/named/server.c == --- vendor/bind9/dist-9.6/bin/named/server.cThu Sep 20 04:12:09 2012 (r240729) +++ vendor/bind9/dist-9.6/bin/named/server.cThu Sep 20 04:21:05 2012 (r240730) @@ -228,7 +228,7 @@ static const struct { { NULL, ISC_FALSE } }; -ISC_PLATFORM_NORETURN_POST static void +ISC_PLATFORM_NORETURN_PRE static void fatal(const char *msg, isc_result_t result) ISC_PLATFORM_NORETURN_POST; static void Modified: vendor/bind9/dist-9.6/bin/nsupdate/nsupdate.c == --- vendor/bind9/dist-9.6/bin/nsupdate/nsupdate.c Thu Sep 20 04:12:09 2012(r240729) +++ vendor/bind9/dist-9.6/bin/nsupdate/nsupdate.c Thu Sep 20 04:21:05 2012(r240730) @@ -174,7 +174,7 @@ typedef struct nsu_requestinfo { static void sendrequest(isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr, dns_message_t *msg, dns_request_t **request); -ISC_PLATFORM_NORETURN_POST static void +ISC_PLATFORM_NORETURN_PRE static void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; Modified: vendor/bind9/dist-9.6/lib/dns/include/dns/rdata.h == --- vendor/bind9/dist-9.6/lib/dns/include/dns/rdata.h Thu Sep 20 04:12:09 2012(r240729) +++ vendor/bind9/dist-9.6/lib/dns/include/dns/rdata.h Thu Sep 20 04:21:05 2012(r240730) @@ -128,6 +128,17 @@ struct dns_rdata { #define DNS_RDATA_OFFLINE 0x0002 /*%< RRSIG has a offline key. */ /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH65512U + +/* * Flags affecting rdata formatting style. Flags 0x * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: vendor/bind9/dist-9.6/lib/dns/master.c == --- vendor/bind9/dist-9.6/lib/dns/master.c Thu Sep 20 04:12:09 2012 (r240729) +++ vendor/bind9/dist-9.6/lib/dns/master.c Thu Sep 20 04:21:05 2012 (r240730) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: vendor/bind9/dist-9.6/lib/dns/rdata.c == --- vendor/bind9/dist-9.6/lib/dns/rdata.c Thu Sep 20 04:12:09 2012 (r240729) +++ vendor/bind9/dist-9.6/lib/dns/rdata.c Thu Sep 20 04:21:05 2012 (r240730) @@ -414,6 +414,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d isc_buffer_t st; isc_boolean_t use_default = ISC_FALSE; isc_uint32_t activelength; + size_t length; REQUIRE(dctx != NULL); if (rdata != NULL) { @@ -444,6 +445,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d } /* +* Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH +* as we cannot transmit it. +*/ + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result
svn commit: r240731 - vendor/bind9/9.6-ESV-R7-P3
Author: dougb Date: Thu Sep 20 04:21:29 2012 New Revision: 240731 URL: http://svn.freebsd.org/changeset/base/240731 Log: Tag the 9.6-ESV-R7-P3 release Added: vendor/bind9/9.6-ESV-R7-P3/ - copied from r240730, vendor/bind9/dist-9.6/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240732 - in stable/8/contrib/bind9: . bin/named bin/nsupdate lib/dns lib/dns/include/dns
Author: dougb Date: Thu Sep 20 04:35:20 2012 New Revision: 240732 URL: http://svn.freebsd.org/changeset/base/240732 Log: Upgrade to 9.6-ESV-R7-P3: Prevents a crash when queried for a record whose RDATA exceeds 65535 bytes. Prevents a crash when validating caused by using "Bad cache" data before it has been initialized. ISC_QUEUE handling for recursive clients was updated to address a race condition that could cause a memory leak. This rarely occurred with UDP clients, but could be a significant problem for a server handling a steady rate of TCP queries. A condition has been corrected where improper handling of zero-length RDATA could cause undesirable behavior, including termination of the named process. For more information: https://kb.isc.org/article/AA-00788 Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/bin/named/server.c stable/8/contrib/bind9/bin/nsupdate/nsupdate.c stable/8/contrib/bind9/lib/dns/include/dns/rdata.h stable/8/contrib/bind9/lib/dns/master.c stable/8/contrib/bind9/lib/dns/rdata.c stable/8/contrib/bind9/lib/dns/rdataslab.c stable/8/contrib/bind9/version Directory Properties: stable/8/contrib/bind9/ (props changed) Modified: stable/8/contrib/bind9/CHANGES == --- stable/8/contrib/bind9/CHANGES Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/CHANGES Thu Sep 20 04:35:20 2012 (r240732) @@ -1,3 +1,11 @@ + --- 9.6-ESV-R7-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + +3358 [bug] Fix declaration of fatal in bin/named/server.c + and bin/nsupdate/main.c. [RT #30522] + --- 9.6-ESV-R7-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: stable/8/contrib/bind9/bin/named/server.c == --- stable/8/contrib/bind9/bin/named/server.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/bin/named/server.c Thu Sep 20 04:35:20 2012 (r240732) @@ -228,7 +228,7 @@ static const struct { { NULL, ISC_FALSE } }; -ISC_PLATFORM_NORETURN_POST static void +ISC_PLATFORM_NORETURN_PRE static void fatal(const char *msg, isc_result_t result) ISC_PLATFORM_NORETURN_POST; static void Modified: stable/8/contrib/bind9/bin/nsupdate/nsupdate.c == --- stable/8/contrib/bind9/bin/nsupdate/nsupdate.c Thu Sep 20 04:21:29 2012(r240731) +++ stable/8/contrib/bind9/bin/nsupdate/nsupdate.c Thu Sep 20 04:35:20 2012(r240732) @@ -174,7 +174,7 @@ typedef struct nsu_requestinfo { static void sendrequest(isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr, dns_message_t *msg, dns_request_t **request); -ISC_PLATFORM_NORETURN_POST static void +ISC_PLATFORM_NORETURN_PRE static void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; Modified: stable/8/contrib/bind9/lib/dns/include/dns/rdata.h == --- stable/8/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 04:21:29 2012(r240731) +++ stable/8/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 04:35:20 2012(r240732) @@ -128,6 +128,17 @@ struct dns_rdata { #define DNS_RDATA_OFFLINE 0x0002 /*%< RRSIG has a offline key. */ /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH65512U + +/* * Flags affecting rdata formatting style. Flags 0x * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: stable/8/contrib/bind9/lib/dns/master.c == --- stable/8/contrib/bind9/lib/dns/master.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/lib/dns/master.c Thu Sep 20 04:35:20 2012 (r240732) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: stable/8/contrib/bind9/lib/dns/rdata.c == --- stable/8/contrib/bind9/lib/dns/rdata.c Thu Sep 20 04:21:29 2012
svn commit: r240733 - head/share/man/man7
Author: joel (doc committer) Date: Thu Sep 20 04:53:12 2012 New Revision: 240733 URL: http://svn.freebsd.org/changeset/base/240733 Log: mdoc: remove superfluous paragraph macro. Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 == --- head/share/man/man7/development.7 Thu Sep 20 04:35:20 2012 (r240732) +++ head/share/man/man7/development.7 Thu Sep 20 04:53:12 2012 (r240733) @@ -437,7 +437,6 @@ Many developers choose to maintain a loc to test patches or build a custom distribution. This can be done with svn or another source code management system (git, mercurial, Perforce, BitKeeper) with its own repository. -.Pp .Sh "UPDATING VIA SVN" By using a .Xr cron 8 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240734 - head/contrib/bsnmp/snmpd
Author: glebius Date: Thu Sep 20 05:41:20 2012 New Revision: 240734 URL: http://svn.freebsd.org/changeset/base/240734 Log: Re-do r240271: - Set IP_RECVDSTADDR sockopt on the socket only in case if it is INADDR_ANY bound. - Supply IP_SENDSRCADDR control message only if we did receive IP_RECVDSTADDR control message. This fixes operation of snmpd bound to a specific local IP address. PR: bin/171279 Modified: head/contrib/bsnmp/snmpd/main.c head/contrib/bsnmp/snmpd/trans_udp.c Modified: head/contrib/bsnmp/snmpd/main.c == --- head/contrib/bsnmp/snmpd/main.c Thu Sep 20 04:53:12 2012 (r240733) +++ head/contrib/bsnmp/snmpd/main.c Thu Sep 20 05:41:20 2012 (r240734) @@ -1203,6 +1203,8 @@ snmpd_input(struct port_input *pi, struc ret = recv_stream(pi); } else { + struct in_addr *laddr; + memset(cbuf, 0, CMSG_SPACE(sizeof(struct in_addr))); msg.msg_control = cbuf; msg.msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); @@ -1210,8 +1212,14 @@ snmpd_input(struct port_input *pi, struc cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); cmsgp->cmsg_level = IPPROTO_IP; cmsgp->cmsg_type = IP_SENDSRCADDR; + laddr = (struct in_addr *)CMSG_DATA(cmsgp); - ret = recv_dgram(pi, (struct in_addr *)CMSG_DATA(cmsgp)); + ret = recv_dgram(pi, laddr); + + if (laddr->s_addr == 0) { + msg.msg_control = NULL; + msg.msg_controllen = 0; + } } if (ret == -1) Modified: head/contrib/bsnmp/snmpd/trans_udp.c == --- head/contrib/bsnmp/snmpd/trans_udp.cThu Sep 20 04:53:12 2012 (r240733) +++ head/contrib/bsnmp/snmpd/trans_udp.cThu Sep 20 05:41:20 2012 (r240734) @@ -109,13 +109,6 @@ udp_init_port(struct tport *tp) syslog(LOG_ERR, "creating UDP socket: %m"); return (SNMP_ERR_RES_UNAVAIL); } - if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, - sizeof(on)) == -1) { - syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); - } ip = (p->addr[0] << 24) | (p->addr[1] << 16) | (p->addr[2] << 8) | p->addr[3]; memset(&addr, 0, sizeof(addr)); @@ -123,6 +116,14 @@ udp_init_port(struct tport *tp) addr.sin_port = htons(p->port); addr.sin_family = AF_INET; addr.sin_len = sizeof(addr); + if (addr.sin_addr.s_addr == INADDR_ANY && + setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); + close(p->input.fd); + p->input.fd = -1; + return (SNMP_ERR_GENERR); + } if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { if (errno == EADDRNOTAVAIL) { close(p->input.fd); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240735 - head/share/man/man4
Author: glebius Date: Thu Sep 20 05:49:31 2012 New Revision: 240735 URL: http://svn.freebsd.org/changeset/base/240735 Log: Redo r240386 providing more correct information. Modified: head/share/man/man4/ip.4 Modified: head/share/man/man4/ip.4 == --- head/share/man/man4/ip.4Thu Sep 20 05:41:20 2012(r240734) +++ head/share/man/man4/ip.4Thu Sep 20 05:49:31 2012(r240735) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd September 12, 2012 +.Dd September 20, 2012 .Dt IP 4 .Os .Sh NAME @@ -187,21 +187,19 @@ cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed .Pp -The socket should be bound to a local port. -The socket may be bound or not bound to a local address. -In the former case address supplied with -.Dv IP_SENDSRCADDR -overrides bound address. -If the socket is bound to a local address and the address supplied with +The socket should be either bound to +.Dv INADDR_ANY +and a local port, and the address supplied with .Dv IP_SENDSRCADDR -is +should't be .Dv INADDR_ANY , -then bound address is overriden via generic source address selection logic, -which would choose IP address of interface closest to destination. -If the socket is not bound to a local address, then address supplied with +or the socket should be bound to a local address and the address supplied with .Dv IP_SENDSRCADDR -can't be +should be .Dv INADDR_ANY . +In the latter case bound address is overriden via generic source address +selection logic, which would choose IP address of interface closest to +destination. .Pp For convenience, .Dv IP_SENDSRCADDR ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240736 - in head/sys: net netpfil/pf
Author: glebius Date: Thu Sep 20 06:52:05 2012 New Revision: 240736 URL: http://svn.freebsd.org/changeset/base/240736 Log: Utilize Jenkins hash with random seed for source nodes storage. Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c Modified: head/sys/net/pfvar.h == --- head/sys/net/pfvar.hThu Sep 20 05:49:31 2012(r240735) +++ head/sys/net/pfvar.hThu Sep 20 06:52:05 2012(r240736) @@ -1730,28 +1730,6 @@ extern intpf_state_insert(struct pfi struct pf_state *); extern void pf_free_state(struct pf_state *); -static __inline u_int -pf_hashsrc(struct pf_addr *addr, sa_family_t af) -{ - u_int h; - -#defineADDR_HASH(a)((a) ^ ((a) >> 16)) - - switch (af) { - case AF_INET: - h = ADDR_HASH(addr->v4.s_addr); - break; - case AF_INET6: - h = ADDR_HASH(addr->v6.__u6_addr.__u6_addr32[3]); - break; - default: - panic("%s: unknown address family %u", __func__, af); - } -#undef ADDR_HASH - - return (h & V_pf_srchashmask); -} - static __inline void pf_ref_state(struct pf_state *s) { Modified: head/sys/netpfil/pf/pf.c == --- head/sys/netpfil/pf/pf.cThu Sep 20 05:49:31 2012(r240735) +++ head/sys/netpfil/pf/pf.cThu Sep 20 06:52:05 2012(r240736) @@ -387,6 +387,27 @@ pf_hashkey(struct pf_state_key *sk) return (h & V_pf_hashmask); } +static __inline uint32_t +pf_hashsrc(struct pf_addr *addr, sa_family_t af) +{ + uint32_t h; + + switch (af) { + case AF_INET: + h = jenkins_hash32((uint32_t *)&addr->v4, + sizeof(addr->v4)/sizeof(uint32_t), V_pf_hashseed); + break; + case AF_INET6: + h = jenkins_hash32((uint32_t *)&addr->v6, + sizeof(addr->v6)/sizeof(uint32_t), V_pf_hashseed); + break; + default: + panic("%s: unknown address family %u", __func__, af); + } + + return (h & V_pf_srchashmask); +} + #ifdef INET6 void pf_addrcpy(struct pf_addr *dst, struct pf_addr *src, sa_family_t af) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"