CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Sun Apr 6 02:01:43 UTC 2014 Modified Files: src/sys/dev/usb: umodem.c Log Message: PR/48715: Ryo ONODERA: Please support more USB modems To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/usb/umodem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/umodem.c diff -u src/sys/dev/usb/umodem.c:1.65 src/sys/dev/usb/umodem.c:1.66 --- src/sys/dev/usb/umodem.c:1.65 Wed Oct 3 03:07:04 2012 +++ src/sys/dev/usb/umodem.c Sat Apr 5 22:01:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: umodem.c,v 1.65 2012/10/03 07:07:04 mlelstv Exp $ */ +/* $NetBSD: umodem.c,v 1.66 2014/04/06 02:01:43 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.65 2012/10/03 07:07:04 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.66 2014/04/06 02:01:43 christos Exp $"); #include #include @@ -98,12 +98,17 @@ umodem_match(device_t parent, cfdata_t m usb_interface_descriptor_t *id; int cm, acm; + id = usbd_get_interface_descriptor(uaa->iface); + if (uaa->subclass != UISUBCLASS_ABSTRACT_CONTROL_MODEL && + (id->bInterfaceClass == UICLASS_CDC_DATA && + id->bInterfaceSubClass == UISUBCLASS_DATA)) + return (UMATCH_IFACECLASS_IFACESUBCLASS); + if (uaa->class != UICLASS_CDC || uaa->subclass != UISUBCLASS_ABSTRACT_CONTROL_MODEL || !(uaa->proto == UIPROTO_CDC_NOCLASS || uaa->proto == UIPROTO_CDC_AT)) return (UMATCH_NONE); - id = usbd_get_interface_descriptor(uaa->iface); if (umodem_get_caps(uaa->device, &cm, &acm, id) == -1) return (UMATCH_NONE);
CVS commit: src/lib/libc/ssp
Module Name:src Committed By: christos Date: Sun Apr 6 01:13:59 UTC 2014 Modified Files: src/lib/libc/ssp: stpcpy_chk.c Log Message: fix the limit check. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/ssp/stpcpy_chk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/ssp/stpcpy_chk.c diff -u src/lib/libc/ssp/stpcpy_chk.c:1.3 src/lib/libc/ssp/stpcpy_chk.c:1.4 --- src/lib/libc/ssp/stpcpy_chk.c:1.3 Sat Apr 5 21:01:49 2014 +++ src/lib/libc/ssp/stpcpy_chk.c Sat Apr 5 21:13:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: stpcpy_chk.c,v 1.3 2014/04/06 01:01:49 christos Exp $ */ +/* $NetBSD: stpcpy_chk.c,v 1.4 2014/04/06 01:13:59 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: stpcpy_chk.c,v 1.3 2014/04/06 01:01:49 christos Exp $"); +__RCSID("$NetBSD: stpcpy_chk.c,v 1.4 2014/04/06 01:13:59 christos Exp $"); /*LINTLIBRARY*/ @@ -45,11 +45,11 @@ char *__stpcpy_chk(char * __restrict, co char * __stpcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen) { - size_t len = strlen(src); + size_t len = strlen(src) + 1; if (len > slen) __chk_fail(); - (void)memcpy(dst, src, len + 1); - return dst + len; + (void)memcpy(dst, src, len); + return dst + len - 1; }
CVS commit: src/lib/libc/ssp
Module Name:src Committed By: christos Date: Sun Apr 6 01:01:49 UTC 2014 Modified Files: src/lib/libc/ssp: stpcpy_chk.c Log Message: fix off by one in stpcpy_chk. christos To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/ssp/stpcpy_chk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/ssp/stpcpy_chk.c diff -u src/lib/libc/ssp/stpcpy_chk.c:1.2 src/lib/libc/ssp/stpcpy_chk.c:1.3 --- src/lib/libc/ssp/stpcpy_chk.c:1.2 Wed Nov 6 11:58:58 2013 +++ src/lib/libc/ssp/stpcpy_chk.c Sat Apr 5 21:01:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: stpcpy_chk.c,v 1.2 2013/11/06 16:58:58 christos Exp $ */ +/* $NetBSD: stpcpy_chk.c,v 1.3 2014/04/06 01:01:49 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: stpcpy_chk.c,v 1.2 2013/11/06 16:58:58 christos Exp $"); +__RCSID("$NetBSD: stpcpy_chk.c,v 1.3 2014/04/06 01:01:49 christos Exp $"); /*LINTLIBRARY*/ @@ -45,11 +45,11 @@ char *__stpcpy_chk(char * __restrict, co char * __stpcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen) { - size_t len = strlen(src) + 1; + size_t len = strlen(src); if (len > slen) __chk_fail(); - (void)memcpy(dst, src, len); + (void)memcpy(dst, src, len + 1); return dst + len; }
CVS commit: src/sys/dev
Module Name:src Committed By: joerg Date: Sun Apr 6 00:56:39 UTC 2014 Modified Files: src/sys/dev: ccd.c Log Message: Don't destroy locked mutex. Don't access freed memory. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/dev/ccd.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/ccd.c diff -u src/sys/dev/ccd.c:1.147 src/sys/dev/ccd.c:1.148 --- src/sys/dev/ccd.c:1.147 Tue Feb 25 18:30:09 2014 +++ src/sys/dev/ccd.c Sun Apr 6 00:56:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.147 2014/02/25 18:30:09 pooka Exp $ */ +/* $NetBSD: ccd.c,v 1.148 2014/04/06 00:56:39 joerg Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.147 2014/02/25 18:30:09 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.148 2014/04/06 00:56:39 joerg Exp $"); #include #include @@ -231,6 +231,7 @@ ccdcreate(int unit) { static void ccddestroy(struct ccd_softc *sc) { mutex_obj_free(sc->sc_iolock); + mutex_exit(&sc->sc_dvlock); mutex_destroy(&sc->sc_dvlock); cv_destroy(&sc->sc_stop); cv_destroy(&sc->sc_push); @@ -1271,7 +1272,8 @@ ccdioctl(dev_t dev, u_long cmd, void *da disk_detach(&cs->sc_dkdev); bufq_free(cs->sc_bufq); ccdput(cs); - break; + /* Don't break, otherwise cs is read again. */ + return 0; case DIOCGDINFO: *(struct disklabel *)data = *(cs->sc_dkdev.dk_label);
CVS commit: src/sys/arch/arm/vfp
Module Name:src Committed By: matt Date: Sun Apr 6 00:54:52 UTC 2014 Modified Files: src/sys/arch/arm/vfp: vfp_init.c Log Message: propogation -> propagation To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/vfp/vfp_init.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/arm/vfp/vfp_init.c diff -u src/sys/arch/arm/vfp/vfp_init.c:1.37 src/sys/arch/arm/vfp/vfp_init.c:1.38 --- src/sys/arch/arm/vfp/vfp_init.c:1.37 Fri Mar 28 21:39:09 2014 +++ src/sys/arch/arm/vfp/vfp_init.c Sun Apr 6 00:54:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vfp_init.c,v 1.37 2014/03/28 21:39:09 matt Exp $ */ +/* $NetBSD: vfp_init.c,v 1.38 2014/04/06 00:54:52 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -339,7 +339,7 @@ vfp_attach(struct cpu_info *ci) model, ((f0 & ARM_MVFR0_ROUNDING_MASK) ? ", rounding" : ""), ((f0 & ARM_MVFR0_EXCEPT_MASK) ? ", exceptions" : ""), - ((f1 & ARM_MVFR1_D_NAN_MASK) ? ", NaN propogation" : ""), + ((f1 & ARM_MVFR1_D_NAN_MASK) ? ", NaN propagation" : ""), ((f1 & ARM_MVFR1_FTZ_MASK) ? ", denormals" : "")); aprint_verbose("vfp%d: mvfr: [0]=%#x [1]=%#x\n", device_unit(ci->ci_dev), f0, f1); @@ -350,7 +350,7 @@ vfp_attach(struct cpu_info *ci) if (f1 & ARM_MVFR0_EXCEPT_MASK) { vfp_fpscr_changable |= VFP_FPSCR_ESUM; } - // If hardware supports propogation of NaNs, select it. + // If hardware supports propagation of NaNs, select it. if (f1 & ARM_MVFR1_D_NAN_MASK) { vfp_fpscr_default &= ~VFP_FPSCR_DN; vfp_fpscr_changable |= VFP_FPSCR_DN;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: khorben Date: Sat Apr 5 23:47:26 UTC 2014 Modified Files: src/sys/dev/usb: files.usb Log Message: Fixed a typo To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/dev/usb/files.usb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/files.usb diff -u src/sys/dev/usb/files.usb:1.131 src/sys/dev/usb/files.usb:1.132 --- src/sys/dev/usb/files.usb:1.131 Sun Mar 16 09:34:45 2014 +++ src/sys/dev/usb/files.usb Sat Apr 5 23:47:26 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.131 2014/03/16 09:34:45 martin Exp $ +# $NetBSD: files.usb,v 1.132 2014/04/05 23:47:26 khorben Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -108,7 +108,7 @@ device uep: wsmousedev, tpcalib attach uep at usbdevif file dev/usb/uep.c uep needs-flag -# Cypress microcontroller based serial adpaters +# Cypress microcontroller based serial adapters device ucycom: hid attach ucycom at uhidbus file dev/usb/ucycom.c ucycom needs-flag
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: khorben Date: Sat Apr 5 23:45:11 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: BEAGLEBOARD OVERO Log Message: Fixed a typo To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/evbarm/conf/BEAGLEBOARD cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/conf/OVERO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/BEAGLEBOARD diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.51 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.52 --- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.51 Sun Jun 30 21:38:56 2013 +++ src/sys/arch/evbarm/conf/BEAGLEBOARD Sat Apr 5 23:45:11 2014 @@ -1,5 +1,5 @@ # -# $NetBSD: BEAGLEBOARD,v 1.51 2013/06/30 21:38:56 rmind Exp $ +# $NetBSD: BEAGLEBOARD,v 1.52 2014/04/05 23:45:11 khorben Exp $ # # BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel # @@ -220,7 +220,7 @@ omapiic1 at obio0 addr 0x48072000 size 0 omapiic2 at obio0 addr 0x4806 size 0x80 iic* at omapiic? -# Power Managent and System Companion Device +# Power Management and System Companion Device tps65950pm0 at iic0 addr 0x48 tps65950pm1 at iic0 addr 0x49 tps65950pm2 at iic0 addr 0x4a Index: src/sys/arch/evbarm/conf/OVERO diff -u src/sys/arch/evbarm/conf/OVERO:1.33 src/sys/arch/evbarm/conf/OVERO:1.34 --- src/sys/arch/evbarm/conf/OVERO:1.33 Tue Oct 1 11:24:49 2013 +++ src/sys/arch/evbarm/conf/OVERO Sat Apr 5 23:45:11 2014 @@ -1,5 +1,5 @@ # -# $NetBSD: OVERO,v 1.33 2013/10/01 11:24:49 kiyohara Exp $ +# $NetBSD: OVERO,v 1.34 2014/04/05 23:45:11 khorben Exp $ # # OVERO -- Gumstix. Inc. Overo COMS platforms kernel # @@ -188,7 +188,7 @@ omapiic0 at obio0 addr 0x4807 size 0 omapiic1 at obio0 addr 0x4806 size 0x1000 intr 61 # I2C3 iic* at omapiic? -# Power Managent and System Companion Device +# Power Management and System Companion Device tps65950pm0 at iic0 addr 0x48 tps65950pm1 at iic0 addr 0x49 tps65950pm2 at iic0 addr 0x4a
CVS commit: src/usr.sbin/inetd
Module Name:src Committed By: khorben Date: Sat Apr 5 23:36:10 UTC 2014 Modified Files: src/usr.sbin/inetd: inetd.c Log Message: Use base 10 when logging the exit status or exit signal for sub-processes, instead of hexadecimal. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/usr.sbin/inetd/inetd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/inetd/inetd.c diff -u src/usr.sbin/inetd/inetd.c:1.121 src/usr.sbin/inetd/inetd.c:1.122 --- src/usr.sbin/inetd/inetd.c:1.121 Thu Dec 13 19:38:40 2012 +++ src/usr.sbin/inetd/inetd.c Sat Apr 5 23:36:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: inetd.c,v 1.121 2012/12/13 19:38:40 christos Exp $ */ +/* $NetBSD: inetd.c,v 1.122 2014/04/05 23:36:10 khorben Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94"; #else -__RCSID("$NetBSD: inetd.c,v 1.121 2012/12/13 19:38:40 christos Exp $"); +__RCSID("$NetBSD: inetd.c,v 1.122 2014/04/05 23:36:10 khorben Exp $"); #endif #endif /* not lint */ @@ -762,11 +762,11 @@ reapchild(void) if (WIFEXITED(status) && WEXITSTATUS(status)) syslog(LOG_WARNING, - "%s: exit status 0x%x", + "%s: exit status %u", sep->se_server, WEXITSTATUS(status)); else if (WIFSIGNALED(status)) syslog(LOG_WARNING, - "%s: exit signal 0x%x", + "%s: exit signal %u", sep->se_server, WTERMSIG(status)); sep->se_wait = 1; ev = allocchange();
CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt
Module Name:src Committed By: christos Date: Sat Apr 5 23:33:16 UTC 2014 Modified Files: src/external/cddl/osnet/dist/tools/ctf/cvt: dwarf.c Log Message: Handle assembly code built with -g To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.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/cddl/osnet/dist/tools/ctf/cvt/dwarf.c diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.9 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.10 --- src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.9 Sun Mar 9 16:48:01 2014 +++ src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Sat Apr 5 19:33:15 2014 @@ -1924,7 +1924,6 @@ should_have_dwarf(Elf *elf) char *name; name = elf_strptr(elf, shdr.sh_link, sym.st_name); -fprintf(stderr, "name = %s\n", name); /* Studio emits these local symbols regardless */ if ((strcmp(name, "Bbss.bss") != 0) && @@ -1995,15 +1994,29 @@ dw_read(tdata_t *td, Elf *elf, char *fil &addrsz, &offsz, NULL, &nxthdr, &dw.dw_err)) != DW_DLV_OK) terminate("rc = %d %s\n", rc, dwarf_errmsg(dw.dw_err)); - if ((cu = die_sibling(&dw, NULL)) == NULL || - (((child = die_child(&dw, cu)) == NULL) && - should_have_dwarf(elf))) { - terminate("file does not contain dwarf type data " - "(try compiling with -g)\n"); - } else if (child == NULL) { - return (0); + if ((cu = die_sibling(&dw, NULL)) == NULL) + goto out; + + if ((child = die_child(&dw, cu)) == NULL) { + Dwarf_Unsigned lang; + if (die_unsigned(&dw, cu, DW_AT_language, &lang, 0)) { + debug(1, "DWARF language: %u\n", lang); + /* + * Assembly languages are typically that. + * They have some dwarf info, but not what + * we expect. They have local symbols for + * example, but they are missing the child info. + */ + if (lang >= DW_LANG_lo_user) +return 0; + } + if (should_have_dwarf(elf)) + goto out; } + if (child == NULL) + return (0); + dw.dw_maxoff = nxthdr - 1; if (dw.dw_maxoff > TID_FILEMAX) @@ -2044,4 +2057,7 @@ dw_read(tdata_t *td, Elf *elf, char *fil /* leak the dwarf_t */ return (0); +out: + terminate("file does not contain dwarf type data " + "(try compiling with -g)\n"); }
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: matt Date: Sat Apr 5 22:41:50 UTC 2014 Modified Files: src/sys/arch/arm/marvell: armadaxp.c Log Message: Initialize cpu_cc_freq with our CPU speed. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/marvell/armadaxp.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/arm/marvell/armadaxp.c diff -u src/sys/arch/arm/marvell/armadaxp.c:1.7 src/sys/arch/arm/marvell/armadaxp.c:1.8 --- src/sys/arch/arm/marvell/armadaxp.c:1.7 Sat Mar 15 10:54:40 2014 +++ src/sys/arch/arm/marvell/armadaxp.c Sat Apr 5 22:41:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp.c,v 1.7 2014/03/15 10:54:40 kiyohara Exp $ */ +/* $NetBSD: armadaxp.c,v 1.8 2014/04/05 22:41:50 matt Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include -__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.7 2014/03/15 10:54:40 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.8 2014/04/05 22:41:50 matt Exp $"); #define _INTR_PRIVATE @@ -369,6 +369,8 @@ armadaxp_getclks(void) mvPclk *= 100; mvSysclk *= 100; + + curcpu()->ci_data.cpu_cc_freq = mvPclk; } void
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Sat Apr 5 22:36:18 UTC 2014 Modified Files: src/sys/arch/arm/arm32: arm32_kvminit.c arm32_machdep.c Log Message: If using arm32_kvminit, don't bother mapping msgbuf since it's already mapped. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/arm32/arm32_kvminit.c cvs rdiff -u -r1.102 -r1.103 src/sys/arch/arm/arm32/arm32_machdep.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/arm/arm32/arm32_kvminit.c diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.26 src/sys/arch/arm/arm32/arm32_kvminit.c:1.27 --- src/sys/arch/arm/arm32/arm32_kvminit.c:1.26 Tue Apr 1 05:37:35 2014 +++ src/sys/arch/arm/arm32/arm32_kvminit.c Sat Apr 5 22:36:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_kvminit.c,v 1.26 2014/04/01 05:37:35 skrll Exp $ */ +/* $NetBSD: arm32_kvminit.c,v 1.27 2014/04/05 22:36:18 matt Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,7 +122,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.26 2014/04/01 05:37:35 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.27 2014/04/05 22:36:18 matt Exp $"); #include #include @@ -144,6 +144,7 @@ __KERNEL_RCSID(0, "$NetBSD: arm32_kvmini struct bootmem_info bootmem_info; +extern void *msgbufaddr; paddr_t msgbufphys; paddr_t physical_start; paddr_t physical_end; @@ -549,6 +550,7 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_b VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE, false); add_pages(bmi, &msgbuf); msgbufphys = msgbuf.pv_pa; + msgbufaddr = (void *)msgbuf.pv_va; if (map_vectors_p) { /* Index: src/sys/arch/arm/arm32/arm32_machdep.c diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.102 src/sys/arch/arm/arm32/arm32_machdep.c:1.103 --- src/sys/arch/arm/arm32/arm32_machdep.c:1.102 Fri Mar 28 21:39:09 2014 +++ src/sys/arch/arm/arm32/arm32_machdep.c Sat Apr 5 22:36:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_machdep.c,v 1.102 2014/03/28 21:39:09 matt Exp $ */ +/* $NetBSD: arm32_machdep.c,v 1.103 2014/04/05 22:36:18 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.102 2014/03/28 21:39:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.103 2014/04/05 22:36:18 matt Exp $"); #include "opt_modular.h" #include "opt_md.h" @@ -257,7 +257,6 @@ cpu_startup(void) { vaddr_t minaddr; vaddr_t maxaddr; - u_int loop; char pbuf[9]; /* @@ -284,10 +283,13 @@ cpu_startup(void) */ /* msgbufphys was setup during the secondary boot strap */ - for (loop = 0; loop < btoc(MSGBUFSIZE); ++loop) - pmap_kenter_pa((vaddr_t)msgbufaddr + loop * PAGE_SIZE, - msgbufphys + loop * PAGE_SIZE, - VM_PROT_READ|VM_PROT_WRITE, 0); + if (!pmap_extract(pmap_kernel(), (vaddr_t)msgbufaddr, NULL)) { + for (u_int loop = 0; loop < btoc(MSGBUFSIZE); ++loop) { + pmap_kenter_pa((vaddr_t)msgbufaddr + loop * PAGE_SIZE, + msgbufphys + loop * PAGE_SIZE, + VM_PROT_READ|VM_PROT_WRITE, 0); + } + } pmap_update(pmap_kernel()); initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE));
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Apr 5 22:05:12 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Add a missing pmap_release_page_lock To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/arch/arm/arm32/pmap.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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.280 src/sys/arch/arm/arm32/pmap.c:1.281 --- src/sys/arch/arm/arm32/pmap.c:1.280 Wed Apr 2 15:45:51 2014 +++ src/sys/arch/arm/arm32/pmap.c Sat Apr 5 22:05:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.280 2014/04/02 15:45:51 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.281 2014/04/05 22:05:12 skrll Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include //#include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.280 2014/04/02 15:45:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.281 2014/04/05 22:05:12 skrll Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -4405,6 +4405,7 @@ pmap_fault_fixup(pmap_t pm, vaddr_t va, * Is this a mapping of an executable page? */ if ((pv->pv_flags & PVF_EXEC) == 0) { +pmap_release_page_lock(md); UVMHIST_LOG(maphist, " <-- done (ref emul: no exec)", 0, 0, 0, 0); goto out;
CVS commit: src/sys/arch
Module Name:src Committed By: christos Date: Sat Apr 5 18:44:32 UTC 2014 Modified Files: src/sys/arch/alpha/alpha: procfs_machdep.c src/sys/arch/arm/arm: procfs_machdep.c src/sys/arch/hppa/hppa: procfs_machdep.c src/sys/arch/m68k/m68k: procfs_machdep.c src/sys/arch/mips/mips: procfs_machdep.c src/sys/arch/powerpc/powerpc: procfs_machdep.c src/sys/arch/sh3/sh3: procfs_machdep.c src/sys/arch/sparc/sparc: procfs_machdep.c src/sys/arch/sparc64/sparc64: procfs_machdep.c src/sys/arch/usermode/usermode: procfs_machdep.c src/sys/arch/vax/vax: procfs_machdep.c Log Message: adjust to new signature; return consistent stuff. 0 is ok -1 is error To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/alpha/alpha/procfs_machdep.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/procfs_machdep.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/procfs_machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/procfs_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/mips/procfs_machdep.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/powerpc/procfs_machdep.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/sh3/procfs_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc/sparc/procfs_machdep.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc64/sparc64/procfs_machdep.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/usermode/procfs_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/vax/vax/procfs_machdep.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/alpha/alpha/procfs_machdep.c diff -u src/sys/arch/alpha/alpha/procfs_machdep.c:1.4 src/sys/arch/alpha/alpha/procfs_machdep.c:1.5 --- src/sys/arch/alpha/alpha/procfs_machdep.c:1.4 Sun Dec 11 07:16:10 2005 +++ src/sys/arch/alpha/alpha/procfs_machdep.c Sat Apr 5 14:44:32 2014 @@ -1,7 +1,7 @@ -/* $NetBSD: procfs_machdep.c,v 1.4 2005/12/11 12:16:10 christos Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.5 2014/04/05 18:44:32 christos Exp $ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.4 2005/12/11 12:16:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.5 2014/04/05 18:44:32 christos Exp $"); #include #include @@ -15,7 +15,7 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_machd * Only used when procfs is mounted with -o linux. */ int -procfs_getcpuinfstr(char *buf, int *len) +procfs_getcpuinfstr(char *buf, size_t *len) { *len = 0; Index: src/sys/arch/arm/arm/procfs_machdep.c diff -u src/sys/arch/arm/arm/procfs_machdep.c:1.3 src/sys/arch/arm/arm/procfs_machdep.c:1.4 --- src/sys/arch/arm/arm/procfs_machdep.c:1.3 Sun Dec 11 07:16:41 2005 +++ src/sys/arch/arm/arm/procfs_machdep.c Sat Apr 5 14:44:32 2014 @@ -1,7 +1,7 @@ -/* $NetBSD: procfs_machdep.c,v 1.3 2005/12/11 12:16:41 christos Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.4 2014/04/05 18:44:32 christos Exp $ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.3 2005/12/11 12:16:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.4 2014/04/05 18:44:32 christos Exp $"); #include #include @@ -15,7 +15,7 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_machd * Only used when procfs is mounted with -o linux. */ int -procfs_getcpuinfstr(char *buf, int *len) +procfs_getcpuinfstr(char *buf, size_t *len) { *len = 0; Index: src/sys/arch/hppa/hppa/procfs_machdep.c diff -u src/sys/arch/hppa/hppa/procfs_machdep.c:1.3 src/sys/arch/hppa/hppa/procfs_machdep.c:1.4 --- src/sys/arch/hppa/hppa/procfs_machdep.c:1.3 Sun Dec 11 07:17:37 2005 +++ src/sys/arch/hppa/hppa/procfs_machdep.c Sat Apr 5 14:44:32 2014 @@ -1,7 +1,7 @@ -/* $NetBSD: procfs_machdep.c,v 1.3 2005/12/11 12:17:37 christos Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.4 2014/04/05 18:44:32 christos Exp $ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.3 2005/12/11 12:17:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.4 2014/04/05 18:44:32 christos Exp $"); #include #include @@ -15,7 +15,7 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_machd * Only used when procfs is mounted with -o linux. */ int -procfs_getcpuinfstr(char *buf, int *len) +procfs_getcpuinfstr(char *buf, size_t *len) { *len = 0; Index: src/sys/arch/m68k/m68k/procfs_machdep.c diff -u src/sys/arch/m68k/m68k/procfs_machdep.c:1.6 src/sys/arch/m68k/m68k/procfs_machdep.c:1.7 --- src/sys/arch/m68k/m68k/procfs_machdep.c:1.6 Sat Mar 29 07:34:13 2014 +++ src/sys/arch/m68k/m68k/procfs_machdep.c Sat Apr 5 14:44:32 2014 @@ -1,7 +1,7 @@ -/* $NetBSD: procfs_machdep.c,v 1.6 2014/03/29 11:34:13 apb Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.7 2014/04/05 18:44:32 christos Exp $ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.6 2014/03/29 11:34:13 apb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.7 2014/04/05 18:44:32 christos Exp $"); #include #include @@ -16,10 +16,10 @@
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: christos Date: Sat Apr 5 18:43:09 UTC 2014 Modified Files: src/sys/arch/x86/x86: procfs_machdep.c Log Message: make this compute the needed size instead of bailing. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/procfs_machdep.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/x86/x86/procfs_machdep.c diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.5 src/sys/arch/x86/x86/procfs_machdep.c:1.6 --- src/sys/arch/x86/x86/procfs_machdep.c:1.5 Thu Mar 27 14:22:56 2014 +++ src/sys/arch/x86/x86/procfs_machdep.c Sat Apr 5 14:43:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.5 2014/03/27 18:22:56 christos Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.6 2014/04/05 18:43:09 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.5 2014/03/27 18:22:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.6 2014/04/05 18:43:09 christos Exp $"); #include #include @@ -102,7 +102,7 @@ static const char * const x86_features[] #endif }; -static int procfs_getonecpu(int, struct cpu_info *, char *, int *); +static int procfs_getonecpu(int, struct cpu_info *, char *, size_t *); /* * Linux-style /proc/cpuinfo. @@ -111,55 +111,54 @@ static int procfs_getonecpu(int, struct * In the multiprocessor case, this should be a loop over all CPUs. */ int -procfs_getcpuinfstr(char *bf, int *len) +procfs_getcpuinfstr(char *bf, size_t *len) { struct cpu_info *ci; CPU_INFO_ITERATOR cii; - int i = 0, used = *len, total = *len; + size_t i, total, size, used; - *len = 0; + i = total = 0; + used = size = *len; + for (CPU_INFO_FOREACH(cii, ci)) { - if (procfs_getonecpu(i++, ci, bf, &used) == 0) { - *len += used; - total = 0; - break; - } - total -= used; - if (total > 0) { + procfs_getonecpu(i++, ci, bf, &used); + total += used + 1; + if (used + 1 < size) { bf += used; *bf++ = '\n'; - *len += used + 1; - used = --total; - if (used == 0) -break; - } else { - *len += used; - break; - } + size -= used + 1; + used = size; + } else + used = 0; } - return total == 0 ? -1 : 0; + size = *len; + *len = total; + return size < *len ? -1 : 0; } static int -procfs_getonecpu(int xcpu, struct cpu_info *ci, char *bf, int *len) +procfs_getonecpu(int xcpu, struct cpu_info *ci, char *bf, size_t *len) { - int left, l, i; - char featurebuf[256], *p; + size_t left, l, size; + char featurebuf[1024], *p; p = featurebuf; left = sizeof(featurebuf); - for (i = 0; i < 32; i++) { + size = *len; + for (size_t i = 0; i < 32; i++) { if ((ci->ci_feat_val[0] & (1 << i)) && x86_features[i]) { l = snprintf(p, left, "%s ", x86_features[i]); - if (l > left) -return 0; - left -= l; - p += l; + if (l < left) { +left -= l; +p += l; + } else +break; } } p = bf; left = *len; + size = 0; l = snprintf(p, left, "processor\t: %d\n" "vendor_id\t: %s\n" @@ -173,21 +172,24 @@ procfs_getonecpu(int xcpu, struct cpu_in cpuid_level >= 0 ? ((ci->ci_signature >> 4) & 15) : 0, cpu_brand_string ); - - if (l > left) - return 0; - left -= l; - p += l; + size += l; + if (l < left) { + left -= l; + p += l; + } else + left = 0; if (cpuid_level >= 0) l = snprintf(p, left, "%d\n", ci->ci_signature & 15); else l = snprintf(p, left, "unknown\n"); - if (l > left) - return 0; - left -= l; - p += l; + size += l; + if (l < left) { + left -= l; + p += l; + } else + left = 0; if (ci->ci_data.cpu_cc_freq != 0) { uint64_t freq, fraq; @@ -199,10 +201,12 @@ procfs_getonecpu(int xcpu, struct cpu_in } else l = snprintf(p, left, "cpu MHz\t\t: unknown\n"); - if (l > left) - return 0; - left -= l; - p += l; + size += l; + if (l < left) { + left -= l; + p += l; + } else + left = 0; l = snprintf(p, left, "fdiv_bug\t: %s\n" @@ -217,12 +221,11 @@ procfs_getonecpu(int xcpu, struct cpu_in (rcr0() & CR0_WP) ? "yes" : "no", featurebuf ); + size += l; - if (l > left) - return 0; - *len = (p + l) - bf; - - return 1; + left = *len; + *len = size; + return left < *len ? -1 : 0; } #if defined(__HAVE_PROCFS_MACHDEP) && !defined(__x86_64__)
CVS commit: src/sys/miscfs/procfs
Module Name:src Committed By: christos Date: Sat Apr 5 18:42:32 UTC 2014 Modified Files: src/sys/miscfs/procfs: procfs.h procfs_linux.c Log Message: On my 24 proc box I got ENOSPC, so make the routine return the size it wants and try again. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/miscfs/procfs/procfs.h cvs rdiff -u -r1.66 -r1.67 src/sys/miscfs/procfs/procfs_linux.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/miscfs/procfs/procfs.h diff -u src/sys/miscfs/procfs/procfs.h:1.68 src/sys/miscfs/procfs/procfs.h:1.69 --- src/sys/miscfs/procfs/procfs.h:1.68 Mon May 28 09:16:10 2012 +++ src/sys/miscfs/procfs/procfs.h Sat Apr 5 14:42:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs.h,v 1.68 2012/05/28 13:16:10 christos Exp $ */ +/* $NetBSD: procfs.h,v 1.69 2014/04/05 18:42:32 christos Exp $ */ /* * Copyright (c) 1993 @@ -245,7 +245,7 @@ int procfs_validmap(struct lwp *, struct int procfs_rw(void *); -int procfs_getcpuinfstr(char *, int *); +int procfs_getcpuinfstr(char *, size_t *); #define PROCFS_LOCKED 0x01 #define PROCFS_WANT 0x02 Index: src/sys/miscfs/procfs/procfs_linux.c diff -u src/sys/miscfs/procfs/procfs_linux.c:1.66 src/sys/miscfs/procfs/procfs_linux.c:1.67 --- src/sys/miscfs/procfs/procfs_linux.c:1.66 Wed Nov 27 12:24:44 2013 +++ src/sys/miscfs/procfs/procfs_linux.c Sat Apr 5 14:42:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_linux.c,v 1.66 2013/11/27 17:24:44 christos Exp $ */ +/* $NetBSD: procfs_linux.c,v 1.67 2014/04/05 18:42:32 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.66 2013/11/27 17:24:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.67 2014/04/05 18:42:32 christos Exp $"); #include #include @@ -510,14 +510,15 @@ int procfs_docpuinfo(struct lwp *curl, struct proc *p, struct pfsnode *pfs, struct uio *uio) { - int len = LBFSZ; - char *bf = malloc(len, M_TEMP, M_WAITOK); + size_t len = LBFSZ; + char *bf = NULL; int error; - if (procfs_getcpuinfstr(bf, &len) < 0) { - error = ENOSPC; - goto done; - } + do { + if (bf) + free(bf, M_TEMP); + bf = malloc(len, M_TEMP, M_WAITOK); + } while (procfs_getcpuinfstr(bf, &len) < 0); if (len == 0) { error = 0;
CVS commit: src/doc
Module Name:src Committed By: tron Date: Sat Apr 5 17:06:44 UTC 2014 Modified Files: src/doc: HACKS Log Message: Document xauth(1) hack. To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.146 src/doc/HACKS:1.147 --- src/doc/HACKS:1.146 Fri Apr 4 07:21:40 2014 +++ src/doc/HACKS Sat Apr 5 17:06:44 2014 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.146 2014/04/04 07:21:40 wiz Exp $ +# $NetBSD: HACKS,v 1.147 2014/04/05 17:06:44 tron Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -365,6 +365,22 @@ descr included in the Emacs 24.3 distribution. kcah +hack Disable Stack Smash Protection for /usr/X11R7/bin/xauth +cdata 05 Apr 2014 +who tron +file src/external/mit/xorg/bin/xauth/Makefile : 1.4 +pr N/A +descr + If "xauth" is compile with "USE_SSP" set to "yes" it fails + mysteriously with an error message like this: + + /usr/X11R7/bin/xauth: file /foo/bar/.Xauthority does not exist + /usr/X11R7/bin/xauth: unable to link authority file /foo/bar/.Xauthority, use /foo/bar/.Xauthority + + The compiler seems to get confused about the two filename variables + used in the link(2) system call. +kcah + port vax hack gcc4/vax ICE
CVS commit: src/external/mit/xorg/bin/xauth
Module Name:src Committed By: tron Date: Sat Apr 5 17:01:55 UTC 2014 Modified Files: src/external/mit/xorg/bin/xauth: Makefile Log Message: Force "USE_SSP" to "no" when compiling xauth(1) for now. This avoid the program to fail with error messages like this one: /usr/X11R7/bin/xauth: file /home/tron/.Xauthority does not exist /usr/X11R7/bin/xauth: unable to link authority file /home/tron/.Xauthority, use /home/tron/.Xauthority This seems to be some weird compiler bug. If you add a debug printf(3) call before the line in "xsrc/external/mit/xauth/dist/process.c" that calls link(2) the target and source filename have the correct value and the call works. Without the printf(3) call it fails. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/xauth/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/mit/xorg/bin/xauth/Makefile diff -u src/external/mit/xorg/bin/xauth/Makefile:1.3 src/external/mit/xorg/bin/xauth/Makefile:1.4 --- src/external/mit/xorg/bin/xauth/Makefile:1.3 Mon Mar 17 09:24:11 2014 +++ src/external/mit/xorg/bin/xauth/Makefile Sat Apr 5 17:01:55 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2014/03/17 09:24:11 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2014/04/05 17:01:55 tron Exp $ .include @@ -14,5 +14,9 @@ DPADD+= ${LIBXAU} ${LIBXMUU} ${LIBXT} ${ .PATH: ${X11SRCDIR.${PROG}} ${X11SRCDIR.${PROG}}/man +.include + +USE_SSP:= no + .include .include
CVS commit: src/sbin
Module Name:src Committed By: justin Date: Sat Apr 5 12:32:27 UTC 2014 Modified Files: src/sbin/fsck_ffs: inode.c src/sbin/newfs: mkfs.c Log Message: Iterate over fields of struct seperately to avoid warnings from pedantic compilers To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sbin/fsck_ffs/inode.c cvs rdiff -u -r1.120 -r1.121 src/sbin/newfs/mkfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/inode.c diff -u src/sbin/fsck_ffs/inode.c:1.70 src/sbin/fsck_ffs/inode.c:1.71 --- src/sbin/fsck_ffs/inode.c:1.70 Mon Dec 2 18:46:52 2013 +++ src/sbin/fsck_ffs/inode.c Sat Apr 5 12:32:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: inode.c,v 1.70 2013/12/02 18:46:52 bouyer Exp $ */ +/* $NetBSD: inode.c,v 1.71 2014/04/05 12:32:27 justin Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: inode.c,v 1.70 2013/12/02 18:46:52 bouyer Exp $"); +__RCSID("$NetBSD: inode.c,v 1.71 2014/04/05 12:32:27 justin Exp $"); #endif #endif /* not lint */ @@ -358,8 +358,10 @@ swap_dinode1(union dinode *dp, int n) doinglevel2 || (maxsymlinklen < 0) || (iswap64(dp1->di_size) > (uint64_t)maxsymlinklen)) { - for (j = 0; j < (UFS_NDADDR + UFS_NIADDR); j++) + for (j = 0; j < UFS_NDADDR; j++) dp1->di_db[j] = bswap32(dp1->di_db[j]); + for (j = 0; j < UFS_NIADDR; j++) + dp1->di_ib[j] = bswap32(dp1->di_ib[j]); } } } @@ -374,8 +376,12 @@ swap_dinode2(union dinode *dp, int n) for (i = 0; i < n; i++, dp2++) { ffs_dinode2_swap(dp2, dp2); if ((iswap16(dp2->di_mode) & IFMT) != IFLNK) { - for (j = 0; j < (UFS_NDADDR + UFS_NIADDR + UFS_NXADDR); j++) + for (j = 0; j < UFS_NXADDR; j++) dp2->di_extb[j] = bswap64(dp2->di_extb[j]); + for (j = 0; j < UFS_NDADDR; j++) +dp2->di_db[j] = bswap64(dp2->di_db[j]); + for (j = 0; j < UFS_NIADDR; j++) +dp2->di_ib[j] = bswap64(dp2->di_ib[j]); } } } Index: src/sbin/newfs/mkfs.c diff -u src/sbin/newfs/mkfs.c:1.120 src/sbin/newfs/mkfs.c:1.121 --- src/sbin/newfs/mkfs.c:1.120 Sun Jun 23 22:03:34 2013 +++ src/sbin/newfs/mkfs.c Sat Apr 5 12:32:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs.c,v 1.120 2013/06/23 22:03:34 dholland Exp $ */ +/* $NetBSD: mkfs.c,v 1.121 2014/04/05 12:32:27 justin Exp $ */ /* * Copyright (c) 1980, 1989, 1993 @@ -73,7 +73,7 @@ #if 0 static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: mkfs.c,v 1.120 2013/06/23 22:03:34 dholland Exp $"); +__RCSID("$NetBSD: mkfs.c,v 1.121 2014/04/05 12:32:27 justin Exp $"); #endif #endif /* not lint */ @@ -1372,8 +1372,10 @@ iput(union dinode *ip, ino_t ino) if (needswap) { ffs_dinode1_swap(&ip->dp1, dp1); /* ffs_dinode1_swap() doesn't swap blocks addrs */ - for (i=0; idi_db[i] = bswap32(ip->dp1.di_db[i]); + for (i=0; idi_ib[i] = bswap32(ip->dp1.di_ib[i]); } else *dp1 = ip->dp1; dp1->di_gen = arc4random() & INT32_MAX; @@ -1382,8 +1384,10 @@ iput(union dinode *ip, ino_t ino) dp2 += ino_to_fsbo(&sblock, ino); if (needswap) { ffs_dinode2_swap(&ip->dp2, dp2); - for (i=0; idi_db[i] = bswap64(ip->dp2.di_db[i]); + for (i=0; idi_ib[i] = bswap64(ip->dp2.di_ib[i]); } else *dp2 = ip->dp2; dp2->di_gen = arc4random() & INT32_MAX;
CVS commit: src/doc
Module Name:src Committed By: apb Date: Sat Apr 5 11:18:03 UTC 2014 Modified Files: src/doc: 3RDPARTY Log Message: Add a "Location" line for all three versions of gcc. Explain why both gcc.old and gcc trees are expected to persist in the future. Briefly describe how to import a new version of gcc.old. To generate a diff of this commit: cvs rdiff -u -r1.1104 -r1.1105 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1104 src/doc/3RDPARTY:1.1105 --- src/doc/3RDPARTY:1.1104 Thu Apr 3 15:35:55 2014 +++ src/doc/3RDPARTY Sat Apr 5 11:18:03 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1104 2014/04/03 15:35:55 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1105 2014/04/05 11:18:03 apb Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -376,9 +376,19 @@ Home Page: http://www.gnu.org/software/g Mailing List: gcc-b...@gnu.org Responsible: thorpej, mrg License: GPLv3, LGPLv3.1 +Location: gnu/dist/gcc4 +Location: external/gpl3/gcc.old/dist Location: external/gpl3/gcc/dist Notes: -before importing: +As of April 2014, there are three versions of gcc in the NetBSD tree. +In the long term, we expect that there will often be two versions, +in the "gcc" and "gcc.old" directories. Having two versions allows +migration from one version of gcc to another to happen for one port +at a time, instead of for all ports simultaneously. +When importing a new version of external/gpl3/gcc.old: + - copy the current version of external/gpl3/gcc + - import it to a "NETBSD" vendor branch in externalgpl3/gcc.old +Before importing a new version of external/gpl3/gcc: - delete all .cvsignore and .gitignore files - delete java ada fortran their libraries and testsuites - delete libffi zlib boehm-gc
CVS commit: src/sys/arch/playstation2/conf
Module Name:src Committed By: martin Date: Sat Apr 5 11:15:57 UTC 2014 Modified Files: src/sys/arch/playstation2/conf: Makefile.playstation2.inc build.playstation2.sh Log Message: Try with EXTERNAL_TOOLCHAIN instead of MISSING_TOOLCHAIN. Still fails the same. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/arch/playstation2/conf/Makefile.playstation2.inc \ src/sys/arch/playstation2/conf/build.playstation2.sh 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/playstation2/conf/Makefile.playstation2.inc diff -u src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.5 src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.6 --- src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.5 Mon Mar 31 11:43:53 2014 +++ src/sys/arch/playstation2/conf/Makefile.playstation2.inc Sat Apr 5 11:15:57 2014 @@ -1,14 +1,14 @@ -# $NetBSD: Makefile.playstation2.inc,v 1.5 2014/03/31 11:43:53 martin Exp $ +# $NetBSD: Makefile.playstation2.inc,v 1.6 2014/04/05 11:15:57 martin Exp $ -.if !defined(TOOLCHAIN_MISSING) || ${TOOLCHAIN_MISSING}=="no" +.if !defined(EXTERNAL_TOOLCHAIN) || ${EXTERNAL_TOOLCHAIN}=="" .error please do not run "make" directly, use sh ../../conf/build.playstation2.sh instead .endif # working around makesystem bugs: redefine CC and friends here or it does # not properly get picked up by mkdep in sub-makes for "make depend" of # libkern and friends - XXX fix this -PREFIX=/usr/pkg -PLATFORM=mips--netbsdelf +PREFIX=${EXTERNAL_TOOLCHAIN} +PLATFORM=mipsel--netbsdelf CC=${PREFIX}/bin/${PLATFORM}-gcc CPP=${PREFIX}/bin/${PLATFORM}-cpp Index: src/sys/arch/playstation2/conf/build.playstation2.sh diff -u src/sys/arch/playstation2/conf/build.playstation2.sh:1.5 src/sys/arch/playstation2/conf/build.playstation2.sh:1.6 --- src/sys/arch/playstation2/conf/build.playstation2.sh:1.5 Mon Mar 31 11:43:53 2014 +++ src/sys/arch/playstation2/conf/build.playstation2.sh Sat Apr 5 11:15:57 2014 @@ -3,10 +3,9 @@ # This assumes the compiler comes from pkgsrc/cross/gcc-mips-current # (as R5900 support is not available on other branches of gcc yet) root=/usr/pkg -target=mips--netbsdelf - -TOOLCHAIN_MISSING=yes; export TOOLCHAIN_MISSING +target=mipsel--netbsdelf +EXTERNAL_TOOLCHAIN=${root}; export EXTERNAL_TOOLCHAIN LD=${root}/bin/${target}-ld; export LD CC=${root}/bin/${target}-gcc; export CC CXX=${root}/bin/${target}-g++; export CXX
CVS commit: src/sys/arch/mvme68k/conf
Module Name:src Committed By: tsutsui Date: Sat Apr 5 11:07:30 UTC 2014 Modified Files: src/sys/arch/mvme68k/conf: Makefile.mvme68k Log Message: Specify both -Wa,-march=68030 and -Wa,-mcpu=68030 in -m68060 case for gcc45. Now VME177 builds with both gcc45 and gcc48 (though untested on the real machines). XXX: is it really worth to use -m68060 (instead of -m68020-60) for kernel binaries? To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/mvme68k/conf/Makefile.mvme68k 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/mvme68k/conf/Makefile.mvme68k diff -u src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.64 src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.65 --- src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.64 Sun Mar 30 15:54:37 2014 +++ src/sys/arch/mvme68k/conf/Makefile.mvme68k Sat Apr 5 11:07:30 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mvme68k,v 1.64 2014/03/30 15:54:37 tsutsui Exp $ +# $NetBSD: Makefile.mvme68k,v 1.65 2014/04/05 11:07:30 tsutsui Exp $ # Makefile for NetBSD # @@ -40,7 +40,7 @@ CMACHFLAGS= -m68030 .endif .else .if empty(IDENT:M-DMVME147) && empty(IDENT:M-DMVME162) && empty(IDENT:M-DMVME167) -CMACHFLAGS= -m68060 -Wa,-mcpu=68030 -Wa,-m68851 +CMACHFLAGS= -m68060 -Wa,-march=68030 -Wa,-mcpu=68030 -Wa,-m68851 .else CMACHFLAGS= -m68020-60 -Wa,-mcpu=68030 -Wa,-m68851 .endif
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Apr 5 10:35:09 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: On second thoughts don't do the RPI hack for everyone. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/arm32/param.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/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.22 src/sys/arch/arm/include/arm32/param.h:1.23 --- src/sys/arch/arm/include/arm32/param.h:1.22 Sat Apr 5 10:28:18 2014 +++ src/sys/arch/arm/include/arm32/param.h Sat Apr 5 10:35:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.22 2014/04/05 10:28:18 skrll Exp $ */ +/* $NetBSD: param.h,v 1.23 2014/04/05 10:35:09 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -49,7 +49,7 @@ * this file. */ #ifndef PGSHIFT -#if 0 && defined(_ARM_ARCH_6) +#if defined(_ARM_ARCH_6) #define PGSHIFT 13 /* LOG2(NBPG) */ #else #define PGSHIFT 12 /* LOG2(NBPG) */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Apr 5 10:28:18 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Drop down to 4KB pages on armv6 for now. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/arm32/param.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/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.21 src/sys/arch/arm/include/arm32/param.h:1.22 --- src/sys/arch/arm/include/arm32/param.h:1.21 Sun Mar 30 15:50:51 2014 +++ src/sys/arch/arm/include/arm32/param.h Sat Apr 5 10:28:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.21 2014/03/30 15:50:51 matt Exp $ */ +/* $NetBSD: param.h,v 1.22 2014/04/05 10:28:18 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -49,7 +49,7 @@ * this file. */ #ifndef PGSHIFT -#if defined(_ARM_ARCH_6) +#if 0 && defined(_ARM_ARCH_6) #define PGSHIFT 13 /* LOG2(NBPG) */ #else #define PGSHIFT 12 /* LOG2(NBPG) */
CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils/bfd
Module Name:src Committed By: matt Date: Sat Apr 5 07:19:34 UTC 2014 Modified Files: src/gnu/dist/binutils/bfd [matt-nb5-mips64]: elf32-arm.c Log Message: When writing BE8 executables, make the PLTs are written as little endian. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.32.1 src/gnu/dist/binutils/bfd/elf32-arm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/binutils/bfd/elf32-arm.c diff -u src/gnu/dist/binutils/bfd/elf32-arm.c:1.1.1.1 src/gnu/dist/binutils/bfd/elf32-arm.c:1.1.1.1.32.1 --- src/gnu/dist/binutils/bfd/elf32-arm.c:1.1.1.1 Thu Feb 2 20:45:20 2006 +++ src/gnu/dist/binutils/bfd/elf32-arm.c Sat Apr 5 07:19:34 2014 @@ -2012,6 +2012,35 @@ insert_thumb_branch (insn32 br_insn, int return br_insn; } + +/* Store an Arm insn into an output section not processed by + elf32_arm_write_section. */ + +static void +put_arm_insn(struct elf32_arm_link_hash_table *htab, + bfd * output_bfd, bfd_vma val, void * ptr) +{ +if (htab->byteswap_code != bfd_little_endian (output_bfd)) + bfd_putl32(val, ptr); +else + bfd_putb32(val, ptr); +} + + +/* Store a 16-bit Thumb insn into an output section not processed by + elf32_arm_write_section. */ + +static void +put_thumb_insn(struct elf32_arm_link_hash_table *htab, + bfd * output_bfd, bfd_vma val, void * ptr) +{ +if (htab->byteswap_code != bfd_little_endian (output_bfd)) + bfd_putl16(val, ptr); +else + bfd_putb16(val, ptr); +} + + /* Thumb code calling an ARM function. */ static int @@ -2068,11 +2097,11 @@ elf32_thumb_to_arm_stub (struct bfd_link --my_offset; myh->root.u.def.value = my_offset; - bfd_put_16 (output_bfd, (bfd_vma) t2a1_bx_pc_insn, - s->contents + my_offset); + put_thumb_insn (globals, output_bfd, (bfd_vma) t2a1_bx_pc_insn, + s->contents + my_offset); - bfd_put_16 (output_bfd, (bfd_vma) t2a2_noop_insn, - s->contents + my_offset + 2); + put_thumb_insn (globals, output_bfd, (bfd_vma) t2a2_noop_insn, + s->contents + my_offset + 2); ret_offset = /* Address of destination of the stub. */ @@ -2090,9 +2119,9 @@ elf32_thumb_to_arm_stub (struct bfd_link /* ARM branches work from the pc of the instruction + 8. */ + 8); - bfd_put_32 (output_bfd, - (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FF), - s->contents + my_offset + 4); + put_arm_insn (globals, output_bfd, + (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FF), + s->contents + my_offset + 4); } BFD_ASSERT (my_offset <= globals->thumb_glue_size); @@ -2171,11 +2200,11 @@ elf32_arm_to_thumb_stub (struct bfd_link --my_offset; myh->root.u.def.value = my_offset; - bfd_put_32 (output_bfd, (bfd_vma) a2t1_ldr_insn, - s->contents + my_offset); + put_arm_insn (globals, output_bfd, (bfd_vma) a2t1_ldr_insn, + s->contents + my_offset); - bfd_put_32 (output_bfd, (bfd_vma) a2t2_bx_r12_insn, - s->contents + my_offset + 4); + put_arm_insn (globals, output_bfd, (bfd_vma) a2t2_bx_r12_insn, + s->contents + my_offset + 4); /* It's a thumb address. Add the low order bit. */ bfd_put_32 (output_bfd, val | a2t3_func_addr_insn, @@ -4959,16 +4988,17 @@ elf32_arm_finish_dynamic_symbol (bfd * o /* Fill in the entry in the procedure linkage table. */ if (htab->symbian_p) { - unsigned i; - for (i = 0; i < htab->plt_entry_size / 4; ++i) - bfd_put_32 (output_bfd, - elf32_arm_symbian_plt_entry[i], - splt->contents + h->plt.offset + 4 * i); + put_arm_insn (htab, output_bfd, + elf32_arm_symbian_plt_entry[0], + splt->contents + h->plt.offset); + put_arm_insn (htab, output_bfd, + elf32_arm_symbian_plt_entry[1], + splt->contents + h->plt.offset + 4); /* Fill in the entry in the .rel.plt section. */ rel.r_offset = (splt->output_section->vma + splt->output_offset - + h->plt.offset + 4 * (i - 1)); + + h->plt.offset + 4); rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT); /* Get the index in the procedure linkage table which @@ -5014,20 +5044,23 @@ elf32_arm_finish_dynamic_symbol (bfd * o if (eh->plt_thumb_refcount > 0) { - bfd_put_16 (output_bfd, elf32_arm_plt_thumb_stub[0], - splt->contents + h->plt.offset - 4); - bfd_put_16 (output_bfd, elf32_arm_plt_thumb_stub[1], - splt->contents + h->plt.offset - 2); + put_thumb_insn (htab, output_bfd, elf32_arm_plt_thumb_stub[0], + splt->contents + h->plt.offset - 4); + put_thumb_insn (htab, output_bfd, elf32_arm_plt_thumb_stub[1], + splt->contents + h->plt.offset - 2); } - bfd_put_32 (output_bfd, elf32_arm_plt_entry[0] | ((got_displacement & 0x0ff0) >> 20), - splt->contents + h->plt.offset + 0); - bfd_