CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Feb 22 07:52:46 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Xeon E5 (v1) and E5 v2 devices. To generate a diff of this commit: cvs rdiff -u -r1.1314 -r1.1315 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1314 src/sys/dev/pci/pcidevs:1.1315 --- src/sys/dev/pci/pcidevs:1.1314 Thu Feb 22 05:23:29 2018 +++ src/sys/dev/pci/pcidevs Thu Feb 22 07:52:46 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1314 2018/02/22 05:23:29 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1315 2018/02/22 07:52:46 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2894,6 +2894,96 @@ product INTEL S1200_ILB 0x0c60 Atom S12 product INTEL S1200_S1220 0x0c72 Atom S1220 Internal product INTEL S1200_S1240 0x0c73 Atom S1240 Internal product INTEL S1200_S1260 0x0c75 Atom S1260 Internal +product INTEL E5V2_DMI2 0x0e00 E5 v2 DMI2 +product INTEL E5V2_PCIE_1 0x0e01 E5 v2 PCIe x4 (DMI2 Mode) +product INTEL E5V2_PCIE_2 0x0e02 E5 v2 PCIe +product INTEL E5V2_PCIE_3 0x0e03 E5 v2 PCIe +product INTEL E5V2_PCIE_4 0x0e04 E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_5 0x0e05 E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_6 0x0e06 E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_7 0x0e07 E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_8 0x0e08 E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_9 0x0e09 E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_10 0x0e0a E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_PCIE_11 0x0e0b E5 v2 PCIe x16, x8 or x4 +product INTEL E5V2_R2PCIE 0x0e1d E5 v2 R2PCIE +product INTEL E5V2_UBOX_1 0x0e1e E5 v2 UBOX +product INTEL E5V2_UBOX_2 0x0e1f E5 v2 UBOX +product INTEL E5V2_IOAT_0 0x0e20 E5 v2 I/OAT DMA Channel 0 +product INTEL E5V2_IOAT_1 0x0e21 E5 v2 I/OAT DMA Channel 1 +product INTEL E5V2_IOAT_2 0x0e22 E5 v2 I/OAT DMA Channel 2 +product INTEL E5V2_IOAT_3 0x0e23 E5 v2 I/OAT DMA Channel 3 +product INTEL E5V2_IOAT_4 0x0e24 E5 v2 I/OAT DMA Channel 4 +product INTEL E5V2_IOAT_5 0x0e25 E5 v2 I/OAT DMA Channel 5 +product INTEL E5V2_IOAT_6 0x0e26 E5 v2 I/OAT DMA Channel 6 +product INTEL E5V2_IOAT_7 0x0e27 E5 v2 I/OAT DMA Channel 7 +product INTEL E5V2_ADDRMAP 0x0e28 E5 v2 Address Map +product INTEL E5V2_HOTPLUG 0x0e29 E5 v2 Hot-Plug +product INTEL E5V2_IIO_RAS 0x0e2a E5 v2 IIO RAS +product INTEL E5V2_IOAPIC 0x0e2c E5 v2 I/O APIC +product INTEL E5_IOAT_RAID_1 0x3c2e E5 I/OAT DMA (RAID 5/6) +product INTEL E5_IOAT_RAID_2 0x3c2f E5 I/OAT DMA (RAID 5/6) +product INTEL E5V2_HA_2 0x0e30 E5 v2 Home Agent +product INTEL E5V2_PCIE_PM_1 0x0e34 E5 v2 PCIe Performance Monitor +product INTEL E5V2_QPI_PM_1 0x0e36 E5 v2 QPI Performance Monitor +product INTEL E5V2_QPI_PM_2 0x0e37 E5 v2 QPI Performance Monitor +product INTEL E5V2_QPI_1 0x0e41 E5 v2 QPI +product INTEL E5V2_IMC_RAS 0x0e71 E5 v2 IMC RAS +product INTEL E5V2_UBOX_3 0x0e7d E5 v2 UBOX +product INTEL E5V2_QPI_L_0 0x0e80 E5 v2 QPI Link 0 +product INTEL E5V2_QPI_2 0x0e81 E5 v2 QPI +product INTEL E5V2_QPI_L_0_1 0x0e83 E5 v2 QPI Link Reut 0 +product INTEL E5V2_QPI_L_0_2 0x0e84 E5 v2 QPI Link Reut 0 +product INTEL E5V2_QPI_L_1 0x0e90 E5 v2 QPI Link 1 +product INTEL E5V2_QPI_L_1_1 0x0e93 E5 v2 QPI Link Reut 1 +product INTEL E5V2_QPI_L_1_2 0x0e94 E5 v2 QPI Link Reut 1 +product INTEL E5V2_HA_1 0x0ea0 E5 v2 Home Agent +product INTEL E5V2_IMC_TA 0x0ea8 E5 v2 IMC TA +product INTEL E5V2_IMC_TAD_1 0x0eaa E5 v2 IMC TAD +product INTEL E5V2_IMC_TAD_2 0x0eab E5 v2 IMC TAD +product INTEL E5V2_IMC_TAD_3 0x0eac E5 v2 IMC TAD +product INTEL E5V2_IMC_TAD_4 0x0ead E5 v2 IMC TAD +product INTEL E5V2_IMC_THERMAL_1 0x0eb0 E5 v2 IMC Thermal +product INTEL E5V2_IMC_THERMAL_2 0x0eb1 E5 v2 IMC Thermal +product INTEL E5V2_IMC_ERR_1 0x0eb2 E5 v2 IMC Error +product INTEL E5V2_IMC_ERR_2 0x0eb3 E5 v2 IMC Error +product INTEL E5V2_IMC_THERMAL_3 0x0eb4 E5 v2 IMC Thermal +product INTEL E5V2_IMC_THERMAL_4 0x0eb5 E5 v2 IMC Thermal +product INTEL E5V2_IMC_ERR_3 0x0eb6 E5 v2 IMC Error +product INTEL E5V2_IMC_ERR_4 0x0eb7 E5 v2 IMC Error +product INTEL E5V2_IMC_DDRIO_1 0x0eba E5 v2 IMC DDRIO 0,1,2,3 Multicast +product INTEL E5V2_IMC_DDRIO_2 0x0ebb E5 v2 IMC DDRIO 0,1,2,3 Multicast +product INTEL E5V2_IMC_DDRIO_3 0x0ebc E5 v2 IMC DDRIO 0 & 1 +product INTEL E5V2_IMC_DDRIO_4 0x0ebd E5 v2 IMC DDRIO 0 & 1 +product INTEL E5V2_IMC_DDRIO_5 0x0ebe E5 v2 IMC DDRIO 0,1 Multicast +product INTEL E5V2_IMC_DDRIO_6 0x0ebf E5 v2 IMC DDRIO 0,1 Multicast +product INTEL E5V2_PCU_0 0x0ec0 E5 v2 PCU +product INTEL E5V2_PCU_1 0x0ec1 E5 v2 PCU +product INTEL E5V2_PCU_2 0x0ec2 E5 v2 PCU +product INTEL E5V2_PCU_3 0x0ec3 E5 v2 PCU +product INTEL E5V2_PCU_4 0x0ec4 E5 v2 PCU +product INTEL E5V2_SAD_1 0x0ec8 E5 v2 SAD +product INTEL E5V2_BROADCAST_1 0x0ec9 E5 v2 Broadcast +product INTEL E5V2_BROADCAST_2 0x0eca E5 v2 Broadcast +product INTEL E5V2_IMC_DDRIO_7 0x0ed8 E5 v
CVS commit: src/sys
Module Name:src Committed By: mrg Date: Thu Feb 22 07:30:43 UTC 2018 Modified Files: src/sys/arch/alpha/conf: files.alpha src/sys/conf: files Log Message: move "define tcbus {}" into files.alpha. it isn't wanted for general ports, and generates an unused symbol for pmax. with this both alpha and pmax kernel work with gcc 5 and 6. To generate a diff of this commit: cvs rdiff -u -r1.188 -r1.189 src/sys/arch/alpha/conf/files.alpha cvs rdiff -u -r1.1194 -r1.1195 src/sys/conf/files 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/alpha/conf/files.alpha diff -u src/sys/arch/alpha/conf/files.alpha:1.188 src/sys/arch/alpha/conf/files.alpha:1.189 --- src/sys/arch/alpha/conf/files.alpha:1.188 Fri Oct 17 18:31:07 2014 +++ src/sys/arch/alpha/conf/files.alpha Thu Feb 22 07:30:43 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.alpha,v 1.188 2014/10/17 18:31:07 uebayasi Exp $ +# $NetBSD: files.alpha,v 1.189 2018/02/22 07:30:43 mrg Exp $ # # alpha-specific configuration info @@ -119,6 +119,7 @@ include "dev/dec/files.dec" include "dev/tc/files.tc" # TC attachment is MD +define tcbus { } # TURBOchannel attachment attach tc at tcbus device tcasic: tcbus Index: src/sys/conf/files diff -u src/sys/conf/files:1.1194 src/sys/conf/files:1.1195 --- src/sys/conf/files:1.1194 Mon Feb 12 23:11:00 2018 +++ src/sys/conf/files Thu Feb 22 07:30:43 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1194 2018/02/12 23:11:00 joerg Exp $ +# $NetBSD: files,v 1.1195 2018/02/22 07:30:43 mrg Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -1248,7 +1248,6 @@ include "dev/wsfb/files.wsfb" define isabus { } # ISA attachment define eisabus { } # EISA attachment define pcibus {[bus = -1]} # PCI attachment -define tcbus { } # TURBOchannel attachment define mcabus { } # MicroChannel attachment define usbus { } # USB attachment define fwbus { } # IEEE 1394 attachment
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: mrg Date: Thu Feb 22 07:24:19 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc: genemit.c genrecog.c hwint.h Log Message: re-port the patch from https://gcc.gnu.org/bugzilla/attachment.cgi?id=15492. - local HOST_WIDE_INT_CONSTANT macro same as new HOST_WIDE_INT_C macro, so use it instead, and remove the local macro. - re-port the genrecog.c change which was missed in early GCC-6 port. this makes sh3 work again. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/genemit.c \ src/external/gpl3/gcc/dist/gcc/genrecog.c \ src/external/gpl3/gcc/dist/gcc/hwint.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/gpl3/gcc/dist/gcc/genemit.c diff -u src/external/gpl3/gcc/dist/gcc/genemit.c:1.5 src/external/gpl3/gcc/dist/gcc/genemit.c:1.6 --- src/external/gpl3/gcc/dist/gcc/genemit.c:1.5 Fri Feb 2 03:41:03 2018 +++ src/external/gpl3/gcc/dist/gcc/genemit.c Thu Feb 22 07:24:19 2018 @@ -188,7 +188,7 @@ gen_exp (rtx x, enum rtx_code subroutine printf ("const_true_rtx"); else { - printf ("GEN_INT (HOST_WIDE_INT_CONSTANT ("); + printf ("GEN_INT (HOST_WIDE_INT_C ("); printf (HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); printf ("))"); } Index: src/external/gpl3/gcc/dist/gcc/genrecog.c diff -u src/external/gpl3/gcc/dist/gcc/genrecog.c:1.5 src/external/gpl3/gcc/dist/gcc/genrecog.c:1.6 --- src/external/gpl3/gcc/dist/gcc/genrecog.c:1.5 Fri Feb 2 03:41:03 2018 +++ src/external/gpl3/gcc/dist/gcc/genrecog.c Thu Feb 22 07:24:19 2018 @@ -4416,9 +4416,9 @@ print_host_wide_int (uint64_t val) { uint64_t min = uint64_t (1) << (HOST_BITS_PER_WIDE_INT - 1); if (val == min) -printf ("(" HOST_WIDE_INT_PRINT_DEC_C " - 1)", val + 1); +printf ("( HOST_WIDE_INT_C (" HOST_WIDE_INT_PRINT_DEC ") - 1)", val + 1); else -printf (HOST_WIDE_INT_PRINT_DEC_C, val); +printf (" HOST_WIDE_INT_C (" HOST_WIDE_INT_PRINT_DEC ")", val); } /* Print the C expression for actual parameter PARAM. */ Index: src/external/gpl3/gcc/dist/gcc/hwint.h diff -u src/external/gpl3/gcc/dist/gcc/hwint.h:1.5 src/external/gpl3/gcc/dist/gcc/hwint.h:1.6 --- src/external/gpl3/gcc/dist/gcc/hwint.h:1.5 Fri Feb 2 03:41:03 2018 +++ src/external/gpl3/gcc/dist/gcc/hwint.h Thu Feb 22 07:24:19 2018 @@ -99,11 +99,9 @@ typedef HOST_WIDE_INT __gcc_host_wide_in #if INT64_T_IS_LONG # define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT # define HOST_WIDE_INT_PRINT_C "L" -# define HOST_WIDE_INT_CONSTANT(x) x ## L #else # define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT # define HOST_WIDE_INT_PRINT_C "LL" -# define HOST_WIDE_INT_CONSTANT(x) x ## LL #endif #define HOST_WIDE_INT_PRINT_DEC "%" PRId64
CVS commit: src/distrib/pmax/instkernel
Module Name:src Committed By: mrg Date: Thu Feb 22 07:21:10 UTC 2018 Modified Files: src/distrib/pmax/instkernel: Makefile Log Message: bump image size for gcc 6 bloaty mc bloat face. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/distrib/pmax/instkernel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/pmax/instkernel/Makefile diff -u src/distrib/pmax/instkernel/Makefile:1.39 src/distrib/pmax/instkernel/Makefile:1.40 --- src/distrib/pmax/instkernel/Makefile:1.39 Mon Feb 25 16:52:57 2013 +++ src/distrib/pmax/instkernel/Makefile Thu Feb 22 07:21:10 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2013/02/25 16:52:57 mhitch Exp $ +# $NetBSD: Makefile,v 1.40 2018/02/22 07:21:10 mrg Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -10,7 +10,7 @@ SFX= 64 .endif IMAGE= diskimage -IMAGESIZE= 2600k +IMAGESIZE= 2800k LISTS= ${.CURDIR}/list${SFX} MTREECONF= ${DISTRIBDIR}/common/mtree.dot IMAGEENDIAN= le
Re: CVS commit: src/sys/arch/i386/stand
Thanks, Christos. This should also fix PR/53045 (qemu booting). On 21 February 2018 at 17:37, Christos Zoulas wrote: > Module Name:src > Committed By: christos > Date: Thu Feb 22 01:37:04 UTC 2018 > > Modified Files: > src/sys/arch/i386/stand: Makefile.inc > > Log Message: > gcc-6 needs -nosse > > > To generate a diff of this commit: > cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/Makefile.inc > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. >
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Feb 22 05:23:30 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: s/C62x9/C62x/ To generate a diff of this commit: cvs rdiff -u -r1.1313 -r1.1314 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1313 src/sys/dev/pci/pcidevs:1.1314 --- src/sys/dev/pci/pcidevs:1.1313 Thu Feb 22 03:13:18 2018 +++ src/sys/dev/pci/pcidevs Thu Feb 22 05:23:29 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1313 2018/02/22 03:13:18 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1314 2018/02/22 05:23:29 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3808,7 +3808,7 @@ product INTEL 82801HBM_LPC 0x2815 product INTEL 82801H_SATA_1 0x2820 82801H SATA Controller product INTEL 82801H_SATA_AHCI6 0x2821 82801H AHCI SATA Controller w/ 6 ports product INTEL 82801H_SATA_RAID 0x2822 82801H/C6[12]x/X99/Z170/[ZQH]270 RAID SATA Controller -product INTEL C620_SSATA_RAID_2 0x2823 C62x9 sSATA Controller (RAID) +product INTEL C620_SSATA_RAID_2 0x2823 C62x sSATA Controller (RAID) product INTEL 82801H_SATA_AHCI4 0x2824 82801H AHCI SATA Controller w/ 4 ports product INTEL 82801H_SATA_2 0x2825 82801H SATA Controller product INTEL C610_SATA_RAID_3 0x2826 C6[12]x/X99/[ZQH]270 SATA Controller (RAID)
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Feb 22 05:09:56 UTC 2018 Modified Files: src/sys/dev/pci: ichsmb.c Log Message: Add C620 devices. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/ichsmb.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/pci/ichsmb.c diff -u src/sys/dev/pci/ichsmb.c:1.51 src/sys/dev/pci/ichsmb.c:1.52 --- src/sys/dev/pci/ichsmb.c:1.51 Thu Aug 17 01:24:09 2017 +++ src/sys/dev/pci/ichsmb.c Thu Feb 22 05:09:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ichsmb.c,v 1.51 2017/08/17 01:24:09 msaitoh Exp $ */ +/* $NetBSD: ichsmb.c,v 1.52 2018/02/22 05:09:56 msaitoh Exp $ */ /* $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */ /* @@ -22,7 +22,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.51 2017/08/17 01:24:09 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.52 2018/02/22 05:09:56 msaitoh Exp $"); #include #include @@ -126,6 +126,8 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_C600_SMB_1: case PCI_PRODUCT_INTEL_C600_SMB_2: case PCI_PRODUCT_INTEL_C610_SMB: + case PCI_PRODUCT_INTEL_C620_SMB: + case PCI_PRODUCT_INTEL_C620_SMB_S: case PCI_PRODUCT_INTEL_EP80579_SMB: case PCI_PRODUCT_INTEL_DH89XXCC_SMB: case PCI_PRODUCT_INTEL_DH89XXCL_SMB:
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Feb 22 03:13:39 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.1304 -r1.1305 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1303 -r1.1304 src/sys/dev/pci/pcidevs_data.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/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.1304 src/sys/dev/pci/pcidevs.h:1.1305 --- src/sys/dev/pci/pcidevs.h:1.1304 Thu Feb 22 03:03:52 2018 +++ src/sys/dev/pci/pcidevs.h Thu Feb 22 03:13:38 2018 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.1304 2018/02/22 03:03:52 msaitoh Exp $ */ +/* $NetBSD: pcidevs.h,v 1.1305 2018/02/22 03:13:38 msaitoh Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1312 2018/02/22 03:03:28 msaitoh Exp + * NetBSD: pcidevs,v 1.1313 2018/02/22 03:13:18 msaitoh Exp */ /* @@ -3815,7 +3815,7 @@ #define PCI_PRODUCT_INTEL_82801H_SATA_1 0x2820 /* 82801H SATA Controller */ #define PCI_PRODUCT_INTEL_82801H_SATA_AHCI6 0x2821 /* 82801H AHCI SATA Controller w/ 6 ports */ #define PCI_PRODUCT_INTEL_82801H_SATA_RAID 0x2822 /* 82801H/C6[12]x/X99/Z170/[ZQH]270 RAID SATA Controller */ -#define PCI_PRODUCT_INTEL_C620_SSATA_RAID_2 0x2827 /* C62x9 sSATA Controller (RAID) */ +#define PCI_PRODUCT_INTEL_C620_SSATA_RAID_2 0x2823 /* C62x9 sSATA Controller (RAID) */ #define PCI_PRODUCT_INTEL_82801H_SATA_AHCI4 0x2824 /* 82801H AHCI SATA Controller w/ 4 ports */ #define PCI_PRODUCT_INTEL_82801H_SATA_2 0x2825 /* 82801H SATA Controller */ #define PCI_PRODUCT_INTEL_C610_SATA_RAID_3 0x2826 /* C6[12]x/X99/[ZQH]270 SATA Controller (RAID) */ Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.1303 src/sys/dev/pci/pcidevs_data.h:1.1304 --- src/sys/dev/pci/pcidevs_data.h:1.1303 Thu Feb 22 03:03:52 2018 +++ src/sys/dev/pci/pcidevs_data.h Thu Feb 22 03:13:38 2018 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.1303 2018/02/22 03:03:52 msaitoh Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.1304 2018/02/22 03:13:38 msaitoh Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1312 2018/02/22 03:03:28 msaitoh Exp + * NetBSD: pcidevs,v 1.1313 2018/02/22 03:13:18 msaitoh Exp */ /*
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Feb 22 03:13:18 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Fix C62x9 sSATA Controller (RAID) device ID. To generate a diff of this commit: cvs rdiff -u -r1.1312 -r1.1313 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1312 src/sys/dev/pci/pcidevs:1.1313 --- src/sys/dev/pci/pcidevs:1.1312 Thu Feb 22 03:03:28 2018 +++ src/sys/dev/pci/pcidevs Thu Feb 22 03:13:18 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1312 2018/02/22 03:03:28 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1313 2018/02/22 03:13:18 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3808,7 +3808,7 @@ product INTEL 82801HBM_LPC 0x2815 product INTEL 82801H_SATA_1 0x2820 82801H SATA Controller product INTEL 82801H_SATA_AHCI6 0x2821 82801H AHCI SATA Controller w/ 6 ports product INTEL 82801H_SATA_RAID 0x2822 82801H/C6[12]x/X99/Z170/[ZQH]270 RAID SATA Controller -product INTEL C620_SSATA_RAID_2 0x2827 C62x9 sSATA Controller (RAID) +product INTEL C620_SSATA_RAID_2 0x2823 C62x9 sSATA Controller (RAID) product INTEL 82801H_SATA_AHCI4 0x2824 82801H AHCI SATA Controller w/ 4 ports product INTEL 82801H_SATA_2 0x2825 82801H SATA Controller product INTEL C610_SATA_RAID_3 0x2826 C6[12]x/X99/[ZQH]270 SATA Controller (RAID)
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Feb 22 03:03:28 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add C620 devices. To generate a diff of this commit: cvs rdiff -u -r1.1311 -r1.1312 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1311 src/sys/dev/pci/pcidevs:1.1312 --- src/sys/dev/pci/pcidevs:1.1311 Wed Feb 21 08:39:08 2018 +++ src/sys/dev/pci/pcidevs Thu Feb 22 03:03:28 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1311 2018/02/21 08:39:08 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1312 2018/02/22 03:03:28 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3807,11 +3807,12 @@ product INTEL 82801HO_LPC 0x2814 82801H product INTEL 82801HBM_LPC 0x2815 82801HBM LPC Interface Bridge product INTEL 82801H_SATA_1 0x2820 82801H SATA Controller product INTEL 82801H_SATA_AHCI6 0x2821 82801H AHCI SATA Controller w/ 6 ports -product INTEL 82801H_SATA_RAID 0x2822 82801H/C61x/X99/Z170/[ZQH]270 RAID SATA Controller +product INTEL 82801H_SATA_RAID 0x2822 82801H/C6[12]x/X99/Z170/[ZQH]270 RAID SATA Controller +product INTEL C620_SSATA_RAID_2 0x2827 C62x9 sSATA Controller (RAID) product INTEL 82801H_SATA_AHCI4 0x2824 82801H AHCI SATA Controller w/ 4 ports product INTEL 82801H_SATA_2 0x2825 82801H SATA Controller -product INTEL C610_SATA_RAID_3 0x2826 C61x/X99/[ZQH]270 SATA Controller (RAID) -product INTEL C610_SSATA_RAID_2 0x2827 C61x/X99 sSATA Controller (RAID) +product INTEL C610_SATA_RAID_3 0x2826 C6[12]x/X99/[ZQH]270 SATA Controller (RAID) +product INTEL C610_SSATA_RAID_2 0x2827 C6[12]x/X99 sSATA Controller (RAID) product INTEL 82801HEM_SATA 0x2828 82801HEM SATA Controller product INTEL 82801HBM_SATA_AHCI 0x2829 82801HBM AHCI SATA Controller product INTEL 82801HBM_SATA_RAID 0x282a 82801HBM SATA RAID Controller @@ -4152,8 +4153,17 @@ product INTEL E7520_PCIE_C1 0x359a E7520 product INTEL E7520_CFG 0x359b E7520 Extended Configuration product INTEL X722_A0 0x374c X722 A0 10GbE product INTEL X722_A0_VF 0x374d X722 A0 10GbE VF +product INTEL C620_THERM_SENS 0x37b1 Thermal Sensor +product INTEL C620_NPX16 0x37c0 PCIe x16 Uplink (NPX16) +product INTEL C620_NPX8 0x37c1 PCIe x8 Uplink (NPX8) +product INTEL C620_VSWP_0 0x37c2 Virtual Switch Port (for QAT 0) +product INTEL C620_VSWP_1 0x37c3 Virtual Switch Port (for QAT 1) +product INTEL C620_VSWP_2 0x37c4 Virtual Switch Port (for QAT 2) +product INTEL C620_VSWP_3 0x37c5 Virtual Switch Port (for 10GbE LAN) +product INTEL C620_VSWP_4 0x37c6 Virtual Switch Port (for Termal Sensor) product INTEL C620_QAT 0x37c8 C620 QAT product INTEL C620_QAT_VF 0x37c9 C620 QAT Virtual Function +product INTEL X722 0x37cc X722 10GbE product INTEL X722_VF 0x37cd X722 10GbE VF product INTEL X722_KX 0x37ce X722 10GbE Backplane product INTEL X722_QSFP 0x37cf X722 10GbE QSFP+ @@ -4852,6 +4862,106 @@ product INTEL 100SERIES_PCIE_18 0xa168 1 product INTEL 100SERIES_PCIE_19 0xa169 100 Series PCIE product INTEL 100SERIES_PCIE_20 0xa16a 100 Series PCIE product INTEL 100SERIES_HDA 0xa170 100 Series HD Audio +product INTEL C620_AHCI 0xa182 AHCI +product INTEL C620_3RD_RAID 0xa186 3rd Party RAID +product INTEL C620_PCIE_0 0xa190 PCIe Root Port +product INTEL C620_PCIE_1 0xa191 PCIe Root Port +product INTEL C620_PCIE_2 0xa192 PCIe Root Port +product INTEL C620_PCIE_3 0xa193 PCIe Root Port +product INTEL C620_PCIE_4 0xa194 PCIe Root Port +product INTEL C620_PCIE_5 0xa195 PCIe Root Port +product INTEL C620_PCIE_6 0xa196 PCIe Root Port +product INTEL C620_PCIE_7 0xa197 PCIe Root Port +product INTEL C620_PCIE_8 0xa198 PCIe Root Port +product INTEL C620_PCIE_9 0xa199 PCIe Root Port +product INTEL C620_PCIE_10 0xa19a PCIe Root Port +product INTEL C620_PCIE_11 0xa19b PCIe Root Port +product INTEL C620_PCIE_12 0xa19c PCIe Root Port +product INTEL C620_PCIE_13 0xa19d PCIe Root Port +product INTEL C620_PCIE_14 0xa19e PCIe Root Port +product INTEL C620_PCIE_15 0xa19f PCIe Root Port +product INTEL C620_P2SB 0xa1a0 P2SB +product INTEL C620_PMC 0xa1a1 PMC +product INTEL C620_SMB 0xa1a3 SMBus +product INTEL C620_SPI 0xa1a4 SPI +product INTEL C620_TRACE 0xa1a6 Trace Hub +product INTEL C620_XHCI 0xa1af xHCI +product INTEL C620_THERM 0xa1b1 Thermal Subsystem +product INTEL C620_ME_HCI_1 0xa1ba ME HCI +product INTEL C620_ME_HCI_2 0xa1bb ME HCI +product INTEL C620_ME_IDER 0xa1bc ME IDER +product INTEL C620_ME_KT 0xa1bd ME KT +product INTEL C620_ME_HCI_3 0xa1be ME HECI +product INTEL C620_LPC_1 0xa1c1 LPC or eSPI +product INTEL C620_LPC_2 0xa1c2 LPC or eSPI +product INTEL C620_LPC_3 0xa1c3 LPC or eSPI +product INTEL C620_LPC_4 0xa1c4 LPC or eSPI +product INTEL C620_LPC_5 0xa1c5 LPC or eSPI +product INTEL C620_LPC_6 0xa1c6 LPC or eSPI +product INTEL C620_LPC_7 0xa1c7 LPC or eSPI +product INTEL C620_SSATA_AHCI 0xa1d2 sSATA AHCI +product INTEL C620_SSATA_RAI
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Feb 22 01:59:28 UTC 2018 Modified Files: src/usr.bin/make: parse.c Log Message: Avoid calling sysconf for every file loaded. At start of a meta build this can be measurable overhead. Patch from bdrewery at freebsd.org To generate a diff of this commit: cvs rdiff -u -r1.226 -r1.227 src/usr.bin/make/parse.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.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.226 src/usr.bin/make/parse.c:1.227 --- src/usr.bin/make/parse.c:1.226 Mon Feb 12 21:38:09 2018 +++ src/usr.bin/make/parse.c Thu Feb 22 01:59:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.226 2018/02/12 21:38:09 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.227 2018/02/22 01:59:28 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.226 2018/02/12 21:38:09 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.227 2018/02/22 01:59:28 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.226 2018/02/12 21:38:09 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.227 2018/02/22 01:59:28 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -481,7 +481,7 @@ static struct loadedfile * loadfile(const char *path, int fd) { struct loadedfile *lf; - long pagesize; + static long pagesize = 0; ssize_t result; size_t bufpos; @@ -503,7 +503,8 @@ loadfile(const char *path, int fd) if (load_getsize(fd, &lf->len) == SUCCESS) { /* found a size, try mmap */ - pagesize = sysconf(_SC_PAGESIZE); + if (pagesize == 0) + pagesize = sysconf(_SC_PAGESIZE); if (pagesize <= 0) { pagesize = 0x1000; }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: christos Date: Thu Feb 22 01:50:26 UTC 2018 Modified Files: src/sys/dev/acpi: tpm_acpi.c Log Message: notyet an unused variable. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/tpm_acpi.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/acpi/tpm_acpi.c diff -u src/sys/dev/acpi/tpm_acpi.c:1.5 src/sys/dev/acpi/tpm_acpi.c:1.6 --- src/sys/dev/acpi/tpm_acpi.c:1.5 Sat Oct 28 00:53:55 2017 +++ src/sys/dev/acpi/tpm_acpi.c Wed Feb 21 20:50:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm_acpi.c,v 1.5 2017/10/28 04:53:55 riastradh Exp $ */ +/* $NetBSD: tpm_acpi.c,v 1.6 2018/02/22 01:50:26 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.5 2017/10/28 04:53:55 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.6 2018/02/22 01:50:26 christos Exp $"); #include #include @@ -85,11 +85,13 @@ CFATTACH_DECL_NEW(tpm_acpi, sizeof(struc * Supported device IDs */ +#ifdef notyet static const char * const tpm_acpi_ids[] = { "IFX0101", "IFX0102", NULL }; +#endif static int tpm_acpi_match(device_t parent, cfdata_t match, void *aux)
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Thu Feb 22 01:40:49 UTC 2018 Modified Files: src/share/man/man4: tpm.4 Log Message: Add config option for tpm at acpi To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/tpm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tpm.4 diff -u src/share/man/man4/tpm.4:1.3 src/share/man/man4/tpm.4:1.4 --- src/share/man/man4/tpm.4:1.3 Sat Jul 7 21:29:03 2012 +++ src/share/man/man4/tpm.4 Thu Feb 22 01:40:49 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: tpm.4,v 1.3 2012/07/07 21:29:03 spz Exp $ +.\" $NetBSD: tpm.4,v 1.4 2018/02/22 01:40:49 pgoyette Exp $ .\" .\" Copyright (c) 2010 Hans-Jörg Höxer, .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd January 22, 2012 +.Dd February 22, 2018 .Dt TPM 4 .Os .Sh NAME @@ -23,6 +23,7 @@ .Sh SYNOPSIS .Cd "tpm* at isa? iomem 0xfed4" .Cd "tpm* at isa? iomem 0xfed4 irq 7" +.Cd "tpm* at acpi?" .Sh DESCRIPTION The .Nm
CVS commit: src/sys/arch/i386/stand
Module Name:src Committed By: christos Date: Thu Feb 22 01:37:04 UTC 2018 Modified Files: src/sys/arch/i386/stand: Makefile.inc Log Message: gcc-6 needs -nosse To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/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/sys/arch/i386/stand/Makefile.inc diff -u src/sys/arch/i386/stand/Makefile.inc:1.13 src/sys/arch/i386/stand/Makefile.inc:1.14 --- src/sys/arch/i386/stand/Makefile.inc:1.13 Thu Jan 12 17:16:29 2017 +++ src/sys/arch/i386/stand/Makefile.inc Wed Feb 21 20:37:04 2018 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.13 2017/01/12 22:16:29 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.14 2018/02/22 01:37:04 christos Exp $ .include BINDIR= /usr/mdec OPT_SIZE.gcc= -Os -ffreestanding -fomit-frame-pointer -fno-unwind-tables \ - -fno-asynchronous-unwind-tables -fno-exceptions + -fno-asynchronous-unwind-tables -fno-exceptions -mno-sse OPT_SIZE.clang= -Oz -ffreestanding -fomit-frame-pointer -DNDEBUG \ -fno-stack-protector -mno-sse \ -mstack-alignment=4 \
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Wed Feb 21 21:53:54 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c Log Message: KERNEL_PID is > 0 on powerpc/ibm4xx, need to mask all bits <0, KERNEL_PID> to avoid triggering KASSERT() checking allocated asid is bigger than KERNEL_PID; adjust also TLBINFO_ASID_INITIAL_FREE() accordingly discussed with Nick To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/uvm/pmap/pmap_tlb.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/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.25 src/sys/uvm/pmap/pmap_tlb.c:1.26 --- src/sys/uvm/pmap/pmap_tlb.c:1.25 Mon Feb 19 22:01:15 2018 +++ src/sys/uvm/pmap/pmap_tlb.c Wed Feb 21 21:53:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.25 2018/02/19 22:01:15 jdolecek Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.26 2018/02/21 21:53:54 jdolecek Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.25 2018/02/19 22:01:15 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.26 2018/02/21 21:53:54 jdolecek Exp $"); /* * Manages address spaces in a TLB. @@ -144,14 +144,30 @@ static kmutex_t pmap_tlb0_lock __cacheli #error "KERNEL_PID expected in range 0-31" #endif +#define TLBINFO_ASID_MARK_UNUSED(ti, asid) \ + __BITMAP_CLR((asid), &(ti)->ti_asid_bitmap) +#define TLBINFO_ASID_MARK_USED(ti, asid) \ + __BITMAP_SET((asid), &(ti)->ti_asid_bitmap) +#define TLBINFO_ASID_INUSE_P(ti, asid) \ + __BITMAP_ISSET((asid), &(ti)->ti_asid_bitmap) +#define TLBINFO_ASID_RESET(ti) \ + do {\ + __BITMAP_ZERO(&ti->ti_asid_bitmap); \ + for (tlb_asid_t asid = 0; asid <= KERNEL_PID; asid++) \ + TLBINFO_ASID_MARK_USED(ti, asid); \ + } while (0) +#define TLBINFO_ASID_INITIAL_FREE(asid_max) \ + (asid_max + 1 /* 0 */ - (1 + KERNEL_PID)) + struct pmap_tlb_info pmap_tlb0_info = { .ti_name = "tlb0", .ti_asid_hint = KERNEL_PID + 1, #ifdef PMAP_TLB_NUM_PIDS .ti_asid_max = IFCONSTANT(PMAP_TLB_NUM_PIDS - 1), - .ti_asids_free = IFCONSTANT(PMAP_TLB_NUM_PIDS - (1 + KERNEL_PID)), + .ti_asids_free = IFCONSTANT( + TLBINFO_ASID_INITIAL_FREE(PMAP_TLB_NUM_PIDS - 1)), #endif - .ti_asid_bitmap._b[0] = __BIT(KERNEL_PID), + .ti_asid_bitmap._b[0] = __BITS(0, KERNEL_PID), #ifdef PMAP_TLB_WIRED_UPAGES .ti_wired = PMAP_TLB_WIRED_UPAGES, #endif @@ -171,20 +187,6 @@ struct pmap_tlb_info *pmap_tlbs[PMAP_TLB u_int pmap_ntlbs = 1; #endif -#define TLBINFO_ASID_MARK_UNUSED(ti, asid) \ - __BITMAP_CLR((asid), &(ti)->ti_asid_bitmap) -#define TLBINFO_ASID_MARK_USED(ti, asid) \ - __BITMAP_SET((asid), &(ti)->ti_asid_bitmap) -#define TLBINFO_ASID_INUSE_P(ti, asid) \ - __BITMAP_ISSET((asid), &(ti)->ti_asid_bitmap) -#define TLBINFO_ASID_RESET(ti) \ - do { \ - __BITMAP_ZERO(&ti->ti_asid_bitmap); \ - TLBINFO_ASID_MARK_USED(ti, KERNEL_PID); \ - } while (0) -#define TLBINFO_ASID_INITIAL_FREE(ti) \ - ((ti)->ti_asid_max + 1 /* 0 */ - 1 /* reserved KERNEL_PID */) - #ifdef MULTIPROCESSOR __unused static inline bool pmap_tlb_intersecting_active_p(pmap_t pm, struct pmap_tlb_info *ti) @@ -338,10 +340,10 @@ pmap_tlb_info_init(struct pmap_tlb_info KASSERT(pmap_tlbs[pmap_ntlbs] == NULL); ti->ti_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SCHED); - TLBINFO_ASID_MARK_USED(ti, KERNEL_PID); + TLBINFO_ASID_RESET(ti); ti->ti_asid_hint = KERNEL_PID + 1; ti->ti_asid_max = pmap_tlbs[0]->ti_asid_max; - ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max); ti->ti_tlbinvop = TLBINV_NOBODY; ti->ti_victim = NULL; kcpuset_create(&ti->ti_kcpuset, true); @@ -368,7 +370,7 @@ pmap_tlb_info_init(struct pmap_tlb_info //printf("asid "); if (ti->ti_asid_max == 0) { ti->ti_asid_max = pmap_md_tlb_asid_max(); - ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max); } KASSERT(ti->ti_asid_max < PMAP_TLB_BITMAP_LENGTH); @@ -427,7 +429,7 @@ pmap_tlb_asid_reinitialize(struct pmap_t * First, clear the ASID bitmap (except for ASID 0 which belongs * to the kernel). */ - ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max); ti->ti_asid_hint = KERNEL_PID + 1; TLBINFO_ASID_RESET(ti); @@ -471,7 +473,8 @@ pmap_tlb_asid_reinitialize(struct pmap_t tlb_invalidate_all(); #endif /* MULTIPROCESSOR && !PMAP_TLB_NEED_SHOOTDOWN */ TLBINFO_ASID_RESET(ti); - ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE( +ti->ti_asid_max); #if !defined(MULTIPROCESSOR) || defined(PMAP_TLB_NEED_SHOOTDOWN) } else { ti->ti_asids_free -= asids_found;
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 17:04:52 UTC 2018 Modified Files: src/sys/netipsec: ipsec_output.c Log Message: Style, no functional change. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/netipsec/ipsec_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/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.67 src/sys/netipsec/ipsec_output.c:1.68 --- src/sys/netipsec/ipsec_output.c:1.67 Wed Feb 21 16:55:53 2018 +++ src/sys/netipsec/ipsec_output.c Wed Feb 21 17:04:52 2018 @@ -1,6 +1,6 @@ -/* $NetBSD: ipsec_output.c,v 1.67 2018/02/21 16:55:53 maxv Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.68 2018/02/21 17:04:52 maxv Exp $ */ -/*- +/* * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting * All rights reserved. * @@ -29,11 +29,8 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.67 2018/02/21 16:55:53 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.68 2018/02/21 17:04:52 maxv Exp $"); -/* - * IPsec output processing. - */ #if defined(_KERNEL_OPT) #include "opt_inet.h" #include "opt_net_mpsafe.h" @@ -88,7 +85,7 @@ static percpu_t *ipsec_rtcache_percpu __ /* * Add a IPSEC_OUT_DONE tag to mark that we have finished the ipsec processing - * It will be used by ip{,6}_output to check if we have already or not + * It will be used by ip{,6}_output to check if we have already or not * processed this packet. */ static int @@ -148,10 +145,10 @@ ipsec_process_done(struct mbuf *m, const int error; #ifdef INET struct ip * ip; -#endif /* INET */ +#endif #ifdef INET6 struct ip6_hdr * ip6; -#endif /* INET6 */ +#endif struct mbuf * mo; struct udphdr *udp = NULL; uint64_t * data = NULL; @@ -165,11 +162,11 @@ ipsec_process_done(struct mbuf *m, const saidx = &sav->sah->saidx; - if(sav->natt_type != 0) { + if (sav->natt_type != 0) { ip = mtod(m, struct ip *); hlen = sizeof(struct udphdr); - if (sav->natt_type == UDP_ENCAP_ESPINUDP_NON_IKE) + if (sav->natt_type == UDP_ENCAP_ESPINUDP_NON_IKE) hlen += sizeof(uint64_t); mo = m_makespace(m, sizeof(struct ip), hlen, &roff); @@ -182,9 +179,9 @@ ipsec_process_done(struct mbuf *m, const error = ENOBUFS; goto bad; } - - udp = (struct udphdr*) (mtod(mo, char*) + roff); - data = (uint64_t*) (udp + 1); + + udp = (struct udphdr *)(mtod(mo, char *) + roff); + data = (uint64_t *)(udp + 1); if (sav->natt_type == UDP_ENCAP_ESPINUDP_NON_IKE) *data = 0; /* NON-IKE Marker */ @@ -193,12 +190,12 @@ ipsec_process_done(struct mbuf *m, const udp->uh_sport = htons(UDP_ENCAP_ESPINUDP_PORT); else udp->uh_sport = key_portfromsaddr(&saidx->src); - + udp->uh_dport = key_portfromsaddr(&saidx->dst); udp->uh_sum = 0; udp->uh_ulen = htons(m->m_pkthdr.len - (ip->ip_hl << 2)); } - + switch (saidx->dst.sa.sa_family) { #ifdef INET case AF_INET: @@ -208,15 +205,15 @@ ipsec_process_done(struct mbuf *m, const if (sav->natt_type != 0) ip->ip_p = IPPROTO_UDP; break; -#endif /* INET */ +#endif #ifdef INET6 case AF_INET6: /* Fix the header length, for AH processing. */ - if (m->m_pkthdr.len < sizeof (struct ip6_hdr)) { + if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) { error = ENXIO; goto bad; } - if (m->m_pkthdr.len - sizeof (struct ip6_hdr) > IPV6_MAXPACKET) { + if (m->m_pkthdr.len - sizeof(struct ip6_hdr) > IPV6_MAXPACKET) { /* No jumbogram support. */ error = ENXIO; /*?*/ goto bad; @@ -226,7 +223,7 @@ ipsec_process_done(struct mbuf *m, const if (sav->natt_type != 0) ip6->ip6_nxt = IPPROTO_UDP; break; -#endif /* INET6 */ +#endif default: IPSECLOG(LOG_DEBUG, "unknown protocol family %u\n", saidx->dst.sa.sa_family); @@ -245,16 +242,16 @@ ipsec_process_done(struct mbuf *m, const */ if (isr->next) { IPSEC_STATINC(IPSEC_STAT_OUT_BUNDLESA); - switch ( saidx->dst.sa.sa_family ) { + switch (saidx->dst.sa.sa_family) { #ifdef INET case AF_INET: return ipsec4_process_packet(m, isr->next, NULL); -#endif /* INET */ +#endif #ifdef INET6 case AF_INET6: - return ipsec6_process_packet(m,isr->next); -#endif /* INET6 */ - default : + return ipsec6_process_packet(m, isr->next); +#endif + default: IPSECLOG(LOG_DEBUG, "unknown protocol family %u\n", saidx->dst.sa.sa_family); error = ENXIO; @@ -263,18 +260,19 @@ ipsec_process_done(struct mbuf *m, const } /* - * We're done with IPsec processing, + * We're done with IPsec processing, * mark that we have already processed the packet - * transmit it packet using the appropriate network protocol (IP or IPv6). + * transmit it packet using the appropriate network protocol (IP or IPv6). */ if (ipsec_register_done(m, &error) < 0) goto bad; return ipsec_reinject_ipstack(m, saidx->dst.sa.sa_family); + bad: m_freem(m); - return (error); +
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 16:55:53 UTC 2018 Modified Files: src/sys/netipsec: ipsec_output.c Log Message: Strengthen this check, to make sure there is room for an ip6_ext structure. Seems possible to crash m_copydata here (but I didn't test more than that). To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/netipsec/ipsec_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/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.66 src/sys/netipsec/ipsec_output.c:1.67 --- src/sys/netipsec/ipsec_output.c:1.66 Thu Feb 8 20:57:41 2018 +++ src/sys/netipsec/ipsec_output.c Wed Feb 21 16:55:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_output.c,v 1.66 2018/02/08 20:57:41 maxv Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.67 2018/02/21 16:55:53 maxv Exp $ */ /*- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.66 2018/02/08 20:57:41 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.67 2018/02/21 16:55:53 maxv Exp $"); /* * IPsec output processing. @@ -696,7 +696,7 @@ compute_ipsec_pos(struct mbuf *m, int *i default: return; } - } while (*i < m->m_pkthdr.len); + } while (*i + sizeof(ip6e) < m->m_pkthdr.len); } static int
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 16:48:28 UTC 2018 Modified Files: src/sys/netipsec: ipsec_input.c Log Message: Argh, in my previous commit in this file I forgot to fix the IPv6 entry point; apply the same fix there. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/netipsec/ipsec_input.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/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.57 src/sys/netipsec/ipsec_input.c:1.58 --- src/sys/netipsec/ipsec_input.c:1.57 Wed Feb 21 16:08:55 2018 +++ src/sys/netipsec/ipsec_input.c Wed Feb 21 16:48:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.57 2018/02/21 16:08:55 maxv Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.58 2018/02/21 16:48:28 maxv Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.57 2018/02/21 16:08:55 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.58 2018/02/21 16:48:28 maxv Exp $"); /* * IPsec input processing. @@ -589,15 +589,16 @@ ipsec6_common_input_cb(struct mbuf *m, s /* Save protocol */ m_copydata(m, protoff, 1, &prot); +#ifdef notyet #ifdef INET /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip), &ipn); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -623,18 +624,16 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET */ - /* IPv6-in-IP encapsulation */ if (prot == IPPROTO_IPV6) { struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -661,8 +660,8 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } +#endif /* notyet */ key_sa_recordxfer(sav, m);
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 16:42:34 UTC 2018 Modified Files: src/sys/netipsec: ipsec.c Log Message: Fix ipsec4_get_ulp(). We should do "goto done" instead of "return", otherwise the port fields of spidx are uninitialized. ok mlelstv@ To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.133 src/sys/netipsec/ipsec.c:1.134 --- src/sys/netipsec/ipsec.c:1.133 Wed Feb 21 16:38:15 2018 +++ src/sys/netipsec/ipsec.c Wed Feb 21 16:42:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.133 2018/02/21 16:38:15 maxv Exp $ */ +/* $NetBSD: ipsec.c,v 1.134 2018/02/21 16:42:33 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.133 2018/02/21 16:38:15 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.134 2018/02/21 16:42:33 maxv Exp $"); /* * IPsec controller part. @@ -1049,7 +1049,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se case IPPROTO_ICMP: spidx->ul_proto = nxt; if (off + sizeof(struct icmp) > m->m_pkthdr.len) -return; +goto done; m_copydata(m, off, sizeof(icmph), &icmph); ((struct sockaddr_in *)&spidx->src)->sin_port = htons((uint16_t)icmph.icmp_type);
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 16:38:15 UTC 2018 Modified Files: src/sys/netipsec: ipsec.c Log Message: Use inpcb_hdr to reduce the diff between: ipsec4_hdrsiz and ipsec6_hdrsiz ipsec4_in_reject and ipsec6_in_reject ipsec4_checkpolicy and ipsec4_checkpolicy The members of these couples are now identical, and could be merged, giving only three functions instead of six... To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.132 src/sys/netipsec/ipsec.c:1.133 --- src/sys/netipsec/ipsec.c:1.132 Wed Feb 21 16:18:52 2018 +++ src/sys/netipsec/ipsec.c Wed Feb 21 16:38:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.132 2018/02/21 16:18:52 maxv Exp $ */ +/* $NetBSD: ipsec.c,v 1.133 2018/02/21 16:38:15 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.132 2018/02/21 16:18:52 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.133 2018/02/21 16:38:15 maxv Exp $"); /* * IPsec controller part. @@ -584,8 +584,9 @@ ipsec4_checkpolicy(struct mbuf *m, u_int if (inp == NULL) { sp = ipsec_getpolicybyaddr(m, dir, flag, error); } else { - KASSERT(inp->inp_socket != NULL); - sp = ipsec_getpolicybysock(m, dir, (struct inpcb_hdr *)inp, error); + struct inpcb_hdr *inph = (struct inpcb_hdr *)inp; + KASSERT(inph->inph_socket != NULL); + sp = ipsec_getpolicybysock(m, dir, inph, error); } if (sp == NULL) { KASSERTMSG(*error != 0, "getpolicy failed w/o error"); @@ -813,8 +814,9 @@ ipsec6_checkpolicy(struct mbuf *m, u_int if (in6p == NULL) { sp = ipsec_getpolicybyaddr(m, dir, flag, error); } else { - KASSERT(in6p->in6p_socket != NULL); - sp = ipsec_getpolicybysock(m, dir, (struct inpcb_hdr *)in6p, error); + struct inpcb_hdr *inph = (struct inpcb_hdr *)in6p; + KASSERT(inph->inph_socket != NULL); + sp = ipsec_getpolicybysock(m, dir, inph, error); } if (sp == NULL) { KASSERTMSG(*error != 0, "getpolicy failed w/o error"); @@ -834,7 +836,7 @@ ipsec6_checkpolicy(struct mbuf *m, u_int case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_NONE: KEY_SP_UNREF(&sp); - sp = NULL; /* NB: force NULL result */ + sp = NULL; /* NB: force NULL result */ break; case IPSEC_POLICY_IPSEC: KASSERT(sp->req != NULL); @@ -1753,18 +1755,19 @@ ipsec_sp_reject(const struct secpolicy * int ipsec4_in_reject(struct mbuf *m, struct inpcb *inp) { + struct inpcb_hdr *inph = (struct inpcb_hdr *)inp; struct secpolicy *sp; int error; int result; KASSERT(m != NULL); - if (inp == NULL) + if (inph == NULL) sp = ipsec_getpolicybyaddr(m, IPSEC_DIR_INBOUND, IP_FORWARDING, &error); else sp = ipsec_getpolicybysock(m, IPSEC_DIR_INBOUND, - (struct inpcb_hdr *)inp, &error); + inph, &error); if (sp != NULL) { result = ipsec_sp_reject(sp, m); @@ -1786,18 +1789,19 @@ ipsec4_in_reject(struct mbuf *m, struct int ipsec6_in_reject(struct mbuf *m, struct in6pcb *in6p) { + struct inpcb_hdr *inph = (struct inpcb_hdr *)in6p; struct secpolicy *sp; int error; int result; KASSERT(m != NULL); - if (in6p == NULL) + if (inph == NULL) sp = ipsec_getpolicybyaddr(m, IPSEC_DIR_INBOUND, IP_FORWARDING, &error); else sp = ipsec_getpolicybysock(m, IPSEC_DIR_INBOUND, - (struct inpcb_hdr *)in6p, &error); + inph, &error); if (sp != NULL) { result = ipsec_sp_reject(sp, m); @@ -1890,25 +1894,26 @@ ipsec_sp_hdrsiz(const struct secpolicy * size_t ipsec4_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp) { + struct inpcb_hdr *inph = (struct inpcb_hdr *)inp; struct secpolicy *sp; int error; size_t size; KASSERT(m != NULL); - KASSERTMSG(inp == NULL || inp->inp_socket != NULL, "socket w/o inpcb"); + KASSERTMSG(inph == NULL || inph->inph_socket != NULL, + "socket w/o inpcb"); - if (inp == NULL) + if (inph == NULL) sp = ipsec_getpolicybyaddr(m, dir, IP_FORWARDING, &error); else - sp = ipsec_getpolicybysock(m, dir, - (struct inpcb_hdr *)inp, &error); + sp = ipsec_getpolicybysock(m, dir, inph, &error); if (sp != NULL) { size = ipsec_sp_hdrsiz(sp, m); KEYDEBUG_PRINTF(KEYDEBUG_IPSEC_DATA, "size:%zu.\n", size); KEY_SP_UNREF(&sp); } else { - size = 0; /* XXX should be panic ? */ + size = 0; } return size; @@ -1918,19 +1923,19 @@ ipsec4_hdrsiz(struct mbuf *m, u_int dir, size_t ipsec6_hdrsiz(struct mbuf *m, u_int dir, struct in6pcb *in6p) { + struct inpcb_hdr *inph = (struct inpcb_hdr *)in6p; struct secpolicy *sp; int error; size_t size; KASSERT(m != NULL); - KASSERTMSG(in6p == NULL || in6p->in6p_socket != NULL, + KASSE
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 16:18:52 UTC 2018 Modified Files: src/sys/netipsec: ipsec.c ipsec.h Log Message: Rename: ipsec_in_reject -> ipsec_sp_reject ipsec_hdrsiz-> ipsec_sp_hdrsiz localify the former, and do some cleanup while here. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/netipsec/ipsec.c cvs rdiff -u -r1.66 -r1.67 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.131 src/sys/netipsec/ipsec.c:1.132 --- src/sys/netipsec/ipsec.c:1.131 Fri Feb 16 15:18:41 2018 +++ src/sys/netipsec/ipsec.c Wed Feb 21 16:18:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.131 2018/02/16 15:18:41 maxv Exp $ */ +/* $NetBSD: ipsec.c,v 1.132 2018/02/21 16:18:52 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.131 2018/02/16 15:18:41 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.132 2018/02/21 16:18:52 maxv Exp $"); /* * IPsec controller part. @@ -189,8 +189,9 @@ static int ipsec_set_policy(struct secpo kauth_cred_t); static int ipsec_get_policy(struct secpolicy *, struct mbuf **); static void ipsec_destroy_policy(struct secpolicy *); +static int ipsec_sp_reject(const struct secpolicy *, const struct mbuf *); static void vshiftl(unsigned char *, int, int); -static size_t ipsec_hdrsiz(const struct secpolicy *, const struct mbuf *); +static size_t ipsec_sp_hdrsiz(const struct secpolicy *, const struct mbuf *); /* * Try to validate and use cached policy on a PCB. @@ -378,7 +379,7 @@ key_get_default_sp(int af, const char *w } if (sp->policy != IPSEC_POLICY_DISCARD && - sp->policy != IPSEC_POLICY_NONE) { + sp->policy != IPSEC_POLICY_NONE) { IPSECLOG(LOG_INFO, "fixed system default policy: %d->%d\n", sp->policy, IPSEC_POLICY_NONE); sp->policy = IPSEC_POLICY_NONE; @@ -531,7 +532,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ } /* - * For FORWADING packet or OUTBOUND without a socket. Searching SPD for packet, + * For FORWARDING packet or OUTBOUND without a socket. Searching SPD for packet, * and return a pointer to SP. * OUT: positive: a pointer to the entry for security policy leaf matched. * NULL: no apropreate SP found, the following value is set to error. @@ -681,7 +682,6 @@ ipsec4_output(struct mbuf *m, struct inp { u_long _mtu = 0; - /* Note: callee frees mbuf */ error = ipsec4_process_packet(m, sp->req, &_mtu); if (error == 0 && _mtu != 0) { @@ -727,7 +727,7 @@ ipsec4_input(struct mbuf *m, int flags) /* * Check security policy against packet attributes. */ - error = ipsec_in_reject(sp, m); + error = ipsec_sp_reject(sp, m); KEY_SP_UNREF(&sp); splx(s); if (error) { @@ -989,7 +989,6 @@ ipsec4_get_ulp(struct mbuf *m, struct se u_int8_t nxt; int off; - /* sanity check */ KASSERT(m != NULL); KASSERTMSG(m->m_pkthdr.len >= sizeof(struct ip), "packet too short"); @@ -1068,7 +1067,6 @@ done_proto: spidx->dst.sin.sin_port = IPSEC_PORT_ANY; } -/* assumes that m is sane */ static int ipsec4_setspidx_ipaddr(struct mbuf *m, struct secpolicyindex *spidx) { @@ -1161,7 +1159,6 @@ ipsec6_get_ulp(struct mbuf *m, struct se } } -/* assumes that m is sane */ static int ipsec6_setspidx_ipaddr(struct mbuf *m, struct secpolicyindex *spidx) { @@ -1693,7 +1690,7 @@ ipsec_get_reqlevel(const struct ipsecreq * then kick it. */ int -ipsec_in_reject(const struct secpolicy *sp, const struct mbuf *m) +ipsec_sp_reject(const struct secpolicy *sp, const struct mbuf *m) { struct ipsecrequest *isr; @@ -1744,7 +1741,8 @@ ipsec_in_reject(const struct secpolicy * break; } } - return 0; /* valid */ + + return 0; } /* @@ -1769,7 +1767,7 @@ ipsec4_in_reject(struct mbuf *m, struct (struct inpcb_hdr *)inp, &error); if (sp != NULL) { - result = ipsec_in_reject(sp, m); + result = ipsec_sp_reject(sp, m); if (result) IPSEC_STATINC(IPSEC_STAT_IN_POLVIO); KEY_SP_UNREF(&sp); @@ -1802,7 +1800,7 @@ ipsec6_in_reject(struct mbuf *m, struct (struct inpcb_hdr *)in6p, &error); if (sp != NULL) { - result = ipsec_in_reject(sp, m); + result = ipsec_sp_reject(sp, m); if (result) IPSEC_STATINC(IPSEC_STAT_IN_POLVIO); KEY_SP_UNREF(&sp); @@ -1814,12 +1812,11 @@ ipsec6_in_reject(struct mbuf *m, struct #endif /* - * compute the byte size to be occupied by IPsec header. - * in case it is tunneled, it includes the size of outer IP header. - * NOTE: SP passed is free in this function. + * Compute the byte size to be occupied by the IPsec header. If it is + * tunneled, it includes the size of outer IP header. */ static size_t -ipsec_hdrsiz(const struct
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Feb 21 16:08:55 UTC 2018 Modified Files: src/sys/netipsec: ipsec_input.c Log Message: Extend these #ifdef notyet. The m_copydata's in these branches are wrong, we are not guaranteed to have enough room for another struct ip, and we may crash here. Triggerable remotely, but after authentication, by sending an AH packet that has a one-byte-sized IPIP payload. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/netipsec/ipsec_input.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/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.56 src/sys/netipsec/ipsec_input.c:1.57 --- src/sys/netipsec/ipsec_input.c:1.56 Thu Feb 8 20:57:41 2018 +++ src/sys/netipsec/ipsec_input.c Wed Feb 21 16:08:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.56 2018/02/08 20:57:41 maxv Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.57 2018/02/21 16:08:55 maxv Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.56 2018/02/08 20:57:41 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.57 2018/02/21 16:08:55 maxv Exp $"); /* * IPsec input processing. @@ -384,14 +384,15 @@ cantpull: prot = ip->ip_p; +#ifdef notyet /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip), &ipn); -#ifdef notyet /* XXX PROXY address isn't recorded in SAH */ /* * Check that the inner source address is the same as @@ -420,7 +421,6 @@ cantpull: error = EACCES; goto bad; } -#endif /*XXX*/ } #if INET6 /* IPv6-in-IP encapsulation. */ @@ -428,9 +428,9 @@ cantpull: struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -458,9 +458,9 @@ cantpull: error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET6 */ +#endif /* notyet */ key_sa_recordxfer(sav, m); /* record data transfer */
CVS commit: src/lib/libc/net
Module Name:src Committed By: uwe Date: Wed Feb 21 14:11:09 UTC 2018 Modified Files: src/lib/libc/net: getnetent.3 Log Message: Consistenly use "host byte order". To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/net/getnetent.3 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/net/getnetent.3 diff -u src/lib/libc/net/getnetent.3:1.15 src/lib/libc/net/getnetent.3:1.16 --- src/lib/libc/net/getnetent.3:1.15 Wed Feb 21 09:47:37 2018 +++ src/lib/libc/net/getnetent.3 Wed Feb 21 14:11:09 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getnetent.3,v 1.15 2018/02/21 09:47:37 wiz Exp $ +.\" $NetBSD: getnetent.3,v 1.16 2018/02/21 14:11:09 uwe Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -83,7 +83,7 @@ The type of the network number returned; .Dv AF_INET . .It Fa n_net The network number. -Network numbers are returned in machine byte order. +Network numbers are returned in host byte order. .El .Pp The @@ -113,7 +113,7 @@ functions sequentially search from the b a matching net name or net address and type is found, or until .Dv EOF is encountered. -Network numbers are supplied in host order. +Network numbers are supplied in host byte order. .Sh FILES .Bl -tag -width /etc/networks -compact .It Pa /etc/networks
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Feb 21 10:42:16 UTC 2018 Modified Files: src/sys/arch/hppa/hppa: db_disasm.c Log Message: Avoid UB (shift of negative number) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/hppa/db_disasm.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/arch/hppa/hppa/db_disasm.c diff -u src/sys/arch/hppa/hppa/db_disasm.c:1.16 src/sys/arch/hppa/hppa/db_disasm.c:1.17 --- src/sys/arch/hppa/hppa/db_disasm.c:1.16 Wed Jan 18 09:35:48 2012 +++ src/sys/arch/hppa/hppa/db_disasm.c Wed Feb 21 10:42:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.16 2012/01/18 09:35:48 skrll Exp $ */ +/* $NetBSD: db_disasm.c,v 1.17 2018/02/21 10:42:16 skrll Exp $ */ /* $OpenBSD: db_disasm.c,v 1.9 2000/04/18 20:02:45 mickey Exp $ */ @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.16 2012/01/18 09:35:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.17 2018/02/21 10:42:16 skrll Exp $"); #include #include @@ -865,23 +865,23 @@ struct majoropcode { #define Bi2(i) BitfR(i,6,13,_b613) /* fragmented field collating macros */ -#define Ima5(i) (Ima5S(i) ? Ima5M(i) | (-1<<4) : Ima5M(i)) +#define Ima5(i) (Ima5S(i) ? Ima5M(i) | (int)(~__BITS(3,0)) : Ima5M(i)) -#define Imc5(i) (Imc5S(i) ? Imc5M(i) | (-1<<4) : Imc5M(i)) +#define Imc5(i) (Imc5S(i) ? Imc5M(i) | (int)(~__BITS(3,0)) : Imc5M(i)) -#define Disp(i) (DispS(i) ? DispM(i) | (-1<<13) : DispM(i)) +#define Disp(i) (DispS(i) ? DispM(i) | (int)(~__BITS(12,0)) : DispM(i)) #define Im21(i) (Im21S(i) << 31 | Im21H(i) << 20 | Im21M1(i) << 18 | \ Im21M2(i) << 13 | Im21L(i) << 11) -#define Im11(i) (Im11S(i) ? Im11M(i) | (-1<<10) : Im11M(i)) +#define Im11(i) (Im11S(i) ? Im11M(i) | (int)(~__BITS(9,0)) : Im11M(i)) #define Bdisp(i) ((OffS(i) ? (Off5(i)<<11 | Off11L(i)<<10|Off11H(i)) \ -/* branch displacement (bytes) */ | (-1 << 16) \ +/* branch displacement (bytes) */ | (int)(~__BITS(15,0)) \ : (Off5(i)<<11|Off11L(i)<<10|Off11H(i))) << 2) #define Cbdisp(i) ((OffS(i) ? (Off11L(i) << 10 | Off11H(i)) \ - /* compare/branch disp (bytes) */ | (-1 << 11) \ + /* compare/branch disp (bytes) */ | (int)(~__BITS(10,0)) \ :Off11L(i) << 10 | Off11H(i)) << 2) #define Sr(i) (SrH(i)<<2 | SrL(i))
CVS commit: src/lib/libc/net
Module Name:src Committed By: wiz Date: Wed Feb 21 09:47:37 UTC 2018 Modified Files: src/lib/libc/net: getnetent.3 Log Message: Fix endnetent prototype. Fix NULL. New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/net/getnetent.3 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/net/getnetent.3 diff -u src/lib/libc/net/getnetent.3:1.14 src/lib/libc/net/getnetent.3:1.15 --- src/lib/libc/net/getnetent.3:1.14 Wed Feb 21 03:13:50 2018 +++ src/lib/libc/net/getnetent.3 Wed Feb 21 09:47:37 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getnetent.3,v 1.14 2018/02/21 03:13:50 kamil Exp $ +.\" $NetBSD: getnetent.3,v 1.15 2018/02/21 09:47:37 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -52,18 +52,16 @@ .Ft void .Fn setnetent "int stayopen" .Ft void -.Fn endnetent +.Fn endnetent void .Sh DESCRIPTION The .Fn getnetent , .Fn getnetbyname , and .Fn getnetbyaddr -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network data base as described in +functions each return a pointer to an object with the following +structure containing the broken-out fields of a line in the network +data base as described in .Xr networks 5 . .Bd -literal -offset indent struct netent { @@ -81,43 +79,38 @@ The official name of the network. .It Fa n_aliases A zero terminated list of alternative names for the network. .It Fa n_addrtype -The type of the network number returned; currently only AF_INET. +The type of the network number returned; currently only +.Dv AF_INET . .It Fa n_net -The network number. Network numbers are returned in machine byte -order. +The network number. +Network numbers are returned in machine byte order. .El .Pp The .Fn getnetent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setnetent -function -opens and rewinds the file. If the +function opens and rewinds the file. +If the .Fa stayopen -flag is non-zero, -the net data base will not be closed after each call to +flag is non-zero, the net data base will not be closed after each +call to .Fn getnetbyname or .Fn getnetbyaddr . .Pp The .Fn endnetent -function -closes the file. +function closes the file. .Pp The .Fn getnetbyname -function and .Fn getnetbyaddr -sequentially search from the beginning -of the file until a matching -net name or -net address and type is found, -or until +functions sequentially search from the beginning of the file until +a matching net name or net address and type is found, or until .Dv EOF is encountered. Network numbers are supplied in host order. @@ -127,7 +120,8 @@ Network numbers are supplied in host ord .El .Sh DIAGNOSTICS Null pointer -(0) returned on +.Dv ( NULL ) +returned on .Dv EOF or error. .Sh SEE ALSO @@ -144,11 +138,9 @@ and functions appeared in .Bx 4.2 . .Sh BUGS -The data space used by -these functions is static; if future use requires the data, it should be -copied before any subsequent calls to these functions overwrite it. -Only Internet network -numbers are currently understood. -Expecting network numbers to fit -in no more than 32 bits is probably +The data space used by these functions is static; if future use +requires the data, it should be copied before any subsequent calls +to these functions overwrite it. +Only Internet network numbers are currently understood. +Expecting network numbers to fit in no more than 32 bits is probably naive.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Feb 21 08:39:08 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Intel Ethernet devices. To generate a diff of this commit: cvs rdiff -u -r1.1310 -r1.1311 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1310 src/sys/dev/pci/pcidevs:1.1311 --- src/sys/dev/pci/pcidevs:1.1310 Wed Feb 21 07:49:47 2018 +++ src/sys/dev/pci/pcidevs Wed Feb 21 08:39:08 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1310 2018/02/21 07:49:47 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1311 2018/02/21 08:39:08 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3191,6 +3191,11 @@ product INTEL XL710_QSFP_A 0x1583 XL710 product INTEL XL710_QSFP_B 0x1584 XL710 40GbE QSFP+ product INTEL XL710_QSFP_C 0x1585 XL710 40GbE QSFP+ product INTEL X710_10G_T 0x1586 X710 10GBaseT Ethernet +product INTEL XL710_20G_BP_1 0x1587 XL710 20GbE Backplane +product INTEL XL710_20G_BP_2 0x1588 XL710 20GbE Backplane +product INTEL X710_T4_10G 0x1589 X710-T4 10GbaseT +product INTEL XXV710_25G_BP 0x158a XXV710 25GbE Backplane +product INTEL XXV710_25G_SFP28 0x158b XXV710 SFP28 product INTEL I218_LM2 0x15a0 I218-LM Ethernet Connection product INTEL I218_V2 0x15a1 I218-V Ethernet Connection product INTEL I218_LM3 0x15a2 I218-LM Ethernet Connection @@ -4145,8 +4150,17 @@ product INTEL E7520_PCIE_B1 0x3598 E7520 product INTEL E7520_PCIE_C 0x3599 E7520 PCI Express Port C product INTEL E7520_PCIE_C1 0x359a E7520 PCI Express Port C1 product INTEL E7520_CFG 0x359b E7520 Extended Configuration +product INTEL X722_A0 0x374c X722 A0 10GbE +product INTEL X722_A0_VF 0x374d X722 A0 10GbE VF product INTEL C620_QAT 0x37c8 C620 QAT product INTEL C620_QAT_VF 0x37c9 C620 QAT Virtual Function +product INTEL X722_VF 0x37cd X722 10GbE VF +product INTEL X722_KX 0x37ce X722 10GbE Backplane +product INTEL X722_QSFP 0x37cf X722 10GbE QSFP+ +product INTEL X722_SFP 0x37d0 X722 10GgE SFP+ +product INTEL X722_1G_BASET 0x37d1 X722 1GbaseT +product INTEL X722_10G_BASET 0x37d2 X722 10GbaseT +product INTEL X722_I_SFP 0x37d3 X722 I 10GbE SFP+ product INTEL 82801JD_SATA_IDE 0x3a00 82801JD SATA Controller (IDE mode) product INTEL 82801JD_SATA_AHCI 0x3a02 82801JD SATA Controller (AHCI mode) product INTEL 82801JD_SATA_RAID 0x3a05 82801JD SATA Controller (RAID mode)
CVS commit: src/sys/modules/ld
Module Name:src Committed By: pgoyette Date: Wed Feb 21 08:36:36 UTC 2018 Modified Files: src/sys/modules/ld: Makefile Added Files: src/sys/modules/ld: ld.ioconf Log Message: On the off chance that someone tries to use the modular version of the ld(4) driver, provide an ld.ioconf file which will declare the global ld_cd To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/ld/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/ld/ld.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/ld/Makefile diff -u src/sys/modules/ld/Makefile:1.1 src/sys/modules/ld/Makefile:1.2 --- src/sys/modules/ld/Makefile:1.1 Tue Sep 27 03:53:07 2016 +++ src/sys/modules/ld/Makefile Wed Feb 21 08:36:36 2018 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2016/09/27 03:53:07 pgoyette Exp $ +# $NetBSD: Makefile,v 1.2 2018/02/21 08:36:36 pgoyette Exp $ .include "../Makefile.inc" .PATH: ${S}/dev KMOD= ld +IOCONF= ld.ioconf SRCS+= ld.c Added files: Index: src/sys/modules/ld/ld.ioconf diff -u /dev/null src/sys/modules/ld/ld.ioconf:1.1 --- /dev/null Wed Feb 21 08:36:36 2018 +++ src/sys/modules/ld/ld.ioconf Wed Feb 21 08:36:36 2018 @@ -0,0 +1,10 @@ +# $NetBSD: ld.ioconf,v 1.1 2018/02/21 08:36:36 pgoyette Exp $ + +ioconf ld + +include "conf/files" +include "dev/pci/files.pci" + +pseudo-root nvme* + +ld* at nvme? nsid ?