svn commit: r276054 - head/sys/vm
Author: glebius Date: Mon Dec 22 08:59:44 2014 New Revision: 276054 URL: https://svnweb.freebsd.org/changeset/base/276054 Log: Document flags of vm_page allocation functions. Reviewed by: alc Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h == --- head/sys/vm/vm_page.h Mon Dec 22 04:54:57 2014(r276053) +++ head/sys/vm/vm_page.h Mon Dec 22 08:59:44 2014(r276054) @@ -376,22 +376,35 @@ extern long first_page; /* first physi vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); -/* page allocation classes: */ +/* + * Page allocation parameters for vm_page for the functions + * vm_page_alloc(), vm_page_grab(), vm_page_alloc_contig() and + * vm_page_alloc_freelist(). Some functions support only a subset + * of the flags, and ignore others, see the flags legend. + * + * Bits 0 - 1 define class. + * Bits 2 - 15 dedicated for flags. + * Legend: + * (a) - vm_page_alloc() supports the flag. + * (c) - vm_page_alloc_contig() supports the flag. + * (f) - vm_page_alloc_freelist() supports the flag. + * (g) - vm_page_grab() supports the flag. + * Bits above 15 define the count of additional pages that the caller + * intends to allocate. + */ #define VM_ALLOC_NORMAL0 #define VM_ALLOC_INTERRUPT 1 #define VM_ALLOC_SYSTEM2 #defineVM_ALLOC_CLASS_MASK 3 -/* page allocation flags: */ -#defineVM_ALLOC_WIRED 0x0020 /* non pageable */ -#defineVM_ALLOC_ZERO 0x0040 /* Try to obtain a zeroed page */ -#defineVM_ALLOC_NOOBJ 0x0100 /* No associated object */ -#defineVM_ALLOC_NOBUSY 0x0200 /* Do not busy the page */ -#defineVM_ALLOC_IFCACHED 0x0400 /* Fail if the page is not cached */ -#defineVM_ALLOC_IFNOTCACHED0x0800 /* Fail if the page is cached */ -#defineVM_ALLOC_IGN_SBUSY 0x1000 /* vm_page_grab() only */ -#defineVM_ALLOC_NODUMP 0x2000 /* don't include in dump */ -#defineVM_ALLOC_SBUSY 0x4000 /* Shared busy the page */ - +#defineVM_ALLOC_WIRED 0x0020 /* (acfg) Allocate non pageable page */ +#defineVM_ALLOC_ZERO 0x0040 /* (acfg) Try to obtain a zeroed page */ +#defineVM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ +#defineVM_ALLOC_NOBUSY 0x0200 /* (acg) Do not busy the page */ +#defineVM_ALLOC_IFCACHED 0x0400 /* (ag) Fail if page is not cached */ +#defineVM_ALLOC_IFNOTCACHED0x0800 /* (ag) Fail if page is cached */ +#defineVM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ +#defineVM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ +#defineVM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ #defineVM_ALLOC_COUNT_SHIFT16 #defineVM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276055 - head/sys/vm
Author: glebius Date: Mon Dec 22 09:00:47 2014 New Revision: 276055 URL: https://svnweb.freebsd.org/changeset/base/276055 Log: Do not clear flag that vm_page_alloc() doesn't support. Submitted by: kib Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Mon Dec 22 08:59:44 2014(r276054) +++ head/sys/vm/vm_page.c Mon Dec 22 09:00:47 2014(r276055) @@ -2736,7 +2736,7 @@ retrylookup: return (m); } } - m = vm_page_alloc(object, pindex, allocflags & ~VM_ALLOC_IGN_SBUSY); + m = vm_page_alloc(object, pindex, allocflags); if (m == NULL) { VM_OBJECT_WUNLOCK(object); VM_WAIT; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276056 - head/sys/vm
Author: glebius Date: Mon Dec 22 09:02:21 2014 New Revision: 276056 URL: https://svnweb.freebsd.org/changeset/base/276056 Log: Add flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and allows the function to fail. Reviewed by: kib, alc Sponsored by: Nginx, Inc. Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Mon Dec 22 09:00:47 2014(r276055) +++ head/sys/vm/vm_page.c Mon Dec 22 09:02:21 2014(r276056) @@ -2711,6 +2711,8 @@ retrylookup: sleep = (allocflags & VM_ALLOC_IGN_SBUSY) != 0 ? vm_page_xbusied(m) : vm_page_busied(m); if (sleep) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + return (NULL); /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -2738,6 +2740,8 @@ retrylookup: } m = vm_page_alloc(object, pindex, allocflags); if (m == NULL) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + return (NULL); VM_OBJECT_WUNLOCK(object); VM_WAIT; VM_OBJECT_WLOCK(object); Modified: head/sys/vm/vm_page.h == --- head/sys/vm/vm_page.h Mon Dec 22 09:00:47 2014(r276055) +++ head/sys/vm/vm_page.h Mon Dec 22 09:02:21 2014(r276056) @@ -405,6 +405,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa) #defineVM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ #defineVM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ #defineVM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ +#defineVM_ALLOC_NOWAIT 0x8000 /* (g) Do not sleep, return NULL */ #defineVM_ALLOC_COUNT_SHIFT16 #defineVM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r276008 - in head/sys: kern sys
On Sunday, December 21, 2014 11:21:17 am Andriy Gapon wrote: > On 21/12/2014 17:14, Konstantin Belousov wrote: > > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: > >> On 21/12/2014 16:41, Konstantin Belousov wrote: > >>> Or, are you asking why caching of the name could be needed for > >>> core dump files at all ? > >> > >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? > >> What does it make better? > > The vn_fullpath() mostly works for the core files after the change, > > comparing with the non-working state at all before. > > > > Ah, vn_fullpath(). Thank you. Is there something specific to core dumps that makes vn_fullpath() more useful to have working before a process tries to open the core? (As compared to other newly-created files) -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
Hey Steve, 2014-12-19 0:59 GMT+01:00 Steve Kargl : > My only hope now is that Ed will fix the comment he inserted into > math_private.h to properly note that the functions formerly known > as cpack[fl] were written years before the C11 macros CMPLX[FL] > existed. Sure thing! Just to make sure the phrasing is done properly, would you be willing to come up with a diff? I'll push it in if you like. Thanks, -- Ed Schouten ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276058 - head/sys/kern
Author: glebius Date: Mon Dec 22 15:39:24 2014 New Revision: 276058 URL: https://svnweb.freebsd.org/changeset/base/276058 Log: In sbappend*() family of functions clear M_PROTO flags of incoming mbufs. sbappendstream() already does this in m_demote(). PR: 196174 Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c == --- head/sys/kern/uipc_sockbuf.cMon Dec 22 09:21:41 2014 (r276057) +++ head/sys/kern/uipc_sockbuf.cMon Dec 22 15:39:24 2014 (r276058) @@ -579,7 +579,7 @@ sbappend_locked(struct sockbuf *sb, stru if (m == 0) return; - + m_clrprotoflags(m); SBLASTRECORDCHK(sb); n = sb->sb_mb; if (n) { @@ -732,6 +732,7 @@ sbappendrecord_locked(struct sockbuf *sb if (m0 == 0) return; + m_clrprotoflags(m0); /* * Put the first mbuf on the queue. Note this permits zero length * records. @@ -777,6 +778,8 @@ sbappendaddr_locked_internal(struct sock return (0); m->m_len = asa->sa_len; bcopy(asa, mtod(m, caddr_t), asa->sa_len); + if (m0) + m_clrprotoflags(m0); if (ctrl_last) ctrl_last->m_next = m0; /* concatenate data to control */ else @@ -872,6 +875,7 @@ sbappendcontrol_locked(struct sockbuf *s if (space > sbspace(sb)) return (0); + m_clrprotoflags(m0); n->m_next = m0; /* concatenate data to control */ SBLASTRECORDCHK(sb); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276059 - head/sys/arm/ti
Author: loos Date: Mon Dec 22 16:12:55 2014 New Revision: 276059 URL: https://svnweb.freebsd.org/changeset/base/276059 Log: Simplify the use of locks where possible, remove the locking when it is not required. Simplify the code a little bit. Reviewed by: andrew (previous version) Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c == --- head/sys/arm/ti/ti_gpio.c Mon Dec 22 15:39:24 2014(r276058) +++ head/sys/arm/ti/ti_gpio.c Mon Dec 22 16:12:55 2014(r276059) @@ -290,7 +290,7 @@ ti_gpio_intr_clr(struct ti_gpio_softc *s * * * LOCKING: - * Internally locks the context + * No locking required, returns static data. * * RETURNS: * Returns 0 on success otherwise an error code @@ -302,8 +302,6 @@ ti_gpio_pin_max(device_t dev, int *maxpi unsigned int i; unsigned int banks = 0; - TI_GPIO_LOCK(sc); - /* Calculate how many valid banks we have and then multiply that by 32 to * give use the total number of pins. */ @@ -314,8 +312,6 @@ ti_gpio_pin_max(device_t dev, int *maxpi *maxpin = (banks * PINS_PER_BANK) - 1; - TI_GPIO_UNLOCK(sc); - return (0); } @@ -332,7 +328,7 @@ ti_gpio_pin_max(device_t dev, int *maxpi * - GPIO_PIN_PULLDOWN * * LOCKING: - * Internally locks the context + * No locking required, returns static data. * * RETURNS: * Returns 0 on success otherwise an error code @@ -343,19 +339,13 @@ ti_gpio_pin_getcaps(device_t dev, uint32 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); - TI_GPIO_LOCK(sc); - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } - *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT |GPIO_PIN_PULLUP | + *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN); - TI_GPIO_UNLOCK(sc); - return (0); } @@ -381,17 +371,13 @@ ti_gpio_pin_getflags(device_t dev, uint3 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); - TI_GPIO_LOCK(sc); - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Get the current pin state */ + TI_GPIO_LOCK(sc); TI_GPIO_GET_FLAGS(dev, pin, flags); - TI_GPIO_UNLOCK(sc); return (0); @@ -407,7 +393,7 @@ ti_gpio_pin_getflags(device_t dev, uint3 * of the pin. * * LOCKING: - * Internally locks the context + * No locking required, returns static data. * * RETURNS: * Returns 0 on success otherwise an error code @@ -418,20 +404,14 @@ ti_gpio_pin_getname(device_t dev, uint32 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); - TI_GPIO_LOCK(sc); - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Set a very simple name */ snprintf(name, GPIOMAXNAME, "gpio_%u", pin); name[GPIOMAXNAME - 1] = '\0'; - TI_GPIO_UNLOCK(sc); - return (0); } @@ -460,30 +440,26 @@ ti_gpio_pin_setflags(device_t dev, uint3 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); uint32_t mask = (1UL << (pin % PINS_PER_BANK)); - uint32_t reg_val; - - TI_GPIO_LOCK(sc); + uint32_t oe; /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Set the GPIO mode and state */ + TI_GPIO_LOCK(sc); if (TI_GPIO_SET_FLAGS(dev, pin, flags) != 0) { TI_GPIO_UNLOCK(sc); return (EINVAL); } /* If configuring as an output set the "output enable" bit */ - reg_val = ti_gpio_read_4(sc, bank, TI_GPIO_OE); + oe = ti_gpio_read_4(sc, bank, TI_GPIO_OE); if (flags & GPIO_PIN_INPUT) - reg_val |= mask; + oe |= mask; else - reg_val &= ~mask; - ti_gpi
svn commit: r276060 - head/sys/arm/ti
Author: loos Date: Mon Dec 22 16:29:15 2014 New Revision: 276060 URL: https://svnweb.freebsd.org/changeset/base/276060 Log: Remove some leftovers from OMAP3 support. Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c == --- head/sys/arm/ti/ti_gpio.c Mon Dec 22 16:12:55 2014(r276059) +++ head/sys/arm/ti/ti_gpio.c Mon Dec 22 16:29:15 2014(r276060) @@ -69,10 +69,13 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "ti_gpio_if.h" +#if !defined(SOC_OMAP4) && !defined(SOC_TI_AM335X) +#error "Unknown SoC" +#endif + /* Register definitions */ #defineTI_GPIO_REVISION0x #defineTI_GPIO_SYSCONFIG 0x0010 -#if defined(SOC_OMAP4) || defined(SOC_TI_AM335X) #defineTI_GPIO_IRQSTATUS_RAW_0 0x0024 #defineTI_GPIO_IRQSTATUS_RAW_1 0x0028 #defineTI_GPIO_IRQSTATUS_0 0x002C @@ -103,9 +106,6 @@ __FBSDID("$FreeBSD$"); #defineTI_GPIO_SETWKUENA 0x0184 #defineTI_GPIO_CLEARDATAOUT0x0190 #defineTI_GPIO_SETDATAOUT 0x0194 -#else -#error "Unknown SoC" -#endif /* Other SoC Specific definitions */ #defineOMAP4_MAX_GPIO_BANKS6 @@ -273,13 +273,8 @@ ti_gpio_intr_clr(struct ti_gpio_softc *s { /* We clear both set of registers. */ -#if defined(SOC_OMAP4) || defined(SOC_TI_AM335X) ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_0, mask); ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_1, mask); -#else - ti_gpio_write_4(sc, bank, TI_GPIO_CLEARIRQENABLE1, mask); - ti_gpio_write_4(sc, bank, TI_GPIO_CLEARIRQENABLE2, mask); -#endif } /** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276061 - head/contrib/elftoolchain/elfcopy
Author: emaste Date: Mon Dec 22 16:31:09 2014 New Revision: 276061 URL: https://svnweb.freebsd.org/changeset/base/276061 Log: Set up default shstrtab entries at shstrtab initialization Instead of waiting until the addition of the first non-default entry. This fixes a segfault when strip(1) is asked to remove every section from an object file. Upstream elftoolchain ticket 463 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1341 Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c == --- head/contrib/elftoolchain/elfcopy/sections.cMon Dec 22 16:29:15 2014(r276060) +++ head/contrib/elftoolchain/elfcopy/sections.cMon Dec 22 16:31:09 2014(r276061) @@ -1139,12 +1139,6 @@ add_to_shstrtab(struct elfcopy *ecp, con struct section *s; s = ecp->shstrtab; - if (s->buf == NULL) { - insert_to_strtab(s, ""); - insert_to_strtab(s, ".symtab"); - insert_to_strtab(s, ".strtab"); - insert_to_strtab(s, ".shstrtab"); - } insert_to_strtab(s, name); } @@ -1206,6 +1200,11 @@ init_shstrtab(struct elfcopy *ecp) s->loadable = 0; s->type = SHT_STRTAB; s->vma = 0; + + insert_to_strtab(s, ""); + insert_to_strtab(s, ".symtab"); + insert_to_strtab(s, ".strtab"); + insert_to_strtab(s, ".shstrtab"); } void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276062 - in head/contrib/elftoolchain: common readelf
Author: emaste Date: Mon Dec 22 16:34:59 2014 New Revision: 276062 URL: https://svnweb.freebsd.org/changeset/base/276062 Log: Add AArch64 machine time and relocations for readelf Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1333 Modified: head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/common/elfdefinitions.h == --- head/contrib/elftoolchain/common/elfdefinitions.h Mon Dec 22 16:31:09 2014(r276061) +++ head/contrib/elftoolchain/common/elfdefinitions.h Mon Dec 22 16:34:59 2014(r276062) @@ -770,6 +770,8 @@ _ELF_DEFINE_EM(EM_ETPU, 178, "Freescale Extended Time Processing Unit") \ _ELF_DEFINE_EM(EM_SLE9X,179, \ "Infineon Technologies SLE9X core") \ +_ELF_DEFINE_EM(EM_AARCH64, 183, \ + "AArch64 (64-bit ARM)") \ _ELF_DEFINE_EM(EM_AVR32,185, \ "Atmel Corporation 32-bit microprocessor family") \ _ELF_DEFINE_EM(EM_STM8, 186, \ Modified: head/contrib/elftoolchain/readelf/readelf.c == --- head/contrib/elftoolchain/readelf/readelf.c Mon Dec 22 16:31:09 2014 (r276061) +++ head/contrib/elftoolchain/readelf/readelf.c Mon Dec 22 16:34:59 2014 (r276062) @@ -487,6 +487,7 @@ elf_machine(unsigned int mach) case EM_SEP: return "Sharp embedded microprocessor"; case EM_ARCA: return "Arca RISC Microprocessor"; case EM_UNICORE: return "Microprocessor series from PKU-Unity Ltd"; + case EM_AARCH64: return "AArch64"; default: snprintf(s_mach, sizeof(s_mach), "", mach); return (s_mach); @@ -1041,6 +1042,67 @@ r_type(unsigned int mach, unsigned int t case 37: return "R_386_TLS_TPOFF32"; default: return ""; } + case EM_AARCH64: + switch(type) { + case 0: return "R_AARCH64_NONE"; + case 257: return "R_AARCH64_ABS64"; + case 258: return "R_AARCH64_ABS32"; + case 259: return "R_AARCH64_ABS16"; + case 260: return "R_AARCH64_PREL64"; + case 261: return "R_AARCH64_PREL32"; + case 262: return "R_AARCH64_PREL16"; + case 263: return "R_AARCH64_MOVW_UABS_G0"; + case 264: return "R_AARCH64_MOVW_UABS_G0_NC"; + case 265: return "R_AARCH64_MOVW_UABS_G1"; + case 266: return "R_AARCH64_MOVW_UABS_G1_NC"; + case 267: return "R_AARCH64_MOVW_UABS_G2"; + case 268: return "R_AARCH64_MOVW_UABS_G2_NC"; + case 269: return "R_AARCH64_MOVW_UABS_G3"; + case 270: return "R_AARCH64_MOVW_SABS_G0"; + case 271: return "R_AARCH64_MOVW_SABS_G1"; + case 272: return "R_AARCH64_MOVW_SABS_G2"; + case 273: return "R_AARCH64_LD_PREL_LO19"; + case 274: return "R_AARCH64_ADR_PREL_LO21"; + case 275: return "R_AARCH64_ADR_PREL_PG_HI21"; + case 276: return "R_AARCH64_ADR_PREL_PG_HI21_NC"; + case 277: return "R_AARCH64_ADD_ABS_LO12_NC"; + case 278: return "R_AARCH64_LDST8_ABS_LO12_NC"; + case 279: return "R_AARCH64_TSTBR14"; + case 280: return "R_AARCH64_CONDBR19"; + case 282: return "R_AARCH64_JUMP26"; + case 283: return "R_AARCH64_CALL26"; + case 284: return "R_AARCH64_LDST16_ABS_LO12_NC"; + case 285: return "R_AARCH64_LDST32_ABS_LO12_NC"; + case 286: return "R_AARCH64_LDST64_ABS_LO12_NC"; + case 287: return "R_AARCH64_MOVW_PREL_G0"; + case 288: return "R_AARCH64_MOVW_PREL_G0_NC"; + case 289: return "R_AARCH64_MOVW_PREL_G1"; + case 290: return "R_AARCH64_MOVW_PREL_G1_NC"; + case 291: return "R_AARCH64_MOVW_PREL_G2"; + case 292: return "R_AARCH64_MOVW_PREL_G2_NC"; + case 293: return "R_AARCH64_MOVW_PREL_G3"; + case 299: return "R_AARCH64_LDST128_ABS_LO12_NC"; + case 300: return "R_AARCH64_MOVW_GOTOFF_G0"; + case 301: return "R_AARCH64_MOVW_GOTOFF_G0_NC"; + case 302: return "R_AARCH64_MOVW_GOTOFF_G1"; + case 303: return "R_AARCH64_MOVW_GOTOFF_G1_NC"; + case 304: return "R_AARCH64_MOVW_GOTOFF_G2"; + case 305: return "R_AARCH64_MOVW_GOTOFF_G2_NC"; + case 306: return "R_AARCH6
svn commit: r276063 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Mon Dec 22 16:38:29 2014 New Revision: 276063 URL: https://svnweb.freebsd.org/changeset/base/276063 Log: Standardise on illumos for #ifdef's in zvol.c Also correct as per style(9) on the use of #ifdef comments. This is a no-op change as pre-cursor to a full cleanup and merge with upstream zvol changes. Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 16:34:59 2014(r276062) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 16:38:29 2014(r276063) @@ -214,7 +214,7 @@ static void zvol_geom_worker(void *arg); static void zvol_size_changed(zvol_state_t *zv) { -#ifdef sun +#ifdef illumos dev_t dev = makedevice(maj, min); VERIFY(ddi_prop_update_int64(dev, zfs_dip, @@ -225,7 +225,7 @@ zvol_size_changed(zvol_state_t *zv) /* Notify specfs to invalidate the cached size */ spec_size_invalidate(dev, VBLK); spec_size_invalidate(dev, VCHR); -#else /* !sun */ +#else /* !illumos */ if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { struct g_provider *pp; @@ -236,7 +236,7 @@ zvol_size_changed(zvol_state_t *zv) g_resize_provider(pp, zv->zv_volsize); g_topology_unlock(); } -#endif /* !sun */ +#endif /* illumos */ } int @@ -517,7 +517,7 @@ zil_replay_func_t *zvol_replay_vector[TX zvol_replay_err,/* TX_WRITE2 */ }; -#ifdef sun +#ifdef illumos int zvol_name2minor(const char *name, minor_t *minor) { @@ -530,7 +530,7 @@ zvol_name2minor(const char *name, minor_ mutex_exit(&spa_namespace_lock); return (zv ? 0 : -1); } -#endif /* sun */ +#endif /* illumos */ /* * Create a minor node (plus a whole lot more) for the specified volume. @@ -565,7 +565,7 @@ zvol_create_minor(const char *name) return (error); } -#ifdef sun +#ifdef illumos if ((minor = zfsdev_minor_alloc()) == 0) { dmu_objset_disown(os, FTAG); mutex_exit(&spa_namespace_lock); @@ -604,7 +604,7 @@ zvol_create_minor(const char *name) zs = ddi_get_soft_state(zfsdev_state, minor); zs->zss_type = ZSST_ZVOL; zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); -#else /* !sun */ +#else /* !illumos */ zv = kmem_zalloc(sizeof(*zv), KM_SLEEP); zv->zv_state = 0; @@ -651,7 +651,7 @@ zvol_create_minor(const char *name) dev->si_drv2 = zv; } LIST_INSERT_HEAD(&all_zvols, zv, zv_links); -#endif /* !sun */ +#endif /* illumos */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); zv->zv_min_bs = DEV_BSHIFT; @@ -681,7 +681,7 @@ zvol_create_minor(const char *name) mutex_exit(&spa_namespace_lock); -#ifndef sun +#ifndef illumos if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { zvol_geom_run(zv); g_topology_unlock(); @@ -700,7 +700,7 @@ zvol_create_minor(const char *name) static int zvol_remove_zv(zvol_state_t *zv) { -#ifdef sun +#ifdef illumos minor_t minor = zv->zv_minor; #endif @@ -710,7 +710,7 @@ zvol_remove_zv(zvol_state_t *zv) ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name); -#ifdef sun +#ifdef illumos (void) snprintf(nmbuf, sizeof (nmbuf), "%u,raw", minor); ddi_remove_minor_node(zfs_dip, nmbuf); #else @@ -721,7 +721,7 @@ zvol_remove_zv(zvol_state_t *zv) g_topology_unlock(); } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) destroy_dev(zv->zv_dev); -#endif /* sun */ +#endif avl_destroy(&zv->zv_znode.z_range_avl); mutex_destroy(&zv->zv_znode.z_range_lock); @@ -809,7 +809,7 @@ zvol_last_close(zvol_state_t *zv) zv->zv_objset = NULL; } -#ifdef sun +#ifdef illumos int zvol_prealloc(zvol_state_t *zv) { @@ -848,7 +848,7 @@ zvol_prealloc(zvol_state_t *zv) return (0); } -#endif /* sun */ +#endif /* illumos */ static int zvol_update_volsize(objset_t *os, uint64_t volsize) @@ -955,7 +955,7 @@ zvol_set_volsize(const char *name, major } } -#ifdef sun +#ifdef illumos /* * Generate a LUN expansion event. */ @@ -976,7 +976,7 @@ zvol_set_volsize(const char *name, major nvlist_free(attr); kmem_free(physpath, MAXPATHLEN); } -#endif /* sun */ +#endif /* illumos */ out: dmu_objset_rele(os, FTAG); @@ -1260,7 +1260,7 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_ } } -#ifdef sun +#ifdef illumos static int zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, uint64_t size, boolean_t doread, boolean_t isdump) @@ -1353,7 +1353,7 @@ zvol_dumpio(zvol_state_
svn commit: r276064 - in head/sys/dev/vt/hw: efifb vga
Author: royger Date: Mon Dec 22 16:46:07 2014 New Revision: 276064 URL: https://svnweb.freebsd.org/changeset/base/276064 Log: vt: register the memory regions used by the vt drivers Current VT drivers don't register the memory regions they use with the nexus. This patch makes vt_vga and vt_efifb register the memory regions they use. This is needed (at least) for Xen support, since the FreeBSD kernel will try to use the holes in the memory map to map memory from other domains and setup it's grant table. Sponsored by: Citrix Systems R&D Reported by: sbruno Tested by:emaste Reviewed by: ray PR: 195537 Differential Revision:https://reviews.freebsd.org/D1291 Modified: head/sys/dev/vt/hw/efifb/efifb.c head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/efifb/efifb.c == --- head/sys/dev/vt/hw/efifb/efifb.cMon Dec 22 16:38:29 2014 (r276063) +++ head/sys/dev/vt/hw/efifb/efifb.cMon Dec 22 16:46:07 2014 (r276064) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include "opt_platform.h" @@ -179,3 +182,53 @@ vt_efifb_remap(void *xinfo) info->fb_size, VM_MEMATTR_WRITE_COMBINING); } +/* Dummy NewBus functions to reserve the resources used by the efifb driver */ +static void +vtefifb_identify(driver_t *driver, device_t parent) +{ + + if (local_info.fb_pbase == 0 || local_info.fb_size == 0) + return; + + if (BUS_ADD_CHILD(parent, 0, driver->name, 0) == NULL) + panic("Unable to attach vt_efifb console"); +} + +static int +vtefifb_probe(device_t dev) +{ + + device_set_desc(dev, "vt_efifb driver"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +vtefifb_attach(device_t dev) +{ + struct resource *pseudo_phys_res; + int res_id; + + res_id = 0; + pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &res_id, local_info.fb_pbase, + local_info.fb_pbase + local_info.fb_size, + local_info.fb_size, RF_ACTIVE); + if (pseudo_phys_res == NULL) + panic("Unable to reserve vt_efifb memory"); + return (0); +} + +/* Private Device Attachment Data ---*/ +static device_method_t vtefifb_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, vtefifb_identify), + DEVMETHOD(device_probe, vtefifb_probe), + DEVMETHOD(device_attach,vtefifb_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(vtefifb, vtefifb_driver, vtefifb_methods, 0); +devclass_t vtefifb_devclass; + +DRIVER_MODULE(vtefifb, nexus, vtefifb_driver, vtefifb_devclass, NULL, NULL); Modified: head/sys/dev/vt/hw/vga/vt_vga.c == --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Dec 22 16:38:29 2014 (r276063) +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Dec 22 16:46:07 2014 (r276064) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -56,6 +59,7 @@ struct vga_softc { bus_space_handle_t vga_reg_handle; int vga_wmode; term_color_t vga_curfg, vga_curbg; + boolean_tvga_enabled; }; /* Convenience macros. */ @@ -1228,6 +1232,7 @@ vga_init(struct vt_device *vd) vd->vd_height = VT_VGA_HEIGHT; } vga_initialize(vd, textmode); + sc->vga_enabled = true; return (CN_INTERNAL); } @@ -1241,3 +1246,53 @@ vga_postswitch(struct vt_device *vd) /* Ask vt(9) to update chars on visible area. */ vd->vd_flags |= VDF_INVALID; } + +/* Dummy NewBus functions to reserve the resources used by the vt_vga driver */ +static void +vtvga_identify(driver_t *driver, device_t parent) +{ + + if (!vga_conssoftc.vga_enabled) + return; + + if (BUS_ADD_CHILD(parent, 0, driver->name, 0) == NULL) + panic("Unable to attach vt_vga console"); +} + +static int +vtvga_probe(device_t dev) +{ + + device_set_desc(dev, "vt_vga driver"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +vtvga_attach(device_t dev) +{ + struct resource *pseudo_phys_res; + int res_id; + + res_id = 0; + pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &res_id, VGA_MEM_BASE, VGA_MEM_BASE + VGA_MEM_SIZE, + VGA_MEM_SIZE, RF_ACTIVE); + if (pseudo_phys_res == NULL) + panic("Unable to reserve vt_vga memory"); + return (0); +} + +/* Private Device Attachment Data ---*/ +static device_method_t vtvga_methods[] = { + /* Device interface */ + DEVMET
svn commit: r276065 - head/sys/dev/ipmi
Author: jhb Date: Mon Dec 22 16:53:04 2014 New Revision: 276065 URL: https://svnweb.freebsd.org/changeset/base/276065 Log: Explicitly treat timeouts when waiting for IBF or OBF to change state as an error. This fixes occasional hangs in the IPMI kcs thread when using ipmitool locally. MFC after:1 week Modified: head/sys/dev/ipmi/ipmi_kcs.c Modified: head/sys/dev/ipmi/ipmi_kcs.c == --- head/sys/dev/ipmi/ipmi_kcs.cMon Dec 22 16:46:07 2014 (r276064) +++ head/sys/dev/ipmi/ipmi_kcs.cMon Dec 22 16:53:04 2014 (r276065) @@ -184,6 +184,8 @@ kcs_start_write(struct ipmi_softc *sc) for (retry = 0; retry < 10; retry++) { /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); /* Clear OBF */ kcs_clear_obf(sc, status); @@ -193,6 +195,9 @@ kcs_start_write(struct ipmi_softc *sc) /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); + if (KCS_STATUS_STATE(status) == KCS_STATUS_STATE_WRITE) break; DELAY(100); @@ -222,6 +227,8 @@ kcs_write_byte(struct ipmi_softc *sc, u_ /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) return (0); @@ -244,6 +251,8 @@ kcs_write_last_byte(struct ipmi_softc *s /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) /* error state */ @@ -274,6 +283,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1 */ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Data_out */ *data = INB(sc, KCS_DATA); @@ -288,6 +299,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1*/ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Dummy */ dummy = INB(sc, KCS_DATA); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276066 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Mon Dec 22 17:04:51 2014 New Revision: 276066 URL: https://svnweb.freebsd.org/changeset/base/276066 Log: Refactor zvol locking to minimise diff with upstream Use #define zfsdev_state_lock spa_namespace_lock instead of replacing all zfsdev_state_lock with spa_namespace_lock to minimise changes from upstream. Differential Revision:D1302 MFC after:1 month X-MFC-Withr276063 Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 16:53:04 2014(r276065) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 17:04:51 2014(r276066) @@ -110,11 +110,20 @@ static char *zvol_tag = "zvol_tag"; #defineZVOL_DUMPSIZE "dumpsize" /* - * The spa_namespace_lock protects the zfsdev_state structure from being - * modified while it's being used, e.g. an open that comes in before a - * create finishes. It also protects temporary opens of the dataset so that, + * This lock protects the zfsdev_state structure from being modified + * while it's being used, e.g. an open that comes in before a create + * finishes. It also protects temporary opens of the dataset so that, * e.g., an open doesn't get a spurious EBUSY. */ +#ifdef illumos +kmutex_t zfsdev_state_lock; +#else +/* + * In FreeBSD we've replaced the upstream zfsdev_state_lock with the + * spa_namespace_lock in the ZVOL code. + */ +#define zfsdev_state_lock spa_namespace_lock +#endif static uint32_t zvol_minors; SYSCTL_DECL(_vfs_zfs); @@ -294,7 +303,7 @@ zvol_minor_lookup(const char *name) { zvol_state_t *zv; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, name) == 0) @@ -523,11 +532,11 @@ zvol_name2minor(const char *name, minor_ { zvol_state_t *zv; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = zvol_minor_lookup(name); if (minor && zv) *minor = zv->zv_minor; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (zv ? 0 : -1); } #endif /* illumos */ @@ -550,10 +559,10 @@ zvol_create_minor(const char *name) ZFS_LOG(1, "Creating ZVOL %s...", name); - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); if (zvol_minor_lookup(name) != NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EEXIST)); } @@ -561,20 +570,20 @@ zvol_create_minor(const char *name) error = dmu_objset_own(name, DMU_OST_ZVOL, B_TRUE, FTAG, &os); if (error) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } #ifdef illumos if ((minor = zfsdev_minor_alloc()) == 0) { dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } if (ddi_soft_state_zalloc(zfsdev_state, minor) != DDI_SUCCESS) { dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } (void) ddi_prop_update_string(minor, zfs_dip, ZVOL_PROP_NAME, @@ -586,7 +595,7 @@ zvol_create_minor(const char *name) minor, DDI_PSEUDO, 0) == DDI_FAILURE) { ddi_soft_state_free(zfsdev_state, minor); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } @@ -597,7 +606,7 @@ zvol_create_minor(const char *name) ddi_remove_minor_node(zfs_dip, chrbuf); ddi_soft_state_free(zfsdev_state, minor); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } @@ -612,7 +621,7 @@ zvol_create_minor(const char *name) if (error) { kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, zvol_tag); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } error = dsl_prop_get_integer(name, @@ -643,7 +652,7 @@ zvol_create_minor(const char *name) 0640, "%s/%s", ZVOL_DRIVER, name) != 0) { kmem_
Re: svn commit: r276008 - in head/sys: kern sys
On Mon, Dec 22, 2014 at 09:40:02AM -0500, John Baldwin wrote: > On Sunday, December 21, 2014 11:21:17 am Andriy Gapon wrote: > > On 21/12/2014 17:14, Konstantin Belousov wrote: > > > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: > > >> On 21/12/2014 16:41, Konstantin Belousov wrote: > > >>> Or, are you asking why caching of the name could be needed for > > >>> core dump files at all ? > > >> > > >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? > > >> What does it make better? > > > The vn_fullpath() mostly works for the core files after the change, > > > comparing with the non-working state at all before. > > > > > > > Ah, vn_fullpath(). Thank you. > > Is there something specific to core dumps that makes vn_fullpath() more > useful to have working before a process tries to open the core? (As > compared to other newly-created files) See other Rui' reply in the thread. It was done by his request. Basically, we cannot enable caching for CREATE, since operations like extracting large archive, would flush the cache. Doing it rarely and when needed is acceptable. The explained use case seems to be warranted. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r276008 - in head/sys: kern sys
On Dec 22, 2014, at 06:40, John Baldwin wrote: > Is there something specific to core dumps that makes vn_fullpath() more > useful to have working before a process tries to open the core? (As > compared to other newly-created files) Yes: the ability to provide the full path to userland when a core dump file is generated. -- Rui Paulo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276069 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: smh Date: Mon Dec 22 18:39:38 2014 New Revision: 276069 URL: https://svnweb.freebsd.org/changeset/base/276069 Log: Fix panic when resizing ZFS zvol's Resizing a ZFS ZVOL with debug enabled would result in a panic due to recursion on dp_config_rwlock. The upstream change "3464 zfs synctask code needs restructuring" changed zvol_set_volsize to avoid the recursion on dp_config_rwlock, but this was missed when originally merged in by r248571 due to significant differences in our codebases in this area. These changes also relied on bring in changes from upstream: 3557 dumpvp_size is not updated correctly when a dump zvol's size is changed, which where also not present. In order to help prevent future issues in this area a direct comparison and diff minimisation from current upstream version (b515258) of zvol.c. Differential Revision:https://reviews.freebsd.org/D1302 MFC after:1 month X-MFC-With: r276063 & r276066 Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Mon Dec 22 17:54:26 2014(r276068) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Mon Dec 22 18:39:38 2014(r276069) @@ -43,7 +43,7 @@ extern void zvol_create_cb(objset_t *os, extern int zvol_create_minor(const char *); extern int zvol_remove_minor(const char *); extern void zvol_remove_minors(const char *); -extern int zvol_set_volsize(const char *, major_t, uint64_t); +extern int zvol_set_volsize(const char *, uint64_t); #ifdef sun extern int zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Dec 22 17:54:26 2014(r276068) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Dec 22 18:39:38 2014(r276069) @@ -2482,8 +2482,7 @@ zfs_prop_set_special(const char *dsname, err = dsl_dataset_set_refreservation(dsname, source, intval); break; case ZFS_PROP_VOLSIZE: - err = zvol_set_volsize(dsname, ddi_driver_major(zfs_dip), - intval); + err = zvol_set_volsize(dsname, intval); break; case ZFS_PROP_VERSION: { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 17:54:26 2014(r276068) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 18:39:38 2014(r276069) @@ -97,6 +97,7 @@ #include "zfs_namecheck.h" +#ifndef illumos struct g_class zfs_zvol_class = { .name = "ZFS::ZVOL", .version = G_VERSION, @@ -104,6 +105,7 @@ struct g_class zfs_zvol_class = { DECLARE_GEOM_CLASS(zfs_zvol_class, zfs_zvol); +#endif void *zfsdev_state; static char *zvol_tag = "zvol_tag"; @@ -126,12 +128,14 @@ kmutex_t zfsdev_state_lock; #endif static uint32_t zvol_minors; +#ifndef illumos SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, vol, CTLFLAG_RW, 0, "ZFS VOLUME"); static int volmode = ZFS_VOLMODE_GEOM; SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, mode, CTLFLAG_RWTUN, &volmode, 0, "Expose as GEOM providers (1), device files (2) or neither"); +#endif typedef struct zvol_extent { list_node_t ze_node; dva_t ze_dva; /* dva associated with this extent */ @@ -142,28 +146,40 @@ typedef struct zvol_extent { * The in-core state of each volume. */ typedef struct zvol_state { +#ifndef illumos LIST_ENTRY(zvol_state) zv_links; +#endif charzv_name[MAXPATHLEN]; /* pool/dd name */ uint64_tzv_volsize; /* amount of space we advertise */ uint64_tzv_volblocksize; /* volume block size */ +#ifdef illumos + minor_t zv_minor; /* minor number */ +#else struct cdev *zv_dev;/* non-GEOM device */ struct g_provider *zv_provider; /* GEOM provider */ +#endif uint8_t zv_min_bs; /* minimum addressable block shift */ uint8_t zv_flags; /* readonly, dumpified, etc. */ objset_t*zv_objset; /* objset handle */ +#ifdef illumos + uint32_tzv_open_count[OTYPCNT]; /* open counts */ +#endif uint32_tzv_total_opens; /* total open count */
Re: svn commit: r276008 - in head/sys: kern sys
On 22 December 2014 at 09:28, Konstantin Belousov wrote: > On Mon, Dec 22, 2014 at 09:40:02AM -0500, John Baldwin wrote: >> On Sunday, December 21, 2014 11:21:17 am Andriy Gapon wrote: >> > On 21/12/2014 17:14, Konstantin Belousov wrote: >> > > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: >> > >> On 21/12/2014 16:41, Konstantin Belousov wrote: >> > >>> Or, are you asking why caching of the name could be needed for >> > >>> core dump files at all ? >> > >> >> > >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? >> > >> What does it make better? >> > > The vn_fullpath() mostly works for the core files after the change, >> > > comparing with the non-working state at all before. >> > > >> > >> > Ah, vn_fullpath(). Thank you. >> >> Is there something specific to core dumps that makes vn_fullpath() more >> useful to have working before a process tries to open the core? (As >> compared to other newly-created files) > > See other Rui' reply in the thread. It was done by his request. > > Basically, we cannot enable caching for CREATE, since operations like > extracting large archive, would flush the cache. Doing it rarely > and when needed is acceptable. The explained use case seems to > be warranted. .. 2c, sounds like having an ARC style replacement policy for namecache entries would be useful. (I mean the policy as described in the ARC paper, not the ZFS implementation as a block cache.) -adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276071 - in head/contrib/ntp: ntpd util
Author: delphij Date: Mon Dec 22 18:54:55 2014 New Revision: 276071 URL: https://svnweb.freebsd.org/changeset/base/276071 Log: Fix multiple ntp vulnerabilities. Reviewed by: roberto (earlier revision), philip Security: CVE-2014-9293, CVE-2014-9294 Security: CVE-2014-9295, CVE-2014-9296 Security: FreeBSD-SA-14:31.ntp Differential Revision: https://reviews.freebsd.org/D1343 Modified: head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_crypto.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/util/ntp-keygen.c Modified: head/contrib/ntp/ntpd/ntp_config.c == --- head/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 18:54:55 2014 (r276071) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: head/contrib/ntp/ntpd/ntp_control.c == --- head/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 18:54:55 2014 (r276071) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: head/contrib/ntp/ntpd/ntp_crypto.c == --- head/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 18:54:55 2014 (r276071) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: head/contrib/ntp/ntpd/ntp_proto.c == --- head/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 18:54:55 2014
svn commit: r276074 - head/sys/boot/i386/libi386
Author: imp Date: Mon Dec 22 19:10:11 2014 New Revision: 276074 URL: https://svnweb.freebsd.org/changeset/base/276074 Log: Make this compile when TERM_EMU is not defined. Modified: head/sys/boot/i386/libi386/spinconsole.c Modified: head/sys/boot/i386/libi386/spinconsole.c == --- head/sys/boot/i386/libi386/spinconsole.cMon Dec 22 19:08:09 2014 (r276073) +++ head/sys/boot/i386/libi386/spinconsole.cMon Dec 22 19:10:11 2014 (r276074) @@ -86,9 +86,11 @@ spinc_putchar(int c) if (now < (lasttime + 1)) return; lasttime = now; +#ifdef TERM_EMU get_pos(&curx, &cury); if (curx > 0) curs_move(&curx, &cury, curx - 1, cury); +#endif vidc_biosputchar((char)tw_chars); tw_chars = (tw_chars >> 8) | ((tw_chars & (unsigned long)0xFF) << 24); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276075 - head/sys/conf
Author: imp Date: Mon Dec 22 19:10:21 2014 New Revision: 276075 URL: https://svnweb.freebsd.org/changeset/base/276075 Log: Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the current date if we can't find it. MFC After: 2 weeks Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh == --- head/sys/conf/newvers.shMon Dec 22 19:10:11 2014(r276074) +++ head/sys/conf/newvers.shMon Dec 22 19:10:21 2014(r276075) @@ -52,7 +52,11 @@ else fi b=share/examples/etc/bsd-style-copyright -year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) +if [ -r "${SYSDIR}/../COPYRIGHT" ]; then + year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) +else + year=$(date +%Y) +fi # look for copyright template for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b do ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r276065 - head/sys/dev/ipmi
On Monday, December 22, 2014 11:53:05 am John Baldwin wrote: > Author: jhb > Date: Mon Dec 22 16:53:04 2014 > New Revision: 276065 > URL: https://svnweb.freebsd.org/changeset/base/276065 > > Log: > Explicitly treat timeouts when waiting for IBF or OBF to change state as an > error. This fixes occasional hangs in the IPMI kcs thread when using > ipmitool locally. In particular, the ipmi0: kcs thread would run at 100% CPU. With this fix in place I know see a KCS error reported in dmesg and the driver recovers allowing future requests to complete ok. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r276008 - in head/sys: kern sys
On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: > On Dec 22, 2014, at 06:40, John Baldwin wrote: > > Is there something specific to core dumps that makes vn_fullpath() more > > useful to have working before a process tries to open the core? (As > > compared to other newly-created files) > > Yes: the ability to provide the full path to userland when a core dump file is generated. Can you be more specific? Are we printing the path on the console after destroying the generated path? Is it being written into a note in the core itself (but only having the vnode of the core file available and not the generated path)? -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276079 - head/lib/libstand
Author: ian Date: Mon Dec 22 20:42:36 2014 New Revision: 276079 URL: https://svnweb.freebsd.org/changeset/base/276079 Log: Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Update the existing twiddle() calls done in various IO loops to roughly reflect the relative IO sizes. That is, tftp and nfs call twiddle() on every 1K block, ufs on every filesystem block, so the network calls now use a much larger divisor than disk IO calls. Also add a new twiddle_divisor() function that allows an application to set a global divisor that is applied on top of the per-call divisors. Nothing calls this yet, but loader(8) will be using it to further throttle the cursor for slow serial consoles. Modified: head/lib/libstand/cd9660.c head/lib/libstand/ext2fs.c head/lib/libstand/nandfs.c head/lib/libstand/nfs.c head/lib/libstand/read.c head/lib/libstand/stand.h head/lib/libstand/tftp.c head/lib/libstand/twiddle.c head/lib/libstand/ufs.c head/lib/libstand/write.c Modified: head/lib/libstand/cd9660.c == --- head/lib/libstand/cd9660.c Mon Dec 22 20:33:40 2014(r276078) +++ head/lib/libstand/cd9660.c Mon Dec 22 20:42:36 2014(r276079) @@ -281,7 +281,7 @@ cd9660_open(const char *path, struct ope buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); vd = buf; for (bno = 16;; bno++) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -314,7 +314,7 @@ cd9660_open(const char *path, struct ope while (off < dsize) { if ((off % ISO_DEFAULT_BLOCK_SIZE) == 0) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy (f->f_devdata, F_READ, cdb2devb(bno + boff), @@ -374,7 +374,7 @@ cd9660_open(const char *path, struct ope /* Check for Rock Ridge since we didn't in the loop above. */ bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -431,7 +431,7 @@ buf_read_file(struct open_file *f, char if (fp->f_buf == (char *)0) fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE); - twiddle(); + twiddle(16); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read); if (rc) Modified: head/lib/libstand/ext2fs.c == --- head/lib/libstand/ext2fs.c Mon Dec 22 20:33:40 2014(r276078) +++ head/lib/libstand/ext2fs.c Mon Dec 22 20:42:36 2014(r276079) @@ -353,7 +353,7 @@ ext2fs_open(const char *upath, struct op /* allocate space and read super block */ fs = (struct ext2fs *)malloc(sizeof(*fs)); fp->f_fs = fs; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, &buf_size); if (error) @@ -395,7 +395,7 @@ ext2fs_open(const char *upath, struct op len = blkgrps * fs->fs_bsize; fp->f_bg = malloc(len); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, (char *)fp->f_bg, &buf_size); @@ -507,7 +507,7 @@ ext2fs_open(const char *upath, struct op if (error) goto out; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), fs->fs_bsize, buf, &buf_size); @@ -568,7 +568,7 @@ read_inode(ino_t inumber, struct open_fi * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize); if (error) @@ -665,7 +665,7 @@ block_map(struct open_file *f, daddr_t f if (fp->f_blk[level] == (char *)0) fp->f_blk[level] =
svn commit: r276083 - head/etc
Author: marck (doc committer) Date: Mon Dec 22 21:26:49 2014 New Revision: 276083 URL: https://svnweb.freebsd.org/changeset/base/276083 Log: Add VAMI (VMware Appliance Management Interface) port. Reviewed by: eadler MFC after:2 weeks Modified: head/etc/services Modified: head/etc/services == --- head/etc/services Mon Dec 22 21:06:26 2014(r276082) +++ head/etc/services Mon Dec 22 21:26:49 2014(r276083) @@ -2345,6 +2345,8 @@ mdns 5353/tcp #Multicast DNS mdns 5353/udp #Multicast DNS postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database +vami 5480/tcp #VMware Appliance Management Interface, HTTPS-like +vami 5480/udp #VMware Appliance Management Interface, HTTPS-like rplay /udp amqp 5672/sctp #AMQP amqp 5672/tcp #AMQP ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276086 - head/usr.sbin/freebsd-update
Author: cperciva Date: Mon Dec 22 21:52:37 2014 New Revision: 276086 URL: https://svnweb.freebsd.org/changeset/base/276086 Log: Strip trailing / characters from paths in "not present" index entries, not just "directory" entries. Prior to this commit, if / was added as part of a security update (how? In the most recent case, because lib32 was accidentally omitted and was then re-added, and every installer distribution set gets its own paths) then the code which was supposed to filter out updates to deleted parts of the base system (if someone decides to delete / then we shouldn't re-create it for them) would instead get confused and decided that while / should exist, // should not exist and needs to be removed. This fixes the bug which caused freebsd-update to want to delete / (which is harmless, since `rm /` fails, but scary nonetheless). A workaround is being applied to the update bits in order to avoid triggering the bug on unpatched systems. PR: 196055, 196091, 196147 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh == --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 21:46:35 2014(r276085) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 21:52:37 2014(r276086) @@ -1395,6 +1395,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276087 - in head/sys/boot: common forth
Author: ian Date: Mon Dec 22 22:07:22 2014 New Revision: 276087 URL: https://svnweb.freebsd.org/changeset/base/276087 Log: Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator. The default value is 1. For larger values N, the next stage of the animation is only output on every Nth call to the output routine. A sufficiently large N effectively disables the animation completely. Modified: head/sys/boot/common/console.c head/sys/boot/common/loader.8 head/sys/boot/forth/loader.conf Modified: head/sys/boot/common/console.c == --- head/sys/boot/common/console.c Mon Dec 22 21:52:37 2014 (r276086) +++ head/sys/boot/common/console.c Mon Dec 22 22:07:22 2014 (r276087) @@ -39,6 +39,7 @@ static intcons_set(struct env_var *ev, static int cons_find(const char *name); static int cons_check(const char *string); static voidcons_change(const char *string); +static int twiddle_set(struct env_var *ev, int flags, const void *value); /* * Detect possible console(s) to use. If preferred console(s) have been @@ -52,6 +53,9 @@ cons_probe(void) intactive; char *prefconsole; +/* We want a callback to install the new value when this var changes. */ +env_setenv("twiddle_divisor", EV_VOLATILE, "1", twiddle_set, env_nounset); + /* Do all console probes */ for (cons = 0; consoles[cons] != NULL; cons++) { consoles[cons]->c_flags = 0; @@ -232,3 +236,28 @@ cons_change(const char *string) free(dup); } + +/* + * Change the twiddle divisor. + * + * The user can set the twiddle_divisor variable to directly control how fast + * the progress twiddle spins, useful for folks with slow serial consoles. The + * code to monitor changes to the variable and propagate them to the twiddle + * routines has to live somewhere. Twiddling is console-related so it's here. + */ +static int +twiddle_set(struct env_var *ev, int flags, const void *value) +{ +u_long tdiv; +char * eptr; + +tdiv = strtoul(value, &eptr, 0); +if (*(const char *)value == 0 || *eptr != 0) { + printf("invalid twiddle_divisor '%s'\n", (const char *)value); + return (CMD_ERROR); +} +twiddle_divisor((u_int)tdiv); +env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + +return(CMD_OK); +} Modified: head/sys/boot/common/loader.8 == --- head/sys/boot/common/loader.8 Mon Dec 22 21:52:37 2014 (r276086) +++ head/sys/boot/common/loader.8 Mon Dec 22 22:07:22 2014 (r276087) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd December 22, 2014 .Dt LOADER 8 .Os .Sh NAME @@ -670,6 +670,12 @@ Overrides the compile-time set value of .Dv TCBHASHSIZE or the preset default of 512. Must be a power of 2. +.It Va twiddle_divisor +Throttles the output of the `twiddle' I/O progress indicator displayed +while loading the kernel and modules. +This is useful on slow serial consoles where the time spent waiting for +these characters to be written can add up to many seconds. +The default is 1 (full speed); a value of 2 spins half as fast, and so on. .It Va vm.kmem_size Sets the size of kernel memory (bytes). This overrides the value determined when the kernel was compiled. Modified: head/sys/boot/forth/loader.conf == --- head/sys/boot/forth/loader.conf Mon Dec 22 21:52:37 2014 (r276086) +++ head/sys/boot/forth/loader.conf Mon Dec 22 22:07:22 2014 (r276087) @@ -75,6 +75,7 @@ module_path="/boot/modules" # Set the mo # the block size is set to 512. If the value # is out of range ( < 8 || > 9008 ) an error is # returned. +#twiddle_divisor="1" # >1 means slow down the progress indicator. ## ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276095 - head/usr.sbin/freebsd-update
Author: des Date: Mon Dec 22 23:03:18 2014 New Revision: 276095 URL: https://svnweb.freebsd.org/changeset/base/276095 Log: Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently expand the latter. MFC after:3 days Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh == --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:29:48 2014(r276094) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 23:03:18 2014(r276095) @@ -2264,7 +2264,7 @@ upgrade_oldall_to_oldnew () { } # Helper for upgrade_merge: Return zero true iff the two files differ only -# in the contents of their $FreeBSD$ tags. +# in the contents of their RCS tags. samef () { X=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $1 | ${SHA256}` Y=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $2 | ${SHA256}` @@ -2360,7 +2360,7 @@ upgrade_merge () { # Ask the user to handle any files which didn't merge. while read F; do # If the installed file differs from the version in - # the old release only due to $FreeBSD$ tag expansion + # the old release only due to RCS tag expansion # then just use the version in the new release. if samef merge/old/${F} merge/${OLDRELNUM}/${F}; then cp merge/${RELNUM}/${F} merge/new/${F} @@ -2382,14 +2382,14 @@ manually... # of merging files. while read F; do # Skip files which haven't changed except possibly - # in their $FreeBSD$ tags. + # in their RCS tags. if [ -f merge/old/${F} ] && [ -f merge/new/${F} ] && samef merge/old/${F} merge/new/${F}; then continue fi # Skip files where the installed file differs from - # the old file only due to $FreeBSD$ tags. + # the old file only due to RCS tags. if [ -f merge/old/${F} ] && [ -f merge/${OLDRELNUM}/${F} ] && samef merge/old/${F} merge/${OLDRELNUM}/${F}; then ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276096 - in head/sys: arm/conf conf fs/nfs fs/nfsclient modules modules/dtrace modules/dtrace/dtnfsclient modules/dtrace/dtraceall modules/nfs_common modules/nfsclient modules/nfsserve...
Author: rmacklem Date: Tue Dec 23 00:47:46 2014 New Revision: 276096 URL: https://svnweb.freebsd.org/changeset/base/276096 Log: Remove the old NFS client and server from head, which means that the NFSCLIENT and NFSSERVER kernel options will no longer work. This commit only removes the kernel components. Removal of unused code in the user utilities will be done later. This commit does not include an addition to UPDATING, but that will be committed in a few minutes. Discussed on: freebsd-fs Deleted: head/sys/modules/dtrace/dtnfsclient/ head/sys/modules/nfs_common/ head/sys/modules/nfsclient/ head/sys/modules/nfsserver/ head/sys/nfs/nfs_common.c head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_kdtrace.c head/sys/nfsclient/nfs_krpc.c head/sys/nfsclient/nfs_nfsiod.c head/sys/nfsclient/nfs_node.c head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsserver/nfs_fha_old.c head/sys/nfsserver/nfs_serv.c head/sys/nfsserver/nfs_srvkrpc.c head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/modules/Makefile head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtraceall/dtraceall.c head/sys/nfs/bootp_subr.c head/sys/sys/param.h Modified: head/sys/arm/conf/DOCKSTAR == --- head/sys/arm/conf/DOCKSTAR Mon Dec 22 23:03:18 2014(r276095) +++ head/sys/arm/conf/DOCKSTAR Tue Dec 23 00:47:46 2014(r276096) @@ -154,7 +154,7 @@ options INVARIANT_SUPPORT # Extra sanit # Enable these options for nfs root configured via BOOTP. optionsNFSCL # Network Filesystem Client optionsNFSLOCKD# Network Lock Manager -#options NFS_ROOT# NFS usable as /, requires NFSCLIENT +#options NFS_ROOT# NFS usable as /, requires NFSCL #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 Modified: head/sys/arm/conf/DREAMPLUG-1001 == --- head/sys/arm/conf/DREAMPLUG-1001Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/arm/conf/DREAMPLUG-1001Tue Dec 23 00:47:46 2014 (r276096) @@ -162,7 +162,7 @@ options INVARIANT_SUPPORT # Extra sanit # Enable these options for nfs root configured via BOOTP. optionsNFSCL # Network Filesystem Client optionsNFSLOCKD# Network Lock Manager -#options NFS_ROOT# NFS usable as /, requires NFSCLIENT +#options NFS_ROOT# NFS usable as /, requires NFSCL #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 Modified: head/sys/arm/conf/EA3250 == --- head/sys/arm/conf/EA3250Mon Dec 22 23:03:18 2014(r276095) +++ head/sys/arm/conf/EA3250Tue Dec 23 00:47:46 2014(r276096) @@ -19,7 +19,7 @@ options INET6 # IPv6 communications p optionsFFS # Berkeley Fast Filesystem optionsNFSCL # Network Filesystem Client optionsNFSLOCKD# Network Lock Manager -optionsNFS_ROOT# NFS usable as /, requires NFSCLIENT +optionsNFS_ROOT# NFS usable as /, requires NFSCL optionsGEOM_PART_BSD # BSD partition scheme optionsGEOM_PART_MBR # MBR partition scheme optionsTMPFS # Efficient memory filesystem Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Dec 22 23:03:18 2014(r276095) +++ head/sys/conf/NOTES Tue Dec 23 00:47:46 2014(r276096) @@ -1019,7 +1019,7 @@ options DUMMYNET # One of these is mandatory: optionsFFS #Fast filesystem -optionsNFSCLIENT #Network File System client +optionsNFSCL #Network File System client # The rest are optional: optionsAUTOFS #Automounter filesystem @@ -1027,7 +1027,6 @@ options CD9660 #ISO 9660 filesystem optionsFDESCFS #File descriptor filesystem optionsFUSE#FUSE support module optionsMSDOSFS #MS DOS File System (FAT, FAT32) -optionsNFSSERVER #Network File System server optionsNFSLOCKD#Network Lock Manager options
svn commit: r276097 - head
Author: rmacklem Date: Tue Dec 23 01:32:18 2014 New Revision: 276097 URL: https://svnweb.freebsd.org/changeset/base/276097 Log: Add an UPDATING entry for r276096, which removed the kernel sources for the old NFS client and server. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Tue Dec 23 00:47:46 2014(r276096) +++ head/UPDATING Tue Dec 23 01:32:18 2014(r276097) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20141222: + The old NFS client and server (kernel options NFSCLIENT, NFSSERVER) + kernel sources have been removed. The .h files remain, since some + utilities include them. This will need to be fixed later. + If "mount -t oldnfs ..." is attempted, it will fail. + If the "-o" option on mountd(8), nfsd(8) or nfsstat(1) is used, + the utilities will report errors. + 20141121: The handling of LOCAL_LIB_DIRS has been altered to skip addition of directories to top level SUBDIR variable when their parent ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276098 - in head/sys/amd64: include vmm vmm/amd vmm/intel
Author: neel Date: Tue Dec 23 02:14:49 2014 New Revision: 276098 URL: https://svnweb.freebsd.org/changeset/base/276098 Log: Allow ktr(4) tracing of all guest exceptions via the tunable "hw.vmm.trace_guest_exceptions". To enable this feature set the tunable to "1" before loading vmm.ko. Tracing the guest exceptions can be useful when debugging guest triple faults. Note that there is a performance impact when exception tracing is enabled since every exception will now trigger a VM-exit. Also, handle machine check exceptions that happen during guest execution by vectoring to the host's machine check handler via "int $18". Discussed with: grehan MFC after:2 weeks Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/vmcs.c head/sys/amd64/vmm/intel/vmcs.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/include/vmm.h == --- head/sys/amd64/include/vmm.hTue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/include/vmm.hTue Dec 23 02:14:49 2014 (r276098) @@ -358,6 +358,8 @@ void vm_copyin(struct vm *vm, int vcpuid void *kaddr, size_t len); void vm_copyout(struct vm *vm, int vcpuid, const void *kaddr, struct vm_copyinfo *copyinfo, size_t len); + +int vcpu_trace_exceptions(struct vm *vm, int vcpuid); #endif /* KERNEL */ #defineVM_MAXCPU 16 /* maximum virtual cpus */ Modified: head/sys/amd64/vmm/amd/svm.c == --- head/sys/amd64/vmm/amd/svm.cTue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/vmm/amd/svm.cTue Dec 23 02:14:49 2014 (r276098) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "vmm_lapic.h" @@ -429,8 +430,24 @@ vmcb_init(struct svm_softc *sc, int vcpu svm_enable_intercept(sc, vcpu, VMCB_CR_INTCPT, mask); } - /* Intercept Machine Check exceptions. */ - svm_enable_intercept(sc, vcpu, VMCB_EXC_INTCPT, BIT(IDT_MC)); + + /* +* Intercept everything when tracing guest exceptions otherwise +* just intercept machine check exception. +*/ + if (vcpu_trace_exceptions(sc->vm, vcpu)) { + for (n = 0; n < 32; n++) { + /* +* Skip unimplemented vectors in the exception bitmap. +*/ + if (n == 2 || n == 9) { + continue; + } + svm_enable_intercept(sc, vcpu, VMCB_EXC_INTCPT, BIT(n)); + } + } else { + svm_enable_intercept(sc, vcpu, VMCB_EXC_INTCPT, BIT(IDT_MC)); + } /* Intercept various events (for e.g. I/O, MSR and CPUID accesses) */ svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_IO); @@ -1176,9 +1193,10 @@ svm_vmexit(struct svm_softc *svm_sc, int struct vmcb_state *state; struct vmcb_ctrl *ctrl; struct svm_regctx *ctx; + struct vm_exception exception; uint64_t code, info1, info2, val; uint32_t eax, ecx, edx; - int handled; + int error, errcode_valid, handled, idtvec, reflect; bool retu; ctx = svm_get_guest_regctx(svm_sc, vcpu); @@ -1237,8 +1255,78 @@ svm_vmexit(struct svm_softc *svm_sc, int case VMCB_EXIT_NMI: /* external NMI */ handled = 1; break; - case VMCB_EXIT_MC: /* machine check */ + case 0x40 ... 0x5F: vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_EXCEPTION, 1); + reflect = 1; + idtvec = code - 0x40; + switch (idtvec) { + case IDT_MC: + /* +* Call the machine check handler by hand. Also don't +* reflect the machine check back into the guest. +*/ + reflect = 0; + VCPU_CTR0(svm_sc->vm, vcpu, "Vectoring to MCE handler"); + __asm __volatile("int $18"); + break; + case IDT_PF: + error = svm_setreg(svm_sc, vcpu, VM_REG_GUEST_CR2, + info2); + KASSERT(error == 0, ("%s: error %d updating cr2", + __func__, error)); + /* fallthru */ + case IDT_NP: + case IDT_SS: + case IDT_GP: + case IDT_AC: + case IDT_TS: + errcode_valid = 1; + break; + + case IDT_DF: + errcode_valid = 1; + info
Re: svn commit: r276008 - in head/sys: kern sys
On Dec 22, 2014, at 11:17, John Baldwin wrote: > > On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: >> On Dec 22, 2014, at 06:40, John Baldwin wrote: >>> Is there something specific to core dumps that makes vn_fullpath() more >>> useful to have working before a process tries to open the core? (As >>> compared to other newly-created files) >> >> Yes: the ability to provide the full path to userland when a core dump file > is generated. > > Can you be more specific? Are we printing the path on the console after > destroying the generated path? Is it being written into a note in the core > itself (but only having the vnode of the core file available and not the > generated path)? No. I have some code that calls devctl_notify() when a core dump is generated which is useful for running an automated debugging session. We use this at work and I'll see if I can upstream it. What Konstantin fixed was the generation of the cache entry in the corefile_open() routine. This lets me call vn_fullpath() after vn_close() with a high probability that it will work whereas, in the past, it was never in the cache, so vn_fullpath() would always fail. -- Rui Paulo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276101 - head/sys/boot/fdt/dts/arm
Author: rpaulo Date: Tue Dec 23 03:00:18 2014 New Revision: 276101 URL: https://svnweb.freebsd.org/changeset/base/276101 Log: Temporarily disable the cpus directive until I figure out what's wrong. Modified: head/sys/boot/fdt/dts/arm/rpi.dts Modified: head/sys/boot/fdt/dts/arm/rpi.dts == --- head/sys/boot/fdt/dts/arm/rpi.dts Tue Dec 23 02:47:14 2014 (r276100) +++ head/sys/boot/fdt/dts/arm/rpi.dts Tue Dec 23 03:00:18 2014 (r276101) @@ -35,6 +35,7 @@ memreserve = <0x0800 0x0800>; /* Set by VideoCore */ + /* cpus { #address-cells = <1>; #size-cells = <0>; @@ -45,6 +46,7 @@ clock-frequency = <7>; /* 700MHz */ }; }; + */ memory { device_type = "memory"; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r276106 - head/sys/dev/mmc
Author: imp Date: Tue Dec 23 05:50:53 2014 New Revision: 276106 URL: https://svnweb.freebsd.org/changeset/base/276106 Log: Always select the card before we do the 4.x specific stuff and deselect it after setting the block size. This is a similar bug that was fixed elsewhere, but not here. This makes sure that we leave the card deselected at the end of the loop, and we don't send any commands to the card without it selected. Reviewed by: ian@ Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c == --- head/sys/dev/mmc/mmc.c Tue Dec 23 05:37:09 2014(r276105) +++ head/sys/dev/mmc/mmc.c Tue Dec 23 05:50:53 2014(r276106) @@ -1446,10 +1446,10 @@ mmc_discover_cards(struct mmc_softc *sc) break; } + mmc_select_card(sc, ivar->rca); + /* Only MMC >= 4.x cards support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { - /* Card must be selected to fetch EXT_CSD. */ - mmc_select_card(sc, ivar->rca); mmc_send_ext_csd(sc, ivar->raw_ext_csd); /* Handle extended capacity from EXT_CSD */ sec_count = ivar->raw_ext_csd[EXT_CSD_SEC_CNT] + @@ -1479,7 +1479,6 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_ERASE_GRP_DEF, 1); } - mmc_select_card(sc, 0); } else { ivar->bus_width = bus_width_1; ivar->timing = bus_timing_normal; @@ -1506,6 +1505,7 @@ mmc_discover_cards(struct mmc_softc *sc) child = device_add_child(sc->dev, NULL, -1); device_set_ivars(child, ivar); } + mmc_select_card(sc, 0); } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r276008 - in head/sys: kern sys
On 23/12/2014 04:39, Rui Paulo wrote: > On Dec 22, 2014, at 11:17, John Baldwin wrote: >> >> On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: >>> On Dec 22, 2014, at 06:40, John Baldwin wrote: Is there something specific to core dumps that makes vn_fullpath() more useful to have working before a process tries to open the core? (As compared to other newly-created files) >>> >>> Yes: the ability to provide the full path to userland when a core dump file >> is generated. >> >> Can you be more specific? Are we printing the path on the console after >> destroying the generated path? Is it being written into a note in the core >> itself (but only having the vnode of the core file available and not the >> generated path)? > > No. I have some code that calls devctl_notify() when a core dump is > generated which is useful for running an automated debugging session. We use > this at work and I'll see if I can upstream it. What Konstantin fixed was > the generation of the cache entry in the corefile_open() routine. This lets > me call vn_fullpath() after vn_close() with a high probability that it will > work whereas, in the past, it was never in the cache, so vn_fullpath() would > always fail. What is not entirely clear to me is why we need to recover the path from the vnode if we, obviously, have the path even before we have the vnode. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r276008 - in head/sys: kern sys
On Dec 22, 2014, at 23:03, Andriy Gapon wrote: > > On 23/12/2014 04:39, Rui Paulo wrote: >> On Dec 22, 2014, at 11:17, John Baldwin wrote: >>> >>> On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: On Dec 22, 2014, at 06:40, John Baldwin wrote: > Is there something specific to core dumps that makes vn_fullpath() more > useful to have working before a process tries to open the core? (As > compared to other newly-created files) Yes: the ability to provide the full path to userland when a core dump file >>> is generated. >>> >>> Can you be more specific? Are we printing the path on the console after >>> destroying the generated path? Is it being written into a note in the core >>> itself (but only having the vnode of the core file available and not the >>> generated path)? >> >> No. I have some code that calls devctl_notify() when a core dump is >> generated which is useful for running an automated debugging session. We >> use this at work and I'll see if I can upstream it. What Konstantin fixed >> was the generation of the cache entry in the corefile_open() routine. This >> lets me call vn_fullpath() after vn_close() with a high probability that it >> will work whereas, in the past, it was never in the cache, so vn_fullpath() >> would always fail. > > What is not entirely clear to me is why we need to recover the path from the > vnode if we, obviously, have the path even before we have the vnode. Using the default setting for core files, it's based on the CWD of the process. If you're using a different kern.corefile setting, it's different. You will also need to account for the %N format string (check the code for indexpos). Given that this is far from being a hot path, it's much easier to just do a vn_fullpath() on the vnode than to deal with all the other details. -- Rui Paulo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"