CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Mon Nov 5 07:42:56 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.generic Log Message: Merge in VIRT now that qemu in pkgsrc can support it (missed in previous commit) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/files.generic Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/files.generic diff -u src/sys/arch/evbarm/conf/files.generic:1.2 src/sys/arch/evbarm/conf/files.generic:1.3 --- src/sys/arch/evbarm/conf/files.generic:1.2 Thu Oct 18 09:01:54 2018 +++ src/sys/arch/evbarm/conf/files.generic Mon Nov 5 07:42:56 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.generic,v 1.2 2018/10/18 09:01:54 skrll Exp $ +# $NetBSD: files.generic,v 1.3 2018/11/05 07:42:56 skrll Exp $ # # A generic (aarch32) kernel configuration info # @@ -22,3 +22,4 @@ include "arch/arm/nvidia/files.tegra" include "arch/arm/samsung/files.exynos" include "arch/arm/sunxi/files.sunxi" include "arch/arm/vexpress/files.vexpress" +include "arch/arm/virt/files.virt"
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Mon Nov 5 07:41:46 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC Log Message: Merge in VIRT now that qemu in pkgsrc can support it To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.12 src/sys/arch/evbarm/conf/GENERIC:1.13 --- src/sys/arch/evbarm/conf/GENERIC:1.12 Wed Oct 31 08:10:01 2018 +++ src/sys/arch/evbarm/conf/GENERIC Mon Nov 5 07:41:46 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.12 2018/10/31 08:10:01 skrll Exp $ +# $NetBSD: GENERIC,v 1.13 2018/11/05 07:41:46 skrll Exp $ # # GENERIC ARM (aarch32) kernel # @@ -162,6 +162,7 @@ options CPU_CORTEXA7 options CPU_CORTEXA8 options CPU_CORTEXA9 options CPU_CORTEXA15 +options CPU_CORTEXA17 options CPU_CORTEXA53 @@ -185,6 +186,8 @@ options SOC_SUN50I_H6 options SOC_TEGRA124 +options SOC_VIRT + options MULTIPROCESSOR pseudo-device openfirm # /dev/openfirm @@ -327,6 +330,7 @@ bcmaux* at fdt? pass 1 # Broadcom BCM2 # GPIO controller bcmgpio* at fdt? # Broadcom BCM283x GPIO exyopctl* at fdt? pass 2 # Samsung Exynos GPIO +plgpio* at fdt? # ARM PrimeCell GPIO sunxigpio* at fdt? pass 3 # Allwinner GPIO tegragpio* at fdt? pass 2 # NVIDIA Tegra GPIO gpio* at gpiobus? @@ -569,13 +573,23 @@ usb* at usbus? # Virtio devices virtio* at fdt?# Virtio MMIO device -# the baloon driver can not work on machines with non-4k pages +# the balloon driver cannot work on machines with non-4k pages #viomb* at virtio? # Virtio memory balloon device ld* at virtio? # Virtio disk device vioif* at virtio? # Virtio network device viornd* at virtio? # Virtio entropy device vioscsi* at virtio? # Virtio SCSI device +# SCSI +scsibus* at scsi? +sd* at scsibus? target ? lun ? # SCSI disks +st* at scsibus? target ? lun ? # SCSI tapes +cd* at scsibus? target ? lun ? # SCSI CD-ROMs +ch* at scsibus? target ? lun ? # SCSI changer devices +ss* at scsibus? target ? lun ? # SCSI scanners +ses* at scsibus? target ? lun ? # SCSI SES/SAF-TE devices +uk* at scsibus? target ? lun ? # unknown SCSI + include "dev/usb/usbdevices.config" midi* at midibus?
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: msaitoh Date: Mon Nov 5 07:39:57 UTC 2018 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c acpidump.8 Log Message: Decode Boot Graghics Resource Table (BGRT). To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/acpitools/acpidump/acpi.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/acpitools/acpidump/acpidump.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.39 src/usr.sbin/acpitools/acpidump/acpi.c:1.40 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.39 Thu Nov 1 03:08:46 2018 +++ src/usr.sbin/acpitools/acpidump/acpi.c Mon Nov 5 07:39:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.39 2018/11/01 03:08:46 msaitoh Exp $ */ +/* $NetBSD: acpi.c,v 1.40 2018/11/05 07:39:57 msaitoh Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: acpi.c,v 1.39 2018/11/01 03:08:46 msaitoh Exp $"); +__RCSID("$NetBSD: acpi.c,v 1.40 2018/11/05 07:39:57 msaitoh Exp $"); #include #include @@ -86,6 +86,7 @@ static void acpi_print_intr(uint32_t int static void acpi_print_local_nmi(u_int lint, uint16_t mps_flags); static void acpi_print_madt(ACPI_SUBTABLE_HEADER *mp); static void acpi_handle_bert(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_bgrt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_boot(ACPI_TABLE_HEADER *sdp); static void acpi_handle_cpep(ACPI_TABLE_HEADER *sdp); static void acpi_handle_csrt(ACPI_TABLE_HEADER *sdp); @@ -1222,6 +1223,37 @@ acpi_handle_bert(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_bgrt(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_BGRT *bgrt; + unsigned int degree; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + bgrt = (ACPI_TABLE_BGRT *)sdp; + + printf("\tVersion=%hu\n", bgrt->Version); + degree = ((unsigned int)(bgrt->Status & ACPI_BGRT_ORIENTATION_OFFSET) + >> 1) * 90; + printf("\tDegree=%u\n", degree); + printf("\tDisplayed=%hhu\n", bgrt->Status & ACPI_BGRT_DISPLAYED); + printf("\tImage Type="); + switch (bgrt->ImageType) { + case 0: + printf("Bitmap\n"); + break; + default: + printf("reserved (0x%hhx)\n", bgrt->ImageType); + break; + } + printf("\tImage Address=0x%"PRIx64"\n", bgrt->ImageAddress); + printf("\tImage Offset X=0x%08x\n", bgrt->ImageOffsetX); + printf("\tImage Offset Y=0x%08x\n", bgrt->ImageOffsetY); + + printf(END_COMMENT); +} + +static void acpi_handle_boot(ACPI_TABLE_HEADER *sdp) { ACPI_TABLE_BOOT *boot; @@ -3896,6 +3928,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp acpi_handle_fadt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_BERT, 4)) acpi_handle_bert(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_BGRT, 4)) + acpi_handle_bgrt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_BOOT, 4)) acpi_handle_boot(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_CPEP, 4)) Index: src/usr.sbin/acpitools/acpidump/acpidump.8 diff -u src/usr.sbin/acpitools/acpidump/acpidump.8:1.13 src/usr.sbin/acpitools/acpidump/acpidump.8:1.14 --- src/usr.sbin/acpitools/acpidump/acpidump.8:1.13 Thu Nov 1 03:08:46 2018 +++ src/usr.sbin/acpitools/acpidump/acpidump.8 Mon Nov 5 07:39:57 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: acpidump.8,v 1.13 2018/11/01 03:08:46 msaitoh Exp $ +.\" $NetBSD: acpidump.8,v 1.14 2018/11/05 07:39:57 msaitoh Exp $ .\" ACPI (ACPI Package) .\" .\" Copyright (c) 1999 Doug Rabson @@ -30,7 +30,7 @@ .\" .\" $FreeBSD: head/usr.sbin/acpi/acpidump/acpidump.8 267668 2014-06-20 09:57:27Z bapt $ .\" -.Dd November 1, 2018 +.Dd November 5, 2018 .Dt ACPIDUMP 8 .Os .Sh NAME @@ -97,6 +97,7 @@ utility dumps contents of the following .Bl -tag -offset indent -width 12345 -compact .It APIC .It BERT +.It BGRT .It BOOT .It CPEP .It CSRT
CVS commit: src/lib/libc
Module Name:src Committed By: maya Date: Mon Nov 5 04:08:40 UTC 2018 Modified Files: src/lib/libc: shlib_version Log Message: Suggest to remove lfs_ stubs on a major bump. they're deprecated, ioctl is used instead. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282 src/lib/libc/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.281 src/lib/libc/shlib_version:1.282 --- src/lib/libc/shlib_version:1.281 Thu Aug 2 08:40:48 2018 +++ src/lib/libc/shlib_version Mon Nov 5 04:08:39 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.281 2018/08/02 08:40:48 rjs Exp $ +# $NetBSD: shlib_version,v 1.282 2018/11/05 04:08:39 maya Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -52,5 +52,6 @@ # - clean-up initialisation order between crt0.o, rtld and libc. # - move environ and __ps_strings from crt0.o into libc. # - move statfs() to libcompat since we have statvfs() +# - the syscall stubs for the (obsolete) lfs syscalls should be removed major=12 minor=211
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Nov 5 03:51:31 UTC 2018 Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h Log Message: Decode PCI Enhanced Allocation. To generate a diff of this commit: cvs rdiff -u -r1.206 -r1.207 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.142 -r1.143 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.206 src/sys/dev/pci/pci_subr.c:1.207 --- src/sys/dev/pci/pci_subr.c:1.206 Thu Oct 4 07:43:12 2018 +++ src/sys/dev/pci/pci_subr.c Mon Nov 5 03:51:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.206 2018/10/04 07:43:12 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.207 2018/11/05 03:51:31 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.206 2018/10/04 07:43:12 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.207 2018/11/05 03:51:31 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -2409,7 +2409,167 @@ pci_conf_print_pciaf_cap(const pcireg_t onoff("Transaction Pending", reg, PCI_AFSR_TP); } -/* XXX pci_conf_print_ea_cap */ +static void +pci_conf_print_ea_cap_prop(unsigned int prop) +{ + + switch (prop) { + case PCI_EA_PROP_MEM_NONPREF: + printf("Memory Space, Non-Prefetchable\n"); + break; + case PCI_EA_PROP_MEM_PREF: + printf("Memory Space, Prefetchable\n"); + break; + case PCI_EA_PROP_IO: + printf("I/O Space\n"); + break; + case PCI_EA_PROP_VF_MEM_NONPREF: + printf("Resorce for VF use, Memory Space, Non-Prefetchable\n"); + break; + case PCI_EA_PROP_VF_MEM_PREF: + printf("Resorce for VF use, Memory Space, Prefetch\n"); + break; + case PCI_EA_PROP_BB_MEM_NONPREF: + printf("Behind the Bridge, Memory Space, Non-Pref\n"); + break; + case PCI_EA_PROP_BB_MEM_PREF: + printf("Behind the Bridge, Memory Space. Prefetchable\n"); + break; + case PCI_EA_PROP_BB_IO: + printf("Behind Bridge, I/O Space\n"); + break; + case PCI_EA_PROP_MEM_UNAVAIL: + printf("Memory Space Unavailable\n"); + break; + case PCI_EA_PROP_IO_UNAVAIL: + printf("IO Space Unavailable\n"); + break; + case PCI_EA_PROP_UNAVAIL: + printf("Entry Unavailable for use\n"); + break; + default: + printf("Reserved\n"); + break; + } +} + +static void +pci_conf_print_ea_cap(const pcireg_t *regs, int capoff) +{ + pcireg_t reg, reg2; + unsigned int entries, entoff, i; + + printf("\n Enhanced Allocation Capability Register\n"); + + reg = regs[o2i(capoff + PCI_EA_CAP1)]; + printf("EA Num Entries register: 0x%04x\n", reg >> 16); + entries = __SHIFTOUT(reg, PCI_EA_CAP1_NUMENTRIES); + printf(" EA Num Entries: %u\n", entries); + + /* Type 1 only */ + if (PCI_HDRTYPE_TYPE(regs[o2i(PCI_BHLC_REG)]) == PCI_HDRTYPE_PPB) { + reg = regs[o2i(capoff + PCI_EA_CAP2)]; + printf("EA Capability Second register: 0x%08x\n", reg); + printf(" Fixed Secondary Bus Number: %hhu\n", + (unsigned char)__SHIFTOUT(reg, PCI_EA_CAP2_SECONDARY)); + printf(" Fixed Subordinate Bus Number: %hhu\n", + (unsigned char)__SHIFTOUT(reg, PCI_EA_CAP2_SUBORDINATE)); + entoff = capoff + 8; + } else + entoff = capoff + 4; + + for (i = 0; i < entries; i++) { + uint64_t base, offset; + bool baseis64, offsetis64; + unsigned int bei, entry_size; + + printf("Entry %u:\n", i); + /* The first DW */ + reg = regs[o2i(entoff)]; + printf(" The first register: 0x%08x\n", reg); + entry_size = __SHIFTOUT(reg, PCI_EA_ES); + printf("Entry size: %u\n", entry_size); + printf("BAR Equivalent Indicator: "); + bei = __SHIFTOUT(reg, PCI_EA_BEI); + switch (bei) { + case PCI_EA_BEI_BAR0: + case PCI_EA_BEI_BAR1: + case PCI_EA_BEI_BAR2: + case PCI_EA_BEI_BAR3: + case PCI_EA_BEI_BAR4: + case PCI_EA_BEI_BAR5: + printf("BAR %u\n", bei - PCI_EA_BEI_BAR0); + break; + case PCI_EA_BEI_BEHIND: + printf("Behind the function\n"); + break; + case PCI_EA_BEI_NOTIND: + printf("Not Indicated\n"); + break; + case PCI_EA_BEI_EXPROM: + printf("Expansion ROM\n"); + break; + case PCI_EA_BEI_VFBAR0: + case PCI_EA_BEI_VFBAR1: + case PCI_EA_BEI_VFBAR2: + case PCI_EA_BEI_VFBAR3: + case PCI_EA_BEI_VFBAR4: + case PCI_EA_BEI_VFBAR5: + printf("VF BAR %u\n", bei - PCI_EA_BEI_VFBAR0); + break; + case PCI_EA_BEI_RESERVED: + default: + printf("Reserved\n"); + break; + } + + printf(" Primary Properties: "); + pci_conf_print_ea_cap_prop(__SHIFTOUT(reg, PCI_EA_PP)); + printf(" Secondary Properties: "); + pci_conf_print_ea_cap_prop(__SHIFTOUT(reg, PCI_EA_SP)); + onoff("Writable", reg, PCI_EA_W); + onoff("Enable for this entry", reg, PCI_EA_E); + + if (entry_size == 0) { + entoff += 4; + continue; + } + + /* Base addr */ + reg = regs[o2i(entoff + 4)]; + base = reg & PCI_EA_LOWMASK; + baseis64 = reg &
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: manu Date: Mon Nov 5 02:28:32 UTC 2018 Modified Files: src/sys/fs/puffs: puffs_vnops.c Log Message: Add missing mutex pn->pn_sizemtx lock in puffs_vnop_open() puffs_vnop_open() calls flushvncache(), which calls dosetattr() if pn->pn_stat has PNODE_METACACHE_MASK. In that case, the lock on pn->pn_sizemtx is mandatory and asserted. To generate a diff of this commit: cvs rdiff -u -r1.211 -r1.212 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.211 src/sys/fs/puffs/puffs_vnops.c:1.212 --- src/sys/fs/puffs/puffs_vnops.c:1.211 Fri May 26 14:21:01 2017 +++ src/sys/fs/puffs/puffs_vnops.c Mon Nov 5 02:28:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.211 2017/05/26 14:21:01 riastradh Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.212 2018/11/05 02:28:32 manu Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.211 2017/05/26 14:21:01 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.212 2018/11/05 02:28:32 manu Exp $"); #include #include @@ -913,7 +913,10 @@ puffs_vnop_open(void *v) * - we do not want to discard cached write by direct write * - read cache is now useless and should be freed */ + mutex_enter(>pn_sizemtx); flushvncache(vp, 0, 0, true); + mutex_exit(>pn_sizemtx); + if (mode & FREAD) pn->pn_stat |= PNODE_RDIRECT; if (mode & FWRITE)
CVS commit: src/lib/libkvm
Module Name:src Committed By: mrg Date: Mon Nov 5 00:43:30 UTC 2018 Modified Files: src/lib/libkvm: kvm.c Log Message: initialise the kvm errbuf so that if an error occurs, but the internal _kvm_*err() functions aren't called, stack garbage is not reported as an error string. call _kvm_err() if _kvm_kvatop() fails. now the above is not triggered anymore :-) To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/lib/libkvm/kvm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkvm/kvm.c diff -u src/lib/libkvm/kvm.c:1.103 src/lib/libkvm/kvm.c:1.104 --- src/lib/libkvm/kvm.c:1.103 Wed Feb 7 14:03:18 2018 +++ src/lib/libkvm/kvm.c Mon Nov 5 00:43:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kvm.c,v 1.103 2018/02/07 14:03:18 maxv Exp $ */ +/* $NetBSD: kvm.c,v 1.104 2018/11/05 00:43:30 mrg Exp $ */ /*- * Copyright (c) 1989, 1992, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94"; #else -__RCSID("$NetBSD: kvm.c,v 1.103 2018/02/07 14:03:18 maxv Exp $"); +__RCSID("$NetBSD: kvm.c,v 1.104 2018/11/05 00:43:30 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -255,6 +255,7 @@ _kvm_open(kvm_t *kd, const char *uf, con kd->fdalign = 1; kd->iobuf = NULL; kd->iobufsz = 0; + kd->errbuf[0] = '\0'; if (flag & KVM_NO_FILES) { kd->alive = KVM_ALIVE_SYSCTL; @@ -851,8 +852,10 @@ kvm_read(kvm_t *kd, u_long kva, void *bu off_t foff; cc = _kvm_kvatop(kd, (vaddr_t)kva, ); - if (cc == 0) + if (cc == 0) { +_kvm_err(kd, kd->program, "_kvm_kvatop(%lx)", kva); return (-1); + } if (cc > len) cc = len; foff = _kvm_pa2off(kd, pa);
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: skrll Date: Sun Nov 4 21:41:12 UTC 2018 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Only add GENERIC to earmv6 and earmv7 builds To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.97 src/etc/etc.evbarm/Makefile.inc:1.98 --- src/etc/etc.evbarm/Makefile.inc:1.97 Thu Nov 1 18:23:25 2018 +++ src/etc/etc.evbarm/Makefile.inc Sun Nov 4 21:41:12 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.97 2018/11/01 18:23:25 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.98 2018/11/04 21:41:12 skrll Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -24,8 +24,6 @@ EVBARM_BOARDS.armv7+= BCM5301X EVBARM_BOARDS.armv7hf+= BCM5301X #EVBARM_BOARDS.armv7+= BCM56340 #EVBARM_BOARDS.armv7hf+= BCM56340 -KERNEL_SETS.armv7+= GENERIC -KERNEL_SETS.armv7hf+= GENERIC KERNEL_SETS.armv7+= SUNXI KERNEL_SETS.armv7hf+= SUNXI KERNEL_SETS.armv7+= VEXPRESS_A15 @@ -98,8 +96,6 @@ EVBARM_BOARDS.armv7+= CUBOX EVBARM_BOARDS.armv7hf+= CUBOX EVBARM_BOARDS.armv7+= CUBOX-I EVBARM_BOARDS.armv7hf+= CUBOX-I -KERNEL_SETS.armv7+= GENERIC -KERNEL_SETS.armv7hf+= GENERIC #EVBARM_BOARDS.armv7+= IGEPV2 EVBARM_BOARDS.armv7+= IMX6UL-STARTER EVBARM_BOARDS.armv7hf+= IMX6UL-STARTER @@ -179,6 +175,10 @@ BUILD_KERNELS+= ${board}_INSTALL KERNEL_SETS+= ${KERNEL_SETS.${arch}} .endfor +.if !empty(MACHINE_ARCH:M*earmv[67]) +KERNEL_SETS+= GENERIC +.endif + .if !empty(MACHINE_ARCH:Maarch64) smp_efibootaa64: cd ${KERNSRCDIR}/stand/efiboot/bootaa64 && ${MAKE} release
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: roy Date: Sun Nov 4 20:45:21 UTC 2018 Modified Files: src/usr.sbin/syslogd: syslogd.8 syslogd.c Log Message: syslogd: allow the reporting of buffer overflows to be disabled. This generally isn't a good thing, nothing should be discard silently. However, for systems that don't want big syslogd buffers or are too slow to log effectively this reporting can now be disabled. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/syslogd/syslogd.8 cvs rdiff -u -r1.126 -r1.127 src/usr.sbin/syslogd/syslogd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/syslogd/syslogd.8 diff -u src/usr.sbin/syslogd/syslogd.8:1.56 src/usr.sbin/syslogd/syslogd.8:1.57 --- src/usr.sbin/syslogd/syslogd.8:1.56 Sun Nov 4 20:23:08 2018 +++ src/usr.sbin/syslogd/syslogd.8 Sun Nov 4 20:45:21 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: syslogd.8,v 1.56 2018/11/04 20:23:08 roy Exp $ +.\" $NetBSD: syslogd.8,v 1.57 2018/11/04 20:45:21 roy Exp $ .\" .\" Copyright (c) 1983, 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl dnrSsTUv +.Op Fl dnrSsTUvX .Op Fl b Ar bind_address .Op Fl B Ar buffer_length .Op Fl f Ar config_file @@ -65,6 +65,9 @@ which corresponds to it is used. Sets the receiving buffer length. The default is 16384 bytes. If syslogd reports buffer overflow, this needs increasing. +If you don't care about it being reported, see the +.Fl X +option. .It Fl d Enable debugging to the standard output, and do not disassociate from the controlling terminal. @@ -154,6 +157,8 @@ If specified once, the numeric facility each locally-written message. If specified more than once, the names of the facility and priority are logged with each locally-written message. +.It Fl X +Disable logging of buffer overflow. .El .Pp .Nm Index: src/usr.sbin/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.126 src/usr.sbin/syslogd/syslogd.c:1.127 --- src/usr.sbin/syslogd/syslogd.c:1.126 Sun Nov 4 20:23:08 2018 +++ src/usr.sbin/syslogd/syslogd.c Sun Nov 4 20:45:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.126 2018/11/04 20:23:08 roy Exp $ */ +/* $NetBSD: syslogd.c,v 1.127 2018/11/04 20:45:21 roy Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.126 2018/11/04 20:23:08 roy Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.127 2018/11/04 20:45:21 roy Exp $"); #endif #endif /* not lint */ @@ -193,6 +193,7 @@ int SyncKernel = 0; /* write kernel mes int UniquePriority = 0; /* only log specified priority */ int LogFacPri = 0; /* put facility and priority in log messages: */ /* 0=no, 1=numeric, 2=names */ +int LogOverflow = 1; /* 0=no, any other value = yes */ bool BSDOutputFormat = true; /* if true emit traditional BSD Syslog lines, * otherwise new syslog-protocol lines * @@ -316,7 +317,7 @@ main(int argc, char *argv[]) /* should we set LC_TIME="C" to ensure correct timestamps? */ (void)setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "b:B:dnsSf:m:o:p:P:ru:g:t:TUv")) != -1) + while ((ch = getopt(argc, argv, "b:B:dnsSf:m:o:p:P:ru:g:t:TUvX")) != -1) switch(ch) { case 'b': bindhostname = optarg; @@ -395,6 +396,9 @@ main(int argc, char *argv[]) if (LogFacPri < 2) LogFacPri++; break; + case 'X': + LogOverflow = 0; + break; default: usage(); } @@ -663,7 +667,7 @@ usage(void) { (void)fprintf(stderr, - "usage: %s [-dnrSsTUv] [-b bind_address] [-B buffer_length]\n" + "usage: %s [-dnrSsTUvX] [-b bind_address] [-B buffer_length]\n" "\t[-f config_file] [-g group]\n" "\t[-m mark_interval] [-P file_list] [-p log_socket\n" "\t[-p log_socket2 ...]] [-t chroot_dir] [-u user]\n", @@ -712,7 +716,10 @@ dispatch_read_klog(int fd, short event, if (rv > 0) { klog_linebuf[klog_linebufoff + rv] = '\0'; printsys(klog_linebuf); - } else if (rv < 0 && errno != EINTR) { + } else if (rv < 0 && + errno != EINTR && + (errno != ENOBUFS || LogOverflow)) + { /* * /dev/klog has croaked. Disable the event * so it won't bother us again. @@ -756,7 +763,10 @@ dispatch_read_funix(int fd, short event, if (rv > 0) { linebuf[rv] = '\0'; printline(LocalFQDN, linebuf, 0); - } else if (rv < 0 && errno != EINTR) { + } else if (rv < 0 && + errno != EINTR && + (errno != ENOBUFS || LogOverflow)) + { logerror("recvfrom() unix `%.*s'", (int)SUN_PATHLEN(), myname.sun_path); } @@ -791,7 +801,9 @@ dispatch_read_finet(int fd, short event, len = sizeof(frominet); rv = recvfrom(fd, linebuf, linebufsize-1, 0, (struct sockaddr *), ); - if (rv == 0 || (rv < 0 && errno == EINTR)) +
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: roy Date: Sun Nov 4 20:23:08 UTC 2018 Modified Files: src/usr.sbin/syslogd: syslogd.8 syslogd.c Log Message: syslogd: allow the receiving buffer size to be set. This allows the admin to try and avoid buffer overflow when a log of logging appears in bursts. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/syslogd/syslogd.8 cvs rdiff -u -r1.125 -r1.126 src/usr.sbin/syslogd/syslogd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/syslogd/syslogd.8 diff -u src/usr.sbin/syslogd/syslogd.8:1.55 src/usr.sbin/syslogd/syslogd.8:1.56 --- src/usr.sbin/syslogd/syslogd.8:1.55 Mon Jul 3 21:35:32 2017 +++ src/usr.sbin/syslogd/syslogd.8 Sun Nov 4 20:23:08 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: syslogd.8,v 1.55 2017/07/03 21:35:32 wiz Exp $ +.\" $NetBSD: syslogd.8,v 1.56 2018/11/04 20:23:08 roy Exp $ .\" .\" Copyright (c) 1983, 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)syslogd.8 8.1 (Berkeley) 6/6/93 .\" -.Dd March 28, 2012 +.Dd November 4, 2018 .Dt SYSLOGD 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Nm .Op Fl dnrSsTUv .Op Fl b Ar bind_address +.Op Fl B Ar buffer_length .Op Fl f Ar config_file .Op Fl g Ar group .Op Fl m Ar mark_interval @@ -60,6 +61,10 @@ The options are as follows: Specify one specific IP address or hostname to bind to. If a hostname is specified, the IPv4 or IPv6 address which corresponds to it is used. +.It Fl B Ar buffer_length +Sets the receiving buffer length. +The default is 16384 bytes. +If syslogd reports buffer overflow, this needs increasing. .It Fl d Enable debugging to the standard output, and do not disassociate from the controlling terminal. Index: src/usr.sbin/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.125 src/usr.sbin/syslogd/syslogd.c:1.126 --- src/usr.sbin/syslogd/syslogd.c:1.125 Sun May 6 19:16:36 2018 +++ src/usr.sbin/syslogd/syslogd.c Sun Nov 4 20:23:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.125 2018/05/06 19:16:36 christos Exp $ */ +/* $NetBSD: syslogd.c,v 1.126 2018/11/04 20:23:08 roy Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.125 2018/05/06 19:16:36 christos Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.126 2018/11/04 20:23:08 roy Exp $"); #endif #endif /* not lint */ @@ -114,6 +114,7 @@ typedef struct deadq_entry { #define DQ_TIMO_INIT 2 #define RCVBUFLEN 16384 +int buflen = RCVBUFLEN; /* * Intervals at which we flush out "message repeated" messages, * in seconds after previous message is logged. After each flush, @@ -315,11 +316,16 @@ main(int argc, char *argv[]) /* should we set LC_TIME="C" to ensure correct timestamps? */ (void)setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "b:dnsSf:m:o:p:P:ru:g:t:TUv")) != -1) + while ((ch = getopt(argc, argv, "b:B:dnsSf:m:o:p:P:ru:g:t:TUv")) != -1) switch(ch) { case 'b': bindhostname = optarg; break; + case 'B': + buflen = atoi(optarg); + if (buflen < RCVBUFLEN) +buflen = RCVBUFLEN; + break; case 'd': /* debug */ Debug = D_DEFAULT; /* is there a way to read the integer value @@ -657,7 +663,8 @@ usage(void) { (void)fprintf(stderr, - "usage: %s [-dnrSsTUv] [-b bind_address] [-f config_file] [-g group]\n" + "usage: %s [-dnrSsTUv] [-b bind_address] [-B buffer_length]\n" + "\t[-f config_file] [-g group]\n" "\t[-m mark_interval] [-P file_list] [-p log_socket\n" "\t[-p log_socket2 ...]] [-t chroot_dir] [-u user]\n", getprogname()); @@ -667,15 +674,15 @@ usage(void) static void setsockbuf(int fd, const char *name) { - int buflen; + int curbuflen; socklen_t socklen = sizeof(buflen); - if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, , ) == -1) { + + if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, , ) == -1) { logerror("getsockopt: SO_RCVBUF: `%s'", name); return; } - if (buflen >= RCVBUFLEN) + if (curbuflen >= buflen) return; - buflen = RCVBUFLEN; if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, , socklen) == -1) { logerror("setsockopt: SO_RCVBUF: `%s'", name); return;
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: palle Date: Sun Nov 4 20:02:07 UTC 2018 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: Ensure that the 64-bit condition codes are used instead of the 32-bit condition codes. ok martin@ To generate a diff of this commit: cvs rdiff -u -r1.414 -r1.415 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.414 src/sys/arch/sparc64/sparc64/locore.s:1.415 --- src/sys/arch/sparc64/sparc64/locore.s:1.414 Sat May 26 19:20:21 2018 +++ src/sys/arch/sparc64/sparc64/locore.s Sun Nov 4 20:02:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.414 2018/05/26 19:20:21 palle Exp $ */ +/* $NetBSD: locore.s,v 1.415 2018/11/04 20:02:07 palle Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -7453,7 +7453,7 @@ ENTRY(next_stick) andn %o1, %o3, %o1 andn %o2, %o3, %o2 cmp %o1, %o2 ! Did we wrap? (stick < stick_cmpr) - bgt,pt %icc, 1f + bgt,pt %xcc, 1f add %o1, 1000, %o1 ! Need some slack so we don't lose intrs. /*
CVS commit: src
Module Name:src Committed By: christos Date: Sun Nov 4 16:30:29 UTC 2018 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c if-bsd.c ipv6nd.c src/lib/libc/sys: getsockopt.2 src/share/man/man7: sysctl.7 src/sys/kern: uipc_socket.c uipc_socket2.c src/sys/sys: socket.h Log Message: - Introduce a new SO_RERROR socket option to explicitly turn on receive overflow errors re-instating the default behavior to silently ignore them as before 2018-03-19. - Introduce a new kern.sooptions sysctl to control the default behavior of socket options. Setting this to 0x4000 (SO_RERROR), turns on receive overflow error reporting for all sockets. - Change dhcpcd to turn on SO_RERROR on all its sockets. As discussed in tech-net. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.1.1.13 -r1.2 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.1.1.9 -r1.2 src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.1.1.8 -r1.2 src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.37 -r1.38 src/lib/libc/sys/getsockopt.2 cvs rdiff -u -r1.134 -r1.135 src/share/man/man7/sysctl.7 cvs rdiff -u -r1.265 -r1.266 src/sys/kern/uipc_socket.c cvs rdiff -u -r1.132 -r1.133 src/sys/kern/uipc_socket2.c cvs rdiff -u -r1.128 -r1.129 src/sys/sys/socket.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.13 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.14 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.13 Mon Aug 20 06:55:59 2018 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sun Nov 4 11:30:28 2018 @@ -1604,6 +1604,11 @@ dhcp_openudp(struct interface *ifp) n = 1; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, , sizeof(n)) == -1) goto eexit; +#ifdef SO_RERROR + n = 1; + if (setsockopt(s, SOL_SOCKET, SO_RERROR, , sizeof(n)) == -1) + goto eexit; +#endif memset(, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(BOOTPC); Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.13 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.2 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.13 Mon Aug 20 06:55:03 2018 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Sun Nov 4 11:30:28 2018 @@ -3620,6 +3620,11 @@ dhcp6_listen(struct dhcpcd_ctx *ctx, str if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, , sizeof(n)) == -1) goto errexit; +#ifdef SO_RERROR + n = 1; + if (setsockopt(s, SOL_SOCKET, SO_RERROR, , sizeof(n)) == -1) + goto errexit; +#endif memset(, 0, sizeof(sa)); sa.sin6_family = AF_INET6; sa.sin6_port = htons(DHCP6_CLIENT_PORT); Index: src/external/bsd/dhcpcd/dist/src/if-bsd.c diff -u src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.1.1.9 src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.2 --- src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.1.1.9 Mon Aug 20 06:55:03 2018 +++ src/external/bsd/dhcpcd/dist/src/if-bsd.c Sun Nov 4 11:30:28 2018 @@ -161,6 +161,12 @@ if_opensockets_os(struct dhcpcd_ctx *ctx if (ctx->link_fd == -1) return -1; +#ifdef SO_RERROR + int n = 1; + if (setsockopt(ctx->link_fd, SOL_SOCKET, SO_RERROR, + , sizeof(n)) == -1) + logerr(__func__); +#endif #if defined(RO_MSGFILTER) if (setsockopt(ctx->link_fd, PF_ROUTE, RO_MSGFILTER, , sizeof(msgfilter)) == -1) Index: src/external/bsd/dhcpcd/dist/src/ipv6nd.c diff -u src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.1.1.8 src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.2 --- src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.1.1.8 Wed May 2 18:06:41 2018 +++ src/external/bsd/dhcpcd/dist/src/ipv6nd.c Sun Nov 4 11:30:28 2018 @@ -217,6 +217,13 @@ ipv6nd_open(struct dhcpcd_ctx *ctx) , sizeof(on)) == -1) goto eexit; +#ifdef SO_RERROR + on = 1; + if (setsockopt(ctx->nd_fd, SOL_SOCKET, SO_RERROR, + , sizeof(on)) == -1) + goto eexit; +#endif + ICMP6_FILTER_SETBLOCKALL(); ICMP6_FILTER_SETPASS(ND_NEIGHBOR_ADVERT, ); ICMP6_FILTER_SETPASS(ND_ROUTER_ADVERT, ); Index: src/lib/libc/sys/getsockopt.2 diff -u src/lib/libc/sys/getsockopt.2:1.37 src/lib/libc/sys/getsockopt.2:1.38 --- src/lib/libc/sys/getsockopt.2:1.37 Tue Jul 31 18:28:26 2018 +++ src/lib/libc/sys/getsockopt.2 Sun Nov 4 11:30:28 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getsockopt.2,v 1.37 2018/07/31 22:28:26 sevan Exp $ +.\" $NetBSD: getsockopt.2,v 1.38 2018/11/04 16:30:28 christos Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" -.Dd July 31, 2018 +.Dd November 3, 2018 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -179,6 +179,7 @@ and set with .It Dv SO_RCVTIMEO Ta "set timeout value for input" .It Dv SO_TIMESTAMP Ta "enables reception of a timestamp with datagrams" .It Dv SO_ACCEPTFILTER Ta "set accept
CVS commit: src/sys/uvm
Module Name:src Committed By: mlelstv Date: Sun Nov 4 13:48:27 UTC 2018 Modified Files: src/sys/uvm: uvm_glue.c uvm_km.c Log Message: PMAP_MAP_POOLPAGE must not fail. Trigger assertion here instead of panic later from failing PR_WAITOK memory allocations. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/uvm/uvm_glue.c cvs rdiff -u -r1.144 -r1.145 src/sys/uvm/uvm_km.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.164 src/sys/uvm/uvm_glue.c:1.165 --- src/sys/uvm/uvm_glue.c:1.164 Wed Aug 22 12:07:43 2018 +++ src/sys/uvm/uvm_glue.c Sun Nov 4 13:48:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.164 2018/08/22 12:07:43 maxv Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.165 2018/11/04 13:48:27 mlelstv Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.164 2018/08/22 12:07:43 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.165 2018/11/04 13:48:27 mlelstv Exp $"); #include "opt_kgdb.h" #include "opt_kstack.h" @@ -246,7 +246,6 @@ uarea_poolpage_alloc(struct pool *pp, in if (USPACE == PAGE_SIZE && USPACE_ALIGN == 0) { struct vm_page *pg; vaddr_t va; - #if defined(PMAP_ALLOC_POOLPAGE) pg = PMAP_ALLOC_POOLPAGE( ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0)); @@ -257,8 +256,7 @@ uarea_poolpage_alloc(struct pool *pp, in if (pg == NULL) return NULL; va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg)); - if (va == 0) - uvm_pagefree(pg); + KASSERT(va != 0); return (void *)va; } #endif Index: src/sys/uvm/uvm_km.c diff -u src/sys/uvm/uvm_km.c:1.144 src/sys/uvm/uvm_km.c:1.145 --- src/sys/uvm/uvm_km.c:1.144 Sat Oct 28 00:37:13 2017 +++ src/sys/uvm/uvm_km.c Sun Nov 4 13:48:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.144 2017/10/28 00:37:13 pgoyette Exp $ */ +/* $NetBSD: uvm_km.c,v 1.145 2018/11/04 13:48:27 mlelstv Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -152,7 +152,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.144 2017/10/28 00:37:13 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.145 2018/11/04 13:48:27 mlelstv Exp $"); #include "opt_uvmhist.h" @@ -786,10 +786,7 @@ again: return ENOMEM; } va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg)); - if (__predict_false(va == 0)) { - uvm_pagefree(pg); - return ENOMEM; - } + KASSERT(va != 0); *addr = va; return 0; }
CVS commit: src
Module Name:src Committed By: maxv Date: Sun Nov 4 12:48:01 UTC 2018 Modified Files: src/etc: MAKEDEV.tmpl src/share/man/man8: MAKEDEV.8 Log Message: Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8. To generate a diff of this commit: cvs rdiff -u -r1.194 -r1.195 src/etc/MAKEDEV.tmpl cvs rdiff -u -r1.49 -r1.50 src/share/man/man8/MAKEDEV.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.194 src/etc/MAKEDEV.tmpl:1.195 --- src/etc/MAKEDEV.tmpl:1.194 Sun Sep 23 09:20:57 2018 +++ src/etc/MAKEDEV.tmpl Sun Nov 4 12:48:01 2018 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.194 2018/09/23 09:20:57 maxv Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.195 2018/11/04 12:48:01 maxv Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -277,6 +277,7 @@ # stic* PixelStamp interface chip # sysmon System Monitoring hardware # tap* virtual Ethernet device +# tprof task profiler # tun* network tunnel driver # twa 3ware Apache control interface # twe 3ware Escalade control interface @@ -1240,6 +1241,10 @@ dk[0-9]*) mkdev $name$unit b $blk $unit 0640 $g_operator ;; +tprof) + mkdev tprof c %tprof_chr% 0 + ;; + ttyCY[0-9]*) # Each unit number creates 32 pairs of {tty,dty} device nodes: # ttyCY0 => device nodes [td]tyCY000 to [td]tyCY031; Index: src/share/man/man8/MAKEDEV.8 diff -u src/share/man/man8/MAKEDEV.8:1.49 src/share/man/man8/MAKEDEV.8:1.50 --- src/share/man/man8/MAKEDEV.8:1.49 Thu Sep 27 16:33:14 2018 +++ src/share/man/man8/MAKEDEV.8 Sun Nov 4 12:48:01 2018 @@ -6,7 +6,7 @@ .\" *** DO NOT EDIT - any changes will be lost!!! .\" *** -- .\" -.\" $NetBSD: MAKEDEV.8,v 1.49 2018/09/27 16:33:14 maxv Exp $ +.\" $NetBSD: MAKEDEV.8,v 1.50 2018/11/04 12:48:01 maxv Exp $ .\" .\" Copyright (c) 2001, 2003, 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -35,7 +35,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 27, 2018 +.Dd November 1, 2018 .Dt MAKEDEV 8 .Os .Sh NAME @@ -838,6 +838,9 @@ System Monitoring hardware, see . It Ar tap# Virtual Ethernet device, see .Xr \ 4 +. It Ar tprof +Task profiler, see +.Xr \ 4 . It Ar tun# Network tunnel driver, see .Xr \ 4
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Nov 4 11:15:10 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1078 and #1079 To generate a diff of this commit: cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.47 src/doc/CHANGES-8.1:1.1.2.48 --- src/doc/CHANGES-8.1:1.1.2.47 Sat Nov 3 17:20:35 2018 +++ src/doc/CHANGES-8.1 Sun Nov 4 11:15:10 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.47 2018/11/03 17:20:35 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.48 2018/11/04 11:15:10 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1576,3 +1576,17 @@ external/bsd/nsd/include/config.h 1.4 errors. [christos, ticket #1077] +sys/dev/usb/uhub.c1.140,1.141 +sys/dev/usb/usb_subr.c1.228 + + Make USB port numbers display consistent. + [manu, ticket #1078] + +sys/netinet6/udp6_usrreq.c 1.142 + (applied to udp6_output.c, due to code refactoring + in -current) + + Fix error path in ip6 source address selection. + [mlelstv, ticket #1079] + +
CVS commit: [netbsd-8] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Nov 4 11:14:09 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-8]: udp6_output.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1079): sys/netinet6/udp6_usrreq.c: revision 1.142 applied to udp6_output.c (refactured in HEAD) Fix error path in ip6 source address selection. in6_selectsrc previously returned a pointer to an ipv6 address, the pointer was NULL in case of an error and is checked later instead of the also returned error code. When in6_selectsrc was changed to store the address into a buffer, the error code was still ignored, but the buffer pointer was never set to NULL. As a result send() to an ipv6 address on a system that isn't configured for ipv6 no longer returns the expected EADDRAVAIL but fails later in ip6_output with EOPNOTSUPP when trying to send from an unspecified address. The wrong error code caused BIND to log the unexpected errors. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.6.1 src/sys/netinet6/udp6_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/udp6_output.c diff -u src/sys/netinet6/udp6_output.c:1.55 src/sys/netinet6/udp6_output.c:1.55.6.1 --- src/sys/netinet6/udp6_output.c:1.55 Fri Mar 3 07:13:06 2017 +++ src/sys/netinet6/udp6_output.c Sun Nov 4 11:14:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_output.c,v 1.55 2017/03/03 07:13:06 ozaki-r Exp $ */ +/* $NetBSD: udp6_output.c,v 1.55.6.1 2018/11/04 11:14:09 martin Exp $ */ /* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.55 2017/03/03 07:13:06 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.55.6.1 2018/11/04 11:14:09 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -233,7 +233,10 @@ udp6_output(struct in6pcb * const in6p, in6p->in6p_moptions, >in6p_route, >in6p_laddr, , , &_laddr); - /* XXX need error check? */ + if (error) +laddr = NULL; + else +laddr = &_laddr; if (oifp && scope_ambiguous && (error = in6_setscope(>sin6_addr, oifp, NULL))) { @@ -243,7 +246,6 @@ udp6_output(struct in6pcb * const in6p, } if_put(oifp, ); curlwp_bindx(bound); - laddr = &_laddr; } else { /* * XXX: freebsd[34] does not have in_selectsrc, but
CVS commit: [netbsd-8] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Nov 4 11:08:10 UTC 2018 Modified Files: src/sys/dev/usb [netbsd-8]: uhub.c usb_subr.c Log Message: Pull up following revision(s) (requested by manu in ticket #1078): sys/dev/usb/uhub.c: revision 1.140 sys/dev/usb/uhub.c: revision 1.141 sys/dev/usb/usb_subr.c: revision 1.228 Make USB port numbers display consistent Make sure USB ports numbers are displayed with the first one as number one and not number zero when rescanning bus. The change makes the display consistent with the display at boot time USB discovery. While we are there, make port iteration consistent everywhere in the code, always starting at one instead of zero. - Make USB port iteration code consistent, always startint at port #1 This complements change in revision 1.140 To generate a diff of this commit: cvs rdiff -u -r1.136.2.2 -r1.136.2.3 src/sys/dev/usb/uhub.c cvs rdiff -u -r1.220.2.5 -r1.220.2.6 src/sys/dev/usb/usb_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/uhub.c diff -u src/sys/dev/usb/uhub.c:1.136.2.2 src/sys/dev/usb/uhub.c:1.136.2.3 --- src/sys/dev/usb/uhub.c:1.136.2.2 Thu Sep 27 14:52:26 2018 +++ src/sys/dev/usb/uhub.c Sun Nov 4 11:08:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uhub.c,v 1.136.2.2 2018/09/27 14:52:26 martin Exp $ */ +/* $NetBSD: uhub.c,v 1.136.2.3 2018/11/04 11:08:10 martin Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ /* $OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */ @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.136.2.2 2018/09/27 14:52:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.136.2.3 2018/11/04 11:08:10 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -412,11 +412,11 @@ uhub_attach(device_t parent, device_t se sizeof(struct usbd_tt), KM_SLEEP); } /* Set up data structures */ - for (p = 0; p < nports; p++) { - struct usbd_port *up = >uh_ports[p]; + for (p = 1; p <= nports; p++) { + struct usbd_port *up = >uh_ports[p - 1]; up->up_dev = NULL; up->up_parent = dev; - up->up_portno = p + 1; + up->up_portno = p; if (dev->ud_selfpowered) /* Self powered hub, give ports maximum current. */ up->up_power = USB_MAX_POWER; @@ -425,7 +425,7 @@ uhub_attach(device_t parent, device_t se up->up_restartcnt = 0; up->up_reattach = 0; if (UHUB_IS_HIGH_SPEED(sc)) { - up->up_tt = [UHUB_IS_SINGLE_TT(sc) ? 0 : p]; + up->up_tt = [UHUB_IS_SINGLE_TT(sc) ? 0 : p - 1]; up->up_tt->utt_hub = hub; } else { up->up_tt = NULL; @@ -822,8 +822,8 @@ uhub_detach(device_t self, int flags) KERNEL_LOCK(1, curlwp); nports = hub->uh_hubdesc.bNbrPorts; - for (port = 0; port < nports; port++) { - rup = >uh_ports[port]; + for (port = 1; port <= nports; port++) { + rup = >uh_ports[port - 1]; if (rup->up_dev == NULL) continue; if ((rc = usb_disconnect_port(rup, self, flags)) != 0) { @@ -870,8 +870,8 @@ uhub_rescan(device_t self, const char *i struct usbd_device *dev; int port; - for (port = 0; port < hub->uh_hubdesc.bNbrPorts; port++) { - dev = hub->uh_ports[port].up_dev; + for (port = 1; port <= hub->uh_hubdesc.bNbrPorts; port++) { + dev = hub->uh_ports[port - 1].up_dev; if (dev == NULL) continue; usbd_reattach_device(sc->sc_dev, dev, port, locators); @@ -895,8 +895,8 @@ uhub_childdet(device_t self, device_t ch panic("hub not fully initialised, but child deleted?"); nports = devhub->ud_hub->uh_hubdesc.bNbrPorts; - for (port = 0; port < nports; port++) { - dev = devhub->ud_hub->uh_ports[port].up_dev; + for (port = 1; port <= nports; port++) { + dev = devhub->ud_hub->uh_ports[port - 1].up_dev; if (!dev || dev->ud_subdevlen == 0) continue; for (i = 0; i < dev->ud_subdevlen; i++) { Index: src/sys/dev/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.220.2.5 src/sys/dev/usb/usb_subr.c:1.220.2.6 --- src/sys/dev/usb/usb_subr.c:1.220.2.5 Thu Sep 27 14:52:26 2018 +++ src/sys/dev/usb/usb_subr.c Sun Nov 4 11:08:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.220.2.5 2018/09/27 14:52:26 martin Exp $ */ +/* $NetBSD: usb_subr.c,v 1.220.2.6 2018/11/04 11:08:10 martin Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.220.2.5 2018/09/27 14:52:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.220.2.6 2018/11/04 11:08:10 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1230,9 +1230,10 @@ usbd_new_device(device_t parent, struct adev = hub, hub = hub->ud_myhub) ; if (hub) { - for (p = 0; p < hub->ud_hub->uh_hubdesc.bNbrPorts; p++) { - if (hub->ud_hub->uh_ports[p].up_dev == adev) { -dev->ud_myhsport = >ud_hub->uh_ports[p]; + for (p = 1; p <=
CVS commit: src/sys/netinet6
Module Name:src Committed By: mlelstv Date: Sun Nov 4 08:48:01 UTC 2018 Modified Files: src/sys/netinet6: udp6_usrreq.c Log Message: Fix error path in ip6 source address selection. in6_selectsrc previously returned a pointer to an ipv6 address, the pointer was NULL in case of an error and is checked later instead of the also returned error code. When in6_selectsrc was changed to store the address into a buffer, the error code was still ignored, but the buffer pointer was never set to NULL. As a result send() to an ipv6 address on a system that isn't configured for ipv6 no longer returns the expected EADDRAVAIL but fails later in ip6_output with EOPNOTSUPP when trying to send from an unspecified address. The wrong error code caused BIND to log the unexpected errors. To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/sys/netinet6/udp6_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/udp6_usrreq.c diff -u src/sys/netinet6/udp6_usrreq.c:1.141 src/sys/netinet6/udp6_usrreq.c:1.142 --- src/sys/netinet6/udp6_usrreq.c:1.141 Sat Apr 28 13:26:57 2018 +++ src/sys/netinet6/udp6_usrreq.c Sun Nov 4 08:48:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_usrreq.c,v 1.141 2018/04/28 13:26:57 maxv Exp $ */ +/* $NetBSD: udp6_usrreq.c,v 1.142 2018/11/04 08:48:01 mlelstv Exp $ */ /* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */ /* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */ @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.141 2018/04/28 13:26:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.142 2018/11/04 08:48:01 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -763,7 +763,10 @@ udp6_output(struct in6pcb * const in6p, in6p->in6p_moptions, >in6p_route, >in6p_laddr, , , &_laddr); - /* XXX need error check? */ + if (error) +laddr = NULL; + else +laddr = &_laddr; if (oifp && scope_ambiguous && (error = in6_setscope(>sin6_addr, oifp, NULL))) { @@ -773,7 +776,6 @@ udp6_output(struct in6pcb * const in6p, } if_put(oifp, ); curlwp_bindx(bound); - laddr = &_laddr; } else { /* * XXX: freebsd[34] does not have in_selectsrc, but