svn commit: r339516 - head/sys/cddl/dev/dtrace/powerpc
Author: jhibbits Date: Sun Oct 21 02:08:57 2018 New Revision: 339516 URL: https://svnweb.freebsd.org/changeset/base/339516 Log: powerpc/dtrace: Use explicit bit numbers to mask out PSL_EE There seems to be a race in CI, such that dtrace_asm.S might be assembled before the genassym is completed. This causes a build failure when PSL_EE doesn't exist, and is read as 0. Get around this by explicitly specifying the bits in the mask instead. Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S == --- head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Sun Oct 21 00:48:38 2018(r339515) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Sun Oct 21 02:08:57 2018(r339516) @@ -72,7 +72,7 @@ ASENTRY_NOPROF(dtrace_interrupt_disable) rldicl %r0,%r3,48,1 rotldi %r0,%r0,16 #else - rlwinm %r0,%r3,0,~PSL_EE /* Clear EE flag */ + rlwinm %r0,%r3,0,17,15 /* Clear EE flag */ #endif mtmsr %r0 blr ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys
Glen Barber writes: > Modified: head/lib/clang/llvm.build.mk > == > --- head/lib/clang/llvm.build.mk Fri Oct 19 00:24:23 2018 > (r339435) > +++ head/lib/clang/llvm.build.mk Fri Oct 19 00:37:47 2018 > (r339436) > @@ -17,7 +17,7 @@ CFLAGS+=-I${LLVM_SRCS}/include > CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL > CFLAGS+= -D__STDC_LIMIT_MACROS > CFLAGS+= -D__STDC_CONSTANT_MACROS > -#CFLAGS+=-DNDEBUG > +CFLAGS+= -DNDEBUG Would Clang still hit asserts instead of crashing with cryptic messages? ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339520 - head/sys/powerpc/aim
Author: jhibbits Date: Sun Oct 21 02:28:04 2018 New Revision: 339520 URL: https://svnweb.freebsd.org/changeset/base/339520 Log: powerpc64/pmap: Correct the logic for minidump KVA chunk r279252 inverted the logic in moea64_scan_init, such that instead of terminating when reaching a dead page, it terminates when reaching a live page, ostensibly preserving exactly one page of KVA. Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cSun Oct 21 02:25:56 2018 (r339519) +++ head/sys/powerpc/aim/mmu_oea64.cSun Oct 21 02:28:04 2018 (r339520) @@ -2882,7 +2882,7 @@ moea64_scan_init(mmu_t mmu) if (va == kmi.buffer_sva) break; pvo = moea64_pvo_find_va(kernel_pmap, va & ~ADDR_POFF); - if (pvo != NULL && !(pvo->pvo_vaddr & PVO_DEAD)) + if (pvo == NULL || (pvo->pvo_vaddr & PVO_DEAD)) break; va += PAGE_SIZE; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339522 - head/sys/powerpc/mpc85xx
Author: jhibbits Date: Sun Oct 21 02:39:13 2018 New Revision: 339522 URL: https://svnweb.freebsd.org/changeset/base/339522 Log: powerpc/mpc85xx: Make Freescale PCI bridge driver a subclass of ofw_pcib_pci This driver was already 99% identical to the ofw_pcib_pci driver, except for the attachment. Since ofw_pcib_pci is already a subclass of pcib, this creates a private declaration of that class, to use for the base class for this driver. At some point in the future, ofw_pcib_pci_driver should probably be exported to a header, so we're not tracking the softc struct contents, but for now, since there's only this one other driver, it's not a pressing issue. Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c == --- head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Sun Oct 21 02:30:34 2018 (r339521) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Sun Oct 21 02:39:13 2018 (r339522) @@ -63,11 +63,16 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" +DECLARE_CLASS(ofw_pcib_pci_driver); + struct fsl_pcib_softc { /* * This is here so that we can use pci bridge methods, too - the * generic routines only need the dev, secbus and subbus members * filled. + * + * XXX: This should be extracted from ofw_pcib_pci.c, and shared in a + * header. */ struct pcib_softc ops_pcib_sc; phandle_t ops_node; @@ -90,89 +95,12 @@ fsl_pcib_rc_probe(device_t dev) return (BUS_PROBE_DEFAULT); } -static int -fsl_pcib_rc_attach(device_t dev) -{ - struct fsl_pcib_softc *sc; - - sc = device_get_softc(dev); - sc->ops_pcib_sc.dev = dev; - sc->ops_node = ofw_bus_get_node(dev); - - ofw_bus_setup_iinfo(sc->ops_node, &sc->ops_iinfo, - sizeof(cell_t)); - - pcib_attach_common(dev); - return (pcib_attach_child(dev)); -} - -static phandle_t -fsl_pcib_rc_get_node(device_t bridge, device_t dev) -{ - /* We have only one child, the PCI bus, so pass it our node */ - - return (ofw_bus_get_node(bridge)); -} - -static int -fsl_pcib_rc_route_interrupt(device_t bridge, device_t dev, int intpin) -{ - struct fsl_pcib_softc *sc; - struct ofw_bus_iinfo *ii; - struct ofw_pci_register reg; - cell_t pintr, mintr[2]; - int intrcells; - phandle_t iparent; - - sc = device_get_softc(bridge); - ii = &sc->ops_iinfo; - if (ii->opi_imapsz > 0) { - pintr = intpin; - - /* Fabricate imap information if this isn't an OFW device */ - bzero(®, sizeof(reg)); - reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) | - (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | - (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); - - intrcells = ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, ®, - sizeof(reg), &pintr, sizeof(pintr), mintr, sizeof(mintr), - &iparent); - if (intrcells) { - /* -* If we've found a mapping, return it and don't map -* it again on higher levels - that causes problems -* in some cases, and never seems to be required. -*/ - mintr[0] = ofw_bus_map_intr(dev, iparent, intrcells, - mintr); - return (mintr[0]); - } - } else if (intpin >= 1 && intpin <= 4) { - /* -* When an interrupt map is missing, we need to do the -* standard PCI swizzle and continue mapping at the parent. -*/ - return (pcib_route_interrupt(bridge, dev, intpin)); - } - return (PCIB_ROUTE_INTERRUPT(device_get_parent(device_get_parent( - bridge)), bridge, intpin)); -} - static device_method_t fsl_pcib_rc_methods[] = { DEVMETHOD(device_probe, fsl_pcib_rc_probe), - DEVMETHOD(device_attach,fsl_pcib_rc_attach), - - /* pcib interface */ - DEVMETHOD(pcib_route_interrupt, fsl_pcib_rc_route_interrupt), - DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), - - /* ofw_bus interface */ - DEVMETHOD(ofw_bus_get_node, fsl_pcib_rc_get_node), DEVMETHOD_END }; static devclass_t fsl_pcib_rc_devclass; DEFINE_CLASS_1(pcib, fsl_pcib_rc_driver, fsl_pcib_rc_methods, -sizeof(struct fsl_pcib_softc), pcib_driver); +sizeof(struct fsl_pcib_softc), ofw_pcib_pci_driver); DRIVER_MODULE(rcpcib, pci, fsl_pcib_rc_driver, fsl_pcib_rc_devclass, 0, 0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/s
svn commit: r339517 - head/sys/arm/arm
Author: jchandra Date: Sun Oct 21 02:12:26 2018 New Revision: 339517 URL: https://svnweb.freebsd.org/changeset/base/339517 Log: arm generic_timer: fix armv8 timer desc In the FDT based probe, check for "arm,armv8-timer" before "arm,armv7-timer". This gets the description right when the timer node has both entries in compatible list. Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cSun Oct 21 02:08:57 2018 (r339516) +++ head/sys/arm/arm/generic_timer.cSun Oct 21 02:12:26 2018 (r339517) @@ -323,11 +323,11 @@ arm_tmr_fdt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "arm,armv7-timer")) { - device_set_desc(dev, "ARMv7 Generic Timer"); - return (BUS_PROBE_DEFAULT); - } else if (ofw_bus_is_compatible(dev, "arm,armv8-timer")) { + if (ofw_bus_is_compatible(dev, "arm,armv8-timer")) { device_set_desc(dev, "ARMv8 Generic Timer"); + return (BUS_PROBE_DEFAULT); + } else if (ofw_bus_is_compatible(dev, "arm,armv7-timer")) { + device_set_desc(dev, "ARMv7 Generic Timer"); return (BUS_PROBE_DEFAULT); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339519 - head/sys/powerpc/pseries
Author: jhibbits Date: Sun Oct 21 02:25:56 2018 New Revision: 339519 URL: https://svnweb.freebsd.org/changeset/base/339519 Log: powerpc64/xics: Fix comment typo Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c == --- head/sys/powerpc/pseries/xics.c Sun Oct 21 02:24:37 2018 (r339518) +++ head/sys/powerpc/pseries/xics.c Sun Oct 21 02:25:56 2018 (r339519) @@ -143,7 +143,7 @@ static driver_t xics_driver = { /* We can only pass physical addresses into OPAL. Kernel stacks are in the KVA, * not in the direct map, so we need to somehow extract the physical address. * However, pmap_kextract() takes locks, which is forbidden in a critical region - * (which PMAP_DISPATCH() operates in). The kernel is mapped into the Direct + * (which PIC_DISPATCH() operates in). The kernel is mapped into the Direct * Map (0xc000), and the CPU implicitly drops the top two bits when doing * real address by nature that the bus width is smaller than 64-bits. Placing * cpu_xirr into the DMAP lets us take advantage of this and avoids the ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339521 - head/sys/powerpc/powernv
Author: jhibbits Date: Sun Oct 21 02:30:34 2018 New Revision: 339521 URL: https://svnweb.freebsd.org/changeset/base/339521 Log: powerpc64/powernv: Add pnpinfo strings to opal device children This makes it easier to see what's left unattached as new drivers are written, and to see what drivers get attached to what nodes. Modified: head/sys/powerpc/powernv/opal_dev.c Modified: head/sys/powerpc/powernv/opal_dev.c == --- head/sys/powerpc/powernv/opal_dev.c Sun Oct 21 02:28:04 2018 (r339520) +++ head/sys/powerpc/powernv/opal_dev.c Sun Oct 21 02:30:34 2018 (r339521) @@ -70,6 +70,9 @@ static device_method_t opaldev_methods[] = { DEVMETHOD(clock_gettime,opal_gettime), DEVMETHOD(clock_settime,opal_settime), + /* Bus interface */ + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, opaldev_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339527 - head/sys/dev/usb
Author: phk Date: Sun Oct 21 07:32:35 2018 New Revision: 339527 URL: https://svnweb.freebsd.org/changeset/base/339527 Log: Add Lenovo USB-C and TB3 docks Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSun Oct 21 07:30:26 2018(r339526) +++ head/sys/dev/usb/usbdevsSun Oct 21 07:32:35 2018(r339527) @@ -2762,6 +2762,8 @@ product LEADTEK 9531 0x2101 9531 GPS product LENOVO GIGALAN 0x304b USB 3.0 Ethernet product LENOVO ETHERNET0x7203 USB 2.0 Ethernet product LENOVO RTL8153 0x7205 USB 3.0 Ethernet +product LENOVO TBT3LAN 0x3069 LAN port in Thinkpad TB3 dock +product LENOVO USBCLAN 0x3062 LAN port in Thinkpad USB-C dock /* Lexar products */ product LEXAR JUMPSHOT 0x0001 jumpSHOT CompactFlash Reader ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339523 - in head/sys: conf dev/amdgpio modules modules/amdgpio
Author: gonzo Date: Sun Oct 21 04:52:37 2018 New Revision: 339523 URL: https://svnweb.freebsd.org/changeset/base/339523 Log: Add amdgpio, driver for GPIO controller on AMD-based x86_64 platforms Submitted by: Rajesh Kumar Differential Revision:https://reviews.freebsd.org/D16865 Added: head/sys/dev/amdgpio/ head/sys/dev/amdgpio/amdgpio.c (contents, props changed) head/sys/dev/amdgpio/amdgpio.h (contents, props changed) head/sys/modules/amdgpio/ head/sys/modules/amdgpio/Makefile (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/modules/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Sun Oct 21 02:39:13 2018(r339522) +++ head/sys/conf/files.amd64 Sun Oct 21 04:52:37 2018(r339523) @@ -208,6 +208,7 @@ dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.coptionalagp dev/agp/agp_i810.c optionalagp dev/agp/agp_via.c optionalagp +dev/amdgpio/amdgpio.c optionalamdgpio dev/amdsbwd/amdsbwd.c optionalamdsbwd dev/amdsmn/amdsmn.coptionalamdsmn | amdtemp dev/amdtemp/amdtemp.c optionalamdtemp Added: head/sys/dev/amdgpio/amdgpio.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/amdgpio/amdgpio.c Sun Oct 21 04:52:37 2018 (r339523) @@ -0,0 +1,468 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Advanced Micro Devices + * 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. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_acpi.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "gpio_if.h" +#include "amdgpio.h" + +static struct resource_spec amdgpio_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static inline uint32_t +amdgpio_read_4(struct amdgpio_softc *sc, bus_size_t off) +{ + return (bus_read_4(sc->sc_res[0], off)); +} + +static inline void +amdgpio_write_4(struct amdgpio_softc *sc, bus_size_t off, + uint32_t val) +{ + bus_write_4(sc->sc_res[0], off, val); +} + +static bool +amdgpio_is_pin_output(struct amdgpio_softc *sc, uint32_t pin) +{ + uint32_t reg, val; + bool ret; + + /* Get the current pin state */ + AMDGPIO_LOCK(sc); + + reg = AMDGPIO_PIN_REGISTER(pin); + val = amdgpio_read_4(sc, reg); + + if (val & BIT(OUTPUT_ENABLE_OFF)) + ret = true; + else + ret = false; + + AMDGPIO_UNLOCK(sc); + + return (ret); +} + +static device_t +amdgpio_get_bus(device_t dev) +{ + struct amdgpio_softc *sc; + + sc = device_get_softc(dev); + + dprintf("busdev %p\n", sc->sc_busdev); + return (sc->sc_busdev); +} + +static int +amdgpio_pin_max(device_t dev, int *maxpin) +{ + struct amdgpio_softc *sc; + + sc = device_get_softc(dev); + + *maxpin = sc->sc_npins - 1; + dprintf("npins %d maxpin %d\n", sc->sc_npins, *maxpin); + + return (0); +} + +static bool +amdgpio_valid_pin(struct amdgpio_softc *sc, int pin) +{ + dprintf("pin %d\n", pin); + if (sc->sc_res[0] == NULL) + return (false); + + if ((sc->sc_gpio_pins[pin].gp_pin == pin) && + (sc->sc_gpio_pins[pin].gp_caps != 0)) +
svn commit: r339529 - head/sys/teken
Author: phk Date: Sun Oct 21 08:29:36 2018 New Revision: 339529 URL: https://svnweb.freebsd.org/changeset/base/339529 Log: Implement ECMA-48 "REP", some Linuxen have started emitting them recently. Approved by: ed Modified: head/sys/teken/gensequences head/sys/teken/sequences head/sys/teken/teken.h head/sys/teken/teken_subr.h Modified: head/sys/teken/gensequences == --- head/sys/teken/gensequences Sun Oct 21 07:56:58 2018(r339528) +++ head/sys/teken/gensequences Sun Oct 21 08:29:36 2018(r339529) @@ -158,6 +158,7 @@ for (p in l_prefix_name) { if (l_prefix_name[p] != "teken_state_init") { print ""; + print "\tt->t_last = 0;"; print "\tteken_state_switch(t, teken_state_init);"; } print "}"; Modified: head/sys/teken/sequences == --- head/sys/teken/sequencesSun Oct 21 07:56:58 2018(r339528) +++ head/sys/teken/sequencesSun Oct 21 08:29:36 2018(r339529) @@ -114,3 +114,6 @@ C25VTSW Cons25 switch virtual terminal ^[ [ z r # VT52 compatibility #DECID VT52 DECID ^[ Z + +# ECMA-48 +REPRepeat last graphic char^[ [ b n Modified: head/sys/teken/teken.h == --- head/sys/teken/teken.h Sun Oct 21 07:56:58 2018(r339528) +++ head/sys/teken/teken.h Sun Oct 21 08:29:36 2018(r339529) @@ -157,6 +157,7 @@ struct __teken { unsigned int t_utf8_left; teken_char_t t_utf8_partial; + teken_char_t t_last; unsigned int t_curscs; teken_scs_t *t_saved_curscs; Modified: head/sys/teken/teken_subr.h == --- head/sys/teken/teken_subr.h Sun Oct 21 07:56:58 2018(r339528) +++ head/sys/teken/teken_subr.h Sun Oct 21 08:29:36 2018(r339529) @@ -796,10 +796,11 @@ teken_subr_primary_device_attributes(const teken_t *t, } static void -teken_subr_do_putchar(const teken_t *t, const teken_pos_t *tp, teken_char_t c, +teken_subr_do_putchar(teken_t *t, const teken_pos_t *tp, teken_char_t c, int width) { + t->t_last = c; if (t->t_stateflags & TS_INSERT && tp->tp_col < t->t_winsize.tp_col - width) { teken_rect_t ctr; @@ -1332,3 +1333,12 @@ teken_subr_vertical_position_absolute(teken_t *t, unsi t->t_stateflags &= ~TS_WRAPPED; teken_funcs_cursor(t); } + +static void +teken_subr_repeat_last_graphic_char(teken_t *t, unsigned int rpts) +{ + + for (; t->t_last != 0 && rpts > 0; rpts--) + teken_subr_regular_character(t, t->t_last); +} + ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339481 - head/sys/dev/random
On Sat, 20 Oct 2018, Conrad Meyer wrote: ... Log: Fortuna: trivial static variable cleanup Remove unnecessary use of function-local static variable. 32 bytes is small enough to live on the stack. ... Modified: head/sys/dev/random/fortuna.c == --- head/sys/dev/random/fortuna.c Sat Oct 20 20:12:57 2018 (r339480) +++ head/sys/dev/random/fortuna.c Sat Oct 20 20:15:06 2018 (r339481) @@ -333,7 +333,7 @@ random_fortuna_genblocks(uint8_t *buf, u_int blockcoun static __inline void random_fortuna_genrandom(uint8_t *buf, u_int bytecount) { - static uint8_t temp[RANDOM_BLOCKSIZE*(RANDOM_KEYS_PER_BLOCK)]; + uint8_t temp[RANDOM_BLOCKSIZE * RANDOM_KEYS_PER_BLOCK]; u_int blockcount; RANDOM_RESEED_ASSERT_LOCK_OWNED(); This now uses explicit_bzero() on the stack variable (as before, just before returning from the function). This is neither necessary nor sufficient for security. Even with the static variable, it was a reasonable optimization to keep a copy of the whole variable on the stack, or better in registers which might be spilled to the stack (this is possible because the variable is small). So to be really secure, the function must clear all stack and registers used by the function. In practice, something probably clobbers the stack and registers before any untrusted thread can read them, and the explicit_bzero() is not really needed. However, this function is explicitly bogusly inlined, so the stack and registers usually don't get clobbered immediately after the function returns. The inlining is bogus since this function is very large. The function call overhead for just the explicit_bzero() in it is as large as the possible savings from inlining it. clang likes to bogusly inline almost all static functions. If this one were not too large to inline, then clang would inline it even if it is not declared __inline, so declaring it has no good effect if the compiler is clang. Auto-inlining may open security holes by extending the lifetime of stack variables. That is another reason to not do it. I use gcc -fno-inline -fno-inline-functions-called-once to kill all auto-inlining. clang inlines even functions called more than once, and doesn't support these flags. Where was the security hole with the old static variable? I think it was mostly with the long lifetime of the variable. The global memory is actually more secure against accidental leaks by copying it out than stack memory. But even local variables have long lifetimes if you can manage to suspend the system while a critical local variable is active. I think rendezvous stuff prevents this particalar variable remaining active across suspend. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339524 - in head: share/man/man5 tools/build/options
Author: imp Date: Sun Oct 21 06:33:35 2018 New Revision: 339524 URL: https://svnweb.freebsd.org/changeset/base/339524 Log: Add missing options. WITHOUT_LOADER_LUA is only needed since we turned it off by default on powerpc and sparc64 in r338203. Same with WITHOUT_LOADER_GEIL. WITH_NVME, WITHOUT_NVME, WITH_LOADER_FORCE_LE have been needed since they were added. Added: head/tools/build/options/WITHOUT_LOADER_LUA (contents, props changed) head/tools/build/options/WITHOUT_NVME (contents, props changed) head/tools/build/options/WITH_LOADER_FORCE_LE (contents, props changed) head/tools/build/options/WITH_LOADER_GELI (contents, props changed) head/tools/build/options/WITH_NVME (contents, props changed) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Sun Oct 21 04:52:37 2018 (r339523) +++ head/share/man/man5/src.conf.5 Sun Oct 21 06:33:35 2018 (r339524) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd October 20, 2018 +.Dd October 21, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1190,11 +1190,24 @@ amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarc .It Va WITH_LOADER_FIREWIRE Enable firewire support in /boot/loader on x86. This option is a nop on all other platforms. +.It Va WITH_LOADER_FORCE_LE +Set to force the powerpc boot loader to launch the kernel in little +endian mode. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. .Pp This is a default setting on powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +.It Va WITH_LOADER_GELI +Set to build GELI bootloader support. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and riscv/riscv64. +.It Va WITHOUT_LOADER_LUA +Set to not build LUA bindings for the boot loader. +.Pp +This is a default setting on +powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LOADER_LUA Set to build LUA bindings for the boot loader. .Pp @@ -1422,6 +1435,17 @@ will not be built either if this option is set. Set to not build .Xr ntpd 8 and related programs. +.It Va WITHOUT_NVME +Set to not build nvme related tools and kernel modules. +.Pp +This is a default setting on +arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. +.It Va WITH_NVME +Set to build nvme related tools and kernel modules. + +.Pp +This is a default setting on +amd64/amd64, i386/i386 and powerpc/powerpc64. .It Va WITH_OFED Set to build the .Dq "OpenFabrics Enterprise Distribution" Added: head/tools/build/options/WITHOUT_LOADER_LUA == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LOADER_LUA Sun Oct 21 06:33:35 2018 (r339524) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build LUA bindings for the boot loader. Added: head/tools/build/options/WITHOUT_NVME == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_NVME Sun Oct 21 06:33:35 2018 (r339524) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build nvme related tools and kernel modules. Added: head/tools/build/options/WITH_LOADER_FORCE_LE == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_FORCE_LE Sun Oct 21 06:33:35 2018(r339524) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to force the powerpc boot loader to launch the kernel in little +endian mode. Added: head/tools/build/options/WITH_LOADER_GELI == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_GELI Sun Oct 21 06:33:35 2018 (r339524) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build GELI bootloader support. Added: head/tools/build/options/WITH_NVME == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_NVME Sun Oct 21 06:33:35 2018 (r339524) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build nvme related tools and kernel modules. + __
svn commit: r339525 - head/share/mk
Author: imp Date: Sun Oct 21 06:52:10 2018 New Revision: 339525 URL: https://svnweb.freebsd.org/changeset/base/339525 Log: Use BROKEN_OPTIONS for NVME, HYPERV, CXGBETOOL and MLX5TOOL instead of __DEFAULT_YES/NO. These options simply cannot work where we were using __DEFAULT_NO. The proper thing to do in that case is to use the BROKEN_OPTIONS knob instead. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Sun Oct 21 06:33:35 2018(r339524) +++ head/share/mk/src.opts.mk Sun Oct 21 06:52:10 2018(r339525) @@ -85,6 +85,7 @@ __DEFAULT_YES_OPTIONS = \ CTM \ CUSE \ CXX \ +CXGBETOOL \ DIALOG \ DICT \ DMAGENT \ @@ -111,6 +112,7 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ HAST \ HTML \ +HYPERV \ ICONV \ INET \ INET6 \ @@ -140,12 +142,14 @@ __DEFAULT_YES_OPTIONS = \ MAIL \ MAILWRAPPER \ MAKE \ +MLX5TOOL \ NDIS \ NETCAT \ NETGRAPH \ NLS_CATALOGS \ NS_CACHING \ NTP \ +NVME \ OFED \ OPENSSL \ PAM \ @@ -365,27 +369,20 @@ BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA # profiling won't work on MIPS64 because there is only assembly for o32 BROKEN_OPTIONS+=PROFILE .endif -.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ -${__T} == "powerpc64" || ${__T} == "sparc64" -__DEFAULT_YES_OPTIONS+=CXGBETOOL -__DEFAULT_YES_OPTIONS+=MLX5TOOL -.else -__DEFAULT_NO_OPTIONS+=CXGBETOOL -__DEFAULT_NO_OPTIONS+=MLX5TOOL +.if ${__T} != "aarch64" && ${__T} != "amd64" && ${__T} != "i386" && \ +${__T} != "powerpc64" && ${__T} != "sparc64" +BROKEN_OPTIONS+=CXGBETOOL +BROKEN_OPTIONS+=MLX5TOOL .endif # HyperV is currently x86-only -.if ${__T} == "amd64" || ${__T} == "i386" -__DEFAULT_YES_OPTIONS+=HYPERV -.else -__DEFAULT_NO_OPTIONS+=HYPERV +.if ${__T} != "amd64" && ${__T} != "i386" +BROKEN_OPTIONS+=HYPERV .endif # NVME is only x86 and powerpc64 -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64" -__DEFAULT_YES_OPTIONS+=NVME -.else -__DEFAULT_NO_OPTIONS+=NVME +.if ${__T} != "amd64" && ${__T} != "i386" && ${__T} != "powerpc64" +BROKEN_OPTIONS+=NVME .endif .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339526 - head/lib/libc/sys
Author: phk Date: Sun Oct 21 07:30:26 2018 New Revision: 339526 URL: https://svnweb.freebsd.org/changeset/base/339526 Log: Update example to something people less than 40 years old have heard about. Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 == --- head/lib/libc/sys/recv.2Sun Oct 21 06:52:10 2018(r339525) +++ head/lib/libc/sys/recv.2Sun Oct 21 07:30:26 2018(r339526) @@ -260,13 +260,8 @@ struct cmsghdr { }; .Ed .Pp -As an example, one could use this to learn of changes in the data-stream -in XNS/SPP, or in ISO, to obtain user-connection-request data by requesting -a -.Fn recvmsg -with no data buffer provided immediately after an -.Fn accept -system call. +As an example, the SO_TIMESTAMP socket option returns a reception +timestamp for UDP packets. .Pp With .Dv AF_UNIX ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys
Dimitry Andric writes: > On 21 Oct 2018, at 04:08, Jan Beich wrote: > >> >> Glen Barber writes: >> >>> Modified: head/lib/clang/llvm.build.mk >>> == >>> --- head/lib/clang/llvm.build.mkFri Oct 19 00:24:23 2018 >>> (r339435) >>> +++ head/lib/clang/llvm.build.mkFri Oct 19 00:37:47 2018 >>> (r339436) >>> @@ -17,7 +17,7 @@ CFLAGS+= -I${LLVM_SRCS}/include >>> CFLAGS+=-DLLVM_BUILD_GLOBAL_ISEL >>> CFLAGS+=-D__STDC_LIMIT_MACROS >>> CFLAGS+=-D__STDC_CONSTANT_MACROS >>> -#CFLAGS+= -DNDEBUG >>> +CFLAGS+= -DNDEBUG >> >> Would Clang still hit asserts instead of crashing with cryptic messages? > > In llvm, assertions (and various other internal consistency checks) are > turned off by defining NDEBUG. So indeed, if something in the internal > state goes in an unexpected direction, you could get crashes or other > "interesting" effects. > > That said, the resulting executable(s) should run somewhat faster, and > be somewhat smaller. I think we have always done this for stable > branches and releases. But this commit is for -CURRENT, not -STABLE or -RELEASE. $ svn cat svn://svn.freebsd.org/base/stable/12/lib/clang/llvm.build.mk | fgrep NDEBUG ~ #CFLAGS+= -DNDEBUG $ svn cat svn://svn.freebsd.org/base/releng/11.2/lib/clang/llvm.build.mk | fgrep NDEBUG CFLAGS+=-DNDEBUG > > If users encounter such crashes, it will still write reproduction files > (self-contained .c or .cpp file and a shell script), so those can be > included in bug reports, and run on a copy of clang with assertions. > > -Dimitry ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339531 - head/sys/amd64/amd64
Author: mjg Date: Sun Oct 21 10:46:00 2018 New Revision: 339531 URL: https://svnweb.freebsd.org/changeset/base/339531 Log: amd64: tidy up memset to have rax set earlier for small sizes Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S == --- head/sys/amd64/amd64/support.S Sun Oct 21 09:36:12 2018 (r339530) +++ head/sys/amd64/amd64/support.S Sun Oct 21 10:46:00 2018 (r339531) @@ -452,11 +452,11 @@ END(memcpy_erms) */ .macro MEMSET erms PUSH_FRAME_POINTER - movq%rdi,%r9 + movq%rdi,%rax movq%rdx,%rcx movzbq %sil,%r8 - movabs $0x0101010101010101,%rax - imulq %r8,%rax + movabs $0x0101010101010101,%r10 + imulq %r8,%r10 cmpq$32,%rcx jb 1016f @@ -465,10 +465,10 @@ END(memcpy_erms) ja 1256f 1032: - movq%rax,(%rdi) - movq%rax,8(%rdi) - movq%rax,16(%rdi) - movq%rax,24(%rdi) + movq%r10,(%rdi) + movq%r10,8(%rdi) + movq%r10,16(%rdi) + movq%r10,24(%rdi) leaq32(%rdi),%rdi subq$32,%rcx cmpq$32,%rcx @@ -478,54 +478,56 @@ END(memcpy_erms) 1016: cmpb$16,%cl jl 1008f - movq%rax,(%rdi) - movq%rax,8(%rdi) + movq%r10,(%rdi) + movq%r10,8(%rdi) subb$16,%cl jz 1000f leaq16(%rdi),%rdi 1008: cmpb$8,%cl jl 1004f - movq%rax,(%rdi) + movq%r10,(%rdi) subb$8,%cl jz 1000f leaq8(%rdi),%rdi 1004: cmpb$4,%cl jl 1002f - movl%eax,(%rdi) + movl%r10d,(%rdi) subb$4,%cl jz 1000f leaq4(%rdi),%rdi 1002: cmpb$2,%cl jl 1001f - movw%ax,(%rdi) + movw%r10w,(%rdi) subb$2,%cl jz 1000f leaq2(%rdi),%rdi 1001: cmpb$1,%cl jl 1000f - movb%al,(%rdi) + movb%r10b,(%rdi) 1000: - movq%r9,%rax POP_FRAME_POINTER ret ALIGN_TEXT 1256: + movq%rdi,%r9 + movq%r10,%rax .if \erms == 1 rep stosb + movq%r9,%rax .else shrq$3,%rcx rep stosq + movq%r9,%rax movq%rdx,%rcx andb$7,%cl jne 1004b .endif - movq%r9,%rax POP_FRAME_POINTER ret .endm ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339530 - head/sys/dev/usb/net
Author: phk Date: Sun Oct 21 09:36:12 2018 New Revision: 339530 URL: https://svnweb.freebsd.org/changeset/base/339530 Log: Recognize LAN in Lenovo USB-C and TB3 docks Modified: head/sys/dev/usb/net/if_ure.c Modified: head/sys/dev/usb/net/if_ure.c == --- head/sys/dev/usb/net/if_ure.c Sun Oct 21 08:29:36 2018 (r339529) +++ head/sys/dev/usb/net/if_ure.c Sun Oct 21 09:36:12 2018 (r339530) @@ -68,6 +68,8 @@ SYSCTL_INT(_hw_usb_ure, OID_AUTO, debug, CTLFLAG_RWTUN static const STRUCT_USB_HOST_ID ure_devs[] = { #defineURE_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } URE_DEV(LENOVO, RTL8153, 0), + URE_DEV(LENOVO, TBT3LAN, 0), + URE_DEV(LENOVO, USBCLAN, 0), URE_DEV(NVIDIA, RTL8153, 0), URE_DEV(REALTEK, RTL8152, URE_FLAG_8152), URE_DEV(REALTEK, RTL8153, 0), ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339462 - head/libexec/rc
> Author: eugen > Date: Sat Oct 20 18:01:48 2018 > New Revision: 339462 > URL: https://svnweb.freebsd.org/changeset/base/339462 > > Log: > Make upgrade from previous FreeBSD versions less painful > and make previously working configuration like this work again: > > gif_interfaces="gif0" > gifconfig_gif0="1.1.1.1 2.2.2.2" > ifconfig_gif0="inet 192.168.1.1 192.168.1.2 netmask 255.255.255.252" > > PR: 204700 > MFC after: 1 month Are you intentionally not wanting this to make 12.0 release? > > Modified: > head/libexec/rc/network.subr > > Modified: head/libexec/rc/network.subr > == > --- head/libexec/rc/network.subr Sat Oct 20 18:01:15 2018 > (r339461) > +++ head/libexec/rc/network.subr Sat Oct 20 18:01:48 2018 > (r339462) > @@ -1393,7 +1393,7 @@ clone_up() > _list="$_list $ifn" > fi > tmpargs=$(get_if_var $ifn gifconfig_IF) > - eval ifconfig_${ifn}=\"tunnel \$tmpargs\" > + eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\" > done > if [ -n "${_list# }" ]; then > echo "Created clone interfaces: ${_list# }." > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys
On 21 Oct 2018, at 04:08, Jan Beich wrote: > > Glen Barber writes: > >> Modified: head/lib/clang/llvm.build.mk >> == >> --- head/lib/clang/llvm.build.mk Fri Oct 19 00:24:23 2018 >> (r339435) >> +++ head/lib/clang/llvm.build.mk Fri Oct 19 00:37:47 2018 >> (r339436) >> @@ -17,7 +17,7 @@ CFLAGS+= -I${LLVM_SRCS}/include >> CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL >> CFLAGS+= -D__STDC_LIMIT_MACROS >> CFLAGS+= -D__STDC_CONSTANT_MACROS >> -#CFLAGS+= -DNDEBUG >> +CFLAGS+=-DNDEBUG > > Would Clang still hit asserts instead of crashing with cryptic messages? In llvm, assertions (and various other internal consistency checks) are turned off by defining NDEBUG. So indeed, if something in the internal state goes in an unexpected direction, you could get crashes or other "interesting" effects. That said, the resulting executable(s) should run somewhat faster, and be somewhat smaller. I think we have always done this for stable branches and releases. If users encounter such crashes, it will still write reproduction files (self-contained .c or .cpp file and a shell script), so those can be included in bug reports, and run on a copy of clang with assertions. -Dimitry signature.asc Description: Message signed with OpenPGP
svn commit: r339528 - head/sys/mips/conf
Author: imp Date: Sun Oct 21 07:56:58 2018 New Revision: 339528 URL: https://svnweb.freebsd.org/changeset/base/339528 Log: Remove all the really old junk that never would be used with an OCTEON CPU. Most of them were here just to test build mips versions of things, even though many of them have never been tested on mips, let alone the Octeon. Modified: head/sys/mips/conf/OCTEON1 Modified: head/sys/mips/conf/OCTEON1 == --- head/sys/mips/conf/OCTEON1 Sun Oct 21 07:32:35 2018(r339527) +++ head/sys/mips/conf/OCTEON1 Sun Oct 21 07:56:58 2018(r339528) @@ -109,8 +109,6 @@ device pci # ATA controllers device ahci# AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA -device siis# SiliconImage SiI3124/SiI3132/SiI3531 SATA # On-board Compact Flash driver. device cf @@ -118,22 +116,8 @@ optionsROOTDEVNAME=\"ufs:cf0s2a\" # Default root fil # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices -device ahd # AHA39320/29320 and onboard AIC79xx devices -device esp # AMD Am53C974 (Tekram DC-390(T)) -device hptiop # Highpoint RocketRaid 3xxx series -device isp # Qlogic family -#deviceispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion -device mps # LSI-Logic MPT-Fusion 2 -device mpr # LSI-Logic MPT-Fusion 3 -#devicencr # NCR/Symbios Logic -device trm # Tekram DC395U/UW/F DC315U adapters -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters - # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers @@ -144,25 +128,8 @@ device pass# Passthrough device (direct ATA/SCSI ac device ses # Enclosure Services (SES and SAF-TE) # RAID controllers interfaced to the SCSI subsystem -device amr # AMI MegaRAID -#XXX it is not 64-bit clean, -scottl -#deviceasr # DPT SmartRAID V, VI and Adaptec SCSI RAID device ciss# Compaq Smart RAID 5* -device dpt # DPT Smartcache III, IV - See NOTES for options -device iir # Intel Integrated RAID -device ips # IBM (Adaptec) ServeRAID -device mly # Mylex AcceleRAID/eXtremeRAID -# RAID controllers -device aac # Adaptec FSA RAID -device aacp# SCSI passthrough for aac (requires CAM) -device ida # Compaq Smart RAID -device mfi # LSI MegaRAID SAS -device mlx # Mylex DAC960 family -#XXX pointer/int warnings -#devicepst # Promise Supertrak SX6000 -device twe # 3ware ATA RAID - # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support device cbb # cardbus (yenta) bridge @@ -189,49 +156,17 @@ deviceoctm #devicemv88e61xxphy# Marvell 88E61XX # PCI Ethernet NICs. -device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device ix # Intel PRO/10GbE PF PCIE Ethernet Family device ixv # Intel PRO/10GbE VF PCIE Ethernet Family -device le # AMD Am7900 LANCE and Am79C9xx PCnet -device ti # Alteon Networks Tigon I/II gigabit Ethernet -device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support -device ae # Attansic/Atheros L2 FastEthernet -device age # Attansic/Atheros L1 Gigabit Ethernet -device alc # Atheros AR8131/AR8132 Ethernet -device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet -device dc # DEC/Intel 21143 and
svn commit: r339532 - head/sys/net
Author: glebius Date: Sun Oct 21 12:39:00 2018 New Revision: 339532 URL: https://svnweb.freebsd.org/changeset/base/339532 Log: Fix exiting an epoch(9) we never entered. May happen only with MAC. Modified: head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_me.c Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Sun Oct 21 10:46:00 2018(r339531) +++ head/sys/net/if_gif.c Sun Oct 21 12:39:00 2018(r339532) @@ -272,6 +272,7 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m) uint8_t proto, ecn; int error; + GIF_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) { @@ -280,7 +281,6 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m) } #endif error = ENETDOWN; - GIF_RLOCK(); sc = ifp->if_softc; if ((ifp->if_flags & IFF_MONITOR) != 0 || (ifp->if_flags & IFF_UP) == 0 || Modified: head/sys/net/if_gre.c == --- head/sys/net/if_gre.c Sun Oct 21 10:46:00 2018(r339531) +++ head/sys/net/if_gre.c Sun Oct 21 12:39:00 2018(r339532) @@ -550,6 +550,7 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) uint16_t proto; len = 0; + GRE_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) { @@ -558,7 +559,6 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) } #endif error = ENETDOWN; - GRE_RLOCK(); sc = ifp->if_softc; if ((ifp->if_flags & IFF_MONITOR) != 0 || (ifp->if_flags & IFF_UP) == 0 || Modified: head/sys/net/if_me.c == --- head/sys/net/if_me.cSun Oct 21 10:46:00 2018(r339531) +++ head/sys/net/if_me.cSun Oct 21 12:39:00 2018(r339532) @@ -479,13 +479,13 @@ me_transmit(struct ifnet *ifp, struct mbuf *m) uint32_t af; int error, hlen, plen; + ME_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error != 0) goto drop; #endif error = ENETDOWN; - ME_RLOCK(); sc = ifp->if_softc; if (sc == NULL || !ME_READY(sc) || (ifp->if_flags & IFF_MONITOR) != 0 || ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339448 - head/usr.sbin/vidcontrol
On Sat, 20 Oct 2018, Tobias Kortkamp wrote: ... Log: vidcontrol(1): Fix a typo in the description of -f While here: - Fix markup in -c This was supposed to be consistent with nearby style, but I changed the main .Cm to .Ar so it was inconsistent with itself. There are many other misuses of .Cm in this file and probably in others. I think the only correct uses of .Cm are when there is no flags arg. stty(1) gives many examples. E.g., 'sane' in "stty sane" really is a command modifier -- it modifies the command 'stty. But here .Cm was misused for args of -c. Those really are args. ... Modified: head/usr.sbin/vidcontrol/vidcontrol.1 == --- head/usr.sbin/vidcontrol/vidcontrol.1 Sat Oct 20 16:52:18 2018 (r339447) +++ head/usr.sbin/vidcontrol/vidcontrol.1 Sat Oct 20 16:59:43 2018 (r339448) ... @@ -109,10 +109,10 @@ below. .It Ar foreground Op Ar background This has the reverse bug. There is no flags arg, so the args modify the command directly so should use .Cm, as for stty(1). stty.1 gets this wrong too. Most commands use flags and not many direct command modifiers. stty.1 does the opposite. It starts correctly by using .Ar for its -f arg. Then it misuses .Ar for its speed command modifier. Then it does correct things like ".It Cm ispeed Ar number". Here ispeed is a command modifier for stty and number is an arg for ispeed. vidcontrol.1 apparently uses a mixture of .Cm and .Ar to try to do something similar. It is correct for it to switch to .Ar for args of a .Cm, but often incorrect to start with .Cm. stty.1 misuses .Ar for the C struct member name c_lflag and the C struct tag name termios. These seem to be its only misuses of .Ar. @@ -128,13 +128,13 @@ Clear the history buffer. .It Fl c Ar setting Ns Op , Ns Ar setting ... Change the cursor appearance. The change is specified by a non-empty comma-separated list of -.Cm setting Ns s . +.Ar setting Ns s . Old versions used "... c Cm normal | blink | destructive". .Cm was incorrect here. I fixed it in the flags line but seem to have left it broken for all other instances of 'setting. Here are most of the current misuses of .Cm in vidcontrol.1: - after the [imST] flags - after the t flag, the first alternative uses the correct .Ar but the second alternative misuses .Cm. - for the normal, blink, noblock, destructive, height and base args for -c (missed in this commit). These are all 'settings', so they are more like args than command modifiers (they are the names of instances of args and distinguishing them the names of args, or distingishing names from what they name, would be too subtle). - .Cm value after '... Cm base Ns = Ns Ar value". If 'base' were a command modifier, then its 'value' would still be an arg, but 'base' should be an arg too. Then the second 'value' should not change from an arg to a command modifier. - zillions more .Cm's for args of -c should be .Ar's. ISTR spending a lot of time making these consistent. Now I think they are consistently wrong. - .Cm's for 8x8, 8x14 and 8x16. Again these are names of instances of args. They are not quite args or names of args, but they are much closer to args than they are to command modifiers. - consistently for names of instances of args for the [imSTt] flags Most or all uses of .Ar in vidcontrol.1 are correct. There are many examples where .Ar is used for the name of an instance of an arg, so the extensive use of .Cm for names of instances of args doesn't seem to be because there is a special convention for this. I wrote more than half of the latter for -c by copying bad examples. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339492 - head/sys/dev/random
> On 20 Oct 2018, at 22:09, Conrad Meyer wrote: > > Author: cem > Date: Sat Oct 20 21:09:12 2018 > New Revision: 339492 > URL: https://svnweb.freebsd.org/changeset/base/339492 > > Log: > Fortuna: ... ... and a few others. Thanks, Conrad, for picking these up! Having code reviewed well is a good feeling :-) M -- ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339533 - head/sys/netipsec
Author: ae Date: Sun Oct 21 14:19:16 2018 New Revision: 339533 URL: https://svnweb.freebsd.org/changeset/base/339533 Log: Add sadb_x_sa2 extension to SADB_ACQUIRE requests. SADB_ACQUIRE requests are send by kernel, when security policy doesn't have corresponding security association for outbound packet. IKE daemon usually registers its handler for such messages and when the kernel asks for SA it can handle this request. Now such requests will contain additional fields that can help IKE daemon to create SA. And IKE now can create SAs using only information from SADB_ACQUIRE request, this is useful when many if_ipsec(4) interfaces are in use and IKE doesn track security policies that was installed by kernel. Obtained from:Yandex LLC MFC after:3 weeks Sponsored by: Yandex LLC Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c == --- head/sys/netipsec/key.c Sun Oct 21 12:39:00 2018(r339532) +++ head/sys/netipsec/key.c Sun Oct 21 14:19:16 2018(r339533) @@ -6685,7 +6685,9 @@ key_acquire(const struct secasindex *saidx, struct sec /* XXX proxy address (optional) */ - /* set sadb_x_policy */ + /* +* Set sadb_x_policy. This is KAME extension to RFC2367. +*/ if (sp != NULL) { m = key_setsadbxpolicy(sp->policy, sp->spidx.dir, sp->id, sp->priority); @@ -6696,6 +6698,18 @@ key_acquire(const struct secasindex *saidx, struct sec m_cat(result, m); } + /* +* Set sadb_x_sa2 extension if saidx->reqid is not zero. +* This is FreeBSD extension to RFC2367. +*/ + if (saidx->reqid != 0) { + m = key_setsadbxsa2(saidx->mode, 0, saidx->reqid); + if (m == NULL) { + error = ENOBUFS; + goto fail; + } + m_cat(result, m); + } /* XXX identity (optional) */ #if 0 if (idexttype && fqdn) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339534 - in head/usr.sbin/pw: . tests
Author: yuripv Date: Sun Oct 21 14:23:56 2018 New Revision: 339534 URL: https://svnweb.freebsd.org/changeset/base/339534 Log: pw: fix the checks in boolean_str() after r326738. Add related test cases for `pw useradd -D -w`. PR: 231649 Reviewed by: eugen Approved by: kib (mentor) Differential Revision:https://reviews.freebsd.org/D17299 Modified: head/usr.sbin/pw/pw_conf.c head/usr.sbin/pw/tests/pw_useradd_test.sh Modified: head/usr.sbin/pw/pw_conf.c == --- head/usr.sbin/pw/pw_conf.c Sun Oct 21 14:19:16 2018(r339533) +++ head/usr.sbin/pw/pw_conf.c Sun Oct 21 14:23:56 2018(r339534) @@ -221,12 +221,14 @@ passwd_val(char const * str, int dflt) char const * boolean_str(int val) { - if (val == -1) - return "random"; - else if (val == -2) - return "none"; + if (val == P_NO) + return (boolfalse[0]); + else if (val == P_RANDOM) + return ("random"); + else if (val == P_NONE) + return ("none"); else - return val ? booltrue[0] : boolfalse[0]; + return (booltrue[0]); } char * Modified: head/usr.sbin/pw/tests/pw_useradd_test.sh == --- head/usr.sbin/pw/tests/pw_useradd_test.sh Sun Oct 21 14:19:16 2018 (r339533) +++ head/usr.sbin/pw/tests/pw_useradd_test.sh Sun Oct 21 14:23:56 2018 (r339534) @@ -421,6 +421,7 @@ user_add_with_pw_conf_body() atf_check -s exit:0 \ ${PW} useradd foo -C ${HOME}/pw.conf } + atf_test_case user_add_defaultgroup user_add_defaultgroup_body() { @@ -435,6 +436,25 @@ user_add_defaultgroup_body() ${PW} usershow foo } +atf_test_case user_add_conf_defaultpasswd +user_add_conf_defaultpasswd_body() +{ + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd -D -w no + atf_check -o inline:"defaultpasswd = \"no\"\n" \ + grep defaultpasswd ${HOME}/pw.conf + atf_check -s exit:0 ${PW} useradd -D -w none + atf_check -o inline:"defaultpasswd = \"none\"\n" \ + grep defaultpasswd ${HOME}/pw.conf + atf_check -s exit:0 ${PW} useradd -D -w random + atf_check -o inline:"defaultpasswd = \"random\"\n" \ + grep defaultpasswd ${HOME}/pw.conf + atf_check -s exit:0 ${PW} useradd -D -w yes + atf_check -o inline:"defaultpasswd = \"yes\"\n" \ + grep defaultpasswd ${HOME}/pw.conf +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate @@ -472,4 +492,6 @@ atf_init_test_cases() { atf_add_test_case user_add_w_yes atf_add_test_case user_add_with_pw_conf atf_add_test_case user_add_defaultgroup + + atf_add_test_case user_add_conf_defaultpasswd } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339535 - head/sbin/ifconfig
Author: ae Date: Sun Oct 21 14:40:45 2018 New Revision: 339535 URL: https://svnweb.freebsd.org/changeset/base/339535 Log: Do not allow use `create` keyword as hostname when ifconfig(8) is invoked for already existing interface. It appeared, that ifconfig(8) assumes `create` keyword as hostname and tries to resolve it, when `ifconfig ifname create` invoked for already existing interface. This can produce some unexpected results, when hostname resolving has successfully happened. This patch adds check for such case. When an interface is already exists, and create is only one argument, return error message. But when there are some other arguments, just remove create keyword from the arguments list. Obtained from:Yandex LLC MFC after:3 weeks Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17171 Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Sun Oct 21 14:23:56 2018 (r339534) +++ head/sbin/ifconfig/ifconfig.c Sun Oct 21 14:40:45 2018 (r339535) @@ -504,6 +504,18 @@ main(int argc, char *argv[]) } #endif errx(1, "interface %s does not exist", ifname); + } else { + /* +* Do not allow use `create` command as hostname if +* address family is not specified. +*/ + if (argc > 0 && (strcmp(argv[0], "create") == 0 || + strcmp(argv[0], "plumb") == 0)) { + if (argc == 1) + errx(1, "interface %s already exist", + ifname); + argc--, argv++; + } } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339536 - head/sbin/ifconfig
Author: ae Date: Sun Oct 21 14:48:40 2018 New Revision: 339536 URL: https://svnweb.freebsd.org/changeset/base/339536 Log: Fix grammar. Reported by: yuripv MFC after:3 weeks Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Sun Oct 21 14:40:45 2018 (r339535) +++ head/sbin/ifconfig/ifconfig.c Sun Oct 21 14:48:40 2018 (r339536) @@ -512,7 +512,7 @@ main(int argc, char *argv[]) if (argc > 0 && (strcmp(argv[0], "create") == 0 || strcmp(argv[0], "plumb") == 0)) { if (argc == 1) - errx(1, "interface %s already exist", + errx(1, "interface %s already exists", ifname); argc--, argv++; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys
> Dimitry Andric writes: > > > On 21 Oct 2018, at 04:08, Jan Beich wrote: > > > >> > >> Glen Barber writes: > >> > >>> Modified: head/lib/clang/llvm.build.mk > >>> == > >>> --- head/lib/clang/llvm.build.mk Fri Oct 19 00:24:23 2018 > >>> (r339435) > >>> +++ head/lib/clang/llvm.build.mk Fri Oct 19 00:37:47 2018 > >>> (r339436) > >>> @@ -17,7 +17,7 @@ CFLAGS+=-I${LLVM_SRCS}/include > >>> CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL > >>> CFLAGS+= -D__STDC_LIMIT_MACROS > >>> CFLAGS+= -D__STDC_CONSTANT_MACROS > >>> -#CFLAGS+=-DNDEBUG > >>> +CFLAGS+= -DNDEBUG > >> > >> Would Clang still hit asserts instead of crashing with cryptic messages? > > > > In llvm, assertions (and various other internal consistency checks) are > > turned off by defining NDEBUG. So indeed, if something in the internal > > state goes in an unexpected direction, you could get crashes or other > > "interesting" effects. > > > > That said, the resulting executable(s) should run somewhat faster, and > > be somewhat smaller. I think we have always done this for stable > > branches and releases. > > But this commit is for -CURRENT, not -STABLE or -RELEASE. With hat RE: It looks like this should be on the list of RE@ "Stable Branch Creation" check/change list that gets done by RE@ when a stable branch is created so that it is a early commit post branch and not a head commit that is merged post branch. I have forwarded a copy of this issue to internel re@ mail and we whall deal with it for stable/12 as an RE(implicit) commit, and this should probably be reverted from ^head at your descrition. Thanks, Rod > $ svn cat svn://svn.freebsd.org/base/stable/12/lib/clang/llvm.build.mk | > fgrep NDEBUG ~ > #CFLAGS+= -DNDEBUG > > $ svn cat svn://svn.freebsd.org/base/releng/11.2/lib/clang/llvm.build.mk | > fgrep NDEBUG > CFLAGS+=-DNDEBUG > > > > > If users encounter such crashes, it will still write reproduction files > > (self-contained .c or .cpp file and a shell script), so those can be > > included in bug reports, and run on a copy of clang with assertions. > > > > -Dimitry -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339539 - in head: sbin/ipfw sys/netinet
Author: ae Date: Sun Oct 21 15:10:59 2018 New Revision: 339539 URL: https://svnweb.freebsd.org/changeset/base/339539 Log: Add IPFW_RULE_JUSTOPTS flag, that is used by ipfw(8) to mark rule, that was added using "new rule format". And then, when the kernel returns rule with this flag, ipfw(8) can correctly show it. Reported by: lev MFC after:3 weeks Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17373 Modified: head/sbin/ipfw/ipfw2.c head/sys/netinet/ip_fw.h Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Sun Oct 21 15:09:42 2018(r339538) +++ head/sbin/ipfw/ipfw2.c Sun Oct 21 15:10:59 2018(r339539) @@ -2207,6 +2207,12 @@ show_static_rule(struct cmdline_opts *co, struct forma */ if (co->comment_only != 0) goto end; + + if (rule->flags & IPFW_RULE_JUSTOPTS) { + state.flags |= HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP; + goto justopts; + } + print_proto(bp, fo, &state); /* Print source */ @@ -2219,6 +2225,7 @@ show_static_rule(struct cmdline_opts *co, struct forma print_address(bp, fo, &state, dst_opcodes, nitems(dst_opcodes), O_IP_DSTPORT, HAVE_DSTIP); +justopts: /* Print the rest of options */ while (print_opcode(bp, fo, &state, -1)) ; @@ -4340,8 +4347,10 @@ chkarg: } } else if (first_cmd != cmd) { errx(EX_DATAERR, "invalid protocol ``%s''", *av); - } else + } else { + rule->flags |= IPFW_RULE_JUSTOPTS; goto read_options; + } OR_BLOCK(get_proto); /* Modified: head/sys/netinet/ip_fw.h == --- head/sys/netinet/ip_fw.hSun Oct 21 15:09:42 2018(r339538) +++ head/sys/netinet/ip_fw.hSun Oct 21 15:10:59 2018(r339539) @@ -615,6 +615,7 @@ struct ip_fw_rule { ipfw_insn cmd[1]; /* storage for commands */ }; #defineIPFW_RULE_NOOPT 0x01/* Has no options in body */ +#defineIPFW_RULE_JUSTOPTS 0x02/* new format of rule body */ /* Unaligned version */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339523 - in head/sys: conf dev/amdgpio modules modules/amdgpio
On 10/20/18 9:52 PM, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Sun Oct 21 04:52:37 2018 > New Revision: 339523 > URL: https://svnweb.freebsd.org/changeset/base/339523 > > Log: > Add amdgpio, driver for GPIO controller on AMD-based x86_64 platforms > > Submitted by: Rajesh Kumar > Differential Revision: https://reviews.freebsd.org/D16865 > [...] > Modified: head/sys/modules/Makefile > == > --- head/sys/modules/Makefile Sun Oct 21 02:39:13 2018(r339522) > +++ head/sys/modules/Makefile Sun Oct 21 04:52:37 2018(r339523) > @@ -34,6 +34,7 @@ SUBDIR= \ > ale \ > alq \ > ${_amd_ecc_inject} \ > + ${_amdgpio} \ > ${_amdsbwd} \ > ${_amdsmn} \ > ${_amdtemp} \ > @@ -717,6 +718,7 @@ _x86bios= x86bios > .endif > > .if ${MACHINE_CPUARCH} == "amd64" > +_amdgpio=amdgpio > _ccp=ccp > _efirt= efirt > _iavf= iavf > Does this not work on 64-bit AMD processors running i386 kernels? -Nathan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339537 - in head: share/man/man9 sys/net sys/netinet sys/netinet6
Author: ae Date: Sun Oct 21 15:02:06 2018 New Revision: 339537 URL: https://svnweb.freebsd.org/changeset/base/339537 Log: Add ifaddr_event_ext event. It is similar to ifaddr_event, but the handler receives the type of event IFADDR_EVENT_ADD/IFADDR_EVENT_DEL, and the pointer to ifaddr. Also ifaddr_event now is implemented using ifaddr_event_ext handler. MFC after:3 weeks Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17100 Modified: head/share/man/man9/EVENTHANDLER.9 head/sys/net/if.c head/sys/net/if_var.h head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/share/man/man9/EVENTHANDLER.9 == --- head/share/man/man9/EVENTHANDLER.9 Sun Oct 21 14:48:40 2018 (r339536) +++ head/share/man/man9/EVENTHANDLER.9 Sun Oct 21 15:02:06 2018 (r339537) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" $FreeBSD$ .\" -.Dd September 6, 2018 +.Dd October 21, 2018 .Dt EVENTHANDLER 9 .Os .Sh NAME @@ -298,6 +298,8 @@ Callback invoked when an change has been made to an in Callback invoked when an interfance has been removed from an interface group. .It Vt ifaddr_event Callbacks invoked when an address is set up on a network interface. +.It Vt ifaddr_event_ext +Callback invoked when an address has been added or removed from an interface. .It Vt if_clone_event Callbacks invoked when an interface is cloned. .It Vt iflladdr_event Modified: head/sys/net/if.c == --- head/sys/net/if.c Sun Oct 21 14:48:40 2018(r339536) +++ head/sys/net/if.c Sun Oct 21 15:02:06 2018(r339537) @@ -328,6 +328,18 @@ static MALLOC_DEFINE(M_IFNET, "ifnet", "interface inte MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); +/* + * Support for old ifaddr_event. + */ +static void +ifaddr_event_compat(void *arg __unused, struct ifnet *ifp, +struct ifaddr *ifa __unused, int event __unused) +{ + + EVENTHANDLER_INVOKE(ifaddr_event, ifp); +} +EVENTHANDLER_DEFINE(ifaddr_event_ext, ifaddr_event_compat, NULL, 0); + struct ifnet * ifnet_byindex_locked(u_short idx) { Modified: head/sys/net/if_var.h == --- head/sys/net/if_var.h Sun Oct 21 14:48:40 2018(r339536) +++ head/sys/net/if_var.h Sun Oct 21 15:02:06 2018(r339537) @@ -432,6 +432,11 @@ EVENTHANDLER_DECLARE(iflladdr_event, iflladdr_event_ha /* interface address change event */ typedef void (*ifaddr_event_handler_t)(void *, struct ifnet *); EVENTHANDLER_DECLARE(ifaddr_event, ifaddr_event_handler_t); +typedef void (*ifaddr_event_ext_handler_t)(void *, struct ifnet *, +struct ifaddr *, int); +EVENTHANDLER_DECLARE(ifaddr_event_ext, ifaddr_event_ext_handler_t); +#defineIFADDR_EVENT_ADD0 +#defineIFADDR_EVENT_DEL1 /* new interface arrival event */ typedef void (*ifnet_arrival_event_handler_t)(void *, struct ifnet *); EVENTHANDLER_DECLARE(ifnet_arrival_event, ifnet_arrival_event_handler_t); Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Sun Oct 21 14:48:40 2018(r339536) +++ head/sys/netinet/in.c Sun Oct 21 15:02:06 2018(r339537) @@ -520,7 +520,12 @@ in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifne &ii->ii_allhosts); } - EVENTHANDLER_INVOKE(ifaddr_event, ifp); + /* +* Note: we don't need extra reference for ifa, since we called +* with sx lock held, and ifaddr can not be deleted in concurrent +* thread. +*/ + EVENTHANDLER_INVOKE(ifaddr_event_ext, ifp, ifa, IFADDR_EVENT_ADD); return (error); @@ -643,7 +648,8 @@ in_difaddr_ioctl(u_long cmd, caddr_t data, struct ifne } IF_ADDR_WUNLOCK(ifp); - EVENTHANDLER_INVOKE(ifaddr_event, ifp); + EVENTHANDLER_INVOKE(ifaddr_event_ext, ifp, &ia->ia_ifa, + IFADDR_EVENT_DEL); ifa_free(&ia->ia_ifa); /* in_ifaddrhead */ return (0); Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Sun Oct 21 14:48:40 2018(r339536) +++ head/sys/netinet6/in6.c Sun Oct 21 15:02:06 2018(r339537) @@ -712,7 +712,8 @@ aifaddr_out: ND6_WUNLOCK(); nd6_prefix_del(pr); } - EVENTHANDLER_INVOKE(ifaddr_event, ifp); + EVENTHANDLER_INVOKE(ifaddr_event_ext, ifp, &ia->ia_ifa, + IFADDR_EVENT_DEL); break; } @@ -1456,7 +1457,10 @@ done: WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "In
svn commit: r339538 - head/sys/dev/ncr
Author: imp Date: Sun Oct 21 15:09:42 2018 New Revision: 339538 URL: https://svnweb.freebsd.org/changeset/base/339538 Log: Tag this obsolete driver. It was obsolete in 3.x when the sym driver supported all the "old" chips it did, so we should have killed it in 4, but 12 will do. It's a bit outside of the normal deprecation process, but given the extreme age, it's obsolete status for 8 major releases and the fact that I couldn't find any users who posted dmesgs with ncr0: in them after 2000 or 3.4. It may be too late for 12 (this change will be merged, but maybe not the next one to remove it), but it will be removed in 13 with the first round of other drivers tagged to be gone in 12. MFC after: 3 days Modified: head/sys/dev/ncr/ncr.c Modified: head/sys/dev/ncr/ncr.c == --- head/sys/dev/ncr/ncr.c Sun Oct 21 15:02:06 2018(r339537) +++ head/sys/dev/ncr/ncr.c Sun Oct 21 15:09:42 2018(r339538) @@ -3778,6 +3778,7 @@ ncr_attach (device_t dev) ncr_timeout (np); np->lasttime=0; mtx_unlock(&np->lock); + gone_in_dev(dev, 12, "ncr(4) driver, use sym(4) instead"); return 0; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339498 - head/sys/crypto/chacha20
> Author: cem > Date: Sat Oct 20 22:12:53 2018 > New Revision: 339498 > URL: https://svnweb.freebsd.org/changeset/base/339498 > > Log: > crypto/chacha: Split header into separate _chacha.h > > Sponsored by: Dell EMC Isilon > > Added: > head/sys/crypto/chacha20/_chacha.h (contents, props changed) > Modified: > head/sys/crypto/chacha20/chacha.h > > Added: head/sys/crypto/chacha20/_chacha.h > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/crypto/chacha20/_chacha.hSat Oct 20 22:12:53 2018 > (r339498) > @@ -0,0 +1,12 @@ > +/* $FreeBSD$ */ > + > +#ifndef _CHACHA_H > +#define _CHACHA_H > + > +#include > + > +struct chacha_ctx { > + u_int input[16]; > +}; > + > +#endif This new file has neither a copyright or license which is out side of the project guidelines. > > Modified: head/sys/crypto/chacha20/chacha.h > == > --- head/sys/crypto/chacha20/chacha.h Sat Oct 20 21:49:44 2018 > (r339497) > +++ head/sys/crypto/chacha20/chacha.h Sat Oct 20 22:12:53 2018 > (r339498) > @@ -12,10 +12,7 @@ Public domain. > #define CHACHA_H > > #include > - > -struct chacha_ctx { > - u_int input[16]; > -}; > +#include > > #define CHACHA_MINKEYLEN 16 > #define CHACHA_NONCELEN 8 -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339541 - head/lib/clang
Author: gjb Date: Sun Oct 21 15:54:38 2018 New Revision: 339541 URL: https://svnweb.freebsd.org/changeset/base/339541 Log: Comment -DNDEBUG in head after r339436 when head was switched from 12.0-ALPHA10 to 13.0-CURRENT. This edit was a mistake, and should have been applied to stable/12 upon branching, not head. Reported by: jbeich, dim Sponsored by: The FreeBSD Foundation Modified: head/lib/clang/llvm.build.mk Modified: head/lib/clang/llvm.build.mk == --- head/lib/clang/llvm.build.mkSun Oct 21 15:43:20 2018 (r339540) +++ head/lib/clang/llvm.build.mkSun Oct 21 15:54:38 2018 (r339541) @@ -17,7 +17,7 @@ CFLAGS+= -I${LLVM_SRCS}/include CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL CFLAGS+= -D__STDC_LIMIT_MACROS CFLAGS+= -D__STDC_CONSTANT_MACROS -CFLAGS+= -DNDEBUG +#CFLAGS+= -DNDEBUG TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys
On Sun, Oct 21, 2018 at 11:55:20AM +0200, Dimitry Andric wrote: > On 21 Oct 2018, at 04:08, Jan Beich wrote: > > > > Glen Barber writes: > > > >> Modified: head/lib/clang/llvm.build.mk > >> == > >> --- head/lib/clang/llvm.build.mk Fri Oct 19 00:24:23 2018 > >> (r339435) > >> +++ head/lib/clang/llvm.build.mk Fri Oct 19 00:37:47 2018 > >> (r339436) > >> @@ -17,7 +17,7 @@ CFLAGS+= -I${LLVM_SRCS}/include > >> CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL > >> CFLAGS+= -D__STDC_LIMIT_MACROS > >> CFLAGS+= -D__STDC_CONSTANT_MACROS > >> -#CFLAGS+= -DNDEBUG > >> +CFLAGS+= -DNDEBUG > > > > Would Clang still hit asserts instead of crashing with cryptic messages? > > In llvm, assertions (and various other internal consistency checks) are > turned off by defining NDEBUG. So indeed, if something in the internal > state goes in an unexpected direction, you could get crashes or other > "interesting" effects. > > That said, the resulting executable(s) should run somewhat faster, and > be somewhat smaller. I think we have always done this for stable > branches and releases. > I think I screwed up, and changed this in the wrong branch. I'm looking into the "why", but the commit to head in this case should be reverted (I'll take care of it if it was not already done), and this particular change should be applied to stable/12 (which I will also take care of). I first want to look through our docs to understand how I messed this up. Glen signature.asc Description: PGP signature
Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys
On Sun, Oct 21, 2018 at 03:45:20PM +, Glen Barber wrote: > On Sun, Oct 21, 2018 at 11:55:20AM +0200, Dimitry Andric wrote: > > On 21 Oct 2018, at 04:08, Jan Beich wrote: > > > > > > Glen Barber writes: > > > > > >> Modified: head/lib/clang/llvm.build.mk > > >> == > > >> --- head/lib/clang/llvm.build.mk Fri Oct 19 00:24:23 2018 > > >> (r339435) > > >> +++ head/lib/clang/llvm.build.mk Fri Oct 19 00:37:47 2018 > > >> (r339436) > > >> @@ -17,7 +17,7 @@ CFLAGS+= -I${LLVM_SRCS}/include > > >> CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL > > >> CFLAGS+= -D__STDC_LIMIT_MACROS > > >> CFLAGS+= -D__STDC_CONSTANT_MACROS > > >> -#CFLAGS+= -DNDEBUG > > >> +CFLAGS+=-DNDEBUG > > > > > > Would Clang still hit asserts instead of crashing with cryptic messages? > > > > In llvm, assertions (and various other internal consistency checks) are > > turned off by defining NDEBUG. So indeed, if something in the internal > > state goes in an unexpected direction, you could get crashes or other > > "interesting" effects. > > > > That said, the resulting executable(s) should run somewhat faster, and > > be somewhat smaller. I think we have always done this for stable > > branches and releases. > > > > I think I screwed up, and changed this in the wrong branch. I'm looking > into the "why", but the commit to head in this case should be reverted > (I'll take care of it if it was not already done), and this particular > change should be applied to stable/12 (which I will also take care of). > I first want to look through our docs to understand how I messed this > up. > Ok, reverted in head as of r339541, and the commit to apply the change to stable/12 is sent to re@ for approval. Glen signature.asc Description: PGP signature
svn commit: r339540 - in head/sys: conf dev/virtio/mmio
Author: andrew Date: Sun Oct 21 15:43:20 2018 New Revision: 339540 URL: https://svnweb.freebsd.org/changeset/base/339540 Log: Split out the virtio mmio FDT attachment and add an ACPI attachment. This allows the memory mapped I/O virtio driver to attach when we boot with ACPI tables, for example in some cases with QEMU emulating arm64. MFC after:1 month Added: head/sys/dev/virtio/mmio/virtio_mmio_acpi.c (contents, props changed) head/sys/dev/virtio/mmio/virtio_mmio_fdt.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/virtio/mmio/virtio_mmio.c head/sys/dev/virtio/mmio/virtio_mmio.h Modified: head/sys/conf/files == --- head/sys/conf/files Sun Oct 21 15:10:59 2018(r339539) +++ head/sys/conf/files Sun Oct 21 15:43:20 2018(r339540) @@ -3430,8 +3430,10 @@ dev/virtio/virtqueue.c optional virtio dev/virtio/virtio_bus_if.m optionalvirtio dev/virtio/virtio_if.m optionalvirtio dev/virtio/pci/virtio_pci.coptionalvirtio_pci -dev/virtio/mmio/virtio_mmio.c optionalvirtio_mmio fdt -dev/virtio/mmio/virtio_mmio_if.m optionalvirtio_mmio fdt +dev/virtio/mmio/virtio_mmio.c optionalvirtio_mmio +dev/virtio/mmio/virtio_mmio_acpi.c optionalvirtio_mmio acpi +dev/virtio/mmio/virtio_mmio_fdt.c optionalvirtio_mmio fdt +dev/virtio/mmio/virtio_mmio_if.m optionalvirtio_mmio dev/virtio/network/if_vtnet.c optionalvtnet dev/virtio/block/virtio_blk.c optionalvirtio_blk dev/virtio/balloon/virtio_balloon.coptionalvirtio_balloon Modified: head/sys/dev/virtio/mmio/virtio_mmio.c == --- head/sys/dev/virtio/mmio/virtio_mmio.c Sun Oct 21 15:10:59 2018 (r339539) +++ head/sys/dev/virtio/mmio/virtio_mmio.c Sun Oct 21 15:43:20 2018 (r339540) @@ -37,16 +37,6 @@ * This driver is heavily based on VirtIO PCI interface driver. */ -/* - * FDT example: - * virtio_block@1000 { - * compatible = "virtio,mmio"; - * reg = <0x1000 0x100>; - * interrupts = <63>; - * interrupt-parent = <&GIC>; - * }; - */ - #include __FBSDID("$FreeBSD$"); @@ -61,11 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include - #include #include #include @@ -81,25 +66,6 @@ struct vtmmio_virtqueue { int vtv_no_intr; }; -struct vtmmio_softc { - device_tdev; - device_tplatform; - struct resource *res[2]; - - uint64_tvtmmio_features; - uint32_tvtmmio_flags; - - /* This "bus" will only ever have one child. */ - device_tvtmmio_child_dev; - struct virtio_feature_desc *vtmmio_child_feat_desc; - - int vtmmio_nvqs; - struct vtmmio_virtqueue *vtmmio_vqs; - void*ih; -}; - -static int vtmmio_probe(device_t); -static int vtmmio_attach(device_t); static int vtmmio_detach(device_t); static int vtmmio_suspend(device_t); static int vtmmio_resume(device_t); @@ -170,7 +136,6 @@ do { \ static device_method_t vtmmio_methods[] = { /* Device interface. */ - DEVMETHOD(device_probe, vtmmio_probe), DEVMETHOD(device_attach, vtmmio_attach), DEVMETHOD(device_detach, vtmmio_detach), DEVMETHOD(device_suspend, vtmmio_suspend), @@ -199,19 +164,10 @@ static device_method_t vtmmio_methods[] = { DEVMETHOD_END }; -static driver_t vtmmio_driver = { - "virtio_mmio", - vtmmio_methods, - sizeof(struct vtmmio_softc) -}; +DEFINE_CLASS_0(virtio_mmio, vtmmio_driver, vtmmio_methods, +sizeof(struct vtmmio_softc)); -devclass_t vtmmio_devclass; - -DRIVER_MODULE(virtio_mmio, simplebus, vtmmio_driver, vtmmio_devclass, 0, 0); -DRIVER_MODULE(virtio_mmio, ofwbus, vtmmio_driver, vtmmio_devclass, 0, 0); MODULE_VERSION(virtio_mmio, 1); -MODULE_DEPEND(virtio_mmio, simplebus, 1, 1, 1); -MODULE_DEPEND(virtio_mmio, virtio, 1, 1, 1); static int vtmmio_setup_intr(device_t dev, enum intr_type type) @@ -248,55 +204,7 @@ vtmmio_setup_intr(device_t dev, enum intr_type type) return (0); } -static int -vtmmio_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "virtio,mmio")) - return (ENX
svn commit: r339543 - head/sys/conf
Author: imp Date: Sun Oct 21 16:29:32 2018 New Revision: 339543 URL: https://svnweb.freebsd.org/changeset/base/339543 Log: Remove stray fatm reference. Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE == --- head/sys/conf/WITHOUT_SOURCELESS_UCODE Sun Oct 21 16:29:12 2018 (r339542) +++ head/sys/conf/WITHOUT_SOURCELESS_UCODE Sun Oct 21 16:29:32 2018 (r339543) @@ -6,7 +6,6 @@ nodevice adw nodevice bce -nodevice fatm nodevice fxp nodevice ispfw nodevice mwlfw ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339542 - in head: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netpfil/ipfw/nat64
Author: ae Date: Sun Oct 21 16:29:12 2018 New Revision: 339542 URL: https://svnweb.freebsd.org/changeset/base/339542 Log: Retire IPFIREWALL_NAT64_DIRECT_OUTPUT kernel option. And add ability to switch the output method in run-time. Also document some sysctl variables that can by changed for NAT64 module. NAT64 had compile time option IPFIREWALL_NAT64_DIRECT_OUTPUT to use if_output directly from nat64 module. By default is used netisr based output method. Now both methods can be used, but they require different handling by rules. Obtained from:Yandex LLC MFC after:3 weeks Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D16647 Modified: head/sbin/ipfw/ipfw.8 head/sys/conf/options head/sys/modules/ipfw_nat64/Makefile head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c head/sys/netpfil/ipfw/nat64/nat64_translate.c head/sys/netpfil/ipfw/nat64/nat64_translate.h Modified: head/sbin/ipfw/ipfw.8 == --- head/sbin/ipfw/ipfw.8 Sun Oct 21 15:54:38 2018(r339541) +++ head/sbin/ipfw/ipfw.8 Sun Oct 21 16:29:12 2018(r339542) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2018 +.Dd October 21, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -3289,9 +3289,14 @@ Make sure that ND6 neighbor solicitation (ICMPv6 type advertisement (ICMPv6 type 136) messages will not be handled by translation rules. .Pp -After translation NAT64 translator sends packets through corresponding netisr -queue. +After translation NAT64 translator by default sends packets through +corresponding netisr queue. Thus translator host should be configured as IPv4 and IPv6 router. +Also this means, that a packet is handled by firewall twice. +First time an original packet is handled and consumed by translator, +and then it is handled again as translated packet. +This behavior can be changed by sysctl variable +.Va net.inet.ip.fw.nat64_direct_output . .Pp The stateful NAT64 configuration command is the following: .Bd -ragged -offset indent @@ -3914,6 +3919,41 @@ Default is no. Controls whether bridged packets are passed to .Nm . Default is no. +.It Va net.inet.ip.fw.nat64_allow_private : No 0 +Defines how +.Nm nat64 +handles private IPv4 addresses: +.Bl -tag -width indent +.It Cm 0 +Packets with private IPv4 will not be handled by translator +.It Cm 1 +Translator will accept and process packets with private IPv4 addresses. +.El +.It Va net.inet.ip.fw.nat64_debug : No 0 +Controls debugging messages produced by +.Nm ipfw_nat64 +module. +.It Va net.inet.ip.fw.nat64_direct_output : No 0 +Controls the output method used by +.Nm ipfw_nat64 +module: +.Bl -tag -width indent +.It Cm 0 +A packet is handled by +.Nm ipfw +twice. +First time an original packet is handled by +.Nm ipfw +and consumed by +.Nm ipfw_nat64 +translator. +Then translated packet is queued via netisr to input processing again. +.It Cm 1 +A packet is handled by +.Nm ipfw +only once, and after translation it will be pushed directly to outgoing +interface. +.El .El .Sh INTERNAL DIAGNOSTICS There are some commands that may be useful to understand current state Modified: head/sys/conf/options == --- head/sys/conf/options Sun Oct 21 15:54:38 2018(r339541) +++ head/sys/conf/options Sun Oct 21 16:29:12 2018(r339542) @@ -439,7 +439,6 @@ IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h IPFIREWALL_NAT64 opt_ipfw.h -IPFIREWALL_NAT64_DIRECT_OUTPUT opt_ipfw.h IPFIREWALL_NPTV6 opt_ipfw.h IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h Modified: head/sys/modules/ipfw_nat64/Makefile == --- head/sys/modules/ipfw_nat64/MakefileSun Oct 21 15:54:38 2018 (r339541) +++ head/sys/modules/ipfw_nat64/MakefileSun Oct 21 16:29:12 2018 (r339542) @@ -6,8 +6,5 @@ KMOD= ipfw_nat64 SRCS= ip_fw_nat64.c nat64_translate.c SRCS+= nat64lsn.c nat64lsn_control.c SRCS+= nat64stl.c nat64stl_control.c -SRCS+= opt_ipfw.h - -#CFLAGS+= -DIPFIREWALL_NAT64_DIRECT_OUTPUT .include Modified: head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c == --- head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Oct 21 15:54:38 2018 (r339541) +++ head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Oct 21 16:29:12 2018 (r339542) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include "ip_fw_nat64.h" +#include "nat64_translate.h" VNET_DEFINE(int, nat64_debug) = 0; VNET_DEFINE(int, nat64_allow_private) = 0; @@ -56,8 +57,26 @@ SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_debug, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_debu
svn commit: r339544 - head/sys/netpfil/ipfw/nat64
Author: ae Date: Sun Oct 21 16:37:53 2018 New Revision: 339544 URL: https://svnweb.freebsd.org/changeset/base/339544 Log: Call inet_ntop() only when its result is needed. Obtained from:Yandex LLC MFC after:3 weeks Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/nat64/nat64lsn.c Modified: head/sys/netpfil/ipfw/nat64/nat64lsn.c == --- head/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Oct 21 16:29:32 2018 (r339543) +++ head/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Oct 21 16:37:53 2018 (r339544) @@ -643,7 +643,6 @@ static NAT64NOINLINE int nat64lsn_periodic_chkhost(struct nat64lsn_host *nh, struct nat64lsn_periodic_data *d) { - char a[INET6_ADDRSTRLEN]; struct nat64lsn_portgroup *pg; struct nat64lsn_job_item *ji; uint64_t delmask[NAT64LSN_PGPTRNMASK]; @@ -652,9 +651,13 @@ nat64lsn_periodic_chkhost(struct nat64lsn_host *nh, delcount = 0; memset(delmask, 0, sizeof(delmask)); - inet_ntop(AF_INET6, &nh->addr, a, sizeof(a)); - DPRINTF(DP_JQUEUE, "Checking %s host %s on cpu %d", - stale_nh(d->cfg, nh) ? "stale" : "non-stale", a, curcpu); + if (V_nat64_debug & DP_JQUEUE) { + char a[INET6_ADDRSTRLEN]; + + inet_ntop(AF_INET6, &nh->addr, a, sizeof(a)); + DPRINTF(DP_JQUEUE, "Checking %s host %s on cpu %d", + stale_nh(d->cfg, nh) ? "stale" : "non-stale", a, curcpu); + } if (!stale_nh(d->cfg, nh)) { /* Non-stale host. Inspect internals */ NAT64_LOCK(nh); @@ -1527,9 +1530,9 @@ nat64lsn_translate6(struct nat64lsn_cfg *cfg, struct i if (k++ > 1000) { DPRINTF(DP_ALL, "XXX: too long %d/%d %d/%d\n", sidx.idx, sidx.off, st->next.idx, st->next.off); - inet_ntop(AF_INET6, &nh->addr, a, sizeof(a)); DPRINTF(DP_GENERIC, "TR host %s %p on cpu %d", - a, nh, curcpu); + inet_ntop(AF_INET6, &nh->addr, a, sizeof(a)), + nh, curcpu); k = 0; } sidx = st->next; @@ -1542,10 +1545,10 @@ nat64lsn_translate6(struct nat64lsn_cfg *cfg, struct i /* No free states. Request more if we can */ if (nh->pg_used >= cfg->max_chunks) { /* Limit reached */ - inet_ntop(AF_INET6, &nh->addr, a, sizeof(a)); DPRINTF(DP_DROPS, "PG limit reached " " for host %s (used %u, allocated %u, " - "limit %u)", a, + "limit %u)", inet_ntop(AF_INET6, + &nh->addr, a, sizeof(a)), nh->pg_used * NAT64_CHUNK_SIZE, nh->pg_allocated * NAT64_CHUNK_SIZE, cfg->max_chunks * NAT64_CHUNK_SIZE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339545 - head/sys/netpfil/ipfw
Author: ae Date: Sun Oct 21 16:44:57 2018 New Revision: 339545 URL: https://svnweb.freebsd.org/changeset/base/339545 Log: Do not decrement RST life time if keep_alive is not turned on. This allows use differen values configured by user for sysctl variable net.inet.ip.fw.dyn_rst_lifetime. Obtained from:Yandex LLC MFC after:3 weeks Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c == --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Sun Oct 21 16:37:53 2018 (r339544) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Sun Oct 21 16:44:57 2018 (r339545) @@ -979,7 +979,8 @@ dyn_update_tcp_state(struct dyn_data *data, const stru break; default: - if (V_dyn_rst_lifetime >= V_dyn_keepalive_period) + if (V_dyn_keepalive != 0 && + V_dyn_rst_lifetime >= V_dyn_keepalive_period) V_dyn_rst_lifetime = V_dyn_keepalive_period - 1; expire = time_uptime + V_dyn_rst_lifetime; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339546 - head/sys/kern
Author: imp Date: Sun Oct 21 16:49:49 2018 New Revision: 339546 URL: https://svnweb.freebsd.org/changeset/base/339546 Log: Remove stray refernce to pdq. Like the infamous twenty first of Johan Sebastian Bach's twenty children, it hasn't been seen in many years. Modified: head/sys/kern/Make.tags.inc Modified: head/sys/kern/Make.tags.inc == --- head/sys/kern/Make.tags.inc Sun Oct 21 16:44:57 2018(r339545) +++ head/sys/kern/Make.tags.inc Sun Oct 21 16:49:49 2018(r339546) @@ -19,7 +19,6 @@ COMM= ${SYS}/dev/advansys/*.[ch] \ ${SYS}/dev/en/*.[ch] \ ${SYS}/dev/iicbus/*.[ch] \ ${SYS}/dev/isp/*.[ch] \ - ${SYS}/dev/pdq/*.[ch] \ ${SYS}/dev/ppbus/*.[ch] \ ${SYS}/dev/smbus/*.[ch] \ ${SYS}/dev/vx/*.[ch] \ @@ -78,7 +77,6 @@ COMMDIR2= ${SYS}/dev/advansys \ ${SYS}/dev/iicbus \ ${SYS}/dev/isp \ ${SYS}/dev/md \ - ${SYS}/dev/pdq \ ${SYS}/dev/ppbus \ ${SYS}/dev/smbus \ ${SYS}/dev/vx \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339547 - head/sys/net
Author: kp Date: Sun Oct 21 16:51:35 2018 New Revision: 339547 URL: https://svnweb.freebsd.org/changeset/base/339547 Log: vlan: Fix panic with lagg and vlan vlan_lladdr_fn() is called from taskqueue, which means there's no vnet context set. We can end up trying to send ARP messages (through the iflladdr_event event), which requires a vnet context. PR: 227654 MFC after:3 days Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c == --- head/sys/net/if_vlan.c Sun Oct 21 16:49:49 2018(r339546) +++ head/sys/net/if_vlan.c Sun Oct 21 16:51:35 2018(r339547) @@ -1302,8 +1302,13 @@ vlan_lladdr_fn(void *arg, int pending __unused) ifv = (struct ifvlan *)arg; ifp = ifv->ifv_ifp; + + CURVNET_SET(ifp->if_vnet); + /* The ifv_ifp already has the lladdr copied in. */ if_setlladdr(ifp, IF_LLADDR(ifp), ifp->if_addrlen); + + CURVNET_RESTORE(); } static int ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339548 - head/share/man/man4
Author: vmaffione Date: Sun Oct 21 17:15:09 2018 New Revision: 339548 URL: https://svnweb.freebsd.org/changeset/base/339548 Log: man: fix vale(4) port naming The current documentation describing the syntax of a VALE port is wrong. This patch fixes it to make it consistent. Approved by: bcr, gnn (mentor) Differential Revision:https://reviews.freebsd.org/D17411 Modified: head/share/man/man4/vale.4 Modified: head/share/man/man4/vale.4 == --- head/share/man/man4/vale.4 Sun Oct 21 16:51:35 2018(r339547) +++ head/share/man/man4/vale.4 Sun Oct 21 17:15:09 2018(r339548) @@ -59,18 +59,18 @@ API. .Pp .Nm ports are named -.Pa vale[bdg:][port] +.Pa valeSSS:PPP where .Pa vale is the prefix indicating a VALE switch rather than a standard interface, -.Pa bdg +.Pa SSS indicates a specific switch (the colon is a separator), and -.Pa port +.Pa PPP indicates a port within the switch. -Bridge and port names are arbitrary strings, the only -constraint being that the full name must fit within 16 -characters. +Both SSS and PPP have the form [0-9a-zA-Z_]+ , the string cannot +exceed IFNAMSIZ characters, and PPP cannot be the name of any +existing OS network interface. .Pp See .Xr netmap 4 @@ -97,22 +97,20 @@ Set to non-zero values to enable in-kernel diagnostics Create one switch, with a traffic generator connected to one port, and a netmap-enabled tcpdump instance on another port: .Bd -literal -offset indent -tcpdump -ni vale-a:1 & -pkt-gen -i vale-a:0 -f tx & +tcpdump -ni valea:1 & +pkt-gen -i valea:0 -f tx & .Ed .Pp Create two switches, each connected to two qemu machines on different ports. .Bd -literal -offset indent -qemu -net nic -net netmap,ifname=vale-1:a ... & -qemu -net nic -net netmap,ifname=vale-1:b ... & -qemu -net nic -net netmap,ifname=vale-2:c ... & -qemu -net nic -net netmap,ifname=vale-2:d ... & +qemu -net nic -net netmap,ifname=vale1:a ... & +qemu -net nic -net netmap,ifname=vale1:b ... & +qemu -net nic -net netmap,ifname=vale2:c ... & +qemu -net nic -net netmap,ifname=vale2:d ... & .Ed .Sh SEE ALSO .Xr netmap 4 -.Pp -.Xr http://info.iet.unipi.it/~luigi/vale/ .Pp Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines, June 2012, http://info.iet.unipi.it/~luigi/vale/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339550 - in head/sys: net netinet
Author: ae Date: Sun Oct 21 17:55:26 2018 New Revision: 339550 URL: https://svnweb.freebsd.org/changeset/base/339550 Log: Add KPI that can be used by tunneling interfaces to handle IP addresses appearing and disappearing on the host system. Such handling is need, because tunneling interfaces must use addresses, that are configured on the host as ingress addresses for tunnels. Otherwise the system can send spoofed packets with source address, that belongs to foreign host. The KPI uses ifaddr_event_ext event to implement addresses tracking. Tunneling interfaces register event handlers and then they are notified by the kernel, when an address disappears or appears. ifaddr_event_compat() handler from if.c replaced by srcaddr_change_event() in the ip_encap.c MFC after:1 month Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17134 Modified: head/sys/net/if.c head/sys/netinet/ip_encap.c head/sys/netinet/ip_encap.h Modified: head/sys/net/if.c == --- head/sys/net/if.c Sun Oct 21 17:38:52 2018(r339549) +++ head/sys/net/if.c Sun Oct 21 17:55:26 2018(r339550) @@ -328,18 +328,6 @@ static MALLOC_DEFINE(M_IFNET, "ifnet", "interface inte MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); -/* - * Support for old ifaddr_event. - */ -static void -ifaddr_event_compat(void *arg __unused, struct ifnet *ifp, -struct ifaddr *ifa __unused, int event __unused) -{ - - EVENTHANDLER_INVOKE(ifaddr_event, ifp); -} -EVENTHANDLER_DEFINE(ifaddr_event_ext, ifaddr_event_compat, NULL, 0); - struct ifnet * ifnet_byindex_locked(u_short idx) { Modified: head/sys/netinet/ip_encap.c == --- head/sys/netinet/ip_encap.c Sun Oct 21 17:38:52 2018(r339549) +++ head/sys/netinet/ip_encap.c Sun Oct 21 17:55:26 2018(r339550) @@ -100,22 +100,139 @@ struct encaptab { encap_input_t input; }; +struct srcaddrtab { + CK_LIST_ENTRY(srcaddrtab) chain; + + encap_srcaddr_t srcaddr; + void*arg; +}; + CK_LIST_HEAD(encaptab_head, encaptab); +CK_LIST_HEAD(srcaddrtab_head, srcaddrtab); #ifdef INET static struct encaptab_head ipv4_encaptab = CK_LIST_HEAD_INITIALIZER(); +static struct srcaddrtab_head ipv4_srcaddrtab = CK_LIST_HEAD_INITIALIZER(); #endif #ifdef INET6 static struct encaptab_head ipv6_encaptab = CK_LIST_HEAD_INITIALIZER(); +static struct srcaddrtab_head ipv6_srcaddrtab = CK_LIST_HEAD_INITIALIZER(); #endif -static struct mtx encapmtx; +static struct mtx encapmtx, srcaddrmtx; MTX_SYSINIT(encapmtx, &encapmtx, "encapmtx", MTX_DEF); +MTX_SYSINIT(srcaddrmtx, &srcaddrmtx, "srcaddrmtx", MTX_DEF); #defineENCAP_WLOCK() mtx_lock(&encapmtx) #defineENCAP_WUNLOCK() mtx_unlock(&encapmtx) -#defineENCAP_RLOCK() struct epoch_tracker encap_et; epoch_enter_preempt(net_epoch_preempt, &encap_et) -#defineENCAP_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &encap_et) +#defineENCAP_RLOCK_TRACKER struct epoch_tracker encap_et +#defineENCAP_RLOCK() \ +epoch_enter_preempt(net_epoch_preempt, &encap_et) +#defineENCAP_RUNLOCK() \ +epoch_exit_preempt(net_epoch_preempt, &encap_et) #defineENCAP_WAIT()epoch_wait_preempt(net_epoch_preempt) +#defineSRCADDR_WLOCK() mtx_lock(&srcaddrmtx) +#defineSRCADDR_WUNLOCK() mtx_unlock(&srcaddrmtx) +#defineSRCADDR_RLOCK_TRACKER struct epoch_tracker srcaddr_et +#defineSRCADDR_RLOCK() \ +epoch_enter_preempt(net_epoch_preempt, &srcaddr_et) +#defineSRCADDR_RUNLOCK() \ +epoch_exit_preempt(net_epoch_preempt, &srcaddr_et) +#defineSRCADDR_WAIT() epoch_wait_preempt(net_epoch_preempt) + +/* + * ifaddr_event_ext handler. + * + * Tunnelling interfaces may request the kernel to notify when + * some interface addresses appears or disappears. Usually tunnelling + * interface must use an address configured on the local machine as + * ingress address to be able receive datagramms and do not send + * spoofed packets. + */ +static void +srcaddr_change_event(void *arg __unused, struct ifnet *ifp, +struct ifaddr *ifa, int event) +{ + SRCADDR_RLOCK_TRACKER; + struct srcaddrtab_head *head; + struct srcaddrtab *p; + + /* Support for old ifaddr_event. */ + EVENTHANDLER_INVOKE(ifaddr_event, ifp); + + switch (ifa->ifa_addr->sa_family) { +#ifdef INET + case AF_INET: + head = &ipv4_srcaddrtab; + break; +#endif +#ifdef INET6 + case AF_INET6: + head = &ipv6_srcaddrtab; + break; +#endif + default: + /* ignore
svn commit: r339551 - in head: share/man/man4 sys/net sys/netinet sys/netinet6
Author: ae Date: Sun Oct 21 18:06:15 2018 New Revision: 339551 URL: https://svnweb.freebsd.org/changeset/base/339551 Log: Add handling for appearing/disappearing of ingress addresses to if_gif(4). * register handler for ingress address appearing/disappearing; * add new srcaddr hash table for fast softc lookup by srcaddr; * when srcaddr disappears, clear IFF_DRV_RUNNING flag from interface, and set it otherwise; * remove the note about ingress address from BUGS section. MFC after:1 month Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17134 Modified: head/share/man/man4/gif.4 head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c Modified: head/share/man/man4/gif.4 == --- head/share/man/man4/gif.4 Sun Oct 21 17:55:26 2018(r339550) +++ head/share/man/man4/gif.4 Sun Oct 21 18:06:15 2018(r339551) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 5, 2018 +.Dd October 21, 2018 .Dt GIF 4 .Os .Sh NAME @@ -206,15 +206,6 @@ and are picky about outer header fields. For example, you cannot usually use .Nm to talk with IPsec devices that use IPsec tunnel mode. -.Pp -The current code does not check if the ingress address -(outer source address) -configured in the -.Nm -interface makes sense. -Make sure to specify an address which belongs to your node. -Otherwise, your node will not be able to receive packets from the peer, -and it will generate packets with a spoofed source address. .Pp If the outer protocol is IPv4, .Nm Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Sun Oct 21 17:55:26 2018(r339550) +++ head/sys/net/if_gif.c Sun Oct 21 18:06:15 2018(r339551) @@ -284,6 +284,7 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m) sc = ifp->if_softc; if ((ifp->if_flags & IFF_MONITOR) != 0 || (ifp->if_flags & IFF_UP) == 0 || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->gif_family == 0 || (error = if_tunnel_check_nesting(ifp, m, MTAG_GIF, V_max_gif_nesting)) != 0) { @@ -674,7 +675,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) cmd == SIOCSIFPHYADDR_IN6 || #endif 0) { - ifp->if_drv_flags |= IFF_DRV_RUNNING; if_link_state_change(ifp, LINK_STATE_UP); } } @@ -689,6 +689,7 @@ gif_delete_tunnel(struct gif_softc *sc) sx_assert(&gif_ioctl_sx, SA_XLOCKED); if (sc->gif_family != 0) { + CK_LIST_REMOVE(sc, srchash); CK_LIST_REMOVE(sc, chain); /* Wait until it become safe to free gif_hdr */ GIF_WAIT(); Modified: head/sys/net/if_gif.h == --- head/sys/net/if_gif.h Sun Oct 21 17:55:26 2018(r339550) +++ head/sys/net/if_gif.h Sun Oct 21 18:06:15 2018(r339551) @@ -63,6 +63,7 @@ struct gif_softc { } gif_uhdr; CK_LIST_ENTRY(gif_softc) chain; + CK_LIST_ENTRY(gif_softc) srchash; }; CK_LIST_HEAD(gif_list, gif_softc); MALLOC_DECLARE(M_GIF); Modified: head/sys/netinet/in_gif.c == --- head/sys/netinet/in_gif.c Sun Oct 21 17:55:26 2018(r339550) +++ head/sys/netinet/in_gif.c Sun Oct 21 18:06:15 2018(r339551) @@ -82,12 +82,16 @@ SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLA * Interfaces with GIF_IGNORE_SOURCE flag are linked into plain list. */ VNET_DEFINE_STATIC(struct gif_list *, ipv4_hashtbl) = NULL; +VNET_DEFINE_STATIC(struct gif_list *, ipv4_srchashtbl) = NULL; VNET_DEFINE_STATIC(struct gif_list, ipv4_list) = CK_LIST_HEAD_INITIALIZER(); #defineV_ipv4_hashtbl VNET(ipv4_hashtbl) +#defineV_ipv4_srchashtbl VNET(ipv4_srchashtbl) #defineV_ipv4_list VNET(ipv4_list) #defineGIF_HASH(src, dst) (V_ipv4_hashtbl[\ in_gif_hashval((src), (dst)) & (GIF_HASH_SIZE - 1)]) +#defineGIF_SRCHASH(src)(V_ipv4_srchashtbl[\ +fnv_32_buf(&(src), sizeof(src), FNV1_32_INIT) & (GIF_HASH_SIZE - 1)]) #defineGIF_HASH_SC(sc) GIF_HASH((sc)->gif_iphdr->ip_src.s_addr,\ (sc)->gif_iphdr->ip_dst.s_addr) static uint32_t @@ -119,7 +123,44 @@ in_gif_checkdup(const struct gif_softc *sc, in_addr_t return (0); } +/* + * Check that ingress address belongs to local host. + */ static void +in_gif_set_running(struct gif_softc *sc) +{ + + if (in_localip(sc->gif_iphdr->ip_src)) + GIF2IFP(sc)->if_drv_flags |= IFF_DRV_RUNNING; + else + GIF2IFP(sc)->if_drv_flags &= ~IFF_DRV_
svn commit: r339552 - in head/sys: net netinet netinet6
Author: ae Date: Sun Oct 21 18:13:45 2018 New Revision: 339552 URL: https://svnweb.freebsd.org/changeset/base/339552 Log: Add handling for appearing/disappearing of ingress addresses to if_gre(4). * register handler for ingress address appearing/disappearing; * add new srcaddr hash table for fast softc lookup by srcaddr; * when srcaddr disappears, clear IFF_DRV_RUNNING flag from interface, and set it otherwise; MFC after:1 month Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17214 Modified: head/sys/net/if_gre.c head/sys/net/if_gre.h head/sys/netinet/ip_gre.c head/sys/netinet6/ip6_gre.c Modified: head/sys/net/if_gre.c == --- head/sys/net/if_gre.c Sun Oct 21 18:06:15 2018(r339551) +++ head/sys/net/if_gre.c Sun Oct 21 18:13:45 2018(r339552) @@ -326,7 +326,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) cmd == SIOCSIFPHYADDR_IN6 || #endif 0) { - ifp->if_drv_flags |= IFF_DRV_RUNNING; if_link_state_change(ifp, LINK_STATE_UP); } } @@ -342,6 +341,7 @@ gre_delete_tunnel(struct gre_softc *sc) sx_assert(&gre_ioctl_sx, SA_XLOCKED); if (sc->gre_family != 0) { CK_LIST_REMOVE(sc, chain); + CK_LIST_REMOVE(sc, srchash); GRE_WAIT(); free(sc->gre_hdr, M_GRE); sc->gre_family = 0; @@ -543,6 +543,7 @@ gre_setseqn(struct grehdr *gh, uint32_t seq) static int gre_transmit(struct ifnet *ifp, struct mbuf *m) { + GRE_RLOCK_TRACKER; struct gre_softc *sc; struct grehdr *gh; uint32_t af; @@ -562,6 +563,7 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) sc = ifp->if_softc; if ((ifp->if_flags & IFF_MONITOR) != 0 || (ifp->if_flags & IFF_UP) == 0 || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->gre_family == 0 || (error = if_tunnel_check_nesting(ifp, m, MTAG_GRE, V_max_gre_nesting)) != 0) { Modified: head/sys/net/if_gre.h == --- head/sys/net/if_gre.h Sun Oct 21 18:06:15 2018(r339551) +++ head/sys/net/if_gre.h Sun Oct 21 18:13:45 2018(r339552) @@ -82,6 +82,7 @@ struct gre_softc { } gre_uhdr; CK_LIST_ENTRY(gre_softc) chain; + CK_LIST_ENTRY(gre_softc) srchash; }; CK_LIST_HEAD(gre_list, gre_softc); MALLOC_DECLARE(M_GRE); @@ -91,7 +92,8 @@ MALLOC_DECLARE(M_GRE); #endif #defineGRE2IFP(sc) ((sc)->gre_ifp) -#defineGRE_RLOCK() struct epoch_tracker gre_et; epoch_enter_preempt(net_epoch_preempt, &gre_et) +#defineGRE_RLOCK_TRACKER struct epoch_tracker gre_et +#defineGRE_RLOCK() epoch_enter_preempt(net_epoch_preempt, &gre_et) #defineGRE_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &gre_et) #defineGRE_WAIT() epoch_wait_preempt(net_epoch_preempt) Modified: head/sys/netinet/ip_gre.c == --- head/sys/netinet/ip_gre.c Sun Oct 21 18:06:15 2018(r339551) +++ head/sys/netinet/ip_gre.c Sun Oct 21 18:13:45 2018(r339552) @@ -75,9 +75,13 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, grettl, CTLFLAG_VNE &VNET_NAME(ip_gre_ttl), 0, "Default TTL value for encapsulated packets"); VNET_DEFINE_STATIC(struct gre_list *, ipv4_hashtbl) = NULL; +VNET_DEFINE_STATIC(struct gre_list *, ipv4_srchashtbl) = NULL; #defineV_ipv4_hashtbl VNET(ipv4_hashtbl) +#defineV_ipv4_srchashtbl VNET(ipv4_srchashtbl) #defineGRE_HASH(src, dst) (V_ipv4_hashtbl[\ in_gre_hashval((src), (dst)) & (GRE_HASH_SIZE - 1)]) +#defineGRE_SRCHASH(src)(V_ipv4_srchashtbl[\ +fnv_32_buf(&(src), sizeof(src), FNV1_32_INIT) & (GRE_HASH_SIZE - 1)]) #defineGRE_HASH_SC(sc) GRE_HASH((sc)->gre_oip.ip_src.s_addr,\ (sc)->gre_oip.ip_dst.s_addr) @@ -138,7 +142,44 @@ in_gre_lookup(const struct mbuf *m, int off, int proto return (0); } +/* + * Check that ingress address belongs to local host. + */ static void +in_gre_set_running(struct gre_softc *sc) +{ + + if (in_localip(sc->gre_oip.ip_src)) + GRE2IFP(sc)->if_drv_flags |= IFF_DRV_RUNNING; + else + GRE2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING; +} + +/* + * ifaddr_event handler. + * Clear IFF_DRV_RUNNING flag when ingress address disappears to prevent + * source address spoofing. + */ +static void +in_gre_srcaddr(void *arg __unused, const struct sockaddr *sa, +int event __unused) +{ + const struct sockaddr_in *sin; + struct gre_softc *sc; + + if (V_ipv4_srchash
svn commit: r339553 - head/sys/net
Author: ae Date: Sun Oct 21 18:18:37 2018 New Revision: 339553 URL: https://svnweb.freebsd.org/changeset/base/339553 Log: Add handling for appearing/disappearing of ingress addresses to if_me(4). * register handler for ingress address appearing/disappearing; * add new srcaddr hash table for fast softc lookup by srcaddr; * when srcaddr disappears, clear IFF_DRV_RUNNING flag from interface, and set it otherwise; MFC after:1 month Sponsored by: Yandex LLC Modified: head/sys/net/if_me.c Modified: head/sys/net/if_me.c == --- head/sys/net/if_me.cSun Oct 21 18:13:45 2018(r339552) +++ head/sys/net/if_me.cSun Oct 21 18:18:37 2018(r339553) @@ -83,11 +83,13 @@ struct me_softc { struct in_addr me_dst; CK_LIST_ENTRY(me_softc) chain; + CK_LIST_ENTRY(me_softc) srchash; }; CK_LIST_HEAD(me_list, me_softc); #defineME2IFP(sc) ((sc)->me_ifp) #defineME_READY(sc)((sc)->me_src.s_addr != 0) -#defineME_RLOCK() struct epoch_tracker me_et; epoch_enter_preempt(net_epoch_preempt, &me_et) +#defineME_RLOCK_TRACKERstruct epoch_tracker me_et +#defineME_RLOCK() epoch_enter_preempt(net_epoch_preempt, &me_et) #defineME_RUNLOCK()epoch_exit_preempt(net_epoch_preempt, &me_et) #defineME_WAIT() epoch_wait_preempt(net_epoch_preempt) @@ -95,9 +97,13 @@ CK_LIST_HEAD(me_list, me_softc); #defineME_HASH_SIZE(1 << 4) #endif VNET_DEFINE_STATIC(struct me_list *, me_hashtbl) = NULL; +VNET_DEFINE_STATIC(struct me_list *, me_srchashtbl) = NULL; #defineV_me_hashtblVNET(me_hashtbl) +#defineV_me_srchashtbl VNET(me_srchashtbl) #defineME_HASH(src, dst) (V_me_hashtbl[\ me_hashval((src), (dst)) & (ME_HASH_SIZE - 1)]) +#defineME_SRCHASH(src) (V_me_srchashtbl[\ +fnv_32_buf(&(src), sizeof(src), FNV1_32_INIT) & (ME_HASH_SIZE - 1)]) static struct sx me_ioctl_sx; SX_SYSINIT(me_ioctl_sx, &me_ioctl_sx, "me_ioctl"); @@ -165,8 +171,10 @@ static void vnet_me_uninit(const void *unused __unused) { - if (V_me_hashtbl != NULL) + if (V_me_hashtbl != NULL) { free(V_me_hashtbl, M_IFME); + free(V_me_srchashtbl, M_IFME); + } if_clone_detach(V_me_cloner); } VNET_SYSUNINIT(vnet_me_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, @@ -330,6 +338,43 @@ me_lookup(const struct mbuf *m, int off, int proto, vo return (0); } +/* + * Check that ingress address belongs to local host. + */ +static void +me_set_running(struct me_softc *sc) +{ + + if (in_localip(sc->me_src)) + ME2IFP(sc)->if_drv_flags |= IFF_DRV_RUNNING; + else + ME2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING; +} + +/* + * ifaddr_event handler. + * Clear IFF_DRV_RUNNING flag when ingress address disappears to prevent + * source address spoofing. + */ +static void +me_srcaddr(void *arg __unused, const struct sockaddr *sa, +int event __unused) +{ + const struct sockaddr_in *sin; + struct me_softc *sc; + + if (V_me_srchashtbl == NULL) + return; + + MPASS(in_epoch(net_epoch_preempt)); + sin = (const struct sockaddr_in *)sa; + CK_LIST_FOREACH(sc, &ME_SRCHASH(sin->sin_addr.s_addr), srchash) { + if (sc->me_src.s_addr != sin->sin_addr.s_addr) + continue; + me_set_running(sc); + } +} + static int me_set_tunnel(struct me_softc *sc, in_addr_t src, in_addr_t dst) { @@ -337,8 +382,10 @@ me_set_tunnel(struct me_softc *sc, in_addr_t src, in_a sx_assert(&me_ioctl_sx, SA_XLOCKED); - if (V_me_hashtbl == NULL) + if (V_me_hashtbl == NULL) { V_me_hashtbl = me_hashinit(); + V_me_srchashtbl = me_hashinit(); + } if (sc->me_src.s_addr == src && sc->me_dst.s_addr == dst) return (0); @@ -355,8 +402,9 @@ me_set_tunnel(struct me_softc *sc, in_addr_t src, in_a sc->me_dst.s_addr = dst; sc->me_src.s_addr = src; CK_LIST_INSERT_HEAD(&ME_HASH(src, dst), sc, chain); + CK_LIST_INSERT_HEAD(&ME_SRCHASH(src), sc, srchash); - ME2IFP(sc)->if_drv_flags |= IFF_DRV_RUNNING; + me_set_running(sc); if_link_state_change(ME2IFP(sc), LINK_STATE_UP); return (0); } @@ -368,6 +416,7 @@ me_delete_tunnel(struct me_softc *sc) sx_assert(&me_ioctl_sx, SA_XLOCKED); if (ME_READY(sc)) { CK_LIST_REMOVE(sc, chain); + CK_LIST_REMOVE(sc, srchash); ME_WAIT(); sc->me_src.s_addr = 0; @@ -473,6 +522,7 @@ me_output(struct ifnet *ifp, struct mbuf *m, const str static int me_transmit(struct ifnet *ifp, struct mbuf *m) { + ME_RLOCK_TRACKER;
svn commit: r339554 - head/sys/net
Author: ae Date: Sun Oct 21 18:24:20 2018 New Revision: 339554 URL: https://svnweb.freebsd.org/changeset/base/339554 Log: Rework if_ipsec(4) to use epoch(9) instead of rmlock. * use CK_LIST and FNV hash to keep chains of softc; * read access to softc is protected by epoch(); * write access is protected by ipsec_ioctl_sx. Changing of softc fields is allowed only when softc is unlinked from CK_LIST chains. * linking/unlinking of softc is allowed only when ipsec_ioctl_sx is exclusive locked. * the plain LIST of all softc is replaced by hash table that uses ingress address of tunnels as a key. * added support for appearing/disappearing of ingress address handling. Now it is allowed configure non-local ingress IP address, and thus the problem with if_ipsec(4) configuration that happens on boot, when ingress address is not yet configured, is solved. MFC after:1 month Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17190 Modified: head/sys/net/if_ipsec.c Modified: head/sys/net/if_ipsec.c == --- head/sys/net/if_ipsec.c Sun Oct 21 18:18:37 2018(r339553) +++ head/sys/net/if_ipsec.c Sun Oct 21 18:24:20 2018(r339554) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2016 Yandex LLC - * Copyright (c) 2016 Andrey V. Elsukov + * Copyright (c) 2016-2018 Yandex LLC + * Copyright (c) 2016-2018 Andrey V. Elsukov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -61,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -87,58 +87,72 @@ static const char ipsecname[] = "ipsec"; struct ipsec_softc { struct ifnet*ifp; - - struct rmlock lock; struct secpolicy*sp[IPSEC_SPCOUNT]; - uint32_treqid; u_int family; u_int fibnum; - LIST_ENTRY(ipsec_softc) chain; - LIST_ENTRY(ipsec_softc) hash; + + CK_LIST_ENTRY(ipsec_softc) idhash; + CK_LIST_ENTRY(ipsec_softc) srchash; }; -#defineIPSEC_LOCK_INIT(sc) rm_init(&(sc)->lock, "if_ipsec softc") -#defineIPSEC_LOCK_DESTROY(sc) rm_destroy(&(sc)->lock) -#defineIPSEC_RLOCK_TRACKER struct rm_priotracker ipsec_tracker -#defineIPSEC_RLOCK(sc) rm_rlock(&(sc)->lock, &ipsec_tracker) -#defineIPSEC_RUNLOCK(sc) rm_runlock(&(sc)->lock, &ipsec_tracker) -#defineIPSEC_RLOCK_ASSERT(sc) rm_assert(&(sc)->lock, RA_RLOCKED) -#defineIPSEC_WLOCK(sc) rm_wlock(&(sc)->lock) -#defineIPSEC_WUNLOCK(sc) rm_wunlock(&(sc)->lock) -#defineIPSEC_WLOCK_ASSERT(sc) rm_assert(&(sc)->lock, RA_WLOCKED) +#defineIPSEC_RLOCK_TRACKER struct epoch_tracker ipsec_et +#defineIPSEC_RLOCK() epoch_enter_preempt(net_epoch_preempt, &ipsec_et) +#defineIPSEC_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &ipsec_et) +#defineIPSEC_WAIT()epoch_wait_preempt(net_epoch_preempt) -static struct rmlock ipsec_sc_lock; -RM_SYSINIT(ipsec_sc_lock, &ipsec_sc_lock, "if_ipsec softc list"); +#ifndef IPSEC_HASH_SIZE +#defineIPSEC_HASH_SIZE (1 << 5) +#endif -#defineIPSEC_SC_RLOCK_TRACKER struct rm_priotracker ipsec_sc_tracker -#defineIPSEC_SC_RLOCK()rm_rlock(&ipsec_sc_lock, &ipsec_sc_tracker) -#defineIPSEC_SC_RUNLOCK() rm_runlock(&ipsec_sc_lock, &ipsec_sc_tracker) -#defineIPSEC_SC_RLOCK_ASSERT() rm_assert(&ipsec_sc_lock, RA_RLOCKED) -#defineIPSEC_SC_WLOCK()rm_wlock(&ipsec_sc_lock) -#defineIPSEC_SC_WUNLOCK() rm_wunlock(&ipsec_sc_lock) -#defineIPSEC_SC_WLOCK_ASSERT() rm_assert(&ipsec_sc_lock, RA_WLOCKED) +CK_LIST_HEAD(ipsec_iflist, ipsec_softc); +VNET_DEFINE_STATIC(struct ipsec_iflist *, ipsec_idhtbl) = NULL; +#defineV_ipsec_idhtbl VNET(ipsec_idhtbl) -LIST_HEAD(ipsec_iflist, ipsec_softc); -VNET_DEFINE_STATIC(struct ipsec_iflist, ipsec_sc_list); -VNET_DEFINE_STATIC(struct ipsec_iflist *, ipsec_sc_htbl); -VNET_DEFINE_STATIC(u_long, ipsec_sc_hmask); -#defineV_ipsec_sc_list VNET(ipsec_sc_list) -#defineV_ipsec_sc_htbl VNET(ipsec_sc_htbl) -#defineV_ipsec_sc_hmaskVNET(ipsec_sc_hmask) +#ifdef INET +VNET_DEFINE_STATIC(struct ipsec_iflist *, ipsec4_srchtbl) = NULL; +#defineV_ipsec4_srchtblVNET(ipsec4_srchtbl) +static const struct srcaddrtab *ipsec4_srctab = NULL; +#endif -static uint32_t -ipsec_hash(uint32_t id) +#ifdef INET6 +VNET_DEFINE_STATIC(struct ipsec_iflist *, ipsec6_srchtbl) = NULL; +#defineV_ipsec6_srchtblVNET(ipsec6_srchtbl) +static const struct srcaddrtab *ipsec6_srctab
svn commit: r339555 - head/sys/net
Author: ae Date: Sun Oct 21 18:30:27 2018 New Revision: 339555 URL: https://svnweb.freebsd.org/changeset/base/339555 Log: Follow the fix in r339532 (by glebius): Fix exiting an epoch(9) we never entered. May happen only with MAC. MFC after:1 month Modified: head/sys/net/if_ipsec.c Modified: head/sys/net/if_ipsec.c == --- head/sys/net/if_ipsec.c Sun Oct 21 18:24:20 2018(r339554) +++ head/sys/net/if_ipsec.c Sun Oct 21 18:30:27 2018(r339555) @@ -323,6 +323,7 @@ ipsec_transmit(struct ifnet *ifp, struct mbuf *m) uint32_t af; int error; + IPSEC_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) { @@ -331,7 +332,6 @@ ipsec_transmit(struct ifnet *ifp, struct mbuf *m) } #endif error = ENETDOWN; - IPSEC_RLOCK(); sc = ifp->if_softc; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || (ifp->if_flags & IFF_MONITOR) != 0 || ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339556 - head/sys/netinet
Author: ae Date: Sun Oct 21 18:39:34 2018 New Revision: 339556 URL: https://svnweb.freebsd.org/changeset/base/339556 Log: Include to fix the build. MFC after:1 month Modified: head/sys/netinet/ip_encap.c Modified: head/sys/netinet/ip_encap.c == --- head/sys/netinet/ip_encap.c Sun Oct 21 18:30:27 2018(r339555) +++ head/sys/netinet/ip_encap.c Sun Oct 21 18:39:34 2018(r339556) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339523 - in head/sys: conf dev/amdgpio modules modules/amdgpio
Nathan Whitehorn (nwhiteh...@freebsd.org) wrote: > > > On 10/20/18 9:52 PM, Oleksandr Tymoshenko wrote: > > Author: gonzo > > Date: Sun Oct 21 04:52:37 2018 > > New Revision: 339523 > > URL: https://svnweb.freebsd.org/changeset/base/339523 > > > > Log: > > Add amdgpio, driver for GPIO controller on AMD-based x86_64 platforms > > > > Submitted by: Rajesh Kumar > > Differential Revision:https://reviews.freebsd.org/D16865 > > > [...] > > Modified: head/sys/modules/Makefile > > == > > --- head/sys/modules/Makefile Sun Oct 21 02:39:13 2018 > > (r339522) > > +++ head/sys/modules/Makefile Sun Oct 21 04:52:37 2018 > > (r339523) > > @@ -34,6 +34,7 @@ SUBDIR= \ > > ale \ > > alq \ > > ${_amd_ecc_inject} \ > > + ${_amdgpio} \ > > ${_amdsbwd} \ > > ${_amdsmn} \ > > ${_amdtemp} \ > > @@ -717,6 +718,7 @@ _x86bios= x86bios > > .endif > > > > .if ${MACHINE_CPUARCH} == "amd64" > > +_amdgpio= amdgpio > > _ccp= ccp > > _efirt=efirt > > _iavf= iavf > > > > Does this not work on 64-bit AMD processors running i386 kernels? I see no reason why it wouldn't. Probably just haven't been tested. -- gonzo ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339557 - head/contrib/tcpdump
Author: kp Date: Sun Oct 21 21:17:42 2018 New Revision: 339557 URL: https://svnweb.freebsd.org/changeset/base/339557 Log: tcpdump: Log uid on pflog interfaces If pf logs the user id ('pass out log (user)') have tcpdump also print this. Example output: 00:00:00.00 rule 0/0(match) [uid 1001]: pass out on vtnet0: (tos 0x0, ttl 64, id 57539, offset 0, flags [none], proto UDP (17), length 55) 172.16.2.2.18337 > 172.16.2.1.53: [bad udp cksum 0x5c58 -> 0x16e4!] 40222+ A? google.be. (27) PR: 122773 Differential Revision:https://reviews.freebsd.org/D17625 Modified: head/contrib/tcpdump/print-pflog.c Modified: head/contrib/tcpdump/print-pflog.c == --- head/contrib/tcpdump/print-pflog.c Sun Oct 21 18:39:34 2018 (r339556) +++ head/contrib/tcpdump/print-pflog.c Sun Oct 21 21:17:42 2018 (r339557) @@ -97,8 +97,12 @@ pflog_print(netdissect_options *ndo, const struct pflo else ND_PRINT((ndo, "rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr)); - ND_PRINT((ndo, "%s: %s %s on %s: ", - tok2str(pf_reasons, "unkn(%u)", hdr->reason), + ND_PRINT((ndo, "%s", tok2str(pf_reasons, "unkn(%u)", hdr->reason))); + + if (hdr->uid != UID_MAX) + ND_PRINT((ndo, " [uid %u]", (unsigned)hdr->uid)); + + ND_PRINT((ndo, ": %s %s on %s: ", tok2str(pf_actions, "unkn(%u)", hdr->action), tok2str(pf_directions, "unkn(%u)", hdr->dir), hdr->ifname)); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339558 - head/sys/netinet
Author: eugen Date: Sun Oct 21 21:29:19 2018 New Revision: 339558 URL: https://svnweb.freebsd.org/changeset/base/339558 Log: New sysctl: net.inet.icmp.error_keeptags Currently, icmp_error() function copies FIB number from original packet into generated ICMP response but not mbuf_tags(9) chain. This prevents us from easily matching ICMP responses corresponding to tagged original packets by means of packet filter such as ipfw(8). For example, ICMP "time-exceeded in-transit" packets usually generated in response to traceroute probes lose tags attached to original packets. This change adds new sysctl net.inet.icmp.error_keeptags that defaults to 0 to avoid extra overhead when this feature not needed. Set net.inet.icmp.error_keeptags=1 to make icmp_error() copy mbuf_tags from original packet to generated ICMP response. PR: 215874 MFC after:1 month Modified: head/sys/netinet/ip_icmp.c Modified: head/sys/netinet/ip_icmp.c == --- head/sys/netinet/ip_icmp.c Sun Oct 21 21:17:42 2018(r339557) +++ head/sys/netinet/ip_icmp.c Sun Oct 21 21:29:19 2018(r339558) @@ -158,6 +158,12 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFL &VNET_NAME(icmptstamprepl), 0, "Respond to ICMP Timestamp packets"); +VNET_DEFINE_STATIC(int, error_keeptags) = 0; +#defineV_error_keeptagsVNET(error_keeptags) +SYSCTL_INT(_net_inet_icmp, OID_AUTO, error_keeptags, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(error_keeptags), 0, + "ICMP error response keeps copy of mbuf_tags of original packet"); + #ifdef ICMPPRINTFS inticmpprintfs = 0; #endif @@ -367,6 +373,10 @@ stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs nip->ip_p = IPPROTO_ICMP; nip->ip_tos = 0; nip->ip_off = 0; + + if (V_error_keeptags) + m_tag_copy_chain(m, n, M_NOWAIT); + icmp_reflect(m); freeit: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339559 - in head/sys/powerpc: booke include
Author: jhibbits Date: Mon Oct 22 00:21:27 2018 New Revision: 339559 URL: https://svnweb.freebsd.org/changeset/base/339559 Log: powerpc/booke: Turn tlb*_print_tlbentries() into 'show tlb*' DDB commands debugf() is unnecessary for the TLB printing functions, as they're only intended to be used from ddb. Instead, make them full DDB 'show' commands, so now it can be written as 'show tlb1' and 'show tlb0' instead of calling the function, hoping DEBUG has been defined. Modified: head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/tlb.h Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c Sun Oct 21 21:29:19 2018 (r339558) +++ head/sys/powerpc/booke/pmap.c Mon Oct 22 00:21:27 2018 (r339559) @@ -77,6 +77,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" #include "opt_kstack_pages.h" #include @@ -123,6 +124,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "mmu_if.h" #defineSPARSE_MAPDEV @@ -221,11 +224,13 @@ static vm_offset_t tlb1_map_base = VM_MAXUSER_ADDRESS static tlbtid_t tid_alloc(struct pmap *); static void tid_flush(tlbtid_t tid); +#ifdef DDB #ifdef __powerpc64__ static void tlb_print_entry(int, uint32_t, uint64_t, uint32_t, uint32_t); #else static void tlb_print_entry(int, uint32_t, uint32_t, uint32_t, uint32_t); #endif +#endif static void tlb1_read_entry(tlb_entry_t *, unsigned int); static void tlb1_write_entry(tlb_entry_t *, unsigned int); @@ -3783,45 +3788,6 @@ tid_alloc(pmap_t pmap) /* TLB0 handling */ /**/ -static void -#ifdef __powerpc64__ -tlb_print_entry(int i, uint32_t mas1, uint64_t mas2, uint32_t mas3, -#else -tlb_print_entry(int i, uint32_t mas1, uint32_t mas2, uint32_t mas3, -#endif -uint32_t mas7) -{ - int as; - char desc[3]; - tlbtid_t tid; - vm_size_t size; - unsigned int tsize; - - desc[2] = '\0'; - if (mas1 & MAS1_VALID) - desc[0] = 'V'; - else - desc[0] = ' '; - - if (mas1 & MAS1_IPROT) - desc[1] = 'P'; - else - desc[1] = ' '; - - as = (mas1 & MAS1_TS_MASK) ? 1 : 0; - tid = MAS1_GETTID(mas1); - - tsize = (mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; - size = 0; - if (tsize) - size = tsize2size(tsize); - - debugf("%3d: (%s) [AS=%d] " - "sz = 0x%08x tsz = %d tid = %d mas1 = 0x%08x " - "mas2(va) = 0x%"PRI0ptrX" mas3(pa) = 0x%08x mas7 = 0x%08x\n", - i, desc, as, size, tsize, tid, mas1, mas2, mas3, mas7); -} - /* Convert TLB0 va and way number to tlb0[] table index. */ static inline unsigned int tlb0_tableidx(vm_offset_t va, unsigned int way) @@ -3851,41 +3817,7 @@ tlb0_flush_entry(vm_offset_t va) CTR1(KTR_PMAP, "%s: e", __func__); } -/* Print out contents of the MAS registers for each TLB0 entry */ -void -tlb0_print_tlbentries(void) -{ - uint32_t mas0, mas1, mas3, mas7; -#ifdef __powerpc64__ - uint64_t mas2; -#else - uint32_t mas2; -#endif - int entryidx, way, idx; - debugf("TLB0 entries:\n"); - for (way = 0; way < TLB0_WAYS; way ++) - for (entryidx = 0; entryidx < TLB0_ENTRIES_PER_WAY; entryidx++) { - - mas0 = MAS0_TLBSEL(0) | MAS0_ESEL(way); - mtspr(SPR_MAS0, mas0); - __asm __volatile("isync"); - - mas2 = entryidx << MAS2_TLB0_ENTRY_IDX_SHIFT; - mtspr(SPR_MAS2, mas2); - - __asm __volatile("isync; tlbre"); - - mas1 = mfspr(SPR_MAS1); - mas2 = mfspr(SPR_MAS2); - mas3 = mfspr(SPR_MAS3); - mas7 = mfspr(SPR_MAS7); - - idx = tlb0_tableidx(mas2, way); - tlb_print_entry(idx, mas1, mas2, mas3, mas7); - } -} - /**/ /* TLB1 handling */ /**/ @@ -4329,37 +4261,7 @@ set_mas4_defaults(void) __asm __volatile("isync"); } -/* - * Print out contents of the MAS registers for each TLB1 entry - */ -void -tlb1_print_tlbentries(void) -{ - uint32_t mas0, mas1, mas3, mas7; -#ifdef __powerpc64__ - uint64_t mas2; -#else - uint32_t mas2; -#endif - int i; - debugf("TLB1 entries:\n"); - for (i = 0; i < TLB1_ENTRIES; i++) { - - mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(i); - mtspr(SPR_MAS0, mas0); - - __asm __volatile("isync; tlbre"); - - mas1 = mfspr(SPR_MAS1); - mas2 = mfspr(SPR_MAS2); - mas3 = mfspr(SPR_MAS3); -
svn commit: r339560 - head/sys/powerpc/powerpc
Author: jhibbits Date: Mon Oct 22 00:27:37 2018 New Revision: 339560 URL: https://svnweb.freebsd.org/changeset/base/339560 Log: powerpc: stash off srr0 in si_addr for signals si_addr is the address of the instruction executing at the time the signal was sent. Populate this field with srr0, which, though not always the case, is most often the instruction that triggered the fault. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c == --- head/sys/powerpc/powerpc/trap.c Mon Oct 22 00:21:27 2018 (r339559) +++ head/sys/powerpc/powerpc/trap.c Mon Oct 22 00:27:37 2018 (r339560) @@ -438,7 +438,7 @@ trap(struct trapframe *frame) ksiginfo_init_trap(&ksi); ksi.ksi_signo = sig; ksi.ksi_code = (int) ucode; /* XXX, not POSIX */ - /* ksi.ksi_addr = ? */ + ksi.ksi_addr = (void *)frame->srr0; ksi.ksi_trapno = type; trapsignal(td, &ksi); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339561 - head/sys/crypto/chacha20
Author: cem Date: Mon Oct 22 01:27:11 2018 New Revision: 339561 URL: https://svnweb.freebsd.org/changeset/base/339561 Log: Add explicit copyright text to trivial header Reported by: rgrimes Modified: head/sys/crypto/chacha20/_chacha.h Modified: head/sys/crypto/chacha20/_chacha.h == --- head/sys/crypto/chacha20/_chacha.h Mon Oct 22 00:27:37 2018 (r339560) +++ head/sys/crypto/chacha20/_chacha.h Mon Oct 22 01:27:11 2018 (r339561) @@ -1,4 +1,7 @@ /* $FreeBSD$ */ +/* + * Public domain. + */ #ifndef _CHACHA_H #define _CHACHA_H ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339562 - in head/sys: amd64/conf i386/conf
Author: imp Date: Mon Oct 22 02:28:18 2018 New Revision: 339562 URL: https://svnweb.freebsd.org/changeset/base/339562 Log: Remove the gone_in(12) devices. We're planning on removing adv, adw, aha, aic, bt, ncv, nsp, and stg soon. They have been tagged for removal in 12. At least get them out of GENERIC. MFC after: 3 days Relnotes: yes Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Mon Oct 22 01:27:11 2018(r339561) +++ head/sys/amd64/conf/GENERIC Mon Oct 22 02:28:18 2018(r339562) @@ -142,11 +142,6 @@ device mpr # LSI-Logic MPT-Fusion 3 #devicencr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters - -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters device isci# Intel C600 SAS controller device ocs_fc # Emulex FC adapters Modified: head/sys/i386/conf/GENERIC == --- head/sys/i386/conf/GENERIC Mon Oct 22 01:27:11 2018(r339561) +++ head/sys/i386/conf/GENERIC Mon Oct 22 02:28:18 2018(r339562) @@ -135,16 +135,6 @@ device mpr # LSI-Logic MPT-Fusion 3 #devicencr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters - -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aha # Adaptec 154x SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters - -device ncv # NCR 53C500 -device nsp # Workbit Ninja SCSI-3 -device stg # TMC 18C30/18C50 device isci# Intel C600 SAS controller # ATA/SCSI peripherals ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339564 - in head: . share/man/man4 share/man/man4/man4.i386 share/man/man5 sys/conf sys/dev/mse sys/i386/conf sys/modules sys/modules/mse sys/sys tools/kerneldoc/subsys usr.sbin/bsdcon...
Author: imp Date: Mon Oct 22 02:34:10 2018 New Revision: 339564 URL: https://svnweb.freebsd.org/changeset/base/339564 Log: Remove mse(4) from tree Remove mse and all support for bus and inport devices from the tree. Data from nycbug's dmesg database shows the last sighting of this driver was in 4.10 on only one machine. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D17628 Deleted: head/share/man/man4/man4.i386/mse.4 head/sys/dev/mse/mse.c head/sys/dev/mse/mse_isa.c head/sys/dev/mse/msevar.h head/sys/modules/mse/Makefile head/tools/kerneldoc/subsys/Doxyfile-dev_mse Modified: head/ObsoleteFiles.inc head/share/man/man4/man4.i386/Makefile head/share/man/man4/mouse.4 head/share/man/man4/psm.4 head/share/man/man5/rc.conf.5 head/sys/conf/files.i386 head/sys/i386/conf/NOTES head/sys/modules/Makefile head/sys/sys/mouse.h head/usr.sbin/bsdconfig/mouse/include/messages.subr head/usr.sbin/bsdconfig/mouse/port head/usr.sbin/moused/moused.8 head/usr.sbin/moused/moused.c Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Oct 22 02:34:00 2018(r339563) +++ head/ObsoleteFiles.inc Mon Oct 22 02:34:10 2018(r339564) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20181021: mse(4) removal +OLD_FILES+=usr/share/man/man4/mse.4.gz # 20181021: joy(4) removal OLD_FILES+=usr/share/man/man4/joy.4.gz OLD_FILES+=usr/include/sys/joystick.h Modified: head/share/man/man4/man4.i386/Makefile == --- head/share/man/man4/man4.i386/Makefile Mon Oct 22 02:34:00 2018 (r339563) +++ head/share/man/man4/man4.i386/Makefile Mon Oct 22 02:34:10 2018 (r339564) @@ -16,7 +16,6 @@ MAN= aic.4 \ glxiic.4 \ glxsb.4 \ longrun.4 \ - mse.4 \ npx.4 \ pae.4 \ pbio.4 \ Modified: head/share/man/man4/mouse.4 == --- head/share/man/man4/mouse.4 Mon Oct 22 02:34:00 2018(r339563) +++ head/share/man/man4/mouse.4 Mon Oct 22 02:34:10 2018(r339564) @@ -36,7 +36,6 @@ .In sys/mouse.h .Sh DESCRIPTION The mouse drivers -.Xr mse 4 , .Xr psm 4 , .Xr ums 4 and @@ -360,8 +359,6 @@ command. .Bl -tag -width /dev/sysmouseXX -compact .It Pa /dev/cuau%d serial ports -.It Pa /dev/mse%d -bus and InPort mouse device .It Pa /dev/psm%d PS/2 mouse device .It Pa /dev/sysmouse @@ -371,7 +368,6 @@ USB mouse device .El .Sh SEE ALSO .Xr ioctl 2 , -.Xr mse 4 , .Xr psm 4 , .Xr sysmouse 4 , .Xr ums 4 , Modified: head/share/man/man4/psm.4 == --- head/share/man/man4/psm.4 Mon Oct 22 02:34:00 2018(r339563) +++ head/share/man/man4/psm.4 Mon Oct 22 02:34:10 2018(r339564) @@ -806,7 +806,6 @@ At debug level 2, much more detailed information is lo .Xr syslog 3 , .Xr atkbdc 4 , .Xr mouse 4 , -.Xr mse 4 , .Xr sysmouse 4 , .Xr moused 8 , .Xr syslogd 8 Modified: head/share/man/man5/rc.conf.5 == --- head/share/man/man5/rc.conf.5 Mon Oct 22 02:34:00 2018 (r339563) +++ head/share/man/man5/rc.conf.5 Mon Oct 22 02:34:10 2018 (r339564) @@ -3256,11 +3256,9 @@ is set to this is the actual port the mouse is on. It might be .Pa /dev/cuau0 -for a COM1 serial mouse, +for a COM1 serial mouse, or .Pa /dev/psm0 -for a PS/2 mouse or -.Pa /dev/mse0 -for a bus mouse, for example. +for a PS/2 mouse, for example. .It Va moused_flags .Pq Vt str If Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Mon Oct 22 02:34:00 2018(r339563) +++ head/sys/conf/files.i386Mon Oct 22 02:34:10 2018(r339564) @@ -278,8 +278,6 @@ dev/ipmi/ipmi_ssif.coptional ipmi smbus dev/ipmi/ipmi_pci.coptional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux dev/le/if_le_isa.c optional le isa -dev/mse/mse.c optional mse -dev/mse/mse_isa.c optional mse isa dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.coptional if_ntb Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESMon Oct 22 02:34:00 2018(r339563) +++ head/sys/i386/conf/NOTESMon Oct 22 02:34:10 2018(r339564) @@ -501,14 +501,6 @@ device viadrm # VIA optionsDRM_DEBUG # Include debug printfs (slow) # -# mse: Logitech and ATI InPort bus mouse ports - -device mse -hint.mse
svn commit: r339563 - in head: . share/man/man4 sys/conf sys/dev/joy sys/modules sys/modules/joy sys/sys tools/kerneldoc/subsys
Author: imp Date: Mon Oct 22 02:34:00 2018 New Revision: 339563 URL: https://svnweb.freebsd.org/changeset/base/339563 Log: Remove joy(4) driver. This driver was marked as gone in 12. We're at 13 now. Remove it. Data from nycbug's dmesg cache shows only one potential user, suggesting it never was used much. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D17629 Deleted: head/share/man/man4/joy.4 head/sys/dev/joy/joy.c head/sys/dev/joy/joy_isa.c head/sys/dev/joy/joyvar.h head/sys/modules/joy/Makefile head/sys/sys/joystick.h head/tools/kerneldoc/subsys/Doxyfile-dev_joy Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/modules/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Oct 22 02:28:18 2018(r339562) +++ head/ObsoleteFiles.inc Mon Oct 22 02:34:00 2018(r339563) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20181021: joy(4) removal +OLD_FILES+=usr/share/man/man4/joy.4.gz +OLD_FILES+=usr/include/sys/joystick.h # 20181015: Stale libcasper(3) files following r329452 OLD_LIBS+=lib/casper/libcap_sysctl.so.0 OLD_LIBS+=lib/casper/libcap_grp.so.0 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:28:18 2018 (r339562) +++ head/share/man/man4/MakefileMon Oct 22 02:34:00 2018 (r339563) @@ -243,7 +243,6 @@ MAN=aac.4 \ ixl.4 \ jedec_dimm.4 \ jme.4 \ - joy.4 \ kbdmux.4 \ keyboard.4 \ kld.4 \ Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:28:18 2018(r339562) +++ head/sys/conf/NOTES Mon Oct 22 02:34:00 2018(r339563) @@ -2366,12 +2366,8 @@ options SND_OLDSTEREO # Miscellaneous hardware: # # bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board -# joy: joystick (including IO DATA PCJOY PC Card joystick) # cmx: OmniKey CardMan 4040 pccard smartcard reader -device joy # PnP aware, hints for non-PnP only -hint.joy.0.at="isa" -hint.joy.0.port="0x201" device cmx # Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:28:18 2018(r339562) +++ head/sys/conf/files Mon Oct 22 02:34:00 2018(r339563) @@ -2311,8 +2311,6 @@ dev/ixgbe/ixgbe_dcb_82599.c optional ix inet | ixv ine compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jedec_dimm/jedec_dimm.coptional jedec_dimm smbus dev/jme/if_jme.c optional jme pci -dev/joy/joy.c optional joy -dev/joy/joy_isa.c optional joy isa dev/kbd/kbd.c optional atkbd | pckbd | sc | ukbd | vt dev/kbdmux/kbdmux.coptional kbdmux dev/ksyms/ksyms.c optional ksyms Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 22 02:28:18 2018(r339562) +++ head/sys/modules/Makefile Mon Oct 22 02:34:00 2018(r339563) @@ -208,7 +208,6 @@ SUBDIR= \ ${_ixv} \ ${_ixl} \ jme \ - joy \ kbdmux \ kgssapi \ kgssapi_krb5 \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339568 - in head: share/man/man4 sys/conf sys/dev/buslogic sys/kern sys/sparc64/conf
Author: imp Date: Mon Oct 22 02:34:59 2018 New Revision: 339568 URL: https://svnweb.freebsd.org/changeset/base/339568 Log: Remove bt(4) driver The buslogic scsi driver has been tagged as gone in 12 for some time now. Remove it. The nycbug dmesg database shows only one sighting in 6 for this driver. It was very popular in the early days of the project, but that popularity seems to have died by 2004 when the nycbug database started up. Relnotes: yes Deleted: head/sys/dev/buslogic/bt.c head/sys/dev/buslogic/bt_isa.c head/sys/dev/buslogic/bt_pci.c head/sys/dev/buslogic/btreg.h Modified: head/share/man/man4/scsi.4 head/sys/conf/NOTES head/sys/conf/files head/sys/kern/Make.tags.inc head/sys/sparc64/conf/NOTES Modified: head/share/man/man4/scsi.4 == --- head/share/man/man4/scsi.4 Mon Oct 22 02:34:47 2018(r339567) +++ head/share/man/man4/scsi.4 Mon Oct 22 02:34:59 2018(r339568) @@ -348,7 +348,6 @@ for details. .Xr ahci 4 , .Xr ahd 4 , .Xr ata 4 , -.Xr bt 4 , .Xr cd 4 , .Xr ch 4 , .Xr da 4 , Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:34:47 2018(r339567) +++ head/sys/conf/NOTES Mon Oct 22 02:34:59 2018(r339568) @@ -1551,8 +1551,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. -# bt: Most Buslogic controllers: including BT-445, BT-54x, BT-64x, BT-74x, -# BT-75x, BT-946, BT-948, BT-956, BT-958, SDC3211B, SDC3211F, SDC3222F # esp: Emulex ESP, NCR 53C9x and QLogic FAS families based controllers # including the AMD Am53C974 (found on devices such as the Tekram # DC-390(T)) and the Sun ESP and FAS families of controllers @@ -1572,13 +1570,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # 53C1010-33, 53C1010-66. # trm: Tekram DC395U/UW/F DC315U adapters. -# -# Note that the order is important in order for Buslogic ISA cards to be -# probed correctly. -# -device bt -hint.bt.0.at="isa" -hint.bt.0.port="0x330" device ahc device ahd device esp Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:34:47 2018(r339567) +++ head/sys/conf/files Mon Oct 22 02:34:59 2018(r339568) @@ -1327,9 +1327,6 @@ dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci dev/bnxt/bnxt_txrx.c optional bnxt iflib pci dev/bnxt/if_bnxt.c optional bnxt iflib pci -dev/buslogic/bt.c optional bt -dev/buslogic/bt_isa.c optional bt isa -dev/buslogic/bt_pci.c optional bt pci dev/bwi/bwimac.c optional bwi dev/bwi/bwiphy.c optional bwi dev/bwi/bwirf.coptional bwi Modified: head/sys/kern/Make.tags.inc == --- head/sys/kern/Make.tags.inc Mon Oct 22 02:34:47 2018(r339567) +++ head/sys/kern/Make.tags.inc Mon Oct 22 02:34:59 2018(r339568) @@ -12,7 +12,6 @@ SYS?= ${.CURDIR}/.. COMM= ${SYS}/sys/vnode.h \ ${SYS}/dev/alc/*.[ch] \ - ${SYS}/dev/buslogic/*.[ch] \ ${SYS}/dev/dpt/*.[ch] \ ${SYS}/dev/en/*.[ch] \ ${SYS}/dev/iicbus/*.[ch] \ @@ -67,7 +66,6 @@ COMMDIR1= ${SYS}/conf \ ${SYS}/sys COMMDIR2= ${SYS}/dev/alc \ - ${SYS}/dev/buslogic \ ${SYS}/dev/dpt \ ${SYS}/dev/en \ ${SYS}/dev/iicbus \ Modified: head/sys/sparc64/conf/NOTES == --- head/sys/sparc64/conf/NOTES Mon Oct 22 02:34:47 2018(r339567) +++ head/sys/sparc64/conf/NOTES Mon Oct 22 02:34:59 2018(r339568) @@ -119,7 +119,6 @@ nodevicesnd_via8233 nodevice snd_via82c686 nodevice snd_vibes nodevice snd_uaudio -nodevice bt nodevice ep nodevice ex ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339567 - in head: share/man/man4 sys/conf sys/dev/advansys sys/kern
Author: imp Date: Mon Oct 22 02:34:47 2018 New Revision: 339567 URL: https://svnweb.freebsd.org/changeset/base/339567 Log: Remove adv(4) and adw(4) Remove the advanssy drivers (both adv and adw). They were tagged as gone in 12 a while qgo. The nycbug dmesg database shows this was last seen in 6 and there were only a few adv sightings then (none for adw). Relnotes: yes Deleted: head/share/man/man4/adv.4 head/share/man/man4/adw.4 head/sys/dev/advansys/adv_isa.c head/sys/dev/advansys/adv_pci.c head/sys/dev/advansys/advansys.c head/sys/dev/advansys/advansys.h head/sys/dev/advansys/advlib.c head/sys/dev/advansys/advlib.h head/sys/dev/advansys/advmcode.c head/sys/dev/advansys/advmcode.h head/sys/dev/advansys/adw_pci.c head/sys/dev/advansys/adwcam.c head/sys/dev/advansys/adwlib.c head/sys/dev/advansys/adwlib.h head/sys/dev/advansys/adwmcode.c head/sys/dev/advansys/adwmcode.h head/sys/dev/advansys/adwvar.h Modified: head/share/man/man4/Makefile head/sys/conf/NOTES head/sys/conf/WITHOUT_SOURCELESS_UCODE head/sys/conf/files head/sys/conf/files.i386 head/sys/conf/options head/sys/kern/Make.tags.inc Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:34:35 2018 (r339566) +++ head/share/man/man4/MakefileMon Oct 22 02:34:47 2018 (r339567) @@ -23,8 +23,6 @@ MAN= aac.4 \ ${_acpi_wmi.4} \ ada.4 \ adm6996fc.4 \ - adv.4 \ - adw.4 \ ae.4 \ ${_aesni.4} \ age.4 \ Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:34:35 2018(r339566) +++ head/sys/conf/NOTES Mon Oct 22 02:34:47 2018(r339567) @@ -1548,8 +1548,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # # SCSI host adapters: # -# adv: All Narrow SCSI bus AdvanSys controllers. -# adw: Second Generation AdvanSys controllers including the ADV940UW. # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. @@ -1581,9 +1579,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) device bt hint.bt.0.at="isa" hint.bt.0.port="0x330" -device adv -hint.adv.0.at="isa" -device adw device ahc device ahd device esp @@ -1643,10 +1638,6 @@ options AHD_REG_PRETTY_PRINT # Bitmap of units to enable targetmode operations. optionsAHD_TMODE_ENABLE - -# The adw driver will attempt to use memory mapped I/O for all PCI -# controllers that have it configured only if this option is set. -optionsADW_ALLOW_MEMIO # Options used in dev/iscsi (Software iSCSI stack) # Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE == --- head/sys/conf/WITHOUT_SOURCELESS_UCODE Mon Oct 22 02:34:35 2018 (r339566) +++ head/sys/conf/WITHOUT_SOURCELESS_UCODE Mon Oct 22 02:34:47 2018 (r339567) @@ -4,7 +4,6 @@ # # $FreeBSD$ -nodevice adw nodevice bce nodevice fxp nodevice ispfw Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:34:35 2018(r339566) +++ head/sys/conf/files Mon Oct 22 02:34:47 2018(r339567) @@ -755,14 +755,6 @@ dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_video.coptional acpi_video acpi dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.coptional adlink -dev/advansys/adv_pci.c optional adv pci -dev/advansys/advansys.coptional adv -dev/advansys/advlib.c optional adv -dev/advansys/advmcode.coptional adv -dev/advansys/adw_pci.c optional adw pci -dev/advansys/adwcam.c optional adw -dev/advansys/adwlib.c optional adw -dev/advansys/adwmcode.coptional adw dev/ae/if_ae.c optional ae pci dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Mon Oct 22 02:34:35 2018(r339566) +++ head/sys/conf/files.i386Mon Oct 22 02:34:47 2018(r339567) @@ -151,7 +151,6 @@ dev/acpica/acpi_pci_link.c optional acpi pci dev/acpica/acpi_pcib.c optional acpi pci dev/acpica/acpi_pcib_acpi.coptional acpi pci dev/acpica/acpi_pcib_pci.c optional acpi pci -dev/advansys/adv_isa.c optional adv isa dev/agp/agp_ali.c optional agp dev/agp/agp_amd.c optional agp dev/agp/agp_amd64.coptional agp Modi
svn commit: r339569 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/dpt sys/i386/conf sys/kern sys/modules sys/modules/dpt
Author: imp Date: Mon Oct 22 02:35:12 2018 New Revision: 339569 URL: https://svnweb.freebsd.org/changeset/base/339569 Log: Retire dpt(4) Marked as gone in 12 and not relevant since the early 90s. No sightings in nycbug's dmesg database. Relnotes: yes Deleted: head/share/man/man4/dpt.4 head/sys/dev/dpt/dpt.h head/sys/dev/dpt/dpt_pci.c head/sys/dev/dpt/dpt_scsi.c head/sys/modules/dpt/Makefile Modified: head/share/man/man4/Makefile head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/kern/Make.tags.inc head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:34:59 2018 (r339568) +++ head/share/man/man4/MakefileMon Oct 22 02:35:12 2018 (r339569) @@ -132,7 +132,6 @@ MAN=aac.4 \ disc.4 \ divert.4 \ ${_dpms.4} \ - dpt.4 \ ds1307.4 \ ds3231.4 \ ${_dtrace_provs} \ Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Mon Oct 22 02:34:59 2018(r339568) +++ head/sys/amd64/conf/GENERIC Mon Oct 22 02:35:12 2018(r339569) @@ -159,7 +159,6 @@ device ses # Enclosure Services (SES and SAF-TE) device amr # AMI MegaRAID device arcmsr # Areca SATA II RAID device ciss# Compaq Smart RAID 5* -device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptnr # Highpoint DC7280, R750 device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:34:59 2018(r339568) +++ head/sys/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) @@ -1663,27 +1663,6 @@ options ISP_DEFAULT_ROLES=0 #options SYM_SETUP_MAX_LUN #-Number of LUNs supported # default:8, range:[1..64] -# The 'dpt' driver provides support for old DPT controllers (http://www.dpt.com/). -# These have hardware RAID-{0,1,5} support, and do multi-initiator I/O. -# The DPT controllers are commonly re-licensed under other brand-names - -# some controllers by Olivetti, Dec, HP, AT&T, SNI, AST, Alphatronic, NEC and -# Compaq are actually DPT controllers. -# -# See src/sys/dev/dpt for debugging and other subtle options. -# DPT_MEASURE_PERFORMANCE Enables a set of (semi)invasive metrics. Various -# instruments are enabled. The tools in -# /usr/sbin/dpt_* assume these to be enabled. -# DPT_DEBUG_ These are controllable from sys/dev/dpt/dpt.h -# DPT_RESET_HBAMake "reset" actually reset the controller -# instead of fudging it. Only enable this if you -# are 100% certain you need it. - -device dpt - -# DPT options -#!CAM# options DPT_MEASURE_PERFORMANCE -optionsDPT_RESET_HBA - # # Compaq "CISS" RAID controllers (SmartRAID 5* series) # These controllers have a SCSI-like interface, and require the Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:34:59 2018(r339568) +++ head/sys/conf/files Mon Oct 22 02:35:12 2018(r339569) @@ -1537,8 +1537,6 @@ dev/dcons/dcons_crom.coptional dcons_crom dev/dcons/dcons_os.c optional dcons dev/de/if_de.c optional de pci dev/dme/if_dme.c optional dme -dev/dpt/dpt_pci.c optional dpt pci -dev/dpt/dpt_scsi.c optional dpt dev/drm/ati_pcigart.c optional drm dev/drm/drm_agpsupport.c optional drm dev/drm/drm_auth.c optional drm Modified: head/sys/conf/options == --- head/sys/conf/options Mon Oct 22 02:34:59 2018(r339568) +++ head/sys/conf/options Mon Oct 22 02:35:12 2018(r339569) @@ -566,10 +566,6 @@ DRM_DEBUG opt_drm.h TI_SF_BUF_JUMBOopt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h -# DPT driver debug flags -DPT_MEASURE_PERFORMANCEopt_dpt.h -DPT_RESET_HBA opt_dpt.h - # Misc debug flags. Most of these should probably be replaced with # 'DEBUG', and then let people recompile just the interesting modules # with 'make CC="cc -DDEBUG"'. Modified: head/sys/i386/conf/GENERIC ==
svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
Author: imp Date: Mon Oct 22 02:34:25 2018 New Revision: 339565 URL: https://svnweb.freebsd.org/changeset/base/339565 Log: Remove aha(4) from the tree. We tagged aha as gone in 12 a while ago. Proceed with its removal. Data from nycbug's database shows the last sighting of this driver in 6, with the prior one in 4.x show its popularity had died prior to 4.x. Relnotes: yes Deleted: head/share/man/man4/aha.4 head/sys/dev/aha/aha.c head/sys/dev/aha/aha_isa.c head/sys/dev/aha/ahareg.h head/sys/modules/aha/Makefile Modified: head/share/man/man4/Makefile head/share/man/man4/adv.4 head/share/man/man4/ahc.4 head/share/man/man4/man4.i386/aic.4 head/share/man/man4/scsi.4 head/sys/conf/NOTES head/sys/conf/files head/sys/kern/Make.tags.inc head/sys/modules/Makefile head/sys/sparc64/conf/NOTES Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:34:10 2018 (r339564) +++ head/share/man/man4/MakefileMon Oct 22 02:34:25 2018 (r339565) @@ -29,7 +29,6 @@ MAN= aac.4 \ ${_aesni.4} \ age.4 \ agp.4 \ - aha.4 \ ahc.4 \ ahci.4 \ ahd.4 \ Modified: head/share/man/man4/adv.4 == --- head/share/man/man4/adv.4 Mon Oct 22 02:34:10 2018(r339564) +++ head/share/man/man4/adv.4 Mon Oct 22 02:34:25 2018(r339565) @@ -200,7 +200,6 @@ AdvanSys ABP980UA/3980UA .El .Sh SEE ALSO .Xr adw 4 , -.Xr aha 4 , .Xr ahc 4 , .Xr cd 4 , .Xr da 4 , Modified: head/share/man/man4/ahc.4 == --- head/share/man/man4/ahc.4 Mon Oct 22 02:34:10 2018(r339564) +++ head/share/man/man4/ahc.4 Mon Oct 22 02:34:25 2018(r339565) @@ -360,7 +360,6 @@ local SCB space serves as a cache for disconnected tra more SCB space available, the less host bus traffic consumed saving and restoring SCB data. .Sh SEE ALSO -.Xr aha 4 , .Xr ahd 4 , .Xr cd 4 , .Xr da 4 , Modified: head/share/man/man4/man4.i386/aic.4 == --- head/share/man/man4/man4.i386/aic.4 Mon Oct 22 02:34:10 2018 (r339564) +++ head/share/man/man4/man4.i386/aic.4 Mon Oct 22 02:34:25 2018 (r339565) @@ -64,7 +64,6 @@ Creative Labs SoundBlaster SCSI host adapter (ISA) Adaptec AHA-1460, AHA-1460B, AHA-1460C, AHA-1460D (PC Card) .El .Sh SEE ALSO -.Xr aha 4 , .Xr ahc 4 , .Xr cd 4 , .Xr ch 4 , Modified: head/share/man/man4/scsi.4 == --- head/share/man/man4/scsi.4 Mon Oct 22 02:34:10 2018(r339564) +++ head/share/man/man4/scsi.4 Mon Oct 22 02:34:25 2018(r339565) @@ -344,7 +344,6 @@ See for details. .Sh SEE ALSO .Xr ada 4 , -.Xr aha 4 , .Xr ahc 4 , .Xr ahci 4 , .Xr ahd 4 , Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:34:10 2018(r339564) +++ head/sys/conf/NOTES Mon Oct 22 02:34:25 2018(r339565) @@ -1550,7 +1550,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # # adv: All Narrow SCSI bus AdvanSys controllers. # adw: Second Generation AdvanSys controllers including the ADV940UW. -# aha: Adaptec 154x/1535/1640 # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. @@ -1586,8 +1585,6 @@ hint.bt.0.port="0x330" device adv hint.adv.0.at="isa" device adw -device aha -hint.aha.0.at="isa" device aic hint.aic.0.at="isa" device ahc Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:34:10 2018(r339564) +++ head/sys/conf/files Mon Oct 22 02:34:25 2018(r339565) @@ -767,8 +767,6 @@ dev/ae/if_ae.c optional ae pci dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci -dev/aha/aha.c optional aha -dev/aha/aha_isa.c optional aha isa dev/ahci/ahci.coptional ahci dev/ahci/ahciem.c optional ahci dev/ahci/ahci_pci.coptional ahci pci Modified: head/sys/kern/Make.tags.inc == --- head/sys/kern/Make.tags.inc Mon Oct 22 02:34:10 2018(r339564) +++ head/sys/kern/Make.tags.inc Mon Oct 22 02:34:25 2018(r339565) @@ -12,7 +12,6 @@ SYS?= ${.CURDIR}/.. COMM= ${SYS}/dev/advansys/*.[ch] \ ${SYS}/sys/vnode.h \ - ${SYS}/dev/aha/*.[ch] \ ${SYS
svn commit: r339566 - in head: share/man/man4/man4.i386 sys/conf sys/dev/aic sys/modules sys/modules/aic
Author: imp Date: Mon Oct 22 02:34:35 2018 New Revision: 339566 URL: https://svnweb.freebsd.org/changeset/base/339566 Log: Remove aic(4) driver aic was marked to be gone in 12 a while ago. Go ahead and remove it. nycbug's dmesg database shows this was last seen in 6 and one more time in 4.x. It never was popular, and what popularity it had was over before the nycbug databse got going in 2004. Relnotes: yes Deleted: head/share/man/man4/man4.i386/aic.4 head/sys/dev/aic/aic.c head/sys/dev/aic/aic6360reg.h head/sys/dev/aic/aic_isa.c head/sys/dev/aic/aic_pccard.c head/sys/dev/aic/aicvar.h head/sys/modules/aic/Makefile Modified: head/share/man/man4/man4.i386/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.i386 head/sys/modules/Makefile Modified: head/share/man/man4/man4.i386/Makefile == --- head/share/man/man4/man4.i386/Makefile Mon Oct 22 02:34:25 2018 (r339565) +++ head/share/man/man4/man4.i386/Makefile Mon Oct 22 02:34:35 2018 (r339566) @@ -2,8 +2,7 @@ PACKAGE=runtime-manuals -MAN= aic.4 \ - apm.4 \ +MAN= apm.4 \ ce.4 \ cp.4 \ CPU_ELAN.4 \ Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:34:25 2018(r339565) +++ head/sys/conf/NOTES Mon Oct 22 02:34:35 2018(r339566) @@ -1553,7 +1553,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. -# aic: Adaptec 6260/6360, APA-1460 (PC Card) # bt: Most Buslogic controllers: including BT-445, BT-54x, BT-64x, BT-74x, # BT-75x, BT-946, BT-948, BT-956, BT-958, SDC3211B, SDC3211F, SDC3222F # esp: Emulex ESP, NCR 53C9x and QLogic FAS families based controllers @@ -1585,8 +1584,6 @@ hint.bt.0.port="0x330" device adv hint.adv.0.at="isa" device adw -device aic -hint.aic.0.at="isa" device ahc device ahd device esp Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:34:25 2018(r339565) +++ head/sys/conf/files Mon Oct 22 02:34:35 2018(r339566) @@ -770,8 +770,6 @@ dev/agp/agp_if.moptional agp pci dev/ahci/ahci.coptional ahci dev/ahci/ahciem.c optional ahci dev/ahci/ahci_pci.coptional ahci pci -dev/aic/aic.c optional aic -dev/aic/aic_pccard.c optional aic pccard dev/aic7xxx/ahc_isa.c optional ahc isa dev/aic7xxx/ahc_pci.c optional ahc pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Mon Oct 22 02:34:25 2018(r339565) +++ head/sys/conf/files.i386Mon Oct 22 02:34:35 2018(r339566) @@ -161,7 +161,6 @@ dev/agp/agp_intel.c optional agp dev/agp/agp_nvidia.c optional agp dev/agp/agp_sis.c optional agp dev/agp/agp_via.c optional agp -dev/aic/aic_isa.c optional aic isa dev/amdsbwd/amdsbwd.c optional amdsbwd dev/amdsmn/amdsmn.coptional amdsmn | amdtemp dev/amdtemp/amdtemp.c optional amdtemp Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 22 02:34:25 2018(r339565) +++ head/sys/modules/Makefile Mon Oct 22 02:34:35 2018(r339566) @@ -27,7 +27,6 @@ SUBDIR= \ age \ ${_agp} \ ahci \ - ${_aic} \ aic7xxx \ alc \ ale \ @@ -747,7 +746,6 @@ _vmm= vmm # XXX some of these can move now, but are untested on other architectures. _3dfx= 3dfx _3dfx_linux= 3dfx_linux -_aic= aic _apm= apm .if ${MK_SOURCELESS_UCODE} != "no" _ce= ce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339570 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ncv sys/i386/conf sys/modules sys/modules/ncv
Author: imp Date: Mon Oct 22 02:35:26 2018 New Revision: 339570 URL: https://svnweb.freebsd.org/changeset/base/339570 Log: Remove ncv(4) driver ncv(4) is marked as gone in 12. Remove it. There are no sightings of it in the nycbug dmesg database. It was for an obscure SCSI card that sold mostly in Japan, and was especially popilar among pc98 hackers in the 4.x time frame.. Relnote: Yes Deleted: head/share/man/man4/ncv.4 head/sys/dev/ncv/ncr53c500.c head/sys/dev/ncv/ncr53c500_pccard.c head/sys/dev/ncv/ncr53c500hw.h head/sys/dev/ncv/ncr53c500hwtab.h head/sys/dev/ncv/ncr53c500reg.h head/sys/dev/ncv/ncr53c500var.h head/sys/modules/ncv/Makefile Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:35:12 2018 (r339569) +++ head/share/man/man4/MakefileMon Oct 22 02:35:26 2018 (r339570) @@ -305,7 +305,6 @@ MAN=aac.4 \ nand.4 \ nandsim.4 \ ncr.4 \ - ncv.4 \ ${_ndis.4} \ net80211.4 \ netdump.4 \ Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) +++ head/sys/amd64/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) @@ -428,11 +428,9 @@ device twa # 3ware 9000 series PATA/SATA RAID # # SCSI host adapters: # -# ncv: NCR 53C500 based SCSI host adapters. # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. # stg: TMC 18C30, 18C50 based SCSI host adapters. -device ncv device nsp device stg Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:35:12 2018(r339569) +++ head/sys/conf/files Mon Oct 22 02:35:26 2018(r339570) @@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.c optional ctl cam/mmc/mmc_xpt.c optional scbus mmccam cam/mmc/mmc_da.c optional scbus mmccam da cam/scsi/scsi_da.c optional da -cam/scsi/scsi_low.coptional ncv | nsp | stg +cam/scsi/scsi_low.coptional nsp | stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa @@ -2511,8 +2511,6 @@ dev/nand/nandsim_log.coptional nandsim nand dev/nand/nandsim_swap.coptional nandsim nand dev/nand/nfc_if.m optional nand dev/ncr/ncr.c optional ncr pci -dev/ncv/ncr53c500.coptional ncv -dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/if_ptnet.c optional netmap inet dev/netmap/netmap.coptional netmap dev/netmap/netmap_freebsd.coptional netmap Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESMon Oct 22 02:35:12 2018(r339569) +++ head/sys/i386/conf/NOTESMon Oct 22 02:35:26 2018(r339570) @@ -659,11 +659,9 @@ device twa # 3ware 9000 series PATA/SATA RAID # # SCSI host adapters: # -# ncv: NCR 53C500 based SCSI host adapters. # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. # stg: TMC 18C30, 18C50 based SCSI host adapters. -device ncv device nsp device stg hint.stg.0.at="isa" Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 22 02:35:12 2018(r339569) +++ head/sys/modules/Makefile Mon Oct 22 02:35:26 2018(r339570) @@ -268,7 +268,6 @@ SUBDIR= \ ${_nandsim} \ ${_ncr} \ ${_nctgpio} \ - ${_ncv} \ ${_ndis} \ ${_netgraph} \ ${_nfe} \ @@ -757,7 +756,6 @@ _glxiic=glxiic _glxsb=glxsb #_ibcs2= ibcs2 _ncr= ncr -_ncv= ncv _nsp= nsp _pcfclock= pcfclock _pst= pst ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339571 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/nsp sys/i386/conf sys/modules sys/modules/nsp
Author: imp Date: Mon Oct 22 02:35:38 2018 New Revision: 339571 URL: https://svnweb.freebsd.org/changeset/base/339571 Log: Remove nsp(4) driver nsp(4) is marked as gone in 12. Remove it. There are no sightings of it in the nycbug dmesg database. It was for an obscure SCSI card that sold mostly in Japan, and was especially popilar among pc98 hackers in the 4.x time frame. It was also only enabled on i386. Relnote: Yes Deleted: head/share/man/man4/nsp.4 head/sys/dev/nsp/nsp.c head/sys/dev/nsp/nsp_pccard.c head/sys/dev/nsp/nspreg.h head/sys/dev/nsp/nspvar.h head/sys/modules/nsp/Makefile Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:35:26 2018 (r339570) +++ head/share/man/man4/MakefileMon Oct 22 02:35:38 2018 (r339571) @@ -372,7 +372,6 @@ MAN=aac.4 \ ng_vjc.4 \ ng_vlan.4 \ nmdm.4 \ - nsp.4 \ ${_ntb.4} \ ${_ntb_hw_intel.4} \ ${_ntb_hw_plx.4} \ Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) +++ head/sys/amd64/conf/NOTES Mon Oct 22 02:35:38 2018(r339571) @@ -428,10 +428,8 @@ device twa # 3ware 9000 series PATA/SATA RAID # # SCSI host adapters: # -# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. # stg: TMC 18C30, 18C50 based SCSI host adapters. -device nsp device stg # Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:35:26 2018(r339570) +++ head/sys/conf/files Mon Oct 22 02:35:38 2018(r339571) @@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.c optional ctl cam/mmc/mmc_xpt.c optional scbus mmccam cam/mmc/mmc_da.c optional scbus mmccam da cam/scsi/scsi_da.c optional da -cam/scsi/scsi_low.coptional nsp | stg +cam/scsi/scsi_low.coptional stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESMon Oct 22 02:35:26 2018(r339570) +++ head/sys/i386/conf/NOTESMon Oct 22 02:35:38 2018(r339571) @@ -659,10 +659,8 @@ device twa # 3ware 9000 series PATA/SATA RAID # # SCSI host adapters: # -# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. # stg: TMC 18C30, 18C50 based SCSI host adapters. -device nsp device stg hint.stg.0.at="isa" hint.stg.0.port="0x140" Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 22 02:35:26 2018(r339570) +++ head/sys/modules/Makefile Mon Oct 22 02:35:38 2018(r339571) @@ -279,7 +279,6 @@ SUBDIR= \ nfssvc \ nge \ nmdm \ - ${_nsp} \ nullfs \ ${_ntb} \ ${_nvd} \ @@ -756,7 +755,6 @@ _glxiic=glxiic _glxsb=glxsb #_ibcs2= ibcs2 _ncr= ncr -_nsp= nsp _pcfclock= pcfclock _pst= pst _sbni= sbni ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339572 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/stg sys/i386/conf sys/modules sys/modules/stg
Author: imp Date: Mon Oct 22 02:35:50 2018 New Revision: 339572 URL: https://svnweb.freebsd.org/changeset/base/339572 Log: Remove stg(4) driver stg(4) is marked as gone in 12. Remove it. There are no sightings of it in the nycbug dmesg database. It was for an obscure SCSI card that sold mostly in Japan, and was especially popilar among pc98 hackers in the 4.x time frame. It was also only enabled on i386. Relnote: Yes Deleted: head/share/man/man4/stg.4 head/sys/dev/stg/tmc18c30.c head/sys/dev/stg/tmc18c30.h head/sys/dev/stg/tmc18c30_isa.c head/sys/dev/stg/tmc18c30_pccard.c head/sys/dev/stg/tmc18c30_pci.c head/sys/dev/stg/tmc18c30_subr.c head/sys/dev/stg/tmc18c30reg.h head/sys/dev/stg/tmc18c30var.h head/sys/modules/stg/Makefile Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:35:38 2018 (r339571) +++ head/share/man/man4/MakefileMon Oct 22 02:35:50 2018 (r339572) @@ -504,7 +504,6 @@ MAN=aac.4 \ sppp.4 \ ste.4 \ stf.4 \ - stg.4 \ stge.4 \ sym.4 \ syncache.4 \ Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Mon Oct 22 02:35:38 2018(r339571) +++ head/sys/amd64/conf/NOTES Mon Oct 22 02:35:50 2018(r339572) @@ -426,13 +426,6 @@ optionsTWA_DEBUG # 0-10; 10 prints the most message device twa # 3ware 9000 series PATA/SATA RAID # -# SCSI host adapters: -# -# stg: TMC 18C30, 18C50 based SCSI host adapters. - -device stg - -# # Adaptec FSA RAID controllers, including integrated DELL controllers, # the Dell PERC 2/QC and the HP NetRAID-4M device aac Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 22 02:35:38 2018(r339571) +++ head/sys/conf/files Mon Oct 22 02:35:50 2018(r339572) @@ -113,7 +113,6 @@ cam/ctl/scsi_ctl.c optional ctl cam/mmc/mmc_xpt.c optional scbus mmccam cam/mmc/mmc_da.c optional scbus mmccam da cam/scsi/scsi_da.c optional da -cam/scsi/scsi_low.coptional stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa @@ -3137,11 +3136,6 @@ dev/spibus/spibus.c optional spibus \ dev/spibus/spigen.coptional spigen dev/spibus/spibus_if.m optional spibus dev/ste/if_ste.c optional ste pci -dev/stg/tmc18c30.c optional stg -dev/stg/tmc18c30_isa.c optional stg isa -dev/stg/tmc18c30_pccard.c optional stg pccard -dev/stg/tmc18c30_pci.c optional stg pci -dev/stg/tmc18c30_subr.coptional stg dev/stge/if_stge.c optional stge dev/sym/sym_hipd.c optional sym\ dependency "$S/dev/sym/sym_{conf,defs}.h" Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESMon Oct 22 02:35:38 2018(r339571) +++ head/sys/i386/conf/NOTESMon Oct 22 02:35:50 2018(r339572) @@ -657,16 +657,6 @@ optionsTWA_DEBUG # 0-10; 10 prints the most message device twa # 3ware 9000 series PATA/SATA RAID # -# SCSI host adapters: -# -# stg: TMC 18C30, 18C50 based SCSI host adapters. - -device stg -hint.stg.0.at="isa" -hint.stg.0.port="0x140" -hint.stg.0.port="11" - -# # Adaptec FSA RAID controllers, including integrated DELL controllers, # the Dell PERC 2/QC and the HP NetRAID-4M device aac Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 22 02:35:38 2018(r339571) +++ head/sys/modules/Makefile Mon Oct 22 02:35:50 2018(r339572) @@ -357,7 +357,6 @@ SUBDIR= \ ${_splash} \ ${_sppp} \ ste \ - ${_stg} \ stge \ ${_sym} \ ${_syscons} \ @@ -758,7 +757,6 @@ _ncr= ncr _pcfclock= pcfclock _pst= pst _sbni= sbni -_stg= stg .if ${MK_SOURCELESS_UCODE} != "no" _ctau= ctau .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339574 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ncr sys/i386/conf sys/modules sys/modules/ncr
Author: imp Date: Mon Oct 22 02:36:18 2018 New Revision: 339574 URL: https://svnweb.freebsd.org/changeset/base/339574 Log: Remove the ncr(4) drive. This driver has been obsolete since the FreeBSD 4.x. It should have been removed then since the sym(4) driver had subsumed it. The driver was commented out of GENERIC in 2000. RelNotes: Yes Deleted: head/share/man/man4/ncr.4 head/sys/dev/ncr/locate.pl head/sys/dev/ncr/ncr.c head/sys/dev/ncr/ncrreg.h head/sys/modules/ncr/Makefile Modified: head/share/man/man4/Makefile head/share/man/man4/sym.4 head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/i386/conf/PAE head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileMon Oct 22 02:36:07 2018 (r339573) +++ head/share/man/man4/MakefileMon Oct 22 02:36:18 2018 (r339574) @@ -304,7 +304,6 @@ MAN=aac.4 \ my.4 \ nand.4 \ nandsim.4 \ - ncr.4 \ ${_ndis.4} \ net80211.4 \ netdump.4 \ Modified: head/share/man/man4/sym.4 == --- head/share/man/man4/sym.4 Mon Oct 22 02:36:07 2018(r339573) +++ head/share/man/man4/sym.4 Mon Oct 22 02:36:18 2018(r339574) @@ -159,53 +159,6 @@ permanent PCI parity errors detected. This option is supplied for convenience but it is neither recommended nor supported. .Pp -The generic -.Xr ncr 4 -driver also supports SYM53C8XX based PCI SCSI controllers, -except for the SYM53C1010, which is only supported by the -.Nm -driver. -.Pp -By default, when both the -.Xr ncr 4 -and -.Nm -drivers are configured, the -.Nm -driver takes precedence over the -.Xr ncr 4 -driver. -The user can indicate a balancing of chip types between the two drivers -by defining the -.Ar SYM_SETUP_LP_PROBE_MAP -kernel configuration option as follows: -.Bl -column "0x40" -.It Em "BitDevices to be attached by ncr instead" -.It "0x01 53C810a, 53C860" -.It "0x02 53C825a, 53C875, 53C876, 53C885, 53C895" -.It "0x04 53C895a, 53C896, 53C897, 53C1510d" -.It "0x40 53C810, 53C815, 53C825" -.El -.Pp -For example, if -.Ar SYM_SETUP_LP_PROBE_MAP -is supplied with the value 0x41, the -.Xr ncr 4 -driver will attach to 53C810, 53C815, 53C825, 53C810a, and 53C860 based -controllers, -and the -.Nm -driver will attach to all other 53C8XX based controllers. -.Pp -When only the -.Nm -driver is configured, the -.Ar SYM_SETUP_LP_PROBE_MAP -option has no effect. -Thus, in this case, the -.Nm -driver will attach all 53C8XX based controllers present in the system. -.Pp This driver offers other options that are not currently exported to the user. They are defined and documented in the @@ -342,7 +295,6 @@ The DEC KZPCA-AA is a rebadged SYM8952U. .Sh SEE ALSO .Xr cd 4 , .Xr da 4 , -.Xr ncr 4 , .Xr sa 4 , .Xr scsi 4 , .Xr camcontrol 8 Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Mon Oct 22 02:36:07 2018(r339573) +++ head/sys/amd64/conf/GENERIC Mon Oct 22 02:36:18 2018(r339574) @@ -139,8 +139,7 @@ device isp # Qlogic family device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 device mpr # LSI-Logic MPT-Fusion 3 -#devicencr # NCR/Symbios Logic -device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') +device sym # NCR/Symbios Logic device trm # Tekram DC395U/UW/F DC315U adapters device isci# Intel C600 SAS controller device ocs_fc # Emulex FC adapters Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Oct 22 02:36:07 2018(r339573) +++ head/sys/conf/NOTES Mon Oct 22 02:36:18 2018(r339574) @@ -1563,7 +1563,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # ispfw: Firmware module for Qlogic host adapters # mpt: LSI-Logic MPT/Fusion 53c1020 or 53c1030 Ultra4 # or FC9x9 Fibre Channel host adapters. -# ncr: NCR 53C810, 53C825 self-contained SCSI host adapters. # sym: Symbios/Logic 53C8XX family of PCI-SCSI I/O processors: # 53C810, 53C810A, 53C815, 53C825, 53C825A, 53C860, 53C875, # 53C876, 53C885, 53C895, 53C895A, 53C896, 53C897, 53C1510D, @@ -1592,7 +1591,6 @@ hint.isp.0.portwnn="w5000" hint.isp.0.nodewnn="w50000001" device ispfw device mpt -device ncr device sym device trm
svn commit: r339575 - in head/sys: conf dev/sym
Author: imp Date: Mon Oct 22 02:36:31 2018 New Revision: 339575 URL: https://svnweb.freebsd.org/changeset/base/339575 Log: Remove the long obsolete SYM_SETUP_LP_PROBE_MAP option. It's not been needed for almost 20 years, and is totally useless now that ncr(4) has been removed. Relnotes: yes Modified: head/sys/conf/options head/sys/dev/sym/sym_hipd.c Modified: head/sys/conf/options == --- head/sys/conf/options Mon Oct 22 02:36:18 2018(r339574) +++ head/sys/conf/options Mon Oct 22 02:36:31 2018(r339575) @@ -374,11 +374,6 @@ SCSI_PT_DEFAULT_TIMEOUTopt_pt.h SES_ENABLE_PASSTHROUGH opt_ses.h # Options used in dev/sym/ (Symbios SCSI driver). -SYM_SETUP_LP_PROBE_MAP opt_sym.h #-Low Priority Probe Map (bits) - # Allows the ncr to take precedence - # 1 (1<<0) -> 810a, 860 - # 2 (1<<1) -> 825a, 875, 885, 895 - # 4 (1<<2) -> 895a, 896, 1510d SYM_SETUP_SCSI_DIFFopt_sym.h #-HVD support for 825a, 875, 885 # disabled:0 (default), enabled:1 SYM_SETUP_PCI_PARITY opt_sym.h #-PCI parity checking Modified: head/sys/dev/sym/sym_hipd.c == --- head/sys/dev/sym/sym_hipd.c Mon Oct 22 02:36:18 2018(r339574) +++ head/sys/dev/sym/sym_hipd.c Mon Oct 22 02:36:31 2018(r339575) @@ -8387,8 +8387,7 @@ sym_pci_probe(device_t dev) chip = sym_find_pci_chip(dev); if (chip && sym_find_firmware(chip)) { device_set_desc(dev, chip->name); - return (chip->lp_probe_bit & SYM_SETUP_LP_PROBE_MAP)? - BUS_PROBE_LOW_PRIORITY : BUS_PROBE_DEFAULT; + return BUS_PROBE_DEFAULT; } return ENXIO; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339573 - in head/sys: cam/scsi modules modules/scsi_low
Author: imp Date: Mon Oct 22 02:36:07 2018 New Revision: 339573 URL: https://svnweb.freebsd.org/changeset/base/339573 Log: Retire scsi_low scsi_low was a common set of routines to do the SCSI bus sequencing for the ncv, nsp and stg drivers. Those have been removed, so it's no longer needed since nothing else in the tree uses it and nothing likely ever will (it's for super-low-end 8-bit parallel SCSI cards). Deleted: head/sys/cam/scsi/scsi_dvcfg.h head/sys/cam/scsi/scsi_low.c head/sys/cam/scsi/scsi_low.h head/sys/modules/scsi_low/Makefile Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 22 02:35:50 2018(r339572) +++ head/sys/modules/Makefile Mon Oct 22 02:36:07 2018(r339573) @@ -332,7 +332,6 @@ SUBDIR= \ ${_safe} \ ${_sbni} \ scc \ - ${_scsi_low} \ sdhci \ ${_sdhci_acpi} \ sdhci_pci \ @@ -614,7 +613,6 @@ _pccard=pccard _rdma= rdma .endif _safe= safe -_scsi_low= scsi_low _speaker= speaker _splash= splash _sppp= sppp ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339576 - in head/sys: dev/advansys dev/aha dev/aic dev/buslogic dev/dpt dev/joy dev/mse dev/ncr dev/ncv dev/nsp dev/stg gnu/dts/include/dt-bindings/genpd modules/aha modules/aic module...
Author: imp Date: Mon Oct 22 02:42:14 2018 New Revision: 339576 URL: https://svnweb.freebsd.org/changeset/base/339576 Log: Remove newly empty directories, plus a few ohters that have crept into tree over time (most my fault). Deleted: head/sys/dev/advansys/ head/sys/dev/aha/ head/sys/dev/aic/ head/sys/dev/buslogic/ head/sys/dev/dpt/ head/sys/dev/joy/ head/sys/dev/mse/ head/sys/dev/ncr/ head/sys/dev/ncv/ head/sys/dev/nsp/ head/sys/dev/stg/ head/sys/gnu/dts/include/dt-bindings/genpd/ head/sys/modules/aha/ head/sys/modules/aic/ head/sys/modules/dpt/ head/sys/modules/dtb/atmel/ head/sys/modules/joy/ head/sys/modules/mse/ head/sys/modules/ncr/ head/sys/modules/ncv/ head/sys/modules/nsp/ head/sys/modules/random_yarrow/ head/sys/modules/scsi_low/ head/sys/modules/stg/ head/sys/modules/usb/at91dci/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: > Author: imp > Date: Mon Oct 22 02:34:25 2018 > New Revision: 339565 > URL: https://svnweb.freebsd.org/changeset/base/339565 > > Log: > Remove aha(4) from the tree. > > The documentation build is now failing, as there's an entity reference to the autogenerated hardware list, which does not exist anymore. Will you be able to look at those as part of your removals or does someone from the doc team need to handle it? -Ben ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
On Sun, Oct 21, 2018 at 8:47 PM Benjamin Kaduk wrote: > On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: > >> Author: imp >> Date: Mon Oct 22 02:34:25 2018 >> New Revision: 339565 >> URL: https://svnweb.freebsd.org/changeset/base/339565 >> >> Log: >> Remove aha(4) from the tree. >> >> > The documentation build is now failing, as there's an entity reference to > the autogenerated > hardware list, which does not exist anymore. Will you be able to look at > those as part of your > removals or does someone from the doc team need to handle it? > I'll take a look. What exactly is failing? The only place I see aha.4 is in doc/head/share/xml/man-refs.ent but there's several other drivers that have been removed that are in there... So I'm confused and need some additional guidance. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
On Sun, Oct 21, 2018 at 9:53 PM Warner Losh wrote: > > > On Sun, Oct 21, 2018 at 8:47 PM Benjamin Kaduk wrote: > >> On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: >> >>> Author: imp >>> Date: Mon Oct 22 02:34:25 2018 >>> New Revision: 339565 >>> URL: https://svnweb.freebsd.org/changeset/base/339565 >>> >>> Log: >>> Remove aha(4) from the tree. >>> >>> >> The documentation build is now failing, as there's an entity reference to >> the autogenerated >> hardware list, which does not exist anymore. Will you be able to look at >> those as part of your >> removals or does someone from the doc team need to handle it? >> > > I'll take a look. What exactly is failing? The only place I see aha.4 is > in doc/head/share/xml/man-refs.ent but there's several other drivers that > have been removed that are in there... So I'm confused and need some > additional guidance. > The build log is mailed out at (e.g.) https://lists.freebsd.org/pipermail/freebsd-doc/2018-October/031621.html Though looking slightly more closely, it seems to be complaining about the 12.0 release notes (!), which might both (1) be awkward to solve, and (2) be in re@'s territory. (I would not be surprised if it only shows errors for the first couple problems, in alphabetical order, and there are more issues lingering.) Thanks, Ben ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339577 - head/sys/dev/acpica
Author: bwidawsk Date: Mon Oct 22 03:29:54 2018 New Revision: 339577 URL: https://svnweb.freebsd.org/changeset/base/339577 Log: acpi: Add an interface to obtain DSM information The Device Specific Method (_DSM) is on optional object that defines device specific controls. This will be useful for our power management controller in upcoming patches. More information can be found in ACPI spec 6.2 section 9.1.1 https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf This patch had a minor modification changing ENOMEM to AE_NO_MEMORY after it got review and approval but before committing. Test Plan: Tested in my s0ix branch Reviewed by: kib Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D17121 Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Mon Oct 22 02:42:14 2018(r339576) +++ head/sys/dev/acpica/acpi.c Mon Oct 22 03:29:54 2018(r339577) @@ -2570,6 +2570,98 @@ acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOU return (AE_OK); } +UINT8 +acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revision) +{ +/* + * ACPI spec 9.1.1 defines this. + * + * "Arg2: Function Index Represents a specific function whose meaning is + * specific to the UUID and Revision ID. Function indices should start + * with 1. Function number zero is a query function (see the special + * return code defined below)." + */ +ACPI_BUFFER buf; +ACPI_OBJECT *obj; +UINT8 ret = 0; + +if (!ACPI_SUCCESS(acpi_EvaluateDSM(h, uuid, revision, 0, NULL, &buf))) { + ACPI_INFO(("Failed to enumerate DSM functions\n")); + return (0); +} + +obj = (ACPI_OBJECT *)buf.Pointer; +KASSERT(obj, ("Object not allowed to be NULL\n")); + +/* + * From ACPI 6.2 spec 9.1.1: + * If Function Index = 0, a Buffer containing a function index bitfield. + * Otherwise, the return value and type depends on the UUID and revision + * ID (see below). + */ +switch (obj->Type) { +case ACPI_TYPE_BUFFER: + ret = *(uint8_t *)obj->Buffer.Pointer; + break; +case ACPI_TYPE_INTEGER: + ACPI_BIOS_WARNING((AE_INFO, + "Possibly buggy BIOS with ACPI_TYPE_INTEGER for function enumeration\n")); + ret = obj->Integer.Value & 0xFF; + break; +default: + ACPI_WARNING((AE_INFO, "Unexpected return type %u\n", obj->Type)); +}; + +AcpiOsFree(obj); +return ret; +} + +/* + * DSM may return multiple types depending on the function. It is therefore + * unsafe to use the typed evaluation. It is highly recommended that the caller + * check the type of the returned object. + */ +ACPI_STATUS +acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, int revision, +uint64_t function, union acpi_object *package, ACPI_BUFFER *out_buf) +{ +ACPI_OBJECT arg[4]; +ACPI_OBJECT_LIST arglist; +ACPI_BUFFER buf; +ACPI_STATUS status; + +if (out_buf == NULL) + return (AE_NO_MEMORY); + +arg[0].Type = ACPI_TYPE_BUFFER; +arg[0].Buffer.Length = ACPI_UUID_LENGTH; +arg[0].Buffer.Pointer = uuid; +arg[1].Type = ACPI_TYPE_INTEGER; +arg[1].Integer.Value = revision; +arg[2].Type = ACPI_TYPE_INTEGER; +arg[2].Integer.Value = function; +if (package) { + arg[3] = *package; +} else { + arg[3].Type = ACPI_TYPE_PACKAGE; + arg[3].Package.Count = 0; + arg[3].Package.Elements = NULL; +} + +arglist.Pointer = arg; +arglist.Count = 4; +buf.Pointer = NULL; +buf.Length = ACPI_ALLOCATE_BUFFER; +status = AcpiEvaluateObject(handle, "_DSM", &arglist, &buf); +if (ACPI_FAILURE(status)) + return (status); + +KASSERT(ACPI_SUCCESS(status), ("Unexpected status")); + +*out_buf = buf; +return (status); +} + ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, int revision, int count, uint32_t *caps_in, uint32_t *caps_out, bool query) Modified: head/sys/dev/acpica/acpivar.h == --- head/sys/dev/acpica/acpivar.h Mon Oct 22 02:42:14 2018 (r339576) +++ head/sys/dev/acpica/acpivar.h Mon Oct 22 03:29:54 2018 (r339577) @@ -349,6 +349,10 @@ ACPI_STATUSacpi_FindIndexedResource(ACPI_BUFFER *buf, ACPI_RESOURCE **resp); ACPI_STATUSacpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res); +UINT8 acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revision); +ACPI_STATUSacpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, + int revision, uint64_t function, union acpi_object *package, + ACPI_BUFFER *out_buf); ACPI_STATUSacpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid,
svn commit: r339578 - head/sbin/pfctl
Author: kp Date: Mon Oct 22 04:12:51 2018 New Revision: 339578 URL: https://svnweb.freebsd.org/changeset/base/339578 Log: pfctl: Fix line numbers when \ is used inside "" PR: 201520 Obtained from:OpenBSD MFC after:2 weeks Modified: head/sbin/pfctl/parse.y Modified: head/sbin/pfctl/parse.y == --- head/sbin/pfctl/parse.y Mon Oct 22 03:29:54 2018(r339577) +++ head/sbin/pfctl/parse.y Mon Oct 22 04:12:51 2018(r339578) @@ -5765,8 +5765,10 @@ top: return (0); if (next == quotec || c == ' ' || c == '\t') c = next; - else if (next == '\n') + else if (next == '\n') { + file->lineno++; continue; + } else lungetc(next); } else if (c == quotec) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339579 - head/sys/amd64/amd64
Author: mjg Date: Mon Oct 22 06:44:20 2018 New Revision: 339579 URL: https://svnweb.freebsd.org/changeset/base/339579 Log: amd64: finish the tail in memset with an overlapping store Instead of finding the exact size to fit in we can just shift the target by -8 + tail. Doing a blind write to a previously rep stosq'ed area comes with a penalty so do it conditionally. Sample win on EPYC when zeroing a 257 sized buffer (tail = 1) aligned to 16 bytes: before: 44782846 ops/s after: 46118614 ops/s Idea stolen from NetBSD. Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S == --- head/sys/amd64/amd64/support.S Mon Oct 22 04:12:51 2018 (r339578) +++ head/sys/amd64/amd64/support.S Mon Oct 22 06:44:20 2018 (r339579) @@ -524,9 +524,12 @@ END(memcpy_erms) rep stosq movq%r9,%rax - movq%rdx,%rcx - andb$7,%cl - jne 1004b + andl$7,%edx + jnz 1f + POP_FRAME_POINTER + ret +1: + movq%r10,-8(%rdi,%rdx) .endif POP_FRAME_POINTER ret ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"