CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Dec 18 07:57:36 UTC 2017 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Chelsio devices. To generate a diff of this commit: cvs rdiff -u -r1.1301 -r1.1302 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.1301 src/sys/dev/pci/pcidevs:1.1302 --- src/sys/dev/pci/pcidevs:1.1301 Thu Nov 9 03:07:10 2017 +++ src/sys/dev/pci/pcidevs Mon Dec 18 07:57:36 2017 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1301 2017/11/09 03:07:10 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1302 2017/12/18 07:57:36 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -1920,6 +1920,7 @@ product C4T GPPCI 0x6773 GPPCI product CAVIUM NITROX 0x0001 Nitrox XL /* Chelsio products */ +product CHELSIO PE9000 0x0020 PE9000 10GbE product CHELSIO T302E 0x0021 T302e product CHELSIO T310E 0x0022 T310e product CHELSIO T320X 0x0023 T320x @@ -1929,6 +1930,57 @@ product CHELSIO T310X 0x0026 T310x product CHELSIO T3B10 0x0030 T3B10 product CHELSIO T3B20 0x0031 T3B20 product CHELSIO T3B02 0x0032 T3B02 +product CHELSIO T3B04 0x0033 T3B04 +product CHELSIO T3C10 0x0035 T3C10 +product CHELSIO S320E_CR 0x0036 S320E-CR +product CHELSIO N320E_G2 0x0037 N320E-G2 +product CHELSIO T440_DBG 0x4400 T440-dbg +product CHELSIO T420_CR 0x4401 T420-CR +product CHELSIO T422_CR 0x4402 T422-CR +product CHELSIO T440_CR 0x4403 T440-CR +product CHELSIO T420_BCH 0x4404 T420-BCH +product CHELSIO T440_BCH 0x4405 T440-BCH +product CHELSIO T440_CH 0x4406 T440-CH +product CHELSIO T420_SO 0x4407 T420-SO +product CHELSIO T420_CX 0x4408 T420-CX +product CHELSIO T420_BT 0x4409 T420-BT +product CHELSIO T404_BT 0x440a T404-BT +product CHELSIO T440_LP_CR 0x440e T440-LP-CR +product CHELSIO T580_DBG 0x5400 T580-dbg +product CHELSIO T520_CR 0x5401 T520-CR +product CHELSIO T522_CR 0x5402 T522-CR +product CHELSIO T540_CR 0x5403 T540-CR +product CHELSIO T520_SO 0x5407 T520-SO +product CHELSIO T520_BT 0x5409 T520-BT +product CHELSIO T504_BT 0x540a T504-BT +product CHELSIO T580_CR 0x540d T580-CR +product CHELSIO T540_LP_CR 0x540e T540-LP-CR +product CHELSIO T580_LP_CR 0x5410 T580-LP-CR +product CHELSIO T520_LL_CR 0x5411 T520-LL-CR +product CHELSIO T560_CR 0x5412 T560-CR +product CHELSIO T580_LP_SO_CR 0x5414 T580-LP-SO-CR +product CHELSIO T502_BT 0x5415 T502-BT +product CHELSIO T6_DBG_25 0x6400 T6-DBG-25 +product CHELSIO T6225_CR 0x6401 T6225-CR +product CHELSIO T6225_SO_CR 0x6402 T6225-SO-CR +product CHELSIO T6425_CR 0x6403 T6425-CR +product CHELSIO T6425_SO_CR 0x6404 T6425-SO-CR +product CHELSIO T6225_OCP_SO 0x6405 T6225-OCP-SO +product CHELSIO T62100_OCP_SO 0x6406 T62100-OCP-SO +product CHELSIO T62100_LP_CR 0x6407 T62100-LP-CR +product CHELSIO T62100_SO_CR 0x6408 T62100-SO-CR +product CHELSIO T6210_BT 0x6409 T6210-BT +product CHELSIO T62100_CR 0x640d T62100-CR +product CHELSIO T6_DBG_100 0x6410 T6-DBG-100 +product CHELSIO T6225_LL_CR 0x6411 T6225-LL-CR +product CHELSIO T61100_OCP_SO 0x6414 T61100-OCP-SO +product CHELSIO T6201_BT 0x6415 T6201-BT +product CHELSIO T6225_80 0x6480 T6225 80 +product CHELSIO T62100_81 0x6481 T62100 81 +product CHELSIO T62100_84 0x6484 T62100 84 +product CHELSIO T4_FPGA 0xa000 Terminator 4 FPGA +product CHELSIO T5_FPGA 0xb000 Terminator 5 FPGA +product CHELSIO T6_FPGA 0xc006 Terminator 6 FPGA /* Chips and Technologies products */ product CHIPS 64310 0x00b8 64310
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Dec 18 07:57:55 UTC 2017 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.1294 -r1.1295 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1293 -r1.1294 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.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Dec 18 07:57:36 UTC 2017 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Chelsio devices. To generate a diff of this commit: cvs rdiff -u -r1.1301 -r1.1302 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Mon Dec 18 07:05:16 UTC 2017 Modified Files: src/sys/dev: DEVNAMES Log Message: Add ixg and ixv. To generate a diff of this commit: cvs rdiff -u -r1.299 -r1.300 src/sys/dev/DEVNAMES 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/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.299 src/sys/dev/DEVNAMES:1.300 --- src/sys/dev/DEVNAMES:1.299 Sat Oct 1 15:24:35 2016 +++ src/sys/dev/DEVNAMES Mon Dec 18 07:05:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.299 2016/10/01 15:24:35 flxd Exp $ +# $NetBSD: DEVNAMES,v 1.300 2017/12/18 07:05:16 msaitoh Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -714,10 +714,12 @@ iwi MI iwic MI iwm mac68k ix MI +ixg MI ixpclk evbarm ixpide MI ixpio evbarm ixpsip evbarm +ixv MI iy MI j6x0lcd hpcsh j6x0pwr hpcsh
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Mon Dec 18 07:05:16 UTC 2017 Modified Files: src/sys/dev: DEVNAMES Log Message: Add ixg and ixv. To generate a diff of this commit: cvs rdiff -u -r1.299 -r1.300 src/sys/dev/DEVNAMES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/net
On Thu, Dec 14, 2017 at 10:03 PM, Christos Zoulaswrote: > On Dec 14, 5:42pm, ozak...@netbsd.org (Ryota Ozaki) wrote: > -- Subject: Re: CVS commit: src/sys/net > > | Is there a flag to suppress auto inlining? COPTS=-fno-inline build.sh? > | Anyway no objection to revert the change that is not quite important > | (but makes my life easy). > > just do: > > cat << _EOF >> /etc/mk.conf > .if make(netbsd) > COPTS.route.c += -O0 > .endif > _EOF > > That (or something similar) should work. Oh cool. I didn't know that technique. Thanks, ozaki-r
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 05:35:36 UTC 2017 Modified Files: src/sys/net: rtsock.c Log Message: Fix compile error (may be used uninitialized) Hmm, __noinline had hidden this error. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/net/rtsock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 05:35:36 UTC 2017 Modified Files: src/sys/net: rtsock.c Log Message: Fix compile error (may be used uninitialized) Hmm, __noinline had hidden this error. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/net/rtsock.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/net/rtsock.c diff -u src/sys/net/rtsock.c:1.235 src/sys/net/rtsock.c:1.236 --- src/sys/net/rtsock.c:1.235 Mon Dec 18 05:35:01 2017 +++ src/sys/net/rtsock.c Mon Dec 18 05:35:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.235 2017/12/18 05:35:01 ozaki-r Exp $ */ +/* $NetBSD: rtsock.c,v 1.236 2017/12/18 05:35:36 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.235 2017/12/18 05:35:01 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.236 2017/12/18 05:35:36 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -666,7 +666,7 @@ route_output_change(struct rtentry *rt, struct rt_xmsghdr *rtm) { int error = 0; - struct ifnet *ifp = NULL, *new_ifp; + struct ifnet *ifp = NULL, *new_ifp = NULL; struct ifaddr *ifa = NULL, *new_ifa; struct psref psref_ifa, psref_new_ifa, psref_ifp, psref_new_ifp; bool newgw, ifp_changed = false;
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 05:35:02 UTC 2017 Modified Files: src/sys/net: rtsock.c Log Message: Revert "Spinkle __noinline to some non-performance-sensitive functions for debugging" We should do this kind of tweaks for debugging just locally and personally. Requested by christos@ To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/sys/net/rtsock.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/net/rtsock.c diff -u src/sys/net/rtsock.c:1.234 src/sys/net/rtsock.c:1.235 --- src/sys/net/rtsock.c:1.234 Thu Dec 14 05:48:59 2017 +++ src/sys/net/rtsock.c Mon Dec 18 05:35:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.234 2017/12/14 05:48:59 ozaki-r Exp $ */ +/* $NetBSD: rtsock.c,v 1.235 2017/12/18 05:35:01 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.234 2017/12/14 05:48:59 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.235 2017/12/18 05:35:01 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -495,7 +495,7 @@ COMPATNAME(route_purgeif)(struct socket } #if defined(INET) || defined(INET6) -static int __noinline +static int route_get_sdl_index(struct rt_addrinfo *info, int *sdl_index) { struct rtentry *nrt; @@ -515,7 +515,7 @@ route_get_sdl_index(struct rt_addrinfo * } #endif -static void __noinline +static void route_get_sdl(const struct ifnet *ifp, const struct sockaddr *dst, struct sockaddr_dl *sdl, int *flags) { @@ -551,7 +551,7 @@ route_get_sdl(const struct ifnet *ifp, c } } -static int __noinline +static int route_output_report(struct rtentry *rt, struct rt_addrinfo *info, struct rt_xmsghdr *rtm, struct rt_xmsghdr **new_rtm) { @@ -606,7 +606,7 @@ route_output_report(struct rtentry *rt, return 0; } -static struct ifaddr * __noinline +static struct ifaddr * route_output_get_ifa(const struct rt_addrinfo info, const struct rtentry *rt, struct ifnet **ifp, struct psref *psref_ifp, struct psref *psref) { @@ -661,7 +661,7 @@ out: return ifa; } -static int __noinline +static int route_output_change(struct rtentry *rt, struct rt_addrinfo *info, struct rt_xmsghdr *rtm) {
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 05:35:02 UTC 2017 Modified Files: src/sys/net: rtsock.c Log Message: Revert "Spinkle __noinline to some non-performance-sensitive functions for debugging" We should do this kind of tweaks for debugging just locally and personally. Requested by christos@ To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/sys/net/rtsock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
re: CVS commit: src/sys/compat/common
> >> Modified Files: > >>src/sys/compat/common: Makefile.inc > >> > >> Log Message: > >> Build libcompat as an object, not as a library. We want all of its > >> functions compiled in, because compat modules loaded from the filesystem > >> may depend on them. > > > > this breaks mips64 kernels: > > > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > kern_ipc_10.o: ABI is incompatible with that of the selected emula > tion > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > failed to merge target specific data of file kern_ipc_10.o > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > sysv_shm_50.o: ABI is incompatible with that of the selected emula > tion > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > failed to merge target specific data of file sysv_shm_50.o > > [ ... ] > > Do you know where exactly this comes from? In kern_ipc_10.c nothing should be > built since mips64 is _LP64. i'm not sure what it is -- i assume some bug in a makefile that adds or misses the right options. mips64 is fairly sensitive to this, but i didn't check what the ABI of the wrong parts was before testing the backout. i'm not sure i'll get as chance to look at this soon. .mrg.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Dec 18 04:48:28 UTC 2017 Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h ppbreg.h Log Message: Add VGA 16bit decode bit into the PCI bridge control register. This bit is defined in PCI-to-PCI Bridge Architecture Specification Revision 1.2. This bit has meaning if the VGA enable bit or the VGA Palette Snoop Enable bit is set. NOTE: sys/arch/x86/pci/pci_ranges.c::mmio_range_extend_by_vga_enable() and/or some other functions should be modified. To generate a diff of this commit: cvs rdiff -u -r1.196 -r1.197 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.135 -r1.136 src/sys/dev/pci/pcireg.h cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ppbreg.h 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: Mon Dec 18 04:48:28 UTC 2017 Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h ppbreg.h Log Message: Add VGA 16bit decode bit into the PCI bridge control register. This bit is defined in PCI-to-PCI Bridge Architecture Specification Revision 1.2. This bit has meaning if the VGA enable bit or the VGA Palette Snoop Enable bit is set. NOTE: sys/arch/x86/pci/pci_ranges.c::mmio_range_extend_by_vga_enable() and/or some other functions should be modified. To generate a diff of this commit: cvs rdiff -u -r1.196 -r1.197 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.135 -r1.136 src/sys/dev/pci/pcireg.h cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ppbreg.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.196 src/sys/dev/pci/pci_subr.c:1.197 --- src/sys/dev/pci/pci_subr.c:1.196 Wed Oct 25 08:21:41 2017 +++ src/sys/dev/pci/pci_subr.c Mon Dec 18 04:48:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.196 2017/10/25 08:21:41 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.197 2017/12/18 04:48:28 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.196 2017/10/25 08:21:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.197 2017/12/18 04:48:28 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -4290,7 +4290,7 @@ pci_conf_print_type1( const pcireg_t *regs) { int off, width; - pcireg_t rval; + pcireg_t rval, csreg; uint32_t base, limit; uint32_t base_h, limit_h; uint64_t pbase, plimit; @@ -4407,7 +4407,8 @@ pci_conf_print_type1( } else printf(" range: not set\n"); - if (regs[o2i(PCI_COMMAND_STATUS_REG)] & PCI_STATUS_CAPLIST_SUPPORT) + csreg = regs[o2i(PCI_COMMAND_STATUS_REG)]; + if (csreg & PCI_STATUS_CAPLIST_SUPPORT) printf("Capability list pointer: 0x%02x\n", PCI_CAPLIST_PTR(regs[o2i(PCI_CAPLISTPTR_REG)])); else @@ -4449,6 +4450,13 @@ pci_conf_print_type1( onoff("Secondary SERR forwarding", rval, PCI_BRIDGE_CONTROL_SERR); onoff("ISA enable", rval, PCI_BRIDGE_CONTROL_ISA); onoff("VGA enable", rval, PCI_BRIDGE_CONTROL_VGA); + /* + * VGA 16bit decode bit has meaning if the VGA enable bit or the + * VGA Palette Snoop Enable bit is set. + */ + if (((rval & PCI_BRIDGE_CONTROL_VGA) != 0) + || ((csreg & PCI_COMMAND_PALETTE_ENABLE) != 0)) + onoff("VGA 16bit enable", rval, PCI_BRIDGE_CONTROL_VGA16); onoff("Master abort reporting", rval, PCI_BRIDGE_CONTROL_MABRT); onoff("Secondary bus reset", rval, PCI_BRIDGE_CONTROL_SECBR); onoff("Fast back-to-back capable", rval,PCI_BRIDGE_CONTROL_SECFASTB2B); Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.135 src/sys/dev/pci/pcireg.h:1.136 --- src/sys/dev/pci/pcireg.h:1.135 Thu Oct 19 05:52:57 2017 +++ src/sys/dev/pci/pcireg.h Mon Dec 18 04:48:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.135 2017/10/19 05:52:57 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.136 2017/12/18 04:48:28 msaitoh Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -1327,7 +1327,7 @@ typedef u_int8_t pci_intr_line_t; #define PCI_BRIDGE_CONTROL_SERR (1 << 1) #define PCI_BRIDGE_CONTROL_ISA (1 << 2) #define PCI_BRIDGE_CONTROL_VGA (1 << 3) -/* Reserved (1 << 4) */ +#define PCI_BRIDGE_CONTROL_VGA16 (1 << 3) #define PCI_BRIDGE_CONTROL_MABRT (1 << 5) #define PCI_BRIDGE_CONTROL_SECBR (1 << 6) #define PCI_BRIDGE_CONTROL_SECFASTB2B (1 << 7) Index: src/sys/dev/pci/ppbreg.h diff -u src/sys/dev/pci/ppbreg.h:1.7 src/sys/dev/pci/ppbreg.h:1.8 --- src/sys/dev/pci/ppbreg.h:1.7 Wed May 10 03:24:31 2017 +++ src/sys/dev/pci/ppbreg.h Mon Dec 18 04:48:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ppbreg.h,v 1.7 2017/05/10 03:24:31 msaitoh Exp $ */ +/* $NetBSD: ppbreg.h,v 1.8 2017/12/18 04:48:28 msaitoh Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -100,6 +100,7 @@ #define PPB_BC_SERR_ENABLE (1U << (1 + PPB_BC_BITBASE)) #define PPB_BC_ISA_ENABLE (1U << (2 + PPB_BC_BITBASE)) #define PPB_BC_VGA_ENABLE (1U << (3 + PPB_BC_BITBASE)) +#define PPB_BC_VGA16_ENABLE(1U << (3 + PPB_BC_BITBASE)) #define PPB_BC_MASTER_ABORT_MODE (1U << (5 + PPB_BC_BITBASE)) #define PPB_BC_SECONDARY_RESET (1U << (6 + PPB_BC_BITBASE)) #define PPB_BC_FAST_B2B_ENABLE (1U << (7 + PPB_BC_BITBASE))
CVS commit: src/tests/net/route
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 04:11:46 UTC 2017 Modified Files: src/tests/net/route: t_change.sh t_route.sh Log Message: Adjust outputs of route's flags to include a numeric output To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/net/route/t_change.sh cvs rdiff -u -r1.13 -r1.14 src/tests/net/route/t_route.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/route/t_change.sh diff -u src/tests/net/route/t_change.sh:1.11 src/tests/net/route/t_change.sh:1.12 --- src/tests/net/route/t_change.sh:1.11 Fri Mar 24 04:06:19 2017 +++ src/tests/net/route/t_change.sh Mon Dec 18 04:11:46 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_change.sh,v 1.11 2017/03/24 04:06:19 ozaki-r Exp $ +# $NetBSD: t_change.sh,v 1.12 2017/12/18 04:11:46 ozaki-r Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -125,7 +125,7 @@ destination: 192.168.0.0 gateway: 10.0.0.1 local addr: 10.0.0.10 interface: shmif0 - flags:+ flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get 192.168.0.1 > ./output @@ -144,7 +144,7 @@ destination: 192.168.0.0 gateway: 10.0.0.1 local addr: 10.0.0.11 interface: shmif0 - flags: + flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get 192.168.0.1 > ./output @@ -192,7 +192,7 @@ destination: 192.168.0.0 gateway: 10.0.0.1 local addr: 10.0.0.10 interface: shmif0 - flags: + flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get 192.168.0.1 > ./output @@ -211,7 +211,7 @@ destination: 192.168.0.0 gateway: 10.0.0.1 local addr: 10.0.0.11 interface: shmif1 - flags: + flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get 192.168.0.1 > ./output @@ -259,7 +259,7 @@ destination: 192.168.0.0 gateway: 10.0.0.1 local addr: 10.0.0.10 interface: shmif0 - flags: + flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get 192.168.0.1 > ./output @@ -278,7 +278,7 @@ destination: 192.168.0.0 gateway: 10.0.0.1 local addr: 10.0.0.11 interface: shmif1 - flags: + flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get 192.168.0.1 > ./output Index: src/tests/net/route/t_route.sh diff -u src/tests/net/route/t_route.sh:1.13 src/tests/net/route/t_route.sh:1.14 --- src/tests/net/route/t_route.sh:1.13 Wed Jun 28 04:10:47 2017 +++ src/tests/net/route/t_route.sh Mon Dec 18 04:11:46 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_route.sh,v 1.13 2017/06/28 04:10:47 ozaki-r Exp $ +# $NetBSD: t_route.sh,v 1.14 2017/12/18 04:11:46 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -234,7 +234,7 @@ test_route_get() destination: 10.0.1.2 local addr: 10.0.1.2 interface: lo0 - flags: + flags: 0x40045 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get $IP4SRC > ./output @@ -250,7 +250,7 @@ destination: 10.0.1.0 mask: 255.255.255.0 local addr: 10.0.1.2 interface: shmif0 - flags: + flags: 0x141 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get $IP4SRCGW > ./output @@ -266,7 +266,7 @@ destination: default gateway: 10.0.1.1 local addr: 10.0.1.2 interface: shmif0 - flags: + flags: 0x843 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get $IP4DST > ./output @@ -284,7 +284,7 @@ destination: 10.0.1.0 mask: 255.255.255.0 local addr: 10.0.1.2 interface: shmif0 - flags: + flags: 0x141 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get $IP4SRCGW > ./output @@ -309,7 +309,7 @@ test_route_get6() destination: fc00:0:0:1::2 local addr: fc00:0:0:1::2 interface: lo0 - flags: + flags: 0x40045 recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire EOF rump.route -n get -inet6 $IP6SRC > ./output @@ -324,7
CVS commit: src/tests/net/route
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 04:11:46 UTC 2017 Modified Files: src/tests/net/route: t_change.sh t_route.sh Log Message: Adjust outputs of route's flags to include a numeric output To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/net/route/t_change.sh cvs rdiff -u -r1.13 -r1.14 src/tests/net/route/t_route.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 04:11:13 UTC 2017 Modified Files: src/sys/net: route.h Log Message: Show ARP/NDP caches as LLINFO not LLDATA for backward compatiblity To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/net/route.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 04:11:13 UTC 2017 Modified Files: src/sys/net: route.h Log Message: Show ARP/NDP caches as LLINFO not LLDATA for backward compatiblity To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/net/route.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/net/route.h diff -u src/sys/net/route.h:1.115 src/sys/net/route.h:1.116 --- src/sys/net/route.h:1.115 Wed Dec 13 17:43:10 2017 +++ src/sys/net/route.h Mon Dec 18 04:11:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: route.h,v 1.115 2017/12/13 17:43:10 christos Exp $ */ +/* $NetBSD: route.h,v 1.116 2017/12/18 04:11:13 ozaki-r Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -172,8 +172,12 @@ struct ortentry { #define RTF_BROADCAST 0x8 /* route represents a bcast address */ #define RTF_UPDATING 0x10 /* route is updating */ +/* + * 0x400 is exposed to userland just for backward compatibility. For that + * purpose, it should be shown as LLINFO. + */ #define RTFBITS "\020\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE" \ -"\010MASK_PRESENT\011CONNECTED\012XRESOLVE\013LLDATA\014STATIC" \ +"\010MASK_PRESENT\011CONNECTED\012XRESOLVE\013LLINFO\014STATIC" \ "\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1\021SRC\022ANNOUNCE" \ "\023LOCAL\024BROADCAST\025UPDATING"
Re: CVS commit: src/sys
Hi, On 2017/12/17 2:17, Robert Elz wrote: > Date:Fri, 15 Dec 2017 21:24:20 +0700 > From:Robert Elz> Message-ID: <11642.1513347...@andromeda.noi.kre.to> > > | Unfortunately, because of the way it gets called, this might not be an > | easy change to make. > > It wouldn't be, but it also turns out to be (I think) unnecessary. > > The m_pullup() (or equiv) isn't needed at all, as you determined initially, > m_copydata() handles fetching data from multiple mbufs (or an external > cluster if needed). > > The problem with your first fix was that you were checking whether the > current mbuf contained the session-ID which it might not, it could be > later - but we really do not need to care (and if it isn't there we > do not need to fix it). > > What I'd suggest doing (and the same for the inet6 case) is to make the > function be ... > > [aside don't cut& paste from this e-mail, it will have had most tabs > turned into spaces...] > > static int > in_l2tp_match(struct mbuf *m, int off, int proto, void *arg) > { > struct l2tp_variant *var = arg; > uint32_t sess_id; > > KASSERT(proto == IPPROTO_L2TP); > > /* >* If the packet contains no session ID it cannot match >*/ > if (m_length(m) < off + sizeof(uint32_t)) > return 0; > > /* get L2TP session ID */ > m_copydata(m, off, sizeof(uint32_t), (void *)_id); > NTOHL(sess_id); > if (sess_id == 0) { > /* > * L2TPv3 control packet received. > * userland daemon(l2tpd?) should process. > */ > return 32 * 2; > } else if (sess_id == var->lv_my_sess_id) > return 32 * 2; > else > return 0; > } You are right. I fix it by your patch at in_l2tp.c:r1.9 and in6_l2tp.c:r1.12. Thanks, -- // Internet Initiative Japan Inc. Device Engineering Section, IoT Platform Development Department, Network Division, Technology Unit Kengo NAKAHARA
CVS commit: src/sys
Module Name:src Committed By: knakahara Date: Mon Dec 18 03:21:44 UTC 2017 Modified Files: src/sys/netinet: in_l2tp.c src/sys/netinet6: in6_l2tp.c Log Message: fix mbuf leaks. pointed out and suggested by kre@n.o, thanks. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/netinet/in_l2tp.c cvs rdiff -u -r1.11 -r1.12 src/sys/netinet6/in6_l2tp.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/netinet/in_l2tp.c diff -u src/sys/netinet/in_l2tp.c:1.8 src/sys/netinet/in_l2tp.c:1.9 --- src/sys/netinet/in_l2tp.c:1.8 Mon Dec 18 03:20:12 2017 +++ src/sys/netinet/in_l2tp.c Mon Dec 18 03:21:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: in_l2tp.c,v 1.8 2017/12/18 03:20:12 knakahara Exp $ */ +/* $NetBSD: in_l2tp.c,v 1.9 2017/12/18 03:21:44 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.8 2017/12/18 03:20:12 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.9 2017/12/18 03:21:44 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_l2tp.h" @@ -368,13 +368,11 @@ in_l2tp_match(struct mbuf *m, int off, i KASSERT(proto == IPPROTO_L2TP); - if (m->m_len < off + sizeof(uint32_t)) { - m = m_pullup(m, off + sizeof(uint32_t)); - if (!m) { - /* if payload length < 4 octets */ - return 0; - } -} + /* + * If the packet contains no session ID it cannot match + */ + if (m_length(m) < off + sizeof(uint32_t)) + return 0; /* get L2TP session ID */ m_copydata(m, off, sizeof(uint32_t), (void *)_id); Index: src/sys/netinet6/in6_l2tp.c diff -u src/sys/netinet6/in6_l2tp.c:1.11 src/sys/netinet6/in6_l2tp.c:1.12 --- src/sys/netinet6/in6_l2tp.c:1.11 Mon Dec 18 03:20:13 2017 +++ src/sys/netinet6/in6_l2tp.c Mon Dec 18 03:21:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_l2tp.c,v 1.11 2017/12/18 03:20:13 knakahara Exp $ */ +/* $NetBSD: in6_l2tp.c,v 1.12 2017/12/18 03:21:44 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.11 2017/12/18 03:20:13 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.12 2017/12/18 03:21:44 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_l2tp.h" @@ -360,13 +360,11 @@ in6_l2tp_match(struct mbuf *m, int off, KASSERT(proto == IPPROTO_L2TP); - if (m->m_len < off + sizeof(uint32_t)) { - m = m_pullup(m, off + sizeof(uint32_t)); - if (!m) { - /* if payload length < 4 octets */ - return 0; - } -} + /* + * If the packet contains no session ID it cannot match + */ + if (m_length(m) < off + sizeof(uint32_t)) + return 0; /* get L2TP session ID */ m_copydata(m, off, sizeof(uint32_t), (void *)_id);
CVS commit: src/sys
Module Name:src Committed By: knakahara Date: Mon Dec 18 03:21:44 UTC 2017 Modified Files: src/sys/netinet: in_l2tp.c src/sys/netinet6: in6_l2tp.c Log Message: fix mbuf leaks. pointed out and suggested by kre@n.o, thanks. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/netinet/in_l2tp.c cvs rdiff -u -r1.11 -r1.12 src/sys/netinet6/in6_l2tp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: knakahara Date: Mon Dec 18 03:20:13 UTC 2017 Modified Files: src/sys/netinet: in_l2tp.c src/sys/netinet6: in6_l2tp.c Log Message: backout wrong fix again, sorry. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/netinet/in_l2tp.c cvs rdiff -u -r1.10 -r1.11 src/sys/netinet6/in6_l2tp.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/netinet/in_l2tp.c diff -u src/sys/netinet/in_l2tp.c:1.7 src/sys/netinet/in_l2tp.c:1.8 --- src/sys/netinet/in_l2tp.c:1.7 Fri Dec 15 05:01:16 2017 +++ src/sys/netinet/in_l2tp.c Mon Dec 18 03:20:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: in_l2tp.c,v 1.7 2017/12/15 05:01:16 knakahara Exp $ */ +/* $NetBSD: in_l2tp.c,v 1.8 2017/12/18 03:20:12 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.7 2017/12/15 05:01:16 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.8 2017/12/18 03:20:12 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_l2tp.h" @@ -369,10 +369,12 @@ in_l2tp_match(struct mbuf *m, int off, i KASSERT(proto == IPPROTO_L2TP); if (m->m_len < off + sizeof(uint32_t)) { - /* if payload length < 4 octets */ - if(!m_ensure_contig(, off + sizeof(uint32_t))) + m = m_pullup(m, off + sizeof(uint32_t)); + if (!m) { + /* if payload length < 4 octets */ return 0; - } + } +} /* get L2TP session ID */ m_copydata(m, off, sizeof(uint32_t), (void *)_id); Index: src/sys/netinet6/in6_l2tp.c diff -u src/sys/netinet6/in6_l2tp.c:1.10 src/sys/netinet6/in6_l2tp.c:1.11 --- src/sys/netinet6/in6_l2tp.c:1.10 Fri Dec 15 05:01:16 2017 +++ src/sys/netinet6/in6_l2tp.c Mon Dec 18 03:20:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_l2tp.c,v 1.10 2017/12/15 05:01:16 knakahara Exp $ */ +/* $NetBSD: in6_l2tp.c,v 1.11 2017/12/18 03:20:13 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.10 2017/12/15 05:01:16 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.11 2017/12/18 03:20:13 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_l2tp.h" @@ -361,10 +361,12 @@ in6_l2tp_match(struct mbuf *m, int off, KASSERT(proto == IPPROTO_L2TP); if (m->m_len < off + sizeof(uint32_t)) { - /* if payload length < 4 octets */ - if(!m_ensure_contig(, off + sizeof(uint32_t))) + m = m_pullup(m, off + sizeof(uint32_t)); + if (!m) { + /* if payload length < 4 octets */ return 0; - } + } +} /* get L2TP session ID */ m_copydata(m, off, sizeof(uint32_t), (void *)_id);
CVS commit: src/sys
Module Name:src Committed By: knakahara Date: Mon Dec 18 03:20:13 UTC 2017 Modified Files: src/sys/netinet: in_l2tp.c src/sys/netinet6: in6_l2tp.c Log Message: backout wrong fix again, sorry. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/netinet/in_l2tp.c cvs rdiff -u -r1.10 -r1.11 src/sys/netinet6/in6_l2tp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: mrg Date: Mon Dec 18 00:33:32 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32.h Log Message: include for siginfo32_t. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/compat/netbsd32/netbsd32.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/compat/netbsd32/netbsd32.h diff -u src/sys/compat/netbsd32/netbsd32.h:1.115 src/sys/compat/netbsd32/netbsd32.h:1.116 --- src/sys/compat/netbsd32/netbsd32.h:1.115 Sun Dec 17 20:59:27 2017 +++ src/sys/compat/netbsd32/netbsd32.h Mon Dec 18 00:33:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32.h,v 1.115 2017/12/17 20:59:27 christos Exp $ */ +/* $NetBSD: netbsd32.h,v 1.116 2017/12/18 00:33:32 mrg Exp $ */ /* * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green @@ -49,6 +49,7 @@ #include #include #include +#include #include
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: mrg Date: Mon Dec 18 00:33:32 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32.h Log Message: include for siginfo32_t. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/compat/netbsd32/netbsd32.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Sun Dec 17 22:09:47 UTC 2017 Modified Files: src/sys/dev: fss.c Log Message: If config_cfattach_detach() returns an error, handle it instead of ignoring. Otherwise the mutex will get destroyed and we'll unload the module, and any active users will eventually cause a panic. Noted by code inspection. XXX pullup to netbsd-8 To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/fss.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/fss.c diff -u src/sys/dev/fss.c:1.99 src/sys/dev/fss.c:1.100 --- src/sys/dev/fss.c:1.99 Sat Oct 28 03:47:24 2017 +++ src/sys/dev/fss.c Sun Dec 17 22:09:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.99 2017/10/28 03:47:24 riastradh Exp $ */ +/* $NetBSD: fss.c,v 1.100 2017/12/17 22:09:47 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.99 2017/10/28 03:47:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.100 2017/12/17 22:09:47 pgoyette Exp $"); #include #include @@ -1321,7 +1321,14 @@ fss_modcmd(modcmd_t cmd, void *arg) _cdevsw, _cmajor); break; } - config_cfdriver_detach(_cd); + error = config_cfdriver_detach(_cd); + if (error) { + devsw_attach(fss_cd.cd_name, + _bdevsw, _bmajor, _cdevsw, _cmajor); + devsw_attach(fss_cd.cd_name, _bdevsw, _bmajor, + _cdevsw, _cmajor); + break; + } mutex_destroy(_device_lock); break;
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Sun Dec 17 22:09:47 UTC 2017 Modified Files: src/sys/dev: fss.c Log Message: If config_cfattach_detach() returns an error, handle it instead of ignoring. Otherwise the mutex will get destroyed and we'll unload the module, and any active users will eventually cause a panic. Noted by code inspection. XXX pullup to netbsd-8 To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/fss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pad
Module Name:src Committed By: pgoyette Date: Sun Dec 17 21:57:11 UTC 2017 Modified Files: src/sys/dev/pad: pad.c Log Message: If config_fini_component() fails (due to device driver busy), don't discard its error value when re-attaching the devsw. If the devsw is successfully re-attached and we return success, the module will get detached anyway. And, since the device is actually busy, we'll eventually panic. Thanks to nat@ for providing the reproduction instructions. XXX A driver-busy condition will currently still trigger the error XXX message from config_fini_component() XXX configure: attachment `pad' of `pad' driver fini failed: 16 XXX This will be addresses separately by having pad maintain its own XXX ref-count and not relying on config_fini_component() to detect XXX the busy state. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pad/pad.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/pad/pad.c diff -u src/sys/dev/pad/pad.c:1.48 src/sys/dev/pad/pad.c:1.49 --- src/sys/dev/pad/pad.c:1.48 Sat Dec 16 06:39:07 2017 +++ src/sys/dev/pad/pad.c Sun Dec 17 21:57:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pad.c,v 1.48 2017/12/16 06:39:07 pgoyette Exp $ */ +/* $NetBSD: pad.c,v 1.49 2017/12/17 21:57:11 pgoyette Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.48 2017/12/16 06:39:07 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.49 2017/12/17 21:57:11 pgoyette Exp $"); #include #include @@ -955,7 +955,7 @@ pad_modcmd(modcmd_t cmd, void *arg) error = config_fini_component(cfdriver_ioconf_pad, pad_cfattach, cfdata_ioconf_pad); if (error) { - error = devsw_attach(pad_cd.cd_name, NULL, , + devsw_attach(pad_cd.cd_name, NULL, , _cdevsw, ); break; }
CVS commit: src/sys/dev/pad
Module Name:src Committed By: pgoyette Date: Sun Dec 17 21:57:11 UTC 2017 Modified Files: src/sys/dev/pad: pad.c Log Message: If config_fini_component() fails (due to device driver busy), don't discard its error value when re-attaching the devsw. If the devsw is successfully re-attached and we return success, the module will get detached anyway. And, since the device is actually busy, we'll eventually panic. Thanks to nat@ for providing the reproduction instructions. XXX A driver-busy condition will currently still trigger the error XXX message from config_fini_component() XXX configure: attachment `pad' of `pad' driver fini failed: 16 XXX This will be addresses separately by having pad maintain its own XXX ref-count and not relying on config_fini_component() to detect XXX the busy state. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pad/pad.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [LLVM] src/external/bsd/llvm/dist
Module Name:src Committed By: joerg Date: Sun Dec 17 21:28:52 UTC 2017 Removed Files: src/external/bsd/llvm/dist/clang/bindings/python/tests [LLVM]: test_exception_specification_kind.py src/external/bsd/llvm/dist/clang/test/CodeGen [LLVM]: mips-aggregate-arg.c src/external/bsd/llvm/dist/llvm/test/CodeGen/AArch64 [LLVM]: thread-pointer.ll src/external/bsd/llvm/dist/llvm/test/CodeGen/X86 [LLVM]: f16c-schedule.ll lea32-schedule.ll lea64-schedule.ll popcnt-schedule.ll Log Message: Mark files not tagged with r319952 as dead. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/clang/bindings/python/tests/test_exception_specification_kind.py cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/clang/test/CodeGen/mips-aggregate-arg.c cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/llvm/test/CodeGen/AArch64/thread-pointer.ll cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/f16c-schedule.ll \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/lea32-schedule.ll \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/lea64-schedule.ll \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/popcnt-schedule.ll Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [LLVM] src/external/bsd/llvm/dist
Module Name:src Committed By: joerg Date: Sun Dec 17 21:28:52 UTC 2017 Removed Files: src/external/bsd/llvm/dist/clang/bindings/python/tests [LLVM]: test_exception_specification_kind.py src/external/bsd/llvm/dist/clang/test/CodeGen [LLVM]: mips-aggregate-arg.c src/external/bsd/llvm/dist/llvm/test/CodeGen/AArch64 [LLVM]: thread-pointer.ll src/external/bsd/llvm/dist/llvm/test/CodeGen/X86 [LLVM]: f16c-schedule.ll lea32-schedule.ll lea64-schedule.ll popcnt-schedule.ll Log Message: Mark files not tagged with r319952 as dead. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/clang/bindings/python/tests/test_exception_specification_kind.py cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/clang/test/CodeGen/mips-aggregate-arg.c cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/llvm/test/CodeGen/AArch64/thread-pointer.ll cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/f16c-schedule.ll \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/lea32-schedule.ll \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/lea64-schedule.ll \ src/external/bsd/llvm/dist/llvm/test/CodeGen/X86/popcnt-schedule.ll Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/llvm
Module Name:src Committed By: joerg Date: Sun Dec 17 21:16:57 UTC 2017 Modified Files: src/external/bsd/llvm: Makefile Log Message: Be consistent with the revision numbers in the import-llvm command. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/llvm/Makefile 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/llvm/Makefile diff -u src/external/bsd/llvm/Makefile:1.9 src/external/bsd/llvm/Makefile:1.10 --- src/external/bsd/llvm/Makefile:1.9 Tue Aug 1 20:07:37 2017 +++ src/external/bsd/llvm/Makefile Sun Dec 17 21:16:57 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2017/08/01 20:07:37 joerg Exp $ +# $NetBSD: Makefile,v 1.10 2017/12/17 21:16:57 joerg Exp $ .include @@ -33,6 +33,6 @@ checkout-mclinker: import-clang: cd ${CLANG_SRCDIR} && cvs -d cvs.netbsd.org:/cvsroot import -m "Import clang ${CLANG_REVISION} from ${SVN_BRANCH}" src/external/bsd/llvm/dist/clang LLVM clang-${CLANG_REVISION:C,^r,,} import-llvm: - cd ${LLVM_SRCDIR} && cvs -d cvs.netbsd.org:/cvsroot import -m "Import LLVM ${CLANG_REVISION} from ${SVN_BRANCH}" src/external/bsd/llvm/dist/llvm LLVM llvm-${LLVM_REVISION:C,^r,,} + cd ${LLVM_SRCDIR} && cvs -d cvs.netbsd.org:/cvsroot import -m "Import LLVM ${LLVM_REVISION} from ${SVN_BRANCH}" src/external/bsd/llvm/dist/llvm LLVM llvm-${LLVM_REVISION:C,^r,,} .include
CVS commit: src/sys
Module Name:src Committed By: christos Date: Sun Dec 17 20:59:28 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32.h netbsd32_ptrace.c netbsd32_signal.c src/sys/kern: sys_ptrace.c sys_ptrace_common.c src/sys/sys: ptrace.h Log Message: handle siginfo requests for ptrace32 To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_ptrace.c cvs rdiff -u -r1.44 -r1.45 src/sys/compat/netbsd32/netbsd32_signal.c cvs rdiff -u -r1.4 -r1.5 src/sys/kern/sys_ptrace.c cvs rdiff -u -r1.28 -r1.29 src/sys/kern/sys_ptrace_common.c cvs rdiff -u -r1.61 -r1.62 src/sys/sys/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/llvm
Module Name:src Committed By: joerg Date: Sun Dec 17 21:16:57 UTC 2017 Modified Files: src/external/bsd/llvm: Makefile Log Message: Be consistent with the revision numbers in the import-llvm command. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/llvm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/llvm
Module Name:src Committed By: joerg Date: Sun Dec 17 21:16:33 UTC 2017 Modified Files: src/external/bsd/llvm: Makefile.inc Log Message: Update for LLVM/Clang 5.0.1. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/external/bsd/llvm/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/external/bsd/llvm/Makefile.inc diff -u src/external/bsd/llvm/Makefile.inc:1.84 src/external/bsd/llvm/Makefile.inc:1.85 --- src/external/bsd/llvm/Makefile.inc:1.84 Tue Aug 1 20:07:37 2017 +++ src/external/bsd/llvm/Makefile.inc Sun Dec 17 21:16:33 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.84 2017/08/01 20:07:37 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.85 2017/12/17 21:16:33 joerg Exp $ .if !defined(LLVM_TOPLEVEL_MK) LLVM_TOPLEVEL_MK= @@ -8,7 +8,7 @@ LLVM_TOPLEVEL_MK= SVN_ROOT= http://llvm.org/svn/llvm-project SVN_BRANCH= branches/release_50 -COMMON_REVISION= r309604 +COMMON_REVISION= r319952 CLANG_REVISION= ${COMMON_REVISION} LLD_REVISION= ${COMMON_REVISION} LLDB_REVISION= ${COMMON_REVISION} @@ -17,9 +17,9 @@ LLVM_REVISION= ${COMMON_REVISION} MCLINKER_REVISION= deeb2a77b4165827316f88e0a7ba4ba6b743a080 MCLINKER_ROOT= https://code.google.com/p/mclinker/ -LLVM_VERSION= 5.0.0 -CLANG_VERSION= 5.0.0 -LLD_VERSION= 5.0.0 +LLVM_VERSION= 5.0.1 +CLANG_VERSION= 5.0.1 +LLD_VERSION= 5.0.1 CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang LLD_SRCDIR:= ${.PARSEDIR}/dist/lld
CVS commit: src/sys
Module Name:src Committed By: christos Date: Sun Dec 17 20:59:28 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32.h netbsd32_ptrace.c netbsd32_signal.c src/sys/kern: sys_ptrace.c sys_ptrace_common.c src/sys/sys: ptrace.h Log Message: handle siginfo requests for ptrace32 To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_ptrace.c cvs rdiff -u -r1.44 -r1.45 src/sys/compat/netbsd32/netbsd32_signal.c cvs rdiff -u -r1.4 -r1.5 src/sys/kern/sys_ptrace.c cvs rdiff -u -r1.28 -r1.29 src/sys/kern/sys_ptrace_common.c cvs rdiff -u -r1.61 -r1.62 src/sys/sys/ptrace.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/compat/netbsd32/netbsd32.h diff -u src/sys/compat/netbsd32/netbsd32.h:1.114 src/sys/compat/netbsd32/netbsd32.h:1.115 --- src/sys/compat/netbsd32/netbsd32.h:1.114 Sun Nov 13 08:52:41 2016 +++ src/sys/compat/netbsd32/netbsd32.h Sun Dec 17 15:59:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32.h,v 1.114 2016/11/13 13:52:41 rin Exp $ */ +/* $NetBSD: netbsd32.h,v 1.115 2017/12/17 20:59:27 christos Exp $ */ /* * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green @@ -292,6 +292,13 @@ struct netbsd32_ptrace_io_desc { actual count (out) */ }; +struct netbsd32_ptrace_siginfo { + siginfo32_t psi_siginfo; /* signal information structure */ + lwpid_t psi_lwpid; /* destination LWP of the signal + * value 0 means the whole process + * (route signal to all LWPs) */ +}; + /* from */ typedef netbsd32_pointer_t netbsd32_quotactlargsp_t; struct netbsd32_quotactlargs { @@ -1121,6 +1128,8 @@ vaddr_t netbsd32_vm_default_addr(struct void netbsd32_adjust_limits(struct proc *); void netbsd32_si_to_si32(siginfo32_t *, const siginfo_t *); +void netbsd32_si32_to_si(siginfo_t *, const siginfo32_t *); + void netbsd32_ksi32_to_ksi(struct _ksiginfo *si, const struct __ksiginfo32 *si32); #ifdef KTRACE Index: src/sys/compat/netbsd32/netbsd32_ptrace.c diff -u src/sys/compat/netbsd32/netbsd32_ptrace.c:1.4 src/sys/compat/netbsd32/netbsd32_ptrace.c:1.5 --- src/sys/compat/netbsd32/netbsd32_ptrace.c:1.4 Wed Feb 22 22:34:22 2017 +++ src/sys/compat/netbsd32/netbsd32_ptrace.c Sun Dec 17 15:59:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ptrace.c,v 1.4 2017/02/23 03:34:22 kamil Exp $ */ +/* $NetBSD: netbsd32_ptrace.c,v 1.5 2017/12/17 20:59:27 christos Exp $ */ /* * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_ptrace.c,v 1.4 2017/02/23 03:34:22 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_ptrace.c,v 1.5 2017/12/17 20:59:27 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_ptrace.h" @@ -54,18 +54,14 @@ extern struct emul emul_netbsd32; * PTRACE methods */ -static int netbsd32_copyinpiod(struct ptrace_io_desc *, const void *); -static void netbsd32_copyoutpiod(const struct ptrace_io_desc *, void *); -static int netbsd32_doregs(struct lwp *, struct lwp *, struct uio *); -static int netbsd32_dofpregs(struct lwp *, struct lwp *, struct uio *); -static int netbsd32_dodbregs(struct lwp *, struct lwp *, struct uio *); - - static int -netbsd32_copyinpiod(struct ptrace_io_desc *piod, const void *addr) +netbsd32_copyin_piod(struct ptrace_io_desc *piod, const void *addr, size_t len) { struct netbsd32_ptrace_io_desc piod32; + if (len != 0 && sizeof(piod32) != len) + return EINVAL; + int error = copyin(addr, , sizeof(piod32)); if (error) return error; @@ -77,18 +73,49 @@ netbsd32_copyinpiod(struct ptrace_io_des return 0; } -static void -netbsd32_copyoutpiod(const struct ptrace_io_desc *piod, void *addr) +static int +netbsd32_copyout_piod(const struct ptrace_io_desc *piod, void *addr, size_t len) { struct netbsd32_ptrace_io_desc piod32; + if (len != 0 && sizeof(piod32) != len) + return EINVAL; + piod32.piod_op = piod->piod_op; NETBSD32PTR32(piod32.piod_offs, piod->piod_offs); NETBSD32PTR32(piod32.piod_addr, piod->piod_addr); piod32.piod_len = (netbsd32_size_t)piod->piod_len; - (void) copyout(, addr, sizeof(piod32)); + return copyout(, addr, sizeof(piod32)); } +static int +netbsd32_copyin_siginfo(struct ptrace_siginfo *psi, const void *addr, size_t len) +{ + struct netbsd32_ptrace_siginfo psi32; + + if (sizeof(psi32) != len) + return EINVAL; + + int error = copyin(addr, , sizeof(psi32)); + if (error) + return error; + psi->psi_lwpid = psi32.psi_lwpid; + netbsd32_si32_to_si(>psi_siginfo, _siginfo); + return 0; +} + +static int +netbsd32_copyout_siginfo(const struct ptrace_siginfo *psi, void *addr, size_t len) +{ + struct netbsd32_ptrace_siginfo psi32; + + if (sizeof(psi32) != len) + return EINVAL; + + psi32.psi_lwpid = psi->psi_lwpid; + netbsd32_si_to_si32(_siginfo, >psi_siginfo); + return copyout(, addr, sizeof(psi32)); +} static
CVS commit: src/external/bsd/llvm
Module Name:src Committed By: joerg Date: Sun Dec 17 21:16:33 UTC 2017 Modified Files: src/external/bsd/llvm: Makefile.inc Log Message: Update for LLVM/Clang 5.0.1. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/external/bsd/llvm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gdb/dist/gdb/tui
Module Name:src Committed By: christos Date: Sun Dec 17 17:49:04 UTC 2017 Modified Files: src/external/gpl3/gdb/dist/gdb/tui: tui-data.c tui-wingeneral.c tui-winsource.c Log Message: Don't core dump when the window is too small XXX: feed upstream To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/tui/tui-data.c \ src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c \ src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gdb/dist/gdb/tui
Module Name:src Committed By: christos Date: Sun Dec 17 17:49:04 UTC 2017 Modified Files: src/external/gpl3/gdb/dist/gdb/tui: tui-data.c tui-wingeneral.c tui-winsource.c Log Message: Don't core dump when the window is too small XXX: feed upstream To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/tui/tui-data.c \ src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c \ src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c 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/gdb/dist/gdb/tui/tui-data.c diff -u src/external/gpl3/gdb/dist/gdb/tui/tui-data.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/tui/tui-data.c:1.2 --- src/external/gpl3/gdb/dist/gdb/tui/tui-data.c:1.1.1.7 Tue Nov 28 13:18:30 2017 +++ src/external/gpl3/gdb/dist/gdb/tui/tui-data.c Sun Dec 17 12:49:04 2017 @@ -576,6 +576,9 @@ tui_alloc_content (int num_elements, enu struct tui_win_element *element_block_ptr; int i; + if (num_elements <= 0) +return NULL; + content = XNEWVEC (struct tui_win_element *, num_elements); /* Index: src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c diff -u src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c:1.2 --- src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c:1.1.1.7 Tue Nov 28 13:18:30 2017 +++ src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c Sun Dec 17 12:49:04 2017 @@ -247,32 +247,35 @@ tui_make_all_invisible (void) make_all_visible (0); } +static void +tui_refresh_wi(struct tui_gen_win_info *wi) +{ + if (wi == NULL || wi->handle == NULL || !wi->is_visible) +return; + + touchwin (wi->handle); + tui_refresh_win (wi); +} + /* Function to refresh all the windows currently displayed. */ void tui_refresh_all (struct tui_win_info **list) { int type; - struct tui_gen_win_info *locator = tui_locator_win_info_ptr (); for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++) { - if (list[type] && list[type]->generic.is_visible) + if (!list[type] || !list[type]->generic.is_visible) + continue; + if (type == SRC_WIN || type == DISASSEM_WIN) { - if (type == SRC_WIN || type == DISASSEM_WIN) - { - touchwin (list[type]->detail.source_info.execution_info->handle); - tui_refresh_win (list[type]->detail.source_info.execution_info); - } - touchwin (list[type]->generic.handle); - tui_refresh_win ([type]->generic); + tui_refresh_wi (list[type]->detail.source_info.execution_info); } + tui_refresh_wi ([type]->generic); } - if (locator->is_visible) -{ - touchwin (locator->handle); - tui_refresh_win (locator); -} + + tui_refresh_wi (tui_locator_win_info_ptr ()); } Index: src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c diff -u src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c:1.2 --- src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c:1.1.1.7 Tue Nov 28 13:18:30 2017 +++ src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c Sun Dec 17 12:49:04 2017 @@ -559,6 +559,9 @@ tui_show_exec_info_content (struct tui_w = win_info->detail.source_info.execution_info; int cur_line; + if (exec_info->handle == NULL) +return; + werase (exec_info->handle); tui_refresh_win (exec_info); for (cur_line = 1; (cur_line <= exec_info->content_size); cur_line++) @@ -578,6 +581,9 @@ tui_erase_exec_info_content (struct tui_ struct tui_gen_win_info *exec_info = win_info->detail.source_info.execution_info; + if (exec_info->handle == NULL) +return; + werase (exec_info->handle); tui_refresh_win (exec_info); }
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: chs Date: Sun Dec 17 17:18:34 UTC 2017 Modified Files: src/sys/arch/powerpc/include: cpu.h Log Message: apply the same change for powerpc as mrg did for arm and mips: CPU_INFO_FOREACH() must always iterate at least the boot cpu. document this in sys/cpu.h and fix the arm and mips versions to check ncpu is non zero before using it as an iterator max. this should fix the new assert in init_main.c. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/arch/powerpc/include/cpu.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/arch/powerpc/include/cpu.h diff -u src/sys/arch/powerpc/include/cpu.h:1.102 src/sys/arch/powerpc/include/cpu.h:1.103 --- src/sys/arch/powerpc/include/cpu.h:1.102 Wed Oct 19 00:08:42 2016 +++ src/sys/arch/powerpc/include/cpu.h Sun Dec 17 17:18:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.102 2016/10/19 00:08:42 nonaka Exp $ */ +/* $NetBSD: cpu.h,v 1.103 2017/12/17 17:18:34 chs Exp $ */ /* * Copyright (C) 1999 Wolfgang Solfrank. @@ -32,6 +32,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _POWERPC_CPU_H_ #define _POWERPC_CPU_H_ @@ -54,6 +55,8 @@ struct cache_info { #include #include #include +#include +#include #endif #include @@ -191,7 +194,7 @@ extern struct cpuset_info cpuset_info; #define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0) #define CPU_INFO_ITERATOR int #define CPU_INFO_FOREACH(cii, ci)\ - cii = 0, ci = _info[0]; cii < ncpu; cii++, ci++ + cii = 0, ci = _info[0]; cii < (ncpu ? ncpu : 1); cii++, ci++ #else #define cpu_number() 0
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: chs Date: Sun Dec 17 17:18:34 UTC 2017 Modified Files: src/sys/arch/powerpc/include: cpu.h Log Message: apply the same change for powerpc as mrg did for arm and mips: CPU_INFO_FOREACH() must always iterate at least the boot cpu. document this in sys/cpu.h and fix the arm and mips versions to check ncpu is non zero before using it as an iterator max. this should fix the new assert in init_main.c. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/arch/powerpc/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/compat/common
Hello, On Sun, 17 Dec 2017 10:48:33 +0100 Maxime Villardwrote: > >> Modified Files: > >>src/sys/compat/common: Makefile.inc > >> > >> Log Message: > >> Build libcompat as an object, not as a library. We want all of its > >> functions compiled in, because compat modules loaded from the filesystem > >> may depend on them. > > > > this breaks mips64 kernels: > > > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > kern_ipc_10.o: ABI is incompatible with that of the selected emulation > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > failed to merge target specific data of file kern_ipc_10.o > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > sysv_shm_50.o: ABI is incompatible with that of the selected emulation > > /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: > > failed to merge target specific data of file sysv_shm_50.o > > [ ... ] > > Do you know where exactly this comes from? In kern_ipc_10.c nothing should be > built since mips64 is _LP64. Not necessarily - it's perfectly reasonable to build kernels as n32 ( read: ILP32 but with 64bit registers and such ) on certain hardware. have fun Michael
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sun Dec 17 15:43:28 UTC 2017 Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: - reduce ifdef ugliness by moving it up top. - factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it - factor out PT_DUMPCORE - factor out sendsig code ... more to come ... To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/kern/sys_ptrace_common.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/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.27 src/sys/kern/sys_ptrace_common.c:1.28 --- src/sys/kern/sys_ptrace_common.c:1.27 Sat Dec 16 23:35:21 2017 +++ src/sys/kern/sys_ptrace_common.c Sun Dec 17 10:43:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.27 2017/12/17 04:35:21 christos Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.28 2017/12/17 15:43:27 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.27 2017/12/17 04:35:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.28 2017/12/17 15:43:27 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -170,6 +170,48 @@ static kmutex_t ptrace_mtx; static kcondvar_t ptrace_cv; #endif +#ifdef PT_GETREGS +# define case_PT_GETREGS case PT_GETREGS: +#else +# define case_PT_GETREGS +#endif + +#ifdef PT_SETREGS +# define case_PT_SETREGS case PT_SETREGS: +#else +# define case_PT_SETREGS +#endif + +#ifdef PT_GETFPREGS +# define case_PT_GETFPREGS case PT_GETFPREGS: +#else +# define case_PT_GETFPREGS +#endif + +#ifdef PT_SETFPREGS +# define case_PT_SETFPREGS case PT_SETFPREGS: +#else +# define case_PT_SETFPREGS +#endif + +#ifdef PT_GETDBREGS +# define case_PT_GETDBREGS case PT_GETDBREGS: +#else +# define case_PT_GETDBREGS +#endif + +#ifdef PT_SETDBREGS +# define case_PT_SETDBREGS case PT_SETDBREGS: +#else +# define case_PT_SETDBREGS +#endif + +#if defined(PT_SETREGS) || defined(PT_GETREGS) || \ +defined(PT_SETFPREGS) || defined(PT_GETFOREGS) || \ +defined(PT_SETDBREGS) || defined(PT_GETDBREGS) +# define PT_REGISTERS +#endif + static int ptrace_listener_cb(kauth_cred_t cred, kauth_action_t action, void *cookie, void *arg0, void *arg1, void *arg2, void *arg3) @@ -196,24 +238,12 @@ ptrace_listener_cb(kauth_cred_t cred, ka case PT_READ_I: case PT_READ_D: case PT_IO: -#ifdef PT_GETREGS - case PT_GETREGS: -#endif -#ifdef PT_SETREGS - case PT_SETREGS: -#endif -#ifdef PT_GETFPREGS - case PT_GETFPREGS: -#endif -#ifdef PT_SETFPREGS - case PT_SETFPREGS: -#endif -#ifdef PT_GETDBREGS - case PT_GETDBREGS: -#endif -#ifdef PT_SETDBREGS - case PT_SETDBREGS: -#endif + case_PT_GETREGS + case_PT_SETREGS + case_PT_GETFPREGS + case_PT_SETFPREGS + case_PT_GETDBREGS + case_PT_SETDBREGS case PT_SET_EVENT_MASK: case PT_GET_EVENT_MASK: case PT_GET_PROCESS_STATE: @@ -339,11 +369,11 @@ ptrace_allowed(struct lwp *l, int req, s /* Make sure we can operate on it. */ switch (req) { - case PT_TRACE_ME: + case PT_TRACE_ME: /* Saying that you're being traced is always legal. */ return 0; - case PT_ATTACH: + case PT_ATTACH: /* * You can't attach to a process if: * (1) it's the process that's doing the attaching, @@ -374,33 +404,21 @@ ptrace_allowed(struct lwp *l, int req, s return EPERM; return 0; - case PT_READ_I: - case PT_READ_D: - case PT_WRITE_I: - case PT_WRITE_D: - case PT_IO: - case PT_SET_SIGINFO: - case PT_GET_SIGINFO: - case PT_SET_SIGMASK: - case PT_GET_SIGMASK: -#ifdef PT_GETREGS - case PT_GETREGS: -#endif -#ifdef PT_SETREGS - case PT_SETREGS: -#endif -#ifdef PT_GETFPREGS - case PT_GETFPREGS: -#endif -#ifdef PT_SETFPREGS - case PT_SETFPREGS: -#endif -#ifdef PT_GETDBREGS - case PT_GETDBREGS: -#endif -#ifdef PT_SETDBREGS - case PT_SETDBREGS: -#endif + case PT_READ_I: + case PT_READ_D: + case PT_WRITE_I: + case PT_WRITE_D: + case PT_IO: + case PT_SET_SIGINFO: + case PT_GET_SIGINFO: + case PT_SET_SIGMASK: + case PT_GET_SIGMASK: + case_PT_GETREGS + case_PT_SETREGS + case_PT_GETFPREGS + case_PT_SETFPREGS + case_PT_GETDBREGS + case_PT_SETDBREGS #ifdef __HAVE_PTRACE_MACHDEP PTRACE_MACHDEP_REQUEST_CASES #endif @@ -416,23 +434,23 @@ ptrace_allowed(struct lwp *l, int req, s return EPERM; /*FALLTHROUGH*/ - case PT_CONTINUE: - case PT_KILL: - case PT_DETACH: - case PT_LWPINFO: - case PT_SYSCALL: - case PT_SYSCALLEMU: - case PT_DUMPCORE: + case PT_CONTINUE: + case PT_KILL: + case PT_DETACH: + case PT_LWPINFO: + case PT_SYSCALL: + case PT_SYSCALLEMU: + case PT_DUMPCORE: #ifdef PT_STEP - case PT_STEP: - case PT_SETSTEP: - case PT_CLEARSTEP: -#endif - case PT_SET_EVENT_MASK: - case PT_GET_EVENT_MASK: - case PT_GET_PROCESS_STATE: - case PT_RESUME: - case PT_SUSPEND: + case PT_STEP: + case PT_SETSTEP: + case PT_CLEARSTEP: +#endif + case
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sun Dec 17 15:43:28 UTC 2017 Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: - reduce ifdef ugliness by moving it up top. - factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it - factor out PT_DUMPCORE - factor out sendsig code ... more to come ... To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/compat/common
Le 17/12/2017 à 09:58, matthew green a écrit : "Maxime Villard" writes: Module Name:src Committed By: maxv Date: Sat Dec 16 08:31:36 UTC 2017 Modified Files: src/sys/compat/common: Makefile.inc Log Message: Build libcompat as an object, not as a library. We want all of its functions compiled in, because compat modules loaded from the filesystem may depend on them. this breaks mips64 kernels: /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: kern_ipc_10.o: ABI is incompatible with that of the selected emulation /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: failed to merge target specific data of file kern_ipc_10.o /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: sysv_shm_50.o: ABI is incompatible with that of the selected emulation /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: failed to merge target specific data of file sysv_shm_50.o [ ... ] Do you know where exactly this comes from? In kern_ipc_10.c nothing should be built since mips64 is _LP64.
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Dec 17 09:39:00 UTC 2017 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Typo in comment cvS: -- To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Dec 17 09:39:00 UTC 2017 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Typo in comment cvS: -- To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/arm/include/armreg.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/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.113 src/sys/arch/arm/include/armreg.h:1.114 --- src/sys/arch/arm/include/armreg.h:1.113 Tue Oct 24 20:24:12 2017 +++ src/sys/arch/arm/include/armreg.h Sun Dec 17 09:39:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.113 2017/10/24 20:24:12 skrll Exp $ */ +/* $NetBSD: armreg.h,v 1.114 2017/12/17 09:39:00 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -724,7 +724,7 @@ #define CORTEXA9_MPIDR_MP MPIDR_MP #define CORTEXA9_MPIDR_U MPIDR_U #define CORTEXA9_MPIDR_CLID __BITS(11,8) /* AFF1 = cluster id */ -#define CORTEXA9_MPIDR_CPUID __BITS(0,1) /* AFF0 = phisycal core id */ +#define CORTEXA9_MPIDR_CPUID __BITS(0,1) /* AFF0 = physical core id */ /* MPIDR implementation of Marvell PJ4B-MP: AFF2 is not used */ #define PJ4B_MPIDR_MP MPIDR_MP
re: CVS commit: src/sys/compat/common
"Maxime Villard" writes: > Module Name: src > Committed By: maxv > Date: Sat Dec 16 08:31:36 UTC 2017 > > Modified Files: > src/sys/compat/common: Makefile.inc > > Log Message: > Build libcompat as an object, not as a library. We want all of its > functions compiled in, because compat modules loaded from the filesystem > may depend on them. this breaks mips64 kernels: /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: kern_ipc_10.o: ABI is incompatible with that of the selected emulation /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: failed to merge target specific data of file kern_ipc_10.o /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: sysv_shm_50.o: ABI is incompatible with that of the selected emulation /var/obj/evbmips-mips64eb/usr/src/tooldir.NetBSD-7.1_STABLE-amd64/bin/mips64--netbsd-ld: failed to merge target specific data of file sysv_shm_50.o [ ... ] it also shouldn't be necessary for non-MODULAR kernels. (same for compat_util.c.) AFAICT, there is no reason to build this as as object for non-modular. or to include anything else that isn't link-time missing. note that i'm fairly sure that your change only exposed a latent bug in COMPAT_AS=library on mips64, but it's also wrong to use it there anyway. thanks. .mrg.