From owner-svn-src-stable-9@freebsd.org Mon Mar 7 07:49:03 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EAC9AC20A0; Mon, 7 Mar 2016 07:49:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5112CB; Mon, 7 Mar 2016 07:49:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u277n145023382; Mon, 7 Mar 2016 07:49:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u277n1AT023381; Mon, 7 Mar 2016 07:49:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603070749.u277n1AT023381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 7 Mar 2016 07:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296437 - in stable: 10/contrib/binutils/bfd 9/contrib/binutils/bfd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 07:49:03 -0000 Author: dim Date: Mon Mar 7 07:49:01 2016 New Revision: 296437 URL: https://svnweb.freebsd.org/changeset/base/296437 Log: MFC r295901: Fix a problem in ld, causing it to sometimes print messages similar to "invalid string offset 65521 >= 27261 for section `.strtab'". for object files produced by recent versions of clang. In BFD's elf_create_symbuf() function, the size of the symbol buffer ('ssymbuf') is not calculated correctly, and the initial value for the 'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1 members. Modified: stable/9/contrib/binutils/bfd/elf.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/bfd/elf.c Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/binutils/bfd/elf.c ============================================================================== --- stable/9/contrib/binutils/bfd/elf.c Mon Mar 7 07:46:17 2016 (r296436) +++ stable/9/contrib/binutils/bfd/elf.c Mon Mar 7 07:49:01 2016 (r296437) @@ -8934,14 +8934,14 @@ elf_create_symbuf (bfd_size_type symcoun shndx_count++; ssymbuf = bfd_malloc ((shndx_count + 1) * sizeof (*ssymbuf) - + (indbufend - indbuf) * sizeof (*ssymbuf)); + + (indbufend - indbuf) * sizeof (*ssym)); if (ssymbuf == NULL) { free (indbuf); return NULL; } - ssym = (struct elf_symbuf_symbol *) (ssymbuf + shndx_count); + ssym = (struct elf_symbuf_symbol *) (ssymbuf + shndx_count + 1); ssymbuf->ssym = NULL; ssymbuf->count = shndx_count; ssymbuf->st_shndx = 0; From owner-svn-src-stable-9@freebsd.org Mon Mar 7 07:57:58 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A29EDAC257D; Mon, 7 Mar 2016 07:57:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E93EB83; Mon, 7 Mar 2016 07:57:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u277vv3E026523; Mon, 7 Mar 2016 07:57:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u277vvlt026521; Mon, 7 Mar 2016 07:57:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603070757.u277vvlt026521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 7 Mar 2016 07:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296439 - in stable/9/sys: boot/common kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 07:57:58 -0000 Author: dim Date: Mon Mar 7 07:57:57 2016 New Revision: 296439 URL: https://svnweb.freebsd.org/changeset/base/296439 Log: MFC r296419 (by kib): In the link_elf_obj.c, handle sections of type SHT_AMD64_UNWIND same as SHT_PROGBITS. This is needed after the clang 3.8 import, which generates that type for .eh_frame section, which had SHT_PROGBITS type before. Reported by: Nikolai Lifanov PR: 207729 Tested by: dim (previous version) Sponsored by: The FreeBSD Foundation MFC r296428: Since kernel modules can now contain sections of type SHT_AMD64_UNWIND, the boot loader should not skip over these anymore while loading images. Otherwise the kernel can still panic when it doesn't find the .eh_frame section belonging to the .rela.eh_frame section. Unfortunately this will require installing boot loaders from sys/boot before attempting to boot with a new kernel. Reviewed by: kib Modified: stable/9/sys/boot/common/load_elf_obj.c stable/9/sys/kern/link_elf_obj.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/load_elf_obj.c ============================================================================== --- stable/9/sys/boot/common/load_elf_obj.c Mon Mar 7 07:54:48 2016 (r296438) +++ stable/9/sys/boot/common/load_elf_obj.c Mon Mar 7 07:57:57 2016 (r296439) @@ -228,6 +228,9 @@ __elfN(obj_loadimage)(struct preloaded_f switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#if defined(__i386__) || defined(__amd64__) + case SHT_AMD64_UNWIND: +#endif lastaddr = roundup(lastaddr, shdr[i].sh_addralign); shdr[i].sh_addr = (Elf_Addr)lastaddr; lastaddr += shdr[i].sh_size; Modified: stable/9/sys/kern/link_elf_obj.c ============================================================================== --- stable/9/sys/kern/link_elf_obj.c Mon Mar 7 07:54:48 2016 (r296438) +++ stable/9/sys/kern/link_elf_obj.c Mon Mar 7 07:57:57 2016 (r296439) @@ -255,6 +255,9 @@ link_elf_link_preload(linker_class_t cls switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#ifdef __amd64__ + case SHT_AMD64_UNWIND: +#endif ef->nprogtab++; break; case SHT_SYMTAB: @@ -325,9 +328,16 @@ link_elf_link_preload(linker_class_t cls switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#ifdef __amd64__ + case SHT_AMD64_UNWIND: +#endif ef->progtab[pb].addr = (void *)shdr[i].sh_addr; if (shdr[i].sh_type == SHT_PROGBITS) ef->progtab[pb].name = "<>"; +#ifdef __amd64__ + else if (shdr[i].sh_type == SHT_AMD64_UNWIND) + ef->progtab[pb].name = "<>"; +#endif else ef->progtab[pb].name = "<>"; ef->progtab[pb].size = shdr[i].sh_size; @@ -553,6 +563,9 @@ link_elf_load_file(linker_class_t cls, c switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#ifdef __amd64__ + case SHT_AMD64_UNWIND: +#endif ef->nprogtab++; break; case SHT_SYMTAB: @@ -659,6 +672,9 @@ link_elf_load_file(linker_class_t cls, c switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#ifdef __amd64__ + case SHT_AMD64_UNWIND: +#endif alignmask = shdr[i].sh_addralign - 1; mapsize += alignmask; mapsize &= ~alignmask; @@ -721,6 +737,9 @@ link_elf_load_file(linker_class_t cls, c switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#ifdef __amd64__ + case SHT_AMD64_UNWIND: +#endif alignmask = shdr[i].sh_addralign - 1; mapbase += alignmask; mapbase &= ~alignmask; @@ -729,6 +748,10 @@ link_elf_load_file(linker_class_t cls, c ef->shstrtab + shdr[i].sh_name; else if (shdr[i].sh_type == SHT_PROGBITS) ef->progtab[pb].name = "<>"; +#ifdef __amd64__ + else if (shdr[i].sh_type == SHT_AMD64_UNWIND) + ef->progtab[pb].name = "<>"; +#endif else ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && @@ -750,7 +773,11 @@ link_elf_load_file(linker_class_t cls, c } ef->progtab[pb].size = shdr[i].sh_size; ef->progtab[pb].sec = i; - if (shdr[i].sh_type == SHT_PROGBITS) { + if (shdr[i].sh_type == SHT_PROGBITS +#ifdef __amd64__ + || shdr[i].sh_type == SHT_AMD64_UNWIND +#endif + ) { error = vn_rdwr(UIO_READ, nd.ni_vp, ef->progtab[pb].addr, shdr[i].sh_size, shdr[i].sh_offset, From owner-svn-src-stable-9@freebsd.org Mon Mar 7 09:39:37 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EA05A95290; Mon, 7 Mar 2016 09:39:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3FBD784; Mon, 7 Mar 2016 09:39:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u279daBe057287; Mon, 7 Mar 2016 09:39:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u279daRS057286; Mon, 7 Mar 2016 09:39:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603070939.u279daRS057286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Mar 2016 09:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296445 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 09:39:37 -0000 Author: hselasky Date: Mon Mar 7 09:39:35 2016 New Revision: 296445 URL: https://svnweb.freebsd.org/changeset/base/296445 Log: MFC r295923: Be more verbose when truncating number of HID items. Suggested by: Larry Rosenman Modified: stable/9/sys/dev/usb/usb_hid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_hid.c ============================================================================== --- stable/9/sys/dev/usb/usb_hid.c Mon Mar 7 09:37:07 2016 (r296444) +++ stable/9/sys/dev/usb/usb_hid.c Mon Mar 7 09:39:35 2016 (r296445) @@ -353,7 +353,8 @@ hid_get_item(struct hid_data *s, struct /* range check usage count */ if (c->loc.count > 255) { DPRINTFN(0, "Number of " - "items truncated to 255\n"); + "items(%u) truncated to 255\n", + (unsigned)(c->loc.count)); s->ncount = 255; } else s->ncount = c->loc.count; From owner-svn-src-stable-9@freebsd.org Mon Mar 7 10:02:32 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91E72AC202E; Mon, 7 Mar 2016 10:02:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D78EA88; Mon, 7 Mar 2016 10:02:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27A2VYX066290; Mon, 7 Mar 2016 10:02:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27A2VW0066288; Mon, 7 Mar 2016 10:02:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603071002.u27A2VW0066288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Mar 2016 10:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296447 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 10:02:32 -0000 Author: hselasky Date: Mon Mar 7 10:02:31 2016 New Revision: 296447 URL: https://svnweb.freebsd.org/changeset/base/296447 Log: MFC r295928: Configure the correct bMaxPacketSize for control endpoints before requesting the initial complete device descriptor and not as part of the subsequent babble error recovery. Babble means that the received USB packet was bigger than than configured maximum packet size. This only affects enumeration of FULL speed USB devices which use a bMaxPacketSize different from 8 bytes. This patch might help fix enumeration of USB devices which exhibit USB I/O errors in dmesg during boot. Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Mon Mar 7 09:42:16 2016 (r296446) +++ stable/9/sys/dev/usb/controller/xhci.c Mon Mar 7 10:02:31 2016 (r296447) @@ -140,8 +140,8 @@ static struct xhci_endpoint_ext *xhci_ge static usb_proc_callback_t xhci_configure_msg; static usb_error_t xhci_configure_device(struct usb_device *); static usb_error_t xhci_configure_endpoint(struct usb_device *, - struct usb_endpoint_descriptor *, uint64_t, uint16_t, - uint8_t, uint8_t, uint8_t, uint16_t, uint16_t); + struct usb_endpoint_descriptor *, struct xhci_endpoint_ext *, + uint16_t, uint8_t, uint8_t, uint8_t, uint16_t, uint16_t); static usb_error_t xhci_configure_mask(struct usb_device *, uint32_t, uint8_t); static usb_error_t xhci_cmd_evaluate_ctx(struct xhci_softc *, @@ -1405,7 +1405,7 @@ xhci_set_address(struct usb_device *udev USB_BUS_UNLOCK(udev->bus); err = xhci_configure_endpoint(udev, - &udev->ctrl_ep_desc, pepext->physaddr, + &udev->ctrl_ep_desc, pepext, 0, 1, 1, 0, mps, mps); if (err != 0) { @@ -2301,13 +2301,15 @@ xhci_configure_mask(struct usb_device *u static usb_error_t xhci_configure_endpoint(struct usb_device *udev, - struct usb_endpoint_descriptor *edesc, uint64_t ring_addr, - uint16_t interval, uint8_t max_packet_count, uint8_t mult, - uint8_t fps_shift, uint16_t max_packet_size, uint16_t max_frame_size) + struct usb_endpoint_descriptor *edesc, struct xhci_endpoint_ext *pepext, + uint16_t interval, uint8_t max_packet_count, + uint8_t mult, uint8_t fps_shift, uint16_t max_packet_size, + uint16_t max_frame_size) { struct usb_page_search buf_inp; struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); struct xhci_input_dev_ctx *pinp; + uint64_t ring_addr = pepext->physaddr; uint32_t temp; uint8_t index; uint8_t epno; @@ -2338,6 +2340,10 @@ xhci_configure_endpoint(struct usb_devic if (mult == 0) return (USB_ERR_BAD_BUFSIZE); + /* store bMaxPacketSize for control endpoints */ + pepext->trb_ep_maxp = edesc->wMaxPacketSize[0]; + usb_pc_cpu_flush(pepext->page_cache); + temp = XHCI_EPCTX_0_EPSTATE_SET(0) | XHCI_EPCTX_0_MAXP_STREAMS_SET(0) | XHCI_EPCTX_0_LSA_SET(0); @@ -2457,7 +2463,7 @@ xhci_configure_endpoint_by_xfer(struct u usb_pc_cpu_flush(pepext->page_cache); return (xhci_configure_endpoint(xfer->xroot->udev, - xfer->endpoint->edesc, pepext->physaddr, + xfer->endpoint->edesc, pepext, xfer->interval, xfer->max_packet_count, (ecomp != NULL) ? (ecomp->bmAttributes & 3) + 1 : 1, usbd_xfer_get_fps_shift(xfer), xfer->max_packet_size, @@ -2849,6 +2855,17 @@ xhci_transfer_insert(struct usb_xfer *xf return (USB_ERR_NOMEM); } + /* check if bMaxPacketSize changed */ + if (xfer->flags_int.control_xfr != 0 && + pepext->trb_ep_maxp != xfer->endpoint->edesc->wMaxPacketSize[0]) { + + DPRINTFN(8, "Reconfigure control endpoint\n"); + + /* force driver to reconfigure endpoint */ + pepext->trb_halted = 1; + pepext->trb_running = 0; + } + /* check for stopped condition, after putting transfer on interrupt queue */ if (pepext->trb_running == 0) { struct xhci_softc *sc = XHCI_BUS2SC(xfer->xroot->bus); Modified: stable/9/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.h Mon Mar 7 09:42:16 2016 (r296446) +++ stable/9/sys/dev/usb/controller/xhci.h Mon Mar 7 10:02:31 2016 (r296447) @@ -373,6 +373,7 @@ struct xhci_endpoint_ext { uint8_t trb_index; uint8_t trb_halted; uint8_t trb_running; + uint8_t trb_ep_maxp; }; enum { From owner-svn-src-stable-9@freebsd.org Mon Mar 7 15:21:01 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E49D5AC1CEB; Mon, 7 Mar 2016 15:21:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C044BD9; Mon, 7 Mar 2016 15:21:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27FL0xI062794; Mon, 7 Mar 2016 15:21:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27FL0p2062786; Mon, 7 Mar 2016 15:21:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603071521.u27FL0p2062786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 7 Mar 2016 15:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296456 - in stable/9/contrib/gcc: . doc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 15:21:02 -0000 Author: pfg Date: Mon Mar 7 15:20:59 2016 New Revision: 296456 URL: https://svnweb.freebsd.org/changeset/base/296456 Log: Revert r286714: Add a new option "-fstack-protector-strong". The stack-protector-strong option was causing problems when building perl5. This was never within the official featureset of the older GCC 4.x toolchain so just drop it to avoid patching the perl port. PR: 205307 Modified: stable/9/contrib/gcc/c-cppbuiltin.c stable/9/contrib/gcc/cfgexpand.c stable/9/contrib/gcc/common.opt stable/9/contrib/gcc/doc/cpp.texi stable/9/contrib/gcc/doc/gcc.1 stable/9/contrib/gcc/doc/invoke.texi stable/9/contrib/gcc/gcc.c Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/c-cppbuiltin.c ============================================================================== --- stable/9/contrib/gcc/c-cppbuiltin.c Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/c-cppbuiltin.c Mon Mar 7 15:20:59 2016 (r296456) @@ -545,9 +545,7 @@ c_cpp_builtins (cpp_reader *pfile) /* Make the choice of the stack protector runtime visible to source code. The macro names and values here were chosen for compatibility with an earlier implementation, i.e. ProPolice. */ - if (flag_stack_protect == 3) - cpp_define (pfile, "__SSP_STRONG__=3"); - else if (flag_stack_protect == 2) + if (flag_stack_protect == 2) cpp_define (pfile, "__SSP_ALL__=2"); else if (flag_stack_protect == 1) cpp_define (pfile, "__SSP__=1"); Modified: stable/9/contrib/gcc/cfgexpand.c ============================================================================== --- stable/9/contrib/gcc/cfgexpand.c Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/cfgexpand.c Mon Mar 7 15:20:59 2016 (r296456) @@ -810,12 +810,6 @@ clear_tree_used (tree block) clear_tree_used (t); } -enum { - SPCT_FLAG_DEFAULT = 1, - SPCT_FLAG_ALL = 2, - SPCT_FLAG_STRONG = 3 -}; - /* Examine TYPE and determine a bit mask of the following features. */ #define SPCT_HAS_LARGE_CHAR_ARRAY 1 @@ -885,8 +879,7 @@ stack_protect_decl_phase (tree decl) if (bits & SPCT_HAS_SMALL_CHAR_ARRAY) has_short_buffer = true; - if (flag_stack_protect == SPCT_FLAG_ALL - || flag_stack_protect == SPCT_FLAG_STRONG) + if (flag_stack_protect == 2) { if ((bits & (SPCT_HAS_SMALL_CHAR_ARRAY | SPCT_HAS_LARGE_CHAR_ARRAY)) && !(bits & SPCT_HAS_AGGREGATE)) @@ -954,36 +947,12 @@ create_stack_guard (void) cfun->stack_protect_guard = guard; } -/* Helper routine to check if a record or union contains an array field. */ - -static int -record_or_union_type_has_array_p (tree tree_type) -{ - tree fields = TYPE_FIELDS (tree_type); - tree f; - - for (f = fields; f; f = TREE_CHAIN (f)) - if (TREE_CODE (f) == FIELD_DECL) - { - tree field_type = TREE_TYPE (f); - if ((TREE_CODE (field_type) == RECORD_TYPE - || TREE_CODE (field_type) == UNION_TYPE - || TREE_CODE (field_type) == QUAL_UNION_TYPE) - && record_or_union_type_has_array_p (field_type)) - return 1; - if (TREE_CODE (field_type) == ARRAY_TYPE) - return 1; - } - return 0; -} - /* Expand all variables used in the function. */ static void expand_used_vars (void) { tree t, outer_block = DECL_INITIAL (current_function_decl); - bool gen_stack_protect_signal = false; /* Compute the phase of the stack frame for this function. */ { @@ -1003,29 +972,6 @@ expand_used_vars (void) has_protected_decls = false; has_short_buffer = false; - if (flag_stack_protect == SPCT_FLAG_STRONG) - for (t = cfun->unexpanded_var_list; t; t = TREE_CHAIN (t)) - { - tree var = TREE_VALUE (t); - if (!is_global_var (var)) - { - tree var_type = TREE_TYPE (var); - /* Examine local referenced variables that have their addresses - * taken, contain an array, or are arrays. */ - if (TREE_CODE (var) == VAR_DECL - && (TREE_CODE (var_type) == ARRAY_TYPE - || TREE_ADDRESSABLE (var) - || ((TREE_CODE (var_type) == RECORD_TYPE - || TREE_CODE (var_type) == UNION_TYPE - || TREE_CODE (var_type) == QUAL_UNION_TYPE) - && record_or_union_type_has_array_p (var_type)))) - { - gen_stack_protect_signal = true; - break; - } - } - } - /* At this point all variables on the unexpanded_var_list with TREE_USED set are not associated with any block scope. Lay them out. */ for (t = cfun->unexpanded_var_list; t; t = TREE_CHAIN (t)) @@ -1086,26 +1032,12 @@ expand_used_vars (void) dump_stack_var_partition (); } - switch (flag_stack_protect) - { - case SPCT_FLAG_ALL: - create_stack_guard (); - break; - - case SPCT_FLAG_STRONG: - if (gen_stack_protect_signal - || current_function_calls_alloca || has_protected_decls) - create_stack_guard (); - break; - - case SPCT_FLAG_DEFAULT: - if (current_function_calls_alloca || has_protected_decls) - create_stack_guard(); - break; - - default: - ; - } + /* There are several conditions under which we should create a + stack guard: protect-all, alloca used, protected decls present. */ + if (flag_stack_protect == 2 + || (flag_stack_protect + && (current_function_calls_alloca || has_protected_decls))) + create_stack_guard (); /* Assign rtl to each variable based on these partitions. */ if (stack_vars_num > 0) Modified: stable/9/contrib/gcc/common.opt ============================================================================== --- stable/9/contrib/gcc/common.opt Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/common.opt Mon Mar 7 15:20:59 2016 (r296456) @@ -878,10 +878,6 @@ fstack-protector-all Common Report RejectNegative Var(flag_stack_protect, 2) VarExists Use a stack protection method for every function -fstack-protector-strong -Common Report RejectNegative Var(flag_stack_protect, 3) -Use a smart stack protection method for certain functions - fstrength-reduce Common Does nothing. Preserved for backward compatibility. Modified: stable/9/contrib/gcc/doc/cpp.texi ============================================================================== --- stable/9/contrib/gcc/doc/cpp.texi Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/doc/cpp.texi Mon Mar 7 15:20:59 2016 (r296456) @@ -2134,10 +2134,6 @@ use. This macro is defined, with value 2, when @option{-fstack-protector-all} is in use. -@item __SSP_STRONG__ -This macro is defined, with value 3, when @option{-fstack-protector-strong} is -in use. - @item __TIMESTAMP__ This macro expands to a string constant that describes the date and time of the last modification of the current source file. The string constant Modified: stable/9/contrib/gcc/doc/gcc.1 ============================================================================== --- stable/9/contrib/gcc/doc/gcc.1 Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/doc/gcc.1 Mon Mar 7 15:20:59 2016 (r296456) @@ -339,7 +339,7 @@ in the following sections. \&\fB\-fsched2\-use\-superblocks \&\-fsched2\-use\-traces \-fsee \-freschedule\-modulo\-scheduled\-loops \&\-fsection\-anchors \-fsignaling\-nans \-fsingle\-precision\-constant -\&\-fstack\-protector \-fstack\-protector\-all \-fstack\-protector\-strong +\&\-fstack\-protector \-fstack\-protector\-all \&\-fstrict\-aliasing \-fstrict\-overflow \-ftracer \-fthread\-jumps \&\-funroll\-all\-loops \-funroll\-loops \-fpeel\-loops \&\-fsplit\-ivs\-in\-unroller \-funswitch\-loops @@ -5193,11 +5193,6 @@ If a guard check fails, an error message .IP "\fB\-fstack\-protector\-all\fR" 4 .IX Item "-fstack-protector-all" Like \fB\-fstack\-protector\fR except that all functions are protected. -.IP "\fB\-fstack\-protector\-strong\fR" 4 -.IX Item "-fstack-protector-strong" -Like \fB\-fstack\-protector\fR but includes additional functions to -be protected \-\-\- those that have local array definitions, or have -references to local frame addresses. .IP "\fB\-fsection\-anchors\fR" 4 .IX Item "-fsection-anchors" Try to reduce the number of symbolic address calculations by using Modified: stable/9/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/9/contrib/gcc/doc/invoke.texi Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/doc/invoke.texi Mon Mar 7 15:20:59 2016 (r296456) @@ -325,7 +325,7 @@ in the following sections. -fsched2-use-superblocks @gol -fsched2-use-traces -fsee -freschedule-modulo-scheduled-loops @gol -fsection-anchors -fsignaling-nans -fsingle-precision-constant @gol --fstack-protector -fstack-protector-all -fstack-protector-strong @gol +-fstack-protector -fstack-protector-all @gol -fstrict-aliasing -fstrict-overflow -ftracer -fthread-jumps @gol -funroll-all-loops -funroll-loops -fpeel-loops @gol -fsplit-ivs-in-unroller -funswitch-loops @gol @@ -5786,11 +5786,6 @@ If a guard check fails, an error message @item -fstack-protector-all Like @option{-fstack-protector} except that all functions are protected. -@item -fstack-protector-strong -Like @option{-fstack-protector} but includes additional functions to -be protected --- those that have local array definitions, or have -references to local frame addresses. - @item -fsection-anchors @opindex fsection-anchors Try to reduce the number of symbolic address calculations by using Modified: stable/9/contrib/gcc/gcc.c ============================================================================== --- stable/9/contrib/gcc/gcc.c Mon Mar 7 15:00:34 2016 (r296455) +++ stable/9/contrib/gcc/gcc.c Mon Mar 7 15:20:59 2016 (r296456) @@ -680,7 +680,7 @@ proper position among the other output f #ifdef TARGET_LIBC_PROVIDES_SSP #define LINK_SSP_SPEC "%{fstack-protector:}" #else -#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-strong|fstack-protector-all:-lssp_nonshared -lssp}" +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}" #endif #endif From owner-svn-src-stable-9@freebsd.org Mon Mar 7 16:13:56 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 061A2AC3AC7; Mon, 7 Mar 2016 16:13:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC4F532C; Mon, 7 Mar 2016 16:13:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27GDs3I079704; Mon, 7 Mar 2016 16:13:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27GDseu079703; Mon, 7 Mar 2016 16:13:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603071613.u27GDseu079703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 7 Mar 2016 16:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296461 - stable/9/usr.sbin/cron/cron X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 16:13:56 -0000 Author: pfg Date: Mon Mar 7 16:13:54 2016 New Revision: 296461 URL: https://svnweb.freebsd.org/changeset/base/296461 Log: MFC r295671: cron: use (char *)NULL instead of (char *)0 in execle. Obtained from: OpenBSD (CVS Rev 1.25) Modified: stable/9/usr.sbin/cron/cron/do_command.c Modified: stable/9/usr.sbin/cron/cron/do_command.c ============================================================================== --- stable/9/usr.sbin/cron/cron/do_command.c Mon Mar 7 16:12:04 2016 (r296460) +++ stable/9/usr.sbin/cron/cron/do_command.c Mon Mar 7 16:13:54 2016 (r296461) @@ -337,8 +337,9 @@ child_process(e, u) _exit(OK_EXIT); } # endif /*DEBUGGING*/ - execle(shell, shell, "-c", e->cmd, (char *)0, e->envp); - warn("execl: couldn't exec `%s'", shell); + execle(shell, shell, "-c", e->cmd, (char *)NULL, + e->envp); + warn("execle: couldn't exec `%s'", shell); _exit(ERROR_EXIT); } break; From owner-svn-src-stable-9@freebsd.org Mon Mar 7 16:18:08 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E88BCAC3CC8; Mon, 7 Mar 2016 16:18:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 875BB849; Mon, 7 Mar 2016 16:18:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27GI7fJ079906; Mon, 7 Mar 2016 16:18:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27GI736079901; Mon, 7 Mar 2016 16:18:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201603071618.u27GI736079901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 7 Mar 2016 16:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296462 - in stable/9: crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/doc/apps crypto/openssl/ssl secure/usr.bin/openssl/man X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 16:18:09 -0000 Author: delphij Date: Mon Mar 7 16:18:07 2016 New Revision: 296462 URL: https://svnweb.freebsd.org/changeset/base/296462 Log: Fix multiple OpenSSL vulnerabilities as published in OpenSSL advisory on 2016/03/01: constant-time MOD_EXP_CTIME_COPY_FROM_PREBUF. [CVE-2016-0702, upstream d6482a8. 5ea08bd, d6d422e, 8fc8f48 317be63 skipped intentionally as we are not using the code on FreeBSD. Backport done by jkim@. Fix memory issues in BIO_*printf functions. [CVE-2016-0799, upstream d889682, a801bf2]. Fix BN_hex2bn/BN_dec2bn NULL ptr/heap corruption. [CVE-2016-0797, upstream 8f65132]. Disable SSLv2 in default negotiation and weak ciphers. [CVE-2016-0800 "DROWN", upstream 56f1acf5]. Note that support of SSLv2 is not removed in order to preserve ABI compatibility, and application may still explicitly ask for vulnerable protocol or ciphers. In collaboration with: jkim Modified: stable/9/crypto/openssl/crypto/bio/b_print.c stable/9/crypto/openssl/crypto/bn/bn.h stable/9/crypto/openssl/crypto/bn/bn_exp.c stable/9/crypto/openssl/crypto/bn/bn_print.c stable/9/crypto/openssl/doc/apps/ciphers.pod stable/9/crypto/openssl/ssl/s2_lib.c stable/9/crypto/openssl/ssl/ssl_lib.c stable/9/secure/usr.bin/openssl/man/ciphers.1 Modified: stable/9/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- stable/9/crypto/openssl/crypto/bio/b_print.c Mon Mar 7 16:13:54 2016 (r296461) +++ stable/9/crypto/openssl/crypto/bio/b_print.c Mon Mar 7 16:18:07 2016 (r296462) @@ -122,20 +122,20 @@ # define LLONG long long # endif #else -# define LLONG long -#endif - -static void fmtstr(char **, char **, size_t *, size_t *, - const char *, int, int, int); -static void fmtint(char **, char **, size_t *, size_t *, - LLONG, int, int, int, int); -static void fmtfp(char **, char **, size_t *, size_t *, - LDOUBLE, int, int, int); -static void doapr_outch(char **, char **, size_t *, size_t *, int); -static void _dopr(char **sbuffer, char **buffer, - size_t *maxlen, size_t *retlen, int *truncated, - const char *format, va_list args); - +# define LLONG long +#endif + +static int fmtstr(char **, char **, size_t *, size_t *, + const char *, int, int, int); +static int fmtint(char **, char **, size_t *, size_t *, + LLONG, int, int, int, int); +static int fmtfp(char **, char **, size_t *, size_t *, + LDOUBLE, int, int, int); +static int doapr_outch(char **, char **, size_t *, size_t *, int); +static int _dopr(char **sbuffer, char **buffer, + size_t *maxlen, size_t *retlen, int *truncated, + const char *format, va_list args); + /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 @@ -162,13 +162,13 @@ static void _dopr(char **sbuffer, char * #define DP_C_LLONG 4 /* some handy macros */ -#define char_to_int(p) (p - '0') -#define OSSL_MAX(p,q) ((p >= q) ? p : q) - -static void -_dopr(char **sbuffer, - char **buffer, - size_t *maxlen, +#define char_to_int(p) (p - '0') +#define OSSL_MAX(p,q) ((p >= q) ? p : q) + +static int +_dopr(char **sbuffer, + char **buffer, + size_t *maxlen, size_t *retlen, int *truncated, const char *format, va_list args) { char ch; @@ -193,13 +193,14 @@ _dopr(char **sbuffer, switch (state) { case DP_S_DEFAULT: - if (ch == '%') - state = DP_S_FLAGS; - else - doapr_outch(sbuffer, buffer, &currlen, maxlen, ch); - ch = *format++; - break; - case DP_S_FLAGS: + if (ch == '%') + state = DP_S_FLAGS; + else + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch)) + return 0; + ch = *format++; + break; + case DP_S_FLAGS: switch (ch) { case '-': flags |= DP_F_MINUS; @@ -299,14 +300,15 @@ _dopr(char **sbuffer, value = va_arg(args, LLONG); break; default: - value = va_arg(args, int); - break; - } - fmtint(sbuffer, buffer, &currlen, maxlen, - value, 10, min, max, flags); - break; - case 'X': - flags |= DP_F_UP; + value = va_arg(args, int); + break; + } + if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, 10, min, + max, flags)) + return 0; + break; + case 'X': + flags |= DP_F_UP; /* FALLTHROUGH */ case 'x': case 'o': @@ -323,23 +325,25 @@ _dopr(char **sbuffer, value = va_arg(args, unsigned LLONG); break; default: - value = (LLONG) va_arg(args, unsigned int); - break; - } - fmtint(sbuffer, buffer, &currlen, maxlen, value, - ch == 'o' ? 8 : (ch == 'u' ? 10 : 16), - min, max, flags); - break; - case 'f': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg(args, LDOUBLE); - else - fvalue = va_arg(args, double); - fmtfp(sbuffer, buffer, &currlen, maxlen, - fvalue, min, max, flags); - break; - case 'E': - flags |= DP_F_UP; + value = (LLONG) va_arg(args, unsigned int); + break; + } + if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, + ch == 'o' ? 8 : (ch == 'u' ? 10 : 16), + min, max, flags)) + return 0; + break; + case 'f': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg(args, LDOUBLE); + else + fvalue = va_arg(args, double); + if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max, + flags)) + return 0; + break; + case 'E': + flags |= DP_F_UP; case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, LDOUBLE); @@ -352,30 +356,33 @@ _dopr(char **sbuffer, if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, LDOUBLE); else - fvalue = va_arg(args, double); - break; - case 'c': - doapr_outch(sbuffer, buffer, &currlen, maxlen, - va_arg(args, int)); - break; - case 's': - strvalue = va_arg(args, char *); + fvalue = va_arg(args, double); + break; + case 'c': + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, + va_arg(args, int))) + return 0; + break; + case 's': + strvalue = va_arg(args, char *); if (max < 0) { if (buffer) max = INT_MAX; - else - max = *maxlen; - } - fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue, - flags, min, max); - break; - case 'p': - value = (long)va_arg(args, void *); - fmtint(sbuffer, buffer, &currlen, maxlen, - value, 16, min, max, flags | DP_F_NUM); - break; - case 'n': /* XXX */ - if (cflags == DP_C_SHORT) { + else + max = *maxlen; + } + if (!fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue, + flags, min, max)) + return 0; + break; + case 'p': + value = (long)va_arg(args, void *); + if (!fmtint(sbuffer, buffer, &currlen, maxlen, + value, 16, min, max, flags | DP_F_NUM)) + return 0; + break; + case 'n': /* XXX */ + if (cflags == DP_C_SHORT) { short int *num; num = va_arg(args, short int *); *num = currlen; @@ -391,13 +398,14 @@ _dopr(char **sbuffer, int *num; num = va_arg(args, int *); *num = currlen; - } - break; - case '%': - doapr_outch(sbuffer, buffer, &currlen, maxlen, ch); - break; - case 'w': - /* not supported yet, treat as next char */ + } + break; + case '%': + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch)) + return 0; + break; + case 'w': + /* not supported yet, treat as next char */ ch = *format++; break; default: @@ -415,52 +423,62 @@ _dopr(char **sbuffer, break; } } - *truncated = (currlen > *maxlen - 1); - if (*truncated) - currlen = *maxlen - 1; - doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'); - *retlen = currlen - 1; - return; -} - -static void -fmtstr(char **sbuffer, - char **buffer, - size_t *currlen, - size_t *maxlen, const char *value, int flags, int min, int max) -{ - int padlen, strln; - int cnt = 0; - - if (value == 0) - value = ""; - for (strln = 0; value[strln]; ++strln) ; - padlen = min - strln; - if (padlen < 0) - padlen = 0; - if (flags & DP_F_MINUS) - padlen = -padlen; - - while ((padlen > 0) && (cnt < max)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - --padlen; - ++cnt; - } - while (*value && (cnt < max)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, *value++); - ++cnt; - } - while ((padlen < 0) && (cnt < max)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - ++padlen; - ++cnt; - } -} - -static void -fmtint(char **sbuffer, - char **buffer, - size_t *currlen, + *truncated = (currlen > *maxlen - 1); + if (*truncated) + currlen = *maxlen - 1; + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0')) + return 0; + *retlen = currlen - 1; + return 1; +} + +static int +fmtstr(char **sbuffer, + char **buffer, + size_t *currlen, + size_t *maxlen, const char *value, int flags, int min, int max) +{ + int padlen; + size_t strln; + int cnt = 0; + + if (value == 0) + value = ""; + + strln = strlen(value); + if (strln > INT_MAX) + strln = INT_MAX; + + padlen = min - strln; + if (min < 0 || padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; + + while ((padlen > 0) && (cnt < max)) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + --padlen; + ++cnt; + } + while (*value && (cnt < max)) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *value++)) + return 0; + ++cnt; + } + while ((padlen < 0) && (cnt < max)) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + ++padlen; + ++cnt; + } + return 1; +} + +static int +fmtint(char **sbuffer, + char **buffer, + size_t *currlen, size_t *maxlen, LLONG value, int base, int min, int max, int flags) { int signvalue = 0; @@ -514,43 +532,50 @@ fmtint(char **sbuffer, } if (flags & DP_F_MINUS) spadlen = -spadlen; - - /* spaces */ - while (spadlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - --spadlen; - } - - /* sign */ - if (signvalue) - doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); - - /* prefix */ - while (*prefix) { - doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix); - prefix++; - } - - /* zeros */ - if (zpadlen > 0) { - while (zpadlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); - --zpadlen; - } - } - /* digits */ - while (place > 0) - doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place]); - - /* left justified spaces */ - while (spadlen < 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - ++spadlen; - } - return; -} - -static LDOUBLE abs_val(LDOUBLE value) + + /* spaces */ + while (spadlen > 0) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + --spadlen; + } + + /* sign */ + if (signvalue) + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue)) + return 0; + + /* prefix */ + while (*prefix) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix)) + return 0; + prefix++; + } + + /* zeros */ + if (zpadlen > 0) { + while (zpadlen > 0) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, '0')) + return 0; + --zpadlen; + } + } + /* digits */ + while (place > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place])) + return 0; + } + + /* left justified spaces */ + while (spadlen < 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + ++spadlen; + } + return 1; +} + +static LDOUBLE abs_val(LDOUBLE value) { LDOUBLE result = value; if (value < 0) @@ -575,13 +600,13 @@ static long roundv(LDOUBLE value) value = value - intpart; if (value >= 0.5) intpart++; - return intpart; -} - -static void -fmtfp(char **sbuffer, - char **buffer, - size_t *currlen, + return intpart; +} + +static int +fmtfp(char **sbuffer, + char **buffer, + size_t *currlen, size_t *maxlen, LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; @@ -657,87 +682,107 @@ fmtfp(char **sbuffer, padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; - - if ((flags & DP_F_ZERO) && (padlen > 0)) { - if (signvalue) { - doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); - --padlen; - signvalue = 0; - } - while (padlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); - --padlen; - } - } - while (padlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - --padlen; - } - if (signvalue) - doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); - - while (iplace > 0) - doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace]); - - /* - * Decimal point. This should probably use locale to find the correct - * char to print out. - */ - if (max > 0 || (flags & DP_F_NUM)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '.'); - - while (fplace > 0) - doapr_outch(sbuffer, buffer, currlen, maxlen, fconvert[--fplace]); - } - while (zpadlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); - --zpadlen; - } - - while (padlen < 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - ++padlen; - } -} - -static void -doapr_outch(char **sbuffer, - char **buffer, size_t *currlen, size_t *maxlen, int c) -{ - /* If we haven't at least one buffer, someone has doe a big booboo */ - assert(*sbuffer != NULL || buffer != NULL); - - if (buffer) { - while (*currlen >= *maxlen) { - if (*buffer == NULL) { - if (*maxlen == 0) - *maxlen = 1024; - *buffer = OPENSSL_malloc(*maxlen); - if (*currlen > 0) { - assert(*sbuffer != NULL); - memcpy(*buffer, *sbuffer, *currlen); - } - *sbuffer = NULL; - } else { - *maxlen += 1024; - *buffer = OPENSSL_realloc(*buffer, *maxlen); - } - } - /* What to do if *buffer is NULL? */ - assert(*sbuffer != NULL || *buffer != NULL); - } - - if (*currlen < *maxlen) { - if (*sbuffer) + + if ((flags & DP_F_ZERO) && (padlen > 0)) { + if (signvalue) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue)) + return 0; + --padlen; + signvalue = 0; + } + while (padlen > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0')) + return 0; + --padlen; + } + } + while (padlen > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + --padlen; + } + if (signvalue && !doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue)) + return 0; + + while (iplace > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace])) + return 0; + } + + /* + * Decimal point. This should probably use locale to find the correct + * char to print out. + */ + if (max > 0 || (flags & DP_F_NUM)) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '.')) + return 0; + + while (fplace > 0) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, + fconvert[--fplace])) + return 0; + } + } + while (zpadlen > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0')) + return 0; + --zpadlen; + } + + while (padlen < 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + ++padlen; + } + return 1; +} + +#define BUFFER_INC 1024 + +static int +doapr_outch(char **sbuffer, + char **buffer, size_t *currlen, size_t *maxlen, int c) +{ + /* If we haven't at least one buffer, someone has doe a big booboo */ + assert(*sbuffer != NULL || buffer != NULL); + + /* |currlen| must always be <= |*maxlen| */ + assert(*currlen <= *maxlen); + + if (buffer && *currlen == *maxlen) { + if (*maxlen > INT_MAX - BUFFER_INC) + return 0; + + *maxlen += BUFFER_INC; + if (*buffer == NULL) { + *buffer = OPENSSL_malloc(*maxlen); + if (*buffer == NULL) + return 0; + if (*currlen > 0) { + assert(*sbuffer != NULL); + memcpy(*buffer, *sbuffer, *currlen); + } + *sbuffer = NULL; + } else { + char *tmpbuf; + tmpbuf = OPENSSL_realloc(*buffer, *maxlen); + if (tmpbuf == NULL) + return 0; + *buffer = tmpbuf; + } + } + + if (*currlen < *maxlen) { + if (*sbuffer) (*sbuffer)[(*currlen)++] = (char)c; else - (*buffer)[(*currlen)++] = (char)c; - } - - return; -} - -/***************************************************************************/ + (*buffer)[(*currlen)++] = (char)c; + } + + return 1; +} + +/***************************************************************************/ int BIO_printf(BIO *bio, const char *format, ...) { @@ -763,13 +808,17 @@ int BIO_vprintf(BIO *bio, const char *fo size_t hugebufsize = sizeof(hugebuf); char *dynbuf = NULL; int ignored; - - dynbuf = NULL; - CRYPTO_push_info("doapr()"); - _dopr(&hugebufp, &dynbuf, &hugebufsize, &retlen, &ignored, format, args); - if (dynbuf) { - ret = BIO_write(bio, dynbuf, (int)retlen); - OPENSSL_free(dynbuf); + + dynbuf = NULL; + CRYPTO_push_info("doapr()"); + if (!_dopr(&hugebufp, &dynbuf, &hugebufsize, &retlen, &ignored, format, + args)) { + OPENSSL_free(dynbuf); + return -1; + } + if (dynbuf) { + ret = BIO_write(bio, dynbuf, (int)retlen); + OPENSSL_free(dynbuf); } else { ret = BIO_write(bio, hugebuf, (int)retlen); } @@ -798,13 +847,14 @@ int BIO_snprintf(char *buf, size_t n, co int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) { - size_t retlen; - int truncated; - - _dopr(&buf, NULL, &n, &retlen, &truncated, format, args); - - if (truncated) - /* + size_t retlen; + int truncated; + + if(!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args)) + return -1; + + if (truncated) + /* * In case of truncation, return -1 like traditional snprintf. * (Current drafts for ISO/IEC 9899 say snprintf should return the * number of characters that would have been written, had the buffer Modified: stable/9/crypto/openssl/crypto/bn/bn.h ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn.h Mon Mar 7 16:13:54 2016 (r296461) +++ stable/9/crypto/openssl/crypto/bn/bn.h Mon Mar 7 16:18:07 2016 (r296462) @@ -69,12 +69,13 @@ * */ -#ifndef HEADER_BN_H -# define HEADER_BN_H - -# include -# ifndef OPENSSL_NO_FP_API -# include /* FILE */ +#ifndef HEADER_BN_H +# define HEADER_BN_H + +# include +# include +# ifndef OPENSSL_NO_FP_API +# include /* FILE */ # endif # include @@ -701,14 +702,23 @@ const BIGNUM *BN_get0_nist_prime_224(voi const BIGNUM *BN_get0_nist_prime_256(void); const BIGNUM *BN_get0_nist_prime_384(void); const BIGNUM *BN_get0_nist_prime_521(void); - -/* library internal functions */ - -# define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ - (a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2)) -# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) -BIGNUM *bn_expand2(BIGNUM *a, int words); -# ifndef OPENSSL_NO_DEPRECATED + +/* library internal functions */ + +# define bn_expand(a,bits) \ + ( \ + bits > (INT_MAX - BN_BITS2 + 1) ? \ + NULL \ + : \ + (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) ? \ + (a) \ + : \ + bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2) \ + ) + +# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) +BIGNUM *bn_expand2(BIGNUM *a, int words); +# ifndef OPENSSL_NO_DEPRECATED BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */ # endif Modified: stable/9/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_exp.c Mon Mar 7 16:13:54 2016 (r296461) +++ stable/9/crypto/openssl/crypto/bn/bn_exp.c Mon Mar 7 16:18:07 2016 (r296462) @@ -107,12 +107,13 @@ * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * - */ - -#include "cryptlib.h" -#include "bn_lcl.h" - -/* maximum precomputation table size for *variable* sliding windows */ + */ + +#include "cryptlib.h" +#include "constant_time_locl.h" +#include "bn_lcl.h" + +/* maximum precomputation table size for *variable* sliding windows */ #define TABLE_SIZE 32 /* this one works - simple but works */ @@ -520,41 +521,79 @@ int BN_mod_exp_mont(BIGNUM *rr, const BI * pattern as far as cache lines are concerned. The following functions are * used to transfer a BIGNUM from/to that table. */ - -static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int top, - unsigned char *buf, int idx, - int width) -{ - size_t i, j; - - if (bn_wexpand(b, top) == NULL) - return 0; + +static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int top, + unsigned char *buf, int idx, + int window) +{ + int i, j; + int width = 1 << window; + BN_ULONG *table = (BN_ULONG *)buf; + + if (bn_wexpand(b, top) == NULL) + return 0; while (b->top < top) { - b->d[b->top++] = 0; - } - - for (i = 0, j = idx; i < top * sizeof b->d[0]; i++, j += width) { - buf[j] = ((unsigned char *)b->d)[i]; - } - - bn_correct_top(b); + b->d[b->top++] = 0; + } + + for (i = 0, j = idx; i < top; i++, j += width) { + table[j] = b->d[i]; + } + + bn_correct_top(b); return 1; } - -static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, - unsigned char *buf, int idx, - int width) -{ - size_t i, j; - - if (bn_wexpand(b, top) == NULL) - return 0; - - for (i = 0, j = idx; i < top * sizeof b->d[0]; i++, j += width) { - ((unsigned char *)b->d)[i] = buf[j]; - } - - b->top = top; + +static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, + unsigned char *buf, int idx, + int window) +{ + int i, j; + int width = 1 << window; + volatile BN_ULONG *table = (volatile BN_ULONG *)buf; + + if (bn_wexpand(b, top) == NULL) + return 0; + + if (window <= 3) { + for (i = 0; i < top; i++, table += width) { + BN_ULONG acc = 0; + + for (j = 0; j < width; j++) { + acc |= table[j] & + ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); + } + + b->d[i] = acc; + } + } else { + int xstride = 1 << (window - 2); + BN_ULONG y0, y1, y2, y3; + + i = idx >> (window - 2); /* equivalent of idx / xstride */ + idx &= xstride - 1; /* equivalent of idx % xstride */ + + y0 = (BN_ULONG)0 - (constant_time_eq_int(i,0)&1); + y1 = (BN_ULONG)0 - (constant_time_eq_int(i,1)&1); + y2 = (BN_ULONG)0 - (constant_time_eq_int(i,2)&1); + y3 = (BN_ULONG)0 - (constant_time_eq_int(i,3)&1); + + for (i = 0; i < top; i++, table += width) { + BN_ULONG acc = 0; + + for (j = 0; j < xstride; j++) { + acc |= ( (table[j + 0 * xstride] & y0) | + (table[j + 1 * xstride] & y1) | + (table[j + 2 * xstride] & y2) | + (table[j + 3 * xstride] & y3) ) + & ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); + } + + b->d[i] = acc; + } + } + + b->top = top; bn_correct_top(b); return 1; } @@ -645,13 +684,13 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr /* * Initialize the intermediate result. Do this early to save double * conversion, once each for a^0 and intermediate result. - */ - if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)) - goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, numPowers)) - goto err; - - /* Initialize computeTemp as a^1 with montgomery precalcs */ + */ + if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)) + goto err; + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, window)) + goto err; + + /* Initialize computeTemp as a^1 with montgomery precalcs */ computeTemp = BN_CTX_get(ctx); am = BN_CTX_get(ctx); if (computeTemp == NULL || am == NULL) @@ -664,13 +703,13 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr } else aa = a; if (!BN_to_montgomery(am, aa, mont, ctx)) - goto err; - if (!BN_copy(computeTemp, am)) - goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, numPowers)) - goto err; - - /* + goto err; + if (!BN_copy(computeTemp, am)) + goto err; + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, window)) + goto err; + + /* * If the window size is greater than 1, then calculate * val[i=2..2^winsize-1]. Powers are computed as a*a^(i-1) (even powers * could instead be computed as (a^(i/2))^2 to use the slight performance @@ -679,14 +718,14 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr if (window > 1) { for (i = 2; i < numPowers; i++) { /* Calculate a^i = a^(i-1) * a */ - if (!BN_mod_mul_montgomery - (computeTemp, am, computeTemp, mont, ctx)) - goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF - (computeTemp, top, powerbuf, i, numPowers)) - goto err; - } - } + if (!BN_mod_mul_montgomery + (computeTemp, am, computeTemp, mont, ctx)) + goto err; + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(computeTemp, top, powerbuf, i, + window)) + goto err; + } + } /* * Adjust the number of bits up to a multiple of the window size. If the Modified: stable/9/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_print.c Mon Mar 7 16:13:54 2016 (r296461) +++ stable/9/crypto/openssl/crypto/bn/bn_print.c Mon Mar 7 16:18:07 2016 (r296462) @@ -55,12 +55,13 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ - -#include -#include -#include "cryptlib.h" -#include -#include "bn_lcl.h" + +#include +#include +#include +#include "cryptlib.h" +#include +#include "bn_lcl.h" static const char Hex[] = "0123456789ABCDEF"; @@ -186,14 +187,18 @@ int BN_hex2bn(BIGNUM **bn, const char *a if (*a == '-') { neg = 1; - a++; - } - - for (i = 0; isxdigit((unsigned char)a[i]); i++) ; - - num = i + neg; - if (bn == NULL) - return (num); + a++; + } + + for (i = 0; i <= (INT_MAX/4) && isxdigit((unsigned char)a[i]); i++) + continue; + + if (i > INT_MAX/4) + goto err; + + num = i + neg; + if (bn == NULL) + return (num); /* a is the start of the hex digits, and it is 'i' long */ if (*bn == NULL) { @@ -201,13 +206,13 @@ int BN_hex2bn(BIGNUM **bn, const char *a return (0); } else { ret = *bn; - BN_zero(ret); - } - - /* i is the number of hex digests; */ - if (bn_expand(ret, i * 4) == NULL) - goto err; - + BN_zero(ret); + } + + /* i is the number of hex digits */ + if (bn_expand(ret, i * 4) == NULL) + goto err; + j = i; /* least significant 'hex' */ m = 0; h = 0; @@ -257,14 +262,18 @@ int BN_dec2bn(BIGNUM **bn, const char *a *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@freebsd.org Mon Mar 7 16:20:03 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AC75AC3DED; Mon, 7 Mar 2016 16:20:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0749C25; Mon, 7 Mar 2016 16:20:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27GK1rH080069; Mon, 7 Mar 2016 16:20:01 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27GK1BJ080068; Mon, 7 Mar 2016 16:20:01 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603071620.u27GK1BJ080068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 7 Mar 2016 16:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296464 - stable/9/usr.sbin/cron/crontab X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 16:20:03 -0000 Author: pfg Date: Mon Mar 7 16:20:01 2016 New Revision: 296464 URL: https://svnweb.freebsd.org/changeset/base/296464 Log: MFC r295672: crontab: ftruncate() with ftello() instead of ftell(). Obtained from: OpenBSD (CVS rev. 1.47) Modified: stable/9/usr.sbin/cron/crontab/crontab.c Directory Properties: stable/9/usr.sbin/cron/crontab/ (props changed) Modified: stable/9/usr.sbin/cron/crontab/crontab.c ============================================================================== --- stable/9/usr.sbin/cron/crontab/crontab.c Mon Mar 7 16:18:52 2016 (r296463) +++ stable/9/usr.sbin/cron/crontab/crontab.c Mon Mar 7 16:20:01 2016 (r296464) @@ -532,7 +532,7 @@ replace_cmd() { Set_LineNum(1) while (EOF != (ch = get_char(NewCrontab))) putc(ch, tmp); - ftruncate(fileno(tmp), ftell(tmp)); + ftruncate(fileno(tmp), ftello(tmp)); fflush(tmp); rewind(tmp); if (ferror(tmp)) { From owner-svn-src-stable-9@freebsd.org Tue Mar 8 14:39:01 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A855AC7406; Tue, 8 Mar 2016 14:39:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BAA6250; Tue, 8 Mar 2016 14:39:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u28Ed0mH096401; Tue, 8 Mar 2016 14:39:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u28Ed0Cr096400; Tue, 8 Mar 2016 14:39:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603081439.u28Ed0Cr096400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 8 Mar 2016 14:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296499 - stable/9/usr.bin/mail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 14:39:01 -0000 Author: pfg Date: Tue Mar 8 14:39:00 2016 New Revision: 296499 URL: https://svnweb.freebsd.org/changeset/base/296499 Log: MFC r295675: Fix "naive" use of ftell(3). Secure coding practices, FIO19-C. Modified: stable/9/usr.bin/mail/def.h Directory Properties: stable/9/usr.bin/mail/ (props changed) Modified: stable/9/usr.bin/mail/def.h ============================================================================== --- stable/9/usr.bin/mail/def.h Tue Mar 8 14:38:06 2016 (r296498) +++ stable/9/usr.bin/mail/def.h Tue Mar 8 14:39:00 2016 (r296499) @@ -270,5 +270,5 @@ struct ignoretab { */ #define trunc(stream) { \ (void)fflush(stream); \ - (void)ftruncate(fileno(stream), (off_t)ftell(stream)); \ + (void)ftruncate(fileno(stream), ftello(stream)); \ } From owner-svn-src-stable-9@freebsd.org Wed Mar 9 10:14:55 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DE14AC922B; Wed, 9 Mar 2016 10:14:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28822B02; Wed, 9 Mar 2016 10:14:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u29AEsQa063868; Wed, 9 Mar 2016 10:14:54 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u29AEseU063867; Wed, 9 Mar 2016 10:14:54 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201603091014.u29AEseU063867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 9 Mar 2016 10:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296560 - stable/9/sys/netipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2016 10:14:55 -0000 Author: ae Date: Wed Mar 9 10:14:53 2016 New Revision: 296560 URL: https://svnweb.freebsd.org/changeset/base/296560 Log: MFC r295967: Fix useless check. m_pkthdr.len should be equal to orglen. Modified: stable/9/sys/netipsec/key.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/key.c ============================================================================== --- stable/9/sys/netipsec/key.c Wed Mar 9 10:09:51 2016 (r296559) +++ stable/9/sys/netipsec/key.c Wed Mar 9 10:14:53 2016 (r296560) @@ -7338,8 +7338,7 @@ key_parse(m, so) orglen = PFKEY_UNUNIT64(msg->sadb_msg_len); target = KEY_SENDUP_ONE; - if ((m->m_flags & M_PKTHDR) == 0 || - m->m_pkthdr.len != m->m_pkthdr.len) { + if ((m->m_flags & M_PKTHDR) == 0 || m->m_pkthdr.len != orglen) { ipseclog((LOG_DEBUG, "%s: invalid message length.\n",__func__)); PFKEYSTAT_INC(out_invlen); error = EINVAL; From owner-svn-src-stable-9@freebsd.org Wed Mar 9 21:40:02 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76425AC9509; Wed, 9 Mar 2016 21:40:02 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D59F1C0; Wed, 9 Mar 2016 21:40:02 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u29Le15c072819; Wed, 9 Mar 2016 21:40:01 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u29Le1hC072817; Wed, 9 Mar 2016 21:40:01 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201603092140.u29Le1hC072817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 9 Mar 2016 21:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296581 - in stable/9/sys: dev/bxe modules/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2016 21:40:02 -0000 Author: davidcs Date: Wed Mar 9 21:40:00 2016 New Revision: 296581 URL: https://svnweb.freebsd.org/changeset/base/296581 Log: MFC r296071 Upgrade the firmware carried in driver and loaded during hardware initialization (a.k.a STORM firmware) to version 7.13.1 (latest version) Modified: stable/9/sys/dev/bxe/57710_init_values.c stable/9/sys/dev/bxe/57710_int_offsets.h stable/9/sys/dev/bxe/57711_init_values.c stable/9/sys/dev/bxe/57711_int_offsets.h stable/9/sys/dev/bxe/57712_init_values.c stable/9/sys/dev/bxe/57712_int_offsets.h stable/9/sys/dev/bxe/bxe.c stable/9/sys/dev/bxe/bxe.h stable/9/sys/dev/bxe/bxe_elink.c stable/9/sys/dev/bxe/bxe_elink.h stable/9/sys/dev/bxe/bxe_stats.c stable/9/sys/dev/bxe/ecore_fw_defs.h stable/9/sys/dev/bxe/ecore_hsi.h stable/9/sys/dev/bxe/ecore_init.h stable/9/sys/dev/bxe/ecore_init_ops.h stable/9/sys/dev/bxe/ecore_mfw_req.h stable/9/sys/dev/bxe/ecore_reg.h stable/9/sys/dev/bxe/ecore_sp.c stable/9/sys/dev/bxe/ecore_sp.h stable/9/sys/modules/bxe/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/bxe/57710_init_values.c ============================================================================== --- stable/9/sys/dev/bxe/57710_init_values.c Wed Mar 9 21:30:21 2016 (r296580) +++ stable/9/sys/dev/bxe/57710_init_values.c Wed Mar 9 21:40:00 2016 (r296581) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved. + * Copyright (c) 2007-2017 QLogic Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,7 +11,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS @@ -104,19 +104,19 @@ static const struct raw_op init_ops_e1[] /* #define CFC_COMMON_START 88 */ {OP_ZR, 0x104c00, 0x100}, {OP_WR, 0x104028, 0x10}, - {OP_WR, 0x104044, 0x3fff}, + {OP_SW, 0x104040, 0x20469}, {OP_WR, 0x104058, 0x280000}, {OP_WR, 0x104084, 0x84924a}, {OP_WR, 0x104058, 0x0}, /* #define CFC_COMMON_END 89 */ /* #define CSDM_COMMON_START 110 */ - {OP_SW, 0xc2008, 0x30469}, - {OP_SW, 0xc201c, 0x4046c}, - {OP_SW, 0xc2038, 0x110470}, + {OP_SW, 0xc2008, 0x3046b}, + {OP_SW, 0xc201c, 0x4046e}, + {OP_SW, 0xc2038, 0x110472}, {OP_ZR, 0xc207c, 0x4f}, - {OP_SW, 0xc21b8, 0x110481}, + {OP_SW, 0xc21b8, 0x110483}, {OP_ZR, 0xc21fc, 0xf}, - {OP_SW, 0xc2238, 0x40492}, + {OP_SW, 0xc2238, 0x40494}, {OP_RD, 0xc2248, 0x0}, {OP_RD, 0xc224c, 0x0}, {OP_RD, 0xc2250, 0x0}, @@ -141,76 +141,76 @@ static const struct raw_op init_ops_e1[] /* #define CSDM_COMMON_END 111 */ /* #define CSEM_COMMON_START 132 */ {OP_FW, 0x200400, 0xe00000}, - {OP_WR_64, 0x200780, 0x100496}, + {OP_WR_64, 0x200780, 0x100498}, {OP_ZR, 0x220000, 0x1600}, {OP_ZR, 0x228000, 0x40}, {OP_ZR, 0x223bd0, 0x8}, {OP_ZR, 0x224800, 0x6}, - {OP_SW, 0x224818, 0x40498}, + {OP_SW, 0x224818, 0x4049a}, {OP_ZR, 0x224828, 0xc}, - {OP_SW, 0x224858, 0x4049c}, + {OP_SW, 0x224858, 0x4049e}, {OP_ZR, 0x224868, 0xc}, - {OP_SW, 0x224898, 0x404a0}, + {OP_SW, 0x224898, 0x404a2}, {OP_ZR, 0x2248a8, 0xc}, - {OP_SW, 0x2248d8, 0x404a4}, + {OP_SW, 0x2248d8, 0x404a6}, {OP_ZR, 0x2248e8, 0xc}, - {OP_SW, 0x224918, 0x404a8}, + {OP_SW, 0x224918, 0x404aa}, {OP_ZR, 0x224928, 0xc}, - {OP_SW, 0x224958, 0x404ac}, + {OP_SW, 0x224958, 0x404ae}, {OP_ZR, 0x224968, 0xc}, - {OP_SW, 0x224998, 0x404b0}, + {OP_SW, 0x224998, 0x404b2}, {OP_ZR, 0x2249a8, 0xc}, - {OP_SW, 0x2249d8, 0x404b4}, + {OP_SW, 0x2249d8, 0x404b6}, {OP_ZR, 0x2249e8, 0xc}, - {OP_SW, 0x224a18, 0x404b8}, + {OP_SW, 0x224a18, 0x404ba}, {OP_ZR, 0x224a28, 0xc}, - {OP_SW, 0x224a58, 0x404bc}, + {OP_SW, 0x224a58, 0x404be}, {OP_ZR, 0x224a68, 0xc}, - {OP_SW, 0x224a98, 0x404c0}, + {OP_SW, 0x224a98, 0x404c2}, {OP_ZR, 0x224aa8, 0xc}, - {OP_SW, 0x224ad8, 0x404c4}, + {OP_SW, 0x224ad8, 0x404c6}, {OP_ZR, 0x224ae8, 0xc}, - {OP_SW, 0x224b18, 0x404c8}, + {OP_SW, 0x224b18, 0x404ca}, {OP_ZR, 0x224b28, 0xc}, - {OP_SW, 0x224b58, 0x404cc}, + {OP_SW, 0x224b58, 0x404ce}, {OP_ZR, 0x224b68, 0xc}, - {OP_SW, 0x224b98, 0x404d0}, + {OP_SW, 0x224b98, 0x404d2}, {OP_ZR, 0x224ba8, 0xc}, - {OP_SW, 0x224bd8, 0x404d4}, + {OP_SW, 0x224bd8, 0x404d6}, {OP_ZR, 0x224be8, 0xc}, - {OP_SW, 0x224c18, 0x404d8}, + {OP_SW, 0x224c18, 0x404da}, {OP_ZR, 0x224c28, 0xc}, - {OP_SW, 0x224c58, 0x404dc}, + {OP_SW, 0x224c58, 0x404de}, {OP_ZR, 0x224c68, 0xc}, - {OP_SW, 0x224c98, 0x404e0}, + {OP_SW, 0x224c98, 0x404e2}, {OP_ZR, 0x224ca8, 0xc}, - {OP_SW, 0x224cd8, 0x404e4}, + {OP_SW, 0x224cd8, 0x404e6}, {OP_ZR, 0x224ce8, 0xc}, - {OP_SW, 0x224d18, 0x404e8}, + {OP_SW, 0x224d18, 0x404ea}, {OP_ZR, 0x224d28, 0xc}, - {OP_SW, 0x224d58, 0x404ec}, + {OP_SW, 0x224d58, 0x404ee}, {OP_ZR, 0x224d68, 0xc}, - {OP_SW, 0x224d98, 0x404f0}, + {OP_SW, 0x224d98, 0x404f2}, {OP_ZR, 0x224da8, 0xc}, - {OP_SW, 0x224dd8, 0x404f4}, + {OP_SW, 0x224dd8, 0x404f6}, {OP_ZR, 0x224de8, 0xc}, - {OP_SW, 0x224e18, 0x404f8}, + {OP_SW, 0x224e18, 0x404fa}, {OP_ZR, 0x224e28, 0xc}, - {OP_SW, 0x224e58, 0x404fc}, + {OP_SW, 0x224e58, 0x404fe}, {OP_ZR, 0x224e68, 0xc}, - {OP_SW, 0x224e98, 0x40500}, + {OP_SW, 0x224e98, 0x40502}, {OP_ZR, 0x224ea8, 0xc}, - {OP_SW, 0x224ed8, 0x40504}, + {OP_SW, 0x224ed8, 0x40506}, {OP_ZR, 0x224ee8, 0xc}, - {OP_SW, 0x224f18, 0x40508}, + {OP_SW, 0x224f18, 0x4050a}, {OP_ZR, 0x224f28, 0xc}, - {OP_SW, 0x224f58, 0x4050c}, + {OP_SW, 0x224f58, 0x4050e}, {OP_ZR, 0x224f68, 0xc}, - {OP_SW, 0x224f98, 0x40510}, + {OP_SW, 0x224f98, 0x40512}, {OP_ZR, 0x224fa8, 0xc}, - {OP_SW, 0x224fd8, 0x40514}, + {OP_SW, 0x224fd8, 0x40516}, {OP_ZR, 0x224fe8, 0x6}, - {OP_SW, 0x225198, 0x40518}, + {OP_SW, 0x225198, 0x4051a}, {OP_WR, 0x238000, 0x10}, {OP_WR, 0x238040, 0x12}, {OP_WR, 0x238080, 0x30}, @@ -227,16 +227,16 @@ static const struct raw_op init_ops_e1[] {OP_IF_MODE_AND, 2, 0x4}, /* emul */ {OP_WR, 0x238300, 0x138}, {OP_WR, 0x238340, 0x0}, - {OP_FW, 0x240000, 0x27300000}, - {OP_WR_64, 0x249cc0, 0x6ace051c}, + {OP_FW, 0x240000, 0x22600000}, + {OP_WR_64, 0x248980, 0x6d36051e}, {OP_RD, 0x200000, 0x0}, {OP_RD, 0x200004, 0x0}, {OP_RD, 0x200008, 0x0}, {OP_RD, 0x20000c, 0x0}, {OP_RD, 0x200010, 0x0}, {OP_RD, 0x200014, 0x0}, - {OP_SW, 0x200020, 0x1a051e}, - {OP_SW, 0x2000a4, 0x20538}, + {OP_SW, 0x200020, 0x1a0520}, + {OP_SW, 0x2000a4, 0x2053a}, {OP_WR, 0x200224, 0x0}, {OP_WR, 0x200234, 0x0}, {OP_WR, 0x20024c, 0x0}, @@ -259,17 +259,17 @@ static const struct raw_op init_ops_e1[] /* #define CSEM_PORT1_END 137 */ /* #define DMAE_COMMON_START 176 */ {OP_ZR, 0x102400, 0xe0}, - {OP_SW, 0x10201c, 0x2053a}, + {OP_SW, 0x10201c, 0x2053c}, {OP_WR, 0x1020c0, 0x1}, - {OP_SW, 0x102004, 0x2053c}, + {OP_SW, 0x102004, 0x2053e}, /* #define DMAE_COMMON_END 177 */ /* #define DORQ_COMMON_START 198 */ {OP_WR, 0x170008, 0x2}, {OP_WR, 0x17002c, 0x3}, - {OP_SW, 0x170038, 0x2053e}, - {OP_SW, 0x170044, 0x60540}, - {OP_SW, 0x170060, 0x50546}, - {OP_SW, 0x170078, 0x2054b}, + {OP_SW, 0x170038, 0x20540}, + {OP_SW, 0x170044, 0x60542}, + {OP_SW, 0x170060, 0x50548}, + {OP_SW, 0x170078, 0x2054d}, {OP_WR, 0x170004, 0xf}, /* #define DORQ_COMMON_END 199 */ /* #define HC_COMMON_START 220 */ @@ -280,7 +280,7 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0x108040, 0x2}, {OP_ZR, 0x108028, 0x2}, {OP_WR, 0x108038, 0x10}, - {OP_SW, 0x108040, 0x2054d}, + {OP_SW, 0x108040, 0x2054f}, {OP_WR, 0x108050, 0x0}, {OP_WR, 0x108100, 0x0}, {OP_ZR, 0x108120, 0x2}, @@ -300,7 +300,7 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0x108048, 0x2}, {OP_ZR, 0x108030, 0x2}, {OP_WR, 0x10803c, 0x10}, - {OP_SW, 0x108048, 0x2054f}, + {OP_SW, 0x108048, 0x20551}, {OP_WR, 0x108054, 0x0}, {OP_WR, 0x108104, 0x0}, {OP_ZR, 0x108128, 0x2}, @@ -318,13 +318,13 @@ static const struct raw_op init_ops_e1[] /* #define MISC_COMMON_START 264 */ {OP_WR, 0xa468, 0xaffdc}, {OP_WR, 0xa280, 0x1}, - {OP_SW, 0xa294, 0x40551}, + {OP_SW, 0xa294, 0x40553}, {OP_WR, 0xa4fc, 0xff000000}, /* #define MISC_COMMON_END 265 */ /* #define NIG_COMMON_START 286 */ - {OP_SW, 0x100b4, 0x20555}, + {OP_SW, 0x100b4, 0x20557}, {OP_WR, 0x100dc, 0x1}, - {OP_SW, 0x10100, 0x20557}, + {OP_SW, 0x10100, 0x20559}, /* #define NIG_COMMON_END 287 */ /* #define NIG_PORT0_START 288 */ {OP_WR, 0x1007c, 0x300000}, @@ -355,7 +355,7 @@ static const struct raw_op init_ops_e1[] /* #define PBF_COMMON_START 308 */ {OP_WR, 0x140000, 0x1}, {OP_WR, 0x14000c, 0x1}, - {OP_SW, 0x140040, 0x20559}, + {OP_SW, 0x140040, 0x2055b}, {OP_WR, 0x14000c, 0x0}, {OP_WR, 0x140000, 0x0}, {OP_WR, 0x14006c, 0x0}, @@ -373,16 +373,16 @@ static const struct raw_op init_ops_e1[] {OP_WR, 0x140060, 0x0}, /* #define PBF_PORT1_END 313 */ /* #define PRS_COMMON_START 352 */ - {OP_SW, 0x40004, 0x12055b}, - {OP_SW, 0x40054, 0x3056d}, + {OP_SW, 0x40004, 0x12055d}, + {OP_SW, 0x40054, 0x3056f}, {OP_WR, 0x40070, 0x4}, - {OP_SW, 0x40078, 0x40570}, + {OP_SW, 0x40078, 0x40572}, {OP_ZR, 0x40088, 0x5}, - {OP_SW, 0x4009c, 0x30574}, + {OP_SW, 0x4009c, 0x30576}, {OP_ZR, 0x400a8, 0x4}, - {OP_SW, 0x400b8, 0x50577}, + {OP_SW, 0x400b8, 0x50579}, {OP_ZR, 0x400cc, 0x4}, - {OP_SW, 0x400dc, 0x4057c}, + {OP_SW, 0x400dc, 0x4057e}, {OP_ZR, 0x400ec, 0x4}, {OP_RD, 0x40124, 0x0}, {OP_RD, 0x40128, 0x0}, @@ -391,67 +391,67 @@ static const struct raw_op init_ops_e1[] {OP_WR, 0x40134, 0xf}, /* #define PRS_COMMON_END 353 */ /* #define PXP2_COMMON_START 374 */ - {OP_SW, 0x120490, 0x220580}, + {OP_SW, 0x120490, 0x220582}, {OP_WR, 0x120520, 0x2}, {OP_WR, 0x120388, 0x64}, {OP_WR, 0x120390, 0x8}, - {OP_SW, 0x12039c, 0x305a2}, + {OP_SW, 0x12039c, 0x305a4}, {OP_WR, 0x1203bc, 0x4}, {OP_WR, 0x1203c4, 0x4}, {OP_WR, 0x1203d0, 0x0}, {OP_WR, 0x1203dc, 0x0}, {OP_WR, 0x12036c, 0x1}, {OP_WR, 0x120368, 0x3f}, - {OP_SW, 0x1201bc, 0x3c05a5}, - {OP_SW, 0x1202b0, 0x205e1}, - {OP_SW, 0x120324, 0x205e3}, + {OP_SW, 0x1201bc, 0x3c05a7}, + {OP_SW, 0x1202b0, 0x205e3}, + {OP_SW, 0x120324, 0x205e5}, {OP_WR, 0x1201b0, 0x1}, /* #define PXP2_COMMON_END 375 */ /* #define PXP_COMMON_START 396 */ - {OP_WB, 0x103800, 0x505e5}, - {OP_WB, 0x103c00, 0x505ea}, - {OP_WB, 0x103c20, 0x505ef}, + {OP_WB, 0x103800, 0x505e7}, + {OP_WB, 0x103c00, 0x505ec}, + {OP_WB, 0x103c20, 0x505f1}, /* #define PXP_COMMON_END 397 */ /* #define QM_COMMON_START 418 */ - {OP_SW, 0x168030, 0x805f4}, + {OP_SW, 0x168030, 0x805f6}, {OP_WR, 0x168054, 0x2}, - {OP_SW, 0x168060, 0x505fc}, + {OP_SW, 0x168060, 0x505fe}, {OP_ZR, 0x168074, 0x7}, - {OP_SW, 0x168090, 0x20601}, - {OP_SW, 0x16809c, 0x50603}, + {OP_SW, 0x168090, 0x20603}, + {OP_SW, 0x16809c, 0x50605}, {OP_ZR, 0x1680b0, 0x7}, - {OP_SW, 0x1680cc, 0x80608}, + {OP_SW, 0x1680cc, 0x8060a}, {OP_WR, 0x1680f0, 0x7}, {OP_ZR, 0x1680f4, 0xc}, - {OP_SW, 0x168124, 0x40610}, + {OP_SW, 0x168124, 0x40612}, {OP_ZR, 0x168134, 0xc}, - {OP_SW, 0x168164, 0x3b0614}, + {OP_SW, 0x168164, 0x3b0616}, {OP_ZR, 0x168250, 0x4}, - {OP_SW, 0x168260, 0x2064f}, + {OP_SW, 0x168260, 0x20651}, {OP_ZR, 0x168268, 0x8}, - {OP_SW, 0x168288, 0x80651}, + {OP_SW, 0x168288, 0x80653}, {OP_ZR, 0x1682a8, 0xa}, {OP_WR, 0x168804, 0x4}, - {OP_SW, 0x16880c, 0x100659}, + {OP_SW, 0x16880c, 0x10065b}, {OP_WR, 0x1680ec, 0xff}, /* #define QM_COMMON_END 419 */ /* #define SRC_COMMON_START 440 */ - {OP_SW, 0x40408, 0x140669}, + {OP_SW, 0x40408, 0x14066b}, /* #define SRC_COMMON_END 441 */ /* #define TCM_COMMON_START 462 */ - {OP_SW, 0x50044, 0x2067d}, - {OP_SW, 0x50050, 0x4067f}, + {OP_SW, 0x50044, 0x2067f}, + {OP_SW, 0x50050, 0x40681}, {OP_ZR, 0x50060, 0x4}, - {OP_SW, 0x50090, 0x130683}, + {OP_SW, 0x50090, 0x130685}, {OP_WR, 0x50114, 0x1}, - {OP_SW, 0x5011c, 0x20696}, + {OP_SW, 0x5011c, 0x20698}, {OP_WR, 0x50204, 0x1}, - {OP_SW, 0x5020c, 0x20698}, - {OP_SW, 0x5021c, 0x3069a}, + {OP_SW, 0x5020c, 0x2069a}, + {OP_SW, 0x5021c, 0x3069c}, {OP_ZR, 0x50240, 0xa}, - {OP_SW, 0x50280, 0x20069d}, + {OP_SW, 0x50280, 0x20069f}, {OP_ZR, 0x54000, 0xd00}, - {OP_SW, 0x50004, 0x1006bd}, + {OP_SW, 0x50004, 0x1006bf}, /* #define TCM_COMMON_END 463 */ /* #define TCM_PORT0_START 464 */ {OP_WR, 0x500e0, 0xe}, @@ -461,7 +461,7 @@ static const struct raw_op init_ops_e1[] /* #define TCM_PORT1_END 467 */ /* #define TM_COMMON_START 484 */ {OP_ZR, 0x164024, 0x2}, - {OP_SW, 0x164030, 0x306cd}, + {OP_SW, 0x164030, 0x306cf}, {OP_WR, 0x164044, 0x20}, {OP_WR, 0x164070, 0x1c}, {OP_WR, 0x164208, 0x1}, @@ -479,7 +479,7 @@ static const struct raw_op init_ops_e1[] {OP_WR, 0x16401c, 0x9c}, {OP_WR, 0x164000, 0x1}, {OP_WR, 0x1640d8, 0x1}, - {OP_SW, 0x164008, 0x306d0}, + {OP_SW, 0x164008, 0x306d2}, /* #define TM_COMMON_END 485 */ /* #define TM_PORT0_START 486 */ {OP_WR, 0x164240, 0x0}, @@ -492,10 +492,10 @@ static const struct raw_op init_ops_e1[] {OP_WB_ZR, 0x164280, 0x2}, /* #define TM_PORT1_END 489 */ /* #define TSDM_COMMON_START 506 */ - {OP_SW, 0x42008, 0x406d3}, - {OP_SW, 0x4201c, 0x406d7}, + {OP_SW, 0x42008, 0x406d5}, + {OP_SW, 0x4201c, 0x406d9}, {OP_ZR, 0x42038, 0x80}, - {OP_SW, 0x42238, 0x406db}, + {OP_SW, 0x42238, 0x406dd}, {OP_RD, 0x42248, 0x0}, {OP_RD, 0x4224c, 0x0}, {OP_RD, 0x42250, 0x0}, @@ -520,17 +520,17 @@ static const struct raw_op init_ops_e1[] /* #define TSDM_COMMON_END 507 */ /* #define TSEM_COMMON_START 528 */ {OP_FW, 0x180400, 0xd80000}, - {OP_WR_64, 0x180760, 0x1406df}, + {OP_WR_64, 0x180760, 0x1406e1}, {OP_ZR, 0x1a0000, 0x1600}, {OP_ZR, 0x1a8000, 0x40}, - {OP_SW, 0x1a08b0, 0x206e1}, - {OP_SW, 0x1a19c8, 0x206e3}, - {OP_SW, 0x1a2fc0, 0x406e5}, + {OP_SW, 0x1a08b0, 0x206e3}, + {OP_SW, 0x1a19c8, 0x206e5}, + {OP_SW, 0x1a2fc0, 0x406e7}, {OP_ZR, 0x1a2fd0, 0x6}, - {OP_SW, 0x1a2fe8, 0x206e9}, - {OP_SW, 0x1a3000, 0x3f906eb}, + {OP_SW, 0x1a2fe8, 0x206eb}, + {OP_SW, 0x1a3000, 0x3f906ed}, {OP_ZR, 0x1a3fe4, 0x7}, - {OP_SW, 0x1a4870, 0x40ae4}, + {OP_SW, 0x1a4870, 0x40ae6}, {OP_WR, 0x1b8000, 0x34}, {OP_WR, 0x1b8040, 0x18}, {OP_WR, 0x1b8080, 0xc}, @@ -547,16 +547,16 @@ static const struct raw_op init_ops_e1[] {OP_IF_MODE_AND, 2, 0x4}, /* emul */ {OP_WR, 0x1b8300, 0x138}, {OP_WR, 0x1b8340, 0x0}, - {OP_FW, 0x1c0000, 0x535c0000}, - {OP_WR_64, 0x1d4d70, 0x56520ae8}, + {OP_FW, 0x1c0000, 0x48600000}, + {OP_WR_64, 0x1d2180, 0x5bd00aea}, {OP_RD, 0x180000, 0x0}, {OP_RD, 0x180004, 0x0}, {OP_RD, 0x180008, 0x0}, {OP_RD, 0x18000c, 0x0}, {OP_RD, 0x180010, 0x0}, {OP_RD, 0x180014, 0x0}, - {OP_SW, 0x180020, 0x1a0aea}, - {OP_SW, 0x1800a4, 0x20b04}, + {OP_SW, 0x180020, 0x1a0aec}, + {OP_SW, 0x1800a4, 0x20b06}, {OP_WR, 0x180224, 0x0}, {OP_WR, 0x180234, 0x0}, {OP_WR, 0x18024c, 0x0}, @@ -570,11 +570,11 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0x1a2500, 0x10}, {OP_ZR, 0x1a2580, 0x12}, {OP_ZR, 0x1a2610, 0x12}, - {OP_SW, 0x1a2fb0, 0x20b06}, + {OP_SW, 0x1a2fb0, 0x20b08}, {OP_ZR, 0x1a4000, 0x6}, {OP_ZR, 0x1a4030, 0x2}, {OP_ZR, 0x1a4820, 0x2}, - {OP_SW, 0x1a4c50, 0x20b08}, + {OP_SW, 0x1a4c50, 0x20b0a}, /* #define TSEM_PORT0_END 531 */ /* #define TSEM_PORT1_START 532 */ {OP_ZR, 0x1a0810, 0x2}, @@ -583,26 +583,26 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0x1a2540, 0x10}, {OP_ZR, 0x1a25c8, 0x12}, {OP_ZR, 0x1a2658, 0x12}, - {OP_SW, 0x1a2fb8, 0x20b0a}, + {OP_SW, 0x1a2fb8, 0x20b0c}, {OP_ZR, 0x1a4018, 0x6}, {OP_ZR, 0x1a4038, 0x2}, {OP_ZR, 0x1a4828, 0x2}, - {OP_SW, 0x1a4c58, 0x20b0c}, + {OP_SW, 0x1a4c58, 0x20b0e}, /* #define TSEM_PORT1_END 533 */ /* #define UCM_COMMON_START 550 */ {OP_WR, 0xe004c, 0x32}, - {OP_SW, 0xe0054, 0x40b0e}, + {OP_SW, 0xe0054, 0x40b10}, {OP_ZR, 0xe0064, 0x4}, - {OP_SW, 0xe0094, 0x130b12}, + {OP_SW, 0xe0094, 0x130b14}, {OP_WR, 0xe0144, 0x1}, - {OP_SW, 0xe014c, 0x20b25}, + {OP_SW, 0xe014c, 0x20b27}, {OP_WR, 0xe0204, 0x1}, - {OP_SW, 0xe020c, 0x20b27}, - {OP_SW, 0xe021c, 0x40b29}, - {OP_SW, 0xe0280, 0x1b0b2d}, + {OP_SW, 0xe020c, 0x20b29}, + {OP_SW, 0xe021c, 0x40b2b}, + {OP_SW, 0xe0280, 0x1b0b2f}, {OP_ZR, 0xe02ec, 0x17}, {OP_ZR, 0xe2000, 0x800}, - {OP_SW, 0xe0004, 0x110b48}, + {OP_SW, 0xe0004, 0x110b4a}, /* #define UCM_COMMON_END 551 */ /* #define UCM_PORT0_START 552 */ {OP_WR, 0xe0110, 0xf}, @@ -614,13 +614,13 @@ static const struct raw_op init_ops_e1[] {OP_WR, 0xc1000, 0x28}, /* #define UPB_COMMON_END 573 */ /* #define USDM_COMMON_START 594 */ - {OP_SW, 0xc4008, 0x40b59}, - {OP_SW, 0xc401c, 0x40b5d}, - {OP_SW, 0xc4038, 0x20b61}, + {OP_SW, 0xc4008, 0x40b5b}, + {OP_SW, 0xc401c, 0x40b5f}, + {OP_SW, 0xc4038, 0x20b63}, {OP_ZR, 0xc4040, 0x5e}, {OP_WR, 0xc41b8, 0x1}, {OP_ZR, 0xc41bc, 0x1f}, - {OP_SW, 0xc4238, 0x40b63}, + {OP_SW, 0xc4238, 0x40b65}, {OP_RD, 0xc4248, 0x0}, {OP_RD, 0xc424c, 0x0}, {OP_RD, 0xc4250, 0x0}, @@ -646,13 +646,13 @@ static const struct raw_op init_ops_e1[] /* #define USDM_COMMON_END 595 */ /* #define USEM_COMMON_START 616 */ {OP_FW, 0x300400, 0xda0000}, - {OP_WR_64, 0x300768, 0x130b67}, + {OP_WR_64, 0x300768, 0x130b69}, {OP_ZR, 0x320000, 0x1600}, {OP_ZR, 0x328000, 0x40}, - {OP_SW, 0x321830, 0x20b69}, - {OP_SW, 0x322e70, 0x40b6b}, + {OP_SW, 0x321830, 0x20b6b}, + {OP_SW, 0x322e70, 0x40b6d}, {OP_ZR, 0x325080, 0x8}, - {OP_SW, 0x3250a0, 0x20b6f}, + {OP_SW, 0x3250a0, 0x20b71}, {OP_WR, 0x338000, 0x1a}, {OP_WR, 0x338040, 0x4e}, {OP_WR, 0x338080, 0x10}, @@ -669,16 +669,16 @@ static const struct raw_op init_ops_e1[] {OP_IF_MODE_AND, 2, 0x4}, /* emul */ {OP_WR, 0x338300, 0x138}, {OP_WR, 0x338340, 0x0}, - {OP_FW, 0x340000, 0x59440000}, - {OP_WR_64, 0x356510, 0x535e0b71}, + {OP_FW, 0x340000, 0x88540000}, + {OP_WR_64, 0x362150, 0x3bd60b73}, {OP_RD, 0x300000, 0x0}, {OP_RD, 0x300004, 0x0}, {OP_RD, 0x300008, 0x0}, {OP_RD, 0x30000c, 0x0}, {OP_RD, 0x300010, 0x0}, {OP_RD, 0x300014, 0x0}, - {OP_SW, 0x300020, 0x1a0b73}, - {OP_SW, 0x3000a4, 0x20b8d}, + {OP_SW, 0x300020, 0x1a0b75}, + {OP_SW, 0x3000a4, 0x20b8f}, {OP_WR, 0x300224, 0x0}, {OP_WR, 0x300234, 0x0}, {OP_WR, 0x30024c, 0x0}, @@ -733,23 +733,23 @@ static const struct raw_op init_ops_e1[] /* #define USEM_PORT1_END 621 */ /* #define XCM_COMMON_START 638 */ {OP_WR, 0x20058, 0x32}, - {OP_SW, 0x20060, 0x40b8f}, + {OP_SW, 0x20060, 0x40b91}, {OP_ZR, 0x20070, 0x4}, - {OP_SW, 0x200a0, 0xe0b93}, - {OP_SW, 0x200dc, 0x70ba1}, + {OP_SW, 0x200a0, 0xe0b95}, + {OP_SW, 0x200dc, 0x70ba3}, {OP_WR, 0x200fc, 0x6}, {OP_WR, 0x20120, 0x0}, {OP_WR, 0x20134, 0x2}, {OP_WR, 0x201b0, 0x1}, {OP_WR, 0x2020c, 0x1}, - {OP_SW, 0x20214, 0x20ba8}, + {OP_SW, 0x20214, 0x20baa}, {OP_WR, 0x20404, 0x1}, - {OP_SW, 0x2040c, 0x20baa}, - {OP_SW, 0x2041c, 0x40bac}, - {OP_SW, 0x20480, 0x1f0bb0}, + {OP_SW, 0x2040c, 0x20bac}, + {OP_SW, 0x2041c, 0x40bae}, + {OP_SW, 0x20480, 0x1f0bb2}, {OP_ZR, 0x204fc, 0x13}, {OP_ZR, 0x28000, 0x2000}, - {OP_SW, 0x20004, 0x140bcf}, + {OP_SW, 0x20004, 0x140bd1}, /* #define XCM_COMMON_END 639 */ /* #define XCM_PORT0_START 640 */ {OP_WR, 0x20108, 0xc8}, @@ -775,15 +775,15 @@ static const struct raw_op init_ops_e1[] {OP_WR, 0x161000, 0x28}, /* #define XPB_COMMON_END 661 */ /* #define XSDM_COMMON_START 682 */ - {OP_SW, 0x166008, 0x30be3}, - {OP_SW, 0x16601c, 0x40be6}, - {OP_SW, 0x166038, 0xd0bea}, + {OP_SW, 0x166008, 0x30be5}, + {OP_SW, 0x16601c, 0x40be8}, + {OP_SW, 0x166038, 0xd0bec}, {OP_ZR, 0x16606c, 0x13}, - {OP_SW, 0x1660b8, 0x20bf7}, + {OP_SW, 0x1660b8, 0x20bf9}, {OP_ZR, 0x1660c0, 0x3e}, {OP_WR, 0x1661b8, 0x1}, {OP_ZR, 0x1661bc, 0x1f}, - {OP_SW, 0x166238, 0x40bf9}, + {OP_SW, 0x166238, 0x40bfb}, {OP_RD, 0x166248, 0x0}, {OP_RD, 0x16624c, 0x0}, {OP_RD, 0x166250, 0x0}, @@ -808,19 +808,19 @@ static const struct raw_op init_ops_e1[] /* #define XSDM_COMMON_END 683 */ /* #define XSEM_COMMON_START 704 */ {OP_FW, 0x280400, 0xda0000}, - {OP_WR_64, 0x280768, 0x130bfd}, + {OP_WR_64, 0x280768, 0x130bff}, {OP_ZR, 0x2a0000, 0x1600}, {OP_ZR, 0x2a8000, 0x40}, - {OP_SW, 0x2a2500, 0x20bff}, - {OP_SW, 0x2a2960, 0x40c01}, - {OP_SW, 0x2a2f48, 0x20c05}, - {OP_SW, 0x2a3368, 0x20c07}, - {OP_SW, 0x2a3920, 0x20c09}, - {OP_SW, 0x2a3930, 0x20c0b}, - {OP_SW, 0x2a3ac8, 0x20c0d}, + {OP_SW, 0x2a2500, 0x20c01}, + {OP_SW, 0x2a2960, 0x40c03}, + {OP_SW, 0x2a2f48, 0x20c07}, + {OP_SW, 0x2a3368, 0x20c09}, + {OP_SW, 0x2a3920, 0x20c0b}, + {OP_SW, 0x2a3930, 0x20c0d}, + {OP_SW, 0x2a3ac8, 0x20c0f}, {OP_ZR, 0x2a3ad0, 0x6}, - {OP_SW, 0x2a3b98, 0x20c0f}, - {OP_SW, 0x2a3c20, 0x40c11}, + {OP_SW, 0x2a3b98, 0x20c11}, + {OP_SW, 0x2a3c20, 0x40c13}, {OP_WR, 0x2a3cd0, 0x0}, {OP_WR, 0x2b8000, 0x0}, {OP_WR, 0x2b8040, 0x18}, @@ -840,16 +840,16 @@ static const struct raw_op init_ops_e1[] {OP_WR, 0x2b8340, 0x0}, {OP_IF_MODE_AND, 1, 0x20}, /* port2 */ {OP_WR, 0x2a3cd4, 0x0}, - {OP_FW, 0x2c0000, 0x6c0c0000}, - {OP_WR_64, 0x2db030, 0x49fa0c15}, + {OP_FW, 0x2c0000, 0x64e40000}, + {OP_WR_64, 0x2d9390, 0x4d8e0c17}, {OP_RD, 0x280000, 0x0}, {OP_RD, 0x280004, 0x0}, {OP_RD, 0x280008, 0x0}, {OP_RD, 0x28000c, 0x0}, {OP_RD, 0x280010, 0x0}, {OP_RD, 0x280014, 0x0}, - {OP_SW, 0x280020, 0x1a0c17}, - {OP_SW, 0x2800a4, 0x20c31}, + {OP_SW, 0x280020, 0x1a0c19}, + {OP_SW, 0x2800a4, 0x20c33}, {OP_WR, 0x280224, 0x0}, {OP_WR, 0x280234, 0x0}, {OP_WR, 0x28024c, 0x0}, @@ -860,8 +860,8 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0x2a3910, 0x2}, {OP_ZR, 0x2a3938, 0x20}, {OP_ZR, 0x2a3a38, 0x10}, - {OP_SW, 0x2a3ae8, 0x20c33}, - {OP_SW, 0x2a3af8, 0x100c35}, + {OP_SW, 0x2a3ae8, 0x20c35}, + {OP_SW, 0x2a3af8, 0x100c37}, {OP_ZR, 0x2a3c30, 0x2}, {OP_ZR, 0x2a5000, 0x2}, {OP_ZR, 0x2a5010, 0x2}, @@ -874,8 +874,8 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0x2a3918, 0x2}, {OP_ZR, 0x2a39b8, 0x20}, {OP_ZR, 0x2a3a78, 0x10}, - {OP_SW, 0x2a3af0, 0x20c45}, - {OP_SW, 0x2a3b38, 0x100c47}, + {OP_SW, 0x2a3af0, 0x20c47}, + {OP_SW, 0x2a3b38, 0x100c49}, {OP_ZR, 0x2a3c38, 0x2}, {OP_ZR, 0x2a5008, 0x2}, {OP_ZR, 0x2a5018, 0x2}, @@ -888,20 +888,20 @@ static const struct raw_op init_ops_e1[] {OP_ZR, 0xa000, 0x16}, /* #define MISC_AEU_COMMON_END 727 */ /* #define MISC_AEU_PORT0_START 728 */ - {OP_SW, 0xa06c, 0x60c57}, + {OP_SW, 0xa06c, 0x60c59}, {OP_ZR, 0xa084, 0x5}, {OP_WR, 0xa098, 0xfe00000}, {OP_ZR, 0xa09c, 0x14}, - {OP_SW, 0xa0ec, 0x80c5d}, + {OP_SW, 0xa0ec, 0x80c5f}, {OP_ZR, 0xa22c, 0x4}, {OP_WR, 0xa060, 0x307}, /* #define MISC_AEU_PORT0_END 729 */ /* #define MISC_AEU_PORT1_START 730 */ - {OP_SW, 0xa10c, 0x60c65}, + {OP_SW, 0xa10c, 0x60c67}, {OP_ZR, 0xa124, 0x5}, {OP_WR, 0xa138, 0xfe00000}, {OP_ZR, 0xa13c, 0x14}, - {OP_SW, 0xa18c, 0x80c6b}, + {OP_SW, 0xa18c, 0x80c6d}, {OP_ZR, 0xa23c, 0x4}, {OP_WR, 0xa064, 0x307}, /* #define MISC_AEU_PORT1_END 731 */ @@ -1183,14 +1183,15 @@ static const uint32_t init_data_e1[] = { 0x00000000, 0x00100000, 0x00000000, 0xffffffff, 0x00cfffff, 0x00000000, 0x00000000, 0x000000cc, 0x00000000, 0x00200000, 0x00000000, 0xffffffff, 0x00cfffff, 0x00000000, 0x00000000, 0x000000cc, 0x00000000, 0x00400000, - 0x00000000, 0x00000a11, 0x00000a00, 0x00000a04, 0x0000ffff, 0x0000ffff, - 0x0000ffff, 0x0000ffff, 0x00000020, 0x00000021, 0x00000022, 0x00000023, - 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, - 0x0000002a, 0x0000002b, 0x0000002c, 0x0000002d, 0x0000002e, 0x0000002f, - 0x00000010, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, + 0x00000000, 0x00000200, 0x00003dff, 0x00000a11, 0x00000a00, 0x00000a04, + 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x00000020, 0x00000021, + 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, + 0x00000028, 0x00000029, 0x0000002a, 0x0000002b, 0x0000002c, 0x0000002d, + 0x0000002e, 0x0000002f, 0x00000010, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x07ffffff, 0x0000003f, 0x07ffffff, 0x0000000f, 0x00007ff8, 0x00007ff8, + 0x00000001, 0x00000001, 0x07ffffff, 0x0000003f, 0x07ffffff, 0x0000000f, + 0x00007ff8, 0x00007ff8, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, @@ -1211,347 +1212,346 @@ static const uint32_t init_data_e1[] = { 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, - 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, - 0x0000ff1c, 0x0fffffff, 0x0000ff00, 0x00000000, 0x0000ff00, 0x00000000, - 0x00000312, 0x00003500, 0x00000001, 0x00000002, 0x00000003, 0x00000000, - 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000000, - 0x00000001, 0x00000003, 0x00000000, 0x00000001, 0x00000004, 0x00000000, - 0x00000001, 0x00000003, 0x00000000, 0x00000001, 0x00000004, 0x00000000, - 0x00000004, 0x00000003, 0x00000000, 0x00000000, 0x00003fff, 0x000003ff, - 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x007c1004, 0x00000004, - 0x00000000, 0x00000002, 0x00000090, 0x00000090, 0x00800090, 0x08100000, - 0x0000008a, 0x00000080, 0x00000081, 0x00000080, 0x00000006, 0x000007d0, - 0x0000076c, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x071d2911, - 0x00000000, 0x009c0424, 0x00000000, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0x00007fff, 0x000000ff, 0x000000ff, 0x000000ff, - 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x0000003e, - 0x00000000, 0x0000003f, 0x0000003f, 0x0000003f, 0x00000000, 0x0000003f, - 0x0000003f, 0x0000003f, 0x0000000f, 0x00000043, 0x00000000, 0x00000006, - 0x00000000, 0x12170000, 0x22170000, 0x32170000, 0x12150000, 0x22150000, - 0x32150000, 0x02100000, 0x00100000, 0x10100000, 0x20100000, 0x30100000, - 0x00100000, 0x12140000, 0x22140000, 0x32140000, 0x00e38340, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xf0003000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffff3328, 0xffff3338, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0x0000ff1c, 0x0fffffff, 0x0000ff1c, 0x0fffffff, 0x0000ff00, 0x00000000, + 0x0000ff00, 0x00000000, 0x00000002, 0x00001500, 0x00000001, 0x00000002, + 0x00000003, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000001, + 0x00000004, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000001, + 0x00000004, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000001, + 0x00000004, 0x00000000, 0x00000004, 0x00000003, 0x00000000, 0x00000000, + 0x00003fff, 0x000003ff, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x007c1004, 0x00000004, 0x00000000, 0x00000002, 0x00000090, 0x00000090, + 0x00800090, 0x08100000, 0x0000008a, 0x00000080, 0x00000081, 0x00000080, + 0x00000006, 0x000007d0, 0x0000076c, 0x0000ffff, 0x0000ffff, 0x0000ffff, + 0x0000ffff, 0x071d2911, 0x00000000, 0x009c0424, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00007fff, 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, 0x0000003e, 0x00000000, 0x0000003f, 0x0000003f, 0x0000003f, + 0x00000000, 0x0000003f, 0x0000003f, 0x0000003f, 0x0000000f, 0x00000043, + 0x00000000, 0x00000006, 0x00000000, 0x12170000, 0x22170000, 0x32170000, + 0x12150000, 0x22150000, 0x32150000, 0x02100000, 0x00100000, 0x10100000, + 0x20100000, 0x30100000, 0x00100000, 0x12140000, 0x22140000, 0x32140000, + 0x00e38340, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xf0003000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff3328, + 0xffff3338, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x00003c10, 0x00000008, 0x00000000, 0x00000000, 0x00000040, - 0x00001808, 0x00000803, 0x00000803, 0x00000040, 0x00000003, 0x00000803, - 0x00000803, 0x00000803, 0x00010003, 0x00000803, 0x00000803, 0x00000003, - 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, + 0xffffffff, 0xffffffff, 0xffffffff, 0x00003c10, 0x00000008, 0x00000000, + 0x00000000, 0x00000040, 0x00001808, 0x00000803, 0x00000803, 0x00000040, + 0x00000003, 0x00000803, 0x00000803, 0x00000803, 0x00010003, 0x00000803, + 0x00000803, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003, - 0x00000003, 0x00000003, 0x00002403, 0x0000002f, 0x00000009, 0x00000019, - 0x00000184, 0x00000183, 0x00000306, 0x00000019, 0x00000006, 0x00000306, - 0x00000306, 0x00000306, 0x00000c86, 0x00000306, 0x00000306, 0x00000006, + 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00002403, 0x0000002f, + 0x00000009, 0x00000019, 0x00000184, 0x00000183, 0x00000306, 0x00000019, + 0x00000006, 0x00000306, 0x00000306, 0x00000306, 0x00000c86, 0x00000306, + 0x00000306, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, - 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000006, - 0x00000006, 0x00000006, 0x00000306, 0x00000013, 0x00000006, 0x00001004, - 0x00001004, 0x00106440, 0x00106440, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00002000, - 0x0000007c, 0x0000003d, 0x0000003f, 0x0000009c, 0x00000006, 0x00000005, - 0x0000000a, 0x00000005, 0x00000140, 0x00000140, 0x00000000, 0x00000000, - 0x000000c0, 0x0000013f, 0x00007fff, 0x00000048, 0x00000048, 0x00000000, - 0x00000000, 0x00000048, 0x00000004, 0x00000004, 0x00000004, 0x00000004, - 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000009, - 0x0000000b, 0x0000000a, 0x00000004, 0x00000009, 0x0000000b, 0x0000000a, + 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000306, 0x00000013, + 0x00000006, 0x00001004, 0x00001004, 0x00106440, 0x00106440, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00002000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00002000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002000, 0x0000007c, 0x0000003d, 0x0000003f, 0x0000009c, + 0x00000006, 0x00000005, 0x0000000a, 0x00000005, 0x00000140, 0x00000140, + 0x00000000, 0x00000000, 0x000000c0, 0x0000013f, 0x00007fff, 0x00000048, + 0x00000048, 0x00000000, 0x00000000, 0x00000048, 0x00000004, 0x00000004, + 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, + 0x00000004, 0x00000009, 0x0000000b, 0x0000000a, 0x00000004, 0x00000009, + 0x0000000b, 0x0000000a, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, + 0x00000001, 0x00000001, 0x00000004, 0x00000009, 0x0000000b, 0x0000000a, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000004, 0x00000009, 0x0000000b, 0x0000000a, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000004, 0x00000009, - 0x0000000b, 0x0000000a, 0x00000000, 0x00000000, 0x00000800, 0x00000200, - 0x000001ff, 0x00000400, 0x00000000, 0x00000000, 0x1e491e49, 0x1e491e49, - 0x0e490e49, 0x0e490e49, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, - 0x000025e4, 0x00008000, 0x00000013, 0x0fff0fff, 0x00000000, 0x00000000, - 0x0fff0fff, 0x10001000, 0x10001000, 0x20002000, 0x20002000, 0x80008000, - 0x80008000, 0x40004000, 0x40004000, 0x00000000, 0x00000001, 0x01010101, - 0x01200101, 0x20010101, 0x01011001, 0x01010101, 0x01200101, 0x20010101, - 0x01011001, 0x20010101, 0x01011001, 0x01010101, 0x01200101, 0x20010101, - 0x01011001, 0x01010101, 0x01200101, 0x00000123, 0x00000123, 0x00000123, + 0x00000004, 0x00000009, 0x0000000b, 0x0000000a, 0x00000000, 0x00000000, + 0x00000800, 0x00000200, 0x000001ff, 0x00000400, 0x00000000, 0x00000000, + 0x1e491e49, 0x1e491e49, 0x0e490e49, 0x0e490e49, 0xffffffff, 0x00000000, + 0xffffffff, 0x00000000, 0x000025e4, 0x00008000, 0x00000013, 0x0fff0fff, + 0x00000000, 0x00000000, 0x0fff0fff, 0x10001000, 0x10001000, 0x20002000, + 0x20002000, 0x80008000, 0x80008000, 0x40004000, 0x40004000, 0x00000000, + 0x00000001, 0x01010101, 0x01200101, 0x20010101, 0x01011001, 0x01010101, + 0x01200101, 0x20010101, 0x01011001, 0x20010101, 0x01011001, 0x01010101, + 0x01200101, 0x20010101, 0x01011001, 0x01010101, 0x01200101, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, - 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000123, 0x00000020, - 0x00000032, 0x00000007, 0x00000007, 0x00000000, 0x00000008, 0x02150020, - 0x02150020, 0x00000030, 0x08100000, 0x00000033, 0x00000030, 0x00000031, - 0x00000002, 0x00000005, 0x00000006, 0x00000002, 0x00000002, 0x00000000, - 0x00000005, 0x00000002, 0x00000002, 0x00000002, 0x00000001, 0x00000006, - 0x00000001, 0x00000002, 0x00000040, 0x00000040, 0x00000020, 0x00000013, - 0x00000020, 0x00010000, 0x000204c0, 0x00030980, 0x00040e40, 0x00051300, - 0x000617c0, 0x00071c80, 0x00082140, 0x00092600, 0x000a2ac0, 0x000b2f80, - 0x000c3440, 0x000d3900, 0x000e3dc0, 0x000f4280, 0x00104740, 0x00114c00, - 0x001250c0, 0x00135580, 0x00145a40, 0x00155f00, 0x001663c0, 0x00176880, - 0x00186d40, 0x00197200, 0x001a76c0, 0x001b7b80, 0x001c8040, 0x001d8500, - 0x001e89c0, 0x001f8e80, 0x00009340, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000008, 0x0000000c, 0x00000010, 0x00000001, 0x00000001, - 0x00000001, 0x00000211, 0x00000200, 0x00000204, 0x00000219, 0x0000ffff, - 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x07ffffff, 0x0000003f, 0x07ffffff, - 0x0000000f, 0x00007ff8, 0x00007ff8, 0x00000000, 0x140aff00, 0x00000000, - 0x00000001, 0x00201001, 0x00000000, 0x01008600, 0x00000100, 0x00000001, - 0x00000000, 0x00008602, 0x00000000, 0x00000000, 0x00000000, 0x00008604, - 0x00000000, 0x00000000, 0x00000000, 0x00008606, 0x00000000, 0x00000000, - 0x00000000, 0x00008608, 0x00000000, 0x00000000, 0x00000000, 0x0000860a, - 0x00000000, 0x00000000, 0x00000000, 0x0000860c, 0x00000000, 0x00000000, - 0x00000000, 0x0000860e, 0x00000000, 0x00000000, 0x00000000, 0x00008610, - 0x00000000, 0x00000000, 0x00000000, 0x00008612, 0x00000000, 0x00000000, - 0x00000000, 0x00008614, 0x00000000, 0x00000000, 0x00000000, 0x00008616, - 0x00000000, 0x00000000, 0x00000000, 0x00008618, 0x00000000, 0x00000000, - 0x00000000, 0x0000861a, 0x00000000, 0x00000000, 0x00000000, 0x0000861c, - 0x00000000, 0x00000000, 0x00000000, 0x0000861e, 0x00000000, 0x00000000, - 0x00000000, 0x00008620, 0x00000000, 0x00000000, 0x00000000, 0x00008622, - 0x00000000, 0x00000000, 0x00000000, 0x00008624, 0x00000000, 0x00000000, - 0x00000000, 0x00008626, 0x00000000, 0x00000000, 0x00000000, 0x00008628, - 0x00000000, 0x00000000, 0x00000000, 0x0000862a, 0x00000000, 0x00000000, - 0x00000000, 0x0000862c, 0x00000000, 0x00000000, 0x00000000, 0x0000862e, - 0x00000000, 0x00000000, 0x00000000, 0x00008630, 0x00000000, 0x00000000, - 0x00000000, 0x00008632, 0x00000000, 0x00000000, 0x00000000, 0x00008634, - 0x00000000, 0x00000000, 0x00000000, 0x00008636, 0x00000000, 0x00000000, - 0x00000000, 0x00008638, 0x00000000, 0x00000000, 0x00000000, 0x0000863a, - 0x00000000, 0x00000000, 0x00000000, 0x0000863c, 0x00000000, 0x00000000, - 0x00000000, 0x0000863e, 0x00000000, 0x00000000, 0x00000000, 0x00008640, - 0x00000000, 0x00000000, 0x00000000, 0x00008642, 0x00000000, 0x00000000, - 0x00000000, 0x00008644, 0x00000000, 0x00000000, 0x00000000, 0x00008646, - 0x00000000, 0x00000000, 0x00000000, 0x00008648, 0x00000000, 0x00000000, - 0x00000000, 0x0000864a, 0x00000000, 0x00000000, 0x00000000, 0x0000864c, - 0x00000000, 0x00000000, 0x00000000, 0x0000864e, 0x00000000, 0x00000000, - 0x00000000, 0x00008650, 0x00000000, 0x00000000, 0x00000000, 0x00008652, - 0x00000000, 0x00000000, 0x00000000, 0x00008654, 0x00000000, 0x00000000, - 0x00000000, 0x00008656, 0x00000000, 0x00000000, 0x00000000, 0x00008658, - 0x00000000, 0x00000000, 0x00000000, 0x0000865a, 0x00000000, 0x00000000, - 0x00000000, 0x0000865c, 0x00000000, 0x00000000, 0x00000000, 0x0000865e, - 0x00000000, 0x00000000, 0x00000000, 0x00008660, 0x00000000, 0x00000000, - 0x00000000, 0x00008662, 0x00000000, 0x00000000, 0x00000000, 0x00008664, - 0x00000000, 0x00000000, 0x00000000, 0x00008666, 0x00000000, 0x00000000, - 0x00000000, 0x00008668, 0x00000000, 0x00000000, 0x00000000, 0x0000866a, - 0x00000000, 0x00000000, 0x00000000, 0x0000866c, 0x00000000, 0x00000000, - 0x00000000, 0x0000866e, 0x00000000, 0x00000000, 0x00000000, 0x00008670, - 0x00000000, 0x00000000, 0x00000000, 0x00008672, 0x00000000, 0x00000000, - 0x00000000, 0x00008674, 0x00000000, 0x00000000, 0x00000000, 0x00008676, - 0x00000000, 0x00000000, 0x00000000, 0x00008678, 0x00000000, 0x00000000, - 0x00000000, 0x0000867a, 0x00000000, 0x00000000, 0x00000000, 0x0000867c, - 0x00000000, 0x00000000, 0x00000000, 0x0000867e, 0x00000000, 0x00000000, - 0x00000000, 0x00008680, 0x00000000, 0x00000000, 0x00000000, 0x00008682, - 0x00000000, 0x00000000, 0x00000000, 0x00008684, 0x00000000, 0x00000000, - 0x00000000, 0x00008686, 0x00000000, 0x00000000, 0x00000000, 0x00008688, - 0x00000000, 0x00000000, 0x00000000, 0x0000868a, 0x00000000, 0x00000000, - 0x00000000, 0x0000868c, 0x00000000, 0x00000000, 0x00000000, 0x0000868e, - 0x00000000, 0x00000000, 0x00000000, 0x00008690, 0x00000000, 0x00000000, - 0x00000000, 0x00008692, 0x00000000, 0x00000000, 0x00000000, 0x00008694, - 0x00000000, 0x00000000, 0x00000000, 0x00008696, 0x00000000, 0x00000000, - 0x00000000, 0x00008698, 0x00000000, 0x00000000, 0x00000000, 0x0000869a, - 0x00000000, 0x00000000, 0x00000000, 0x0000869c, 0x00000000, 0x00000000, - 0x00000000, 0x0000869e, 0x00000000, 0x00000000, 0x00000000, 0x000086a0, - 0x00000000, 0x00000000, 0x00000000, 0x000086a2, 0x00000000, 0x00000000, - 0x00000000, 0x000086a4, 0x00000000, 0x00000000, 0x00000000, 0x000086a6, - 0x00000000, 0x00000000, 0x00000000, 0x000086a8, 0x00000000, 0x00000000, - 0x00000000, 0x000086aa, 0x00000000, 0x00000000, 0x00000000, 0x000086ac, - 0x00000000, 0x00000000, 0x00000000, 0x000086ae, 0x00000000, 0x00000000, - 0x00000000, 0x000086b0, 0x00000000, 0x00000000, 0x00000000, 0x000086b2, - 0x00000000, 0x00000000, 0x00000000, 0x000086b4, 0x00000000, 0x00000000, - 0x00000000, 0x000086b6, 0x00000000, 0x00000000, 0x00000000, 0x000086b8, - 0x00000000, 0x00000000, 0x00000000, 0x000086ba, 0x00000000, 0x00000000, - 0x00000000, 0x000086bc, 0x00000000, 0x00000000, 0x00000000, 0x000086be, - 0x00000000, 0x00000000, 0x00000000, 0x000086c0, 0x00000000, 0x00000000, - 0x00000000, 0x000086c2, 0x00000000, 0x00000000, 0x00000000, 0x000086c4, - 0x00000000, 0x00000000, 0x00000000, 0x000086c6, 0x00000000, 0x00000000, - 0x00000000, 0x000086c8, 0x00000000, 0x00000000, 0x00000000, 0x000086ca, - 0x00000000, 0x00000000, 0x00000000, 0x000086cc, 0x00000000, 0x00000000, - 0x00000000, 0x000086ce, 0x00000000, 0x00000000, 0x00000000, 0x000086d0, - 0x00000000, 0x00000000, 0x00000000, 0x000086d2, 0x00000000, 0x00000000, - 0x00000000, 0x000086d4, 0x00000000, 0x00000000, 0x00000000, 0x000086d6, - 0x00000000, 0x00000000, 0x00000000, 0x000086d8, 0x00000000, 0x00000000, - 0x00000000, 0x000086da, 0x00000000, 0x00000000, 0x00000000, 0x000086dc, - 0x00000000, 0x00000000, 0x00000000, 0x000086de, 0x00000000, 0x00000000, - 0x00000000, 0x000086e0, 0x00000000, 0x00000000, 0x00000000, 0x000086e2, - 0x00000000, 0x00000000, 0x00000000, 0x000086e4, 0x00000000, 0x00000000, - 0x00000000, 0x000086e6, 0x00000000, 0x00000000, 0x00000000, 0x000086e8, - 0x00000000, 0x00000000, 0x00000000, 0x000086ea, 0x00000000, 0x00000000, - 0x00000000, 0x000086ec, 0x00000000, 0x00000000, 0x00000000, 0x000086ee, - 0x00000000, 0x00000000, 0x00000000, 0x000086f0, 0x00000000, 0x00000000, - 0x00000000, 0x000086f2, 0x00000000, 0x00000000, 0x00000000, 0x000086f4, - 0x00000000, 0x00000000, 0x00000000, 0x000086f6, 0x00000000, 0x00000000, - 0x00000000, 0x000086f8, 0x00000000, 0x00000000, 0x00000000, 0x000086fa, - 0x00000000, 0x00000000, 0x00000000, 0x000086fc, 0x00000000, 0x00000000, - 0x00000000, 0x000086fe, 0x00000000, 0x00000000, 0x00000000, 0x00008700, - 0x00000000, 0x00000000, 0x00000000, 0x00008702, 0x00000000, 0x00000000, - 0x00000000, 0x00008704, 0x00000000, 0x00000000, 0x00000000, 0x00008706, - 0x00000000, 0x00000000, 0x00000000, 0x00008708, 0x00000000, 0x00000000, - 0x00000000, 0x0000870a, 0x00000000, 0x00000000, 0x00000000, 0x0000870c, - 0x00000000, 0x00000000, 0x00000000, 0x0000870e, 0x00000000, 0x00000000, - 0x00000000, 0x00008710, 0x00000000, 0x00000000, 0x00000000, 0x00008712, - 0x00000000, 0x00000000, 0x00000000, 0x00008714, 0x00000000, 0x00000000, - 0x00000000, 0x00008716, 0x00000000, 0x00000000, 0x00000000, 0x00008718, - 0x00000000, 0x00000000, 0x00000000, 0x0000871a, 0x00000000, 0x00000000, - 0x00000000, 0x0000871c, 0x00000000, 0x00000000, 0x00000000, 0x0000871e, - 0x00000000, 0x00000000, 0x00000000, 0x00008720, 0x00000000, 0x00000000, - 0x00000000, 0x00008722, 0x00000000, 0x00000000, 0x00000000, 0x00008724, - 0x00000000, 0x00000000, 0x00000000, 0x00008726, 0x00000000, 0x00000000, - 0x00000000, 0x00008728, 0x00000000, 0x00000000, 0x00000000, 0x0000872a, - 0x00000000, 0x00000000, 0x00000000, 0x0000872c, 0x00000000, 0x00000000, - 0x00000000, 0x0000872e, 0x00000000, 0x00000000, 0x00000000, 0x00008730, - 0x00000000, 0x00000000, 0x00000000, 0x00008732, 0x00000000, 0x00000000, - 0x00000000, 0x00008734, 0x00000000, 0x00000000, 0x00000000, 0x00008736, - 0x00000000, 0x00000000, 0x00000000, 0x00008738, 0x00000000, 0x00000000, - 0x00000000, 0x0000873a, 0x00000000, 0x00000000, 0x00000000, 0x0000873c, - 0x00000000, 0x00000000, 0x00000000, 0x0000873e, 0x00000000, 0x00000000, - 0x00000000, 0x00008740, 0x00000000, 0x00000000, 0x00000000, 0x00008742, - 0x00000000, 0x00000000, 0x00000000, 0x00008744, 0x00000000, 0x00000000, - 0x00000000, 0x00008746, 0x00000000, 0x00000000, 0x00000000, 0x00008748, - 0x00000000, 0x00000000, 0x00000000, 0x0000874a, 0x00000000, 0x00000000, - 0x00000000, 0x0000874c, 0x00000000, 0x00000000, 0x00000000, 0x0000874e, - 0x00000000, 0x00000000, 0x00000000, 0x00008750, 0x00000000, 0x00000000, - 0x00000000, 0x00008752, 0x00000000, 0x00000000, 0x00000000, 0x00008754, - 0x00000000, 0x00000000, 0x00000000, 0x00008756, 0x00000000, 0x00000000, - 0x00000000, 0x00008758, 0x00000000, 0x00000000, 0x00000000, 0x0000875a, - 0x00000000, 0x00000000, 0x00000000, 0x0000875c, 0x00000000, 0x00000000, - 0x00000000, 0x0000875e, 0x00000000, 0x00000000, 0x00000000, 0x00008760, - 0x00000000, 0x00000000, 0x00000000, 0x00008762, 0x00000000, 0x00000000, - 0x00000000, 0x00008764, 0x00000000, 0x00000000, 0x00000000, 0x00008766, - 0x00000000, 0x00000000, 0x00000000, 0x00008768, 0x00000000, 0x00000000, - 0x00000000, 0x0000876a, 0x00000000, 0x00000000, 0x00000000, 0x0000876c, - 0x00000000, 0x00000000, 0x00000000, 0x0000876e, 0x00000000, 0x00000000, - 0x00000000, 0x00008770, 0x00000000, 0x00000000, 0x00000000, 0x00008772, - 0x00000000, 0x00000000, 0x00000000, 0x00008774, 0x00000000, 0x00000000, - 0x00000000, 0x00008776, 0x00000000, 0x00000000, 0x00000000, 0x00008778, - 0x00000000, 0x00000000, 0x00000000, 0x0000877a, 0x00000000, 0x00000000, - 0x00000000, 0x0000877c, 0x00000000, 0x00000000, 0x00000000, 0x0000877e, - 0x00000000, 0x00000000, 0x00000000, 0x00008780, 0x00000000, 0x00000000, - 0x00000000, 0x00008782, 0x00000000, 0x00000000, 0x00000000, 0x00008784, - 0x00000000, 0x00000000, 0x00000000, 0x00008786, 0x00000000, 0x00000000, - 0x00000000, 0x00008788, 0x00000000, 0x00000000, 0x00000000, 0x0000878a, - 0x00000000, 0x00000000, 0x00000000, 0x0000878c, 0x00000000, 0x00000000, - 0x00000000, 0x0000878e, 0x00000000, 0x00000000, 0x00000000, 0x00008790, - 0x00000000, 0x00000000, 0x00000000, 0x00008792, 0x00000000, 0x00000000, - 0x00000000, 0x00008794, 0x00000000, 0x00000000, 0x00000000, 0x00008796, - 0x00000000, 0x00000000, 0x00000000, 0x00008798, 0x00000000, 0x00000000, - 0x00000000, 0x0000879a, 0x00000000, 0x00000000, 0x00000000, 0x0000879c, - 0x00000000, 0x00000000, 0x00000000, 0x0000879e, 0x00000000, 0x00000000, - 0x00000000, 0x000087a0, 0x00000000, 0x00000000, 0x00000000, 0x000087a2, - 0x00000000, 0x00000000, 0x00000000, 0x000087a4, 0x00000000, 0x00000000, - 0x00000000, 0x000087a6, 0x00000000, 0x00000000, 0x00000000, 0x000087a8, - 0x00000000, 0x00000000, 0x00000000, 0x000087aa, 0x00000000, 0x00000000, - 0x00000000, 0x000087ac, 0x00000000, 0x00000000, 0x00000000, 0x000087ae, - 0x00000000, 0x00000000, 0x00000000, 0x000087b0, 0x00000000, 0x00000000, - 0x00000000, 0x000087b2, 0x00000000, 0x00000000, 0x00000000, 0x000087b4, - 0x00000000, 0x00000000, 0x00000000, 0x000087b6, 0x00000000, 0x00000000, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@freebsd.org Thu Mar 10 03:57:38 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA8E0AC9704; Thu, 10 Mar 2016 03:57:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB06C1D8; Thu, 10 Mar 2016 03:57:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2A3vbCQ088687; Thu, 10 Mar 2016 03:57:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2A3vbB0088686; Thu, 10 Mar 2016 03:57:37 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201603100357.u2A3vbB0088686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 10 Mar 2016 03:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296597 - stable/9/crypto/openssl/crypto/bn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 03:57:39 -0000 Author: delphij Date: Thu Mar 10 03:57:37 2016 New Revision: 296597 URL: https://svnweb.freebsd.org/changeset/base/296597 Log: Fix a regression introduced in r296462 that causes out-of-bound access in the BN code and have slipped my review. PR: 207783 Submitted by: dim Modified: stable/9/crypto/openssl/crypto/bn/bn_exp.c Modified: stable/9/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_exp.c Thu Mar 10 02:43:10 2016 (r296596) +++ stable/9/crypto/openssl/crypto/bn/bn_exp.c Thu Mar 10 03:57:37 2016 (r296597) @@ -758,7 +758,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr * Fetch the appropriate pre-computed value from the pre-buf */ if (!MOD_EXP_CTIME_COPY_FROM_PREBUF - (computeTemp, top, powerbuf, wvalue, numPowers)) + (computeTemp, top, powerbuf, wvalue, window)) goto err; /* Multiply the result into the intermediate result */ From owner-svn-src-stable-9@freebsd.org Thu Mar 10 03:58:50 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D705AC99BF; Thu, 10 Mar 2016 03:58:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3C243B7; Thu, 10 Mar 2016 03:58:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2A3wmxu088782; Thu, 10 Mar 2016 03:58:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2A3wmRF088781; Thu, 10 Mar 2016 03:58:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201603100358.u2A3wmRF088781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 10 Mar 2016 03:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296598 - stable/9/crypto/openssl/crypto/bn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 03:58:50 -0000 Author: delphij Date: Thu Mar 10 03:58:48 2016 New Revision: 296598 URL: https://svnweb.freebsd.org/changeset/base/296598 Log: Fix CR/LF's in bn_exp.c introduced in r207783. No actual code change. Modified: stable/9/crypto/openssl/crypto/bn/bn_exp.c Modified: stable/9/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_exp.c Thu Mar 10 03:57:37 2016 (r296597) +++ stable/9/crypto/openssl/crypto/bn/bn_exp.c Thu Mar 10 03:58:48 2016 (r296598) @@ -107,13 +107,13 @@ * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * - */ - -#include "cryptlib.h" -#include "constant_time_locl.h" -#include "bn_lcl.h" - -/* maximum precomputation table size for *variable* sliding windows */ + */ + +#include "cryptlib.h" +#include "constant_time_locl.h" +#include "bn_lcl.h" + +/* maximum precomputation table size for *variable* sliding windows */ #define TABLE_SIZE 32 /* this one works - simple but works */ @@ -521,79 +521,79 @@ int BN_mod_exp_mont(BIGNUM *rr, const BI * pattern as far as cache lines are concerned. The following functions are * used to transfer a BIGNUM from/to that table. */ - -static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int top, - unsigned char *buf, int idx, - int window) -{ - int i, j; - int width = 1 << window; - BN_ULONG *table = (BN_ULONG *)buf; - - if (bn_wexpand(b, top) == NULL) - return 0; + +static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int top, + unsigned char *buf, int idx, + int window) +{ + int i, j; + int width = 1 << window; + BN_ULONG *table = (BN_ULONG *)buf; + + if (bn_wexpand(b, top) == NULL) + return 0; while (b->top < top) { - b->d[b->top++] = 0; - } - - for (i = 0, j = idx; i < top; i++, j += width) { - table[j] = b->d[i]; - } - - bn_correct_top(b); + b->d[b->top++] = 0; + } + + for (i = 0, j = idx; i < top; i++, j += width) { + table[j] = b->d[i]; + } + + bn_correct_top(b); return 1; } - -static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, - unsigned char *buf, int idx, - int window) -{ - int i, j; - int width = 1 << window; - volatile BN_ULONG *table = (volatile BN_ULONG *)buf; - - if (bn_wexpand(b, top) == NULL) - return 0; - - if (window <= 3) { - for (i = 0; i < top; i++, table += width) { - BN_ULONG acc = 0; - - for (j = 0; j < width; j++) { - acc |= table[j] & - ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); - } - - b->d[i] = acc; - } - } else { - int xstride = 1 << (window - 2); - BN_ULONG y0, y1, y2, y3; - - i = idx >> (window - 2); /* equivalent of idx / xstride */ - idx &= xstride - 1; /* equivalent of idx % xstride */ - - y0 = (BN_ULONG)0 - (constant_time_eq_int(i,0)&1); - y1 = (BN_ULONG)0 - (constant_time_eq_int(i,1)&1); - y2 = (BN_ULONG)0 - (constant_time_eq_int(i,2)&1); - y3 = (BN_ULONG)0 - (constant_time_eq_int(i,3)&1); - - for (i = 0; i < top; i++, table += width) { - BN_ULONG acc = 0; - - for (j = 0; j < xstride; j++) { - acc |= ( (table[j + 0 * xstride] & y0) | - (table[j + 1 * xstride] & y1) | - (table[j + 2 * xstride] & y2) | - (table[j + 3 * xstride] & y3) ) - & ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); - } - - b->d[i] = acc; - } - } - - b->top = top; + +static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, + unsigned char *buf, int idx, + int window) +{ + int i, j; + int width = 1 << window; + volatile BN_ULONG *table = (volatile BN_ULONG *)buf; + + if (bn_wexpand(b, top) == NULL) + return 0; + + if (window <= 3) { + for (i = 0; i < top; i++, table += width) { + BN_ULONG acc = 0; + + for (j = 0; j < width; j++) { + acc |= table[j] & + ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); + } + + b->d[i] = acc; + } + } else { + int xstride = 1 << (window - 2); + BN_ULONG y0, y1, y2, y3; + + i = idx >> (window - 2); /* equivalent of idx / xstride */ + idx &= xstride - 1; /* equivalent of idx % xstride */ + + y0 = (BN_ULONG)0 - (constant_time_eq_int(i,0)&1); + y1 = (BN_ULONG)0 - (constant_time_eq_int(i,1)&1); + y2 = (BN_ULONG)0 - (constant_time_eq_int(i,2)&1); + y3 = (BN_ULONG)0 - (constant_time_eq_int(i,3)&1); + + for (i = 0; i < top; i++, table += width) { + BN_ULONG acc = 0; + + for (j = 0; j < xstride; j++) { + acc |= ( (table[j + 0 * xstride] & y0) | + (table[j + 1 * xstride] & y1) | + (table[j + 2 * xstride] & y2) | + (table[j + 3 * xstride] & y3) ) + & ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); + } + + b->d[i] = acc; + } + } + + b->top = top; bn_correct_top(b); return 1; } @@ -684,13 +684,13 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr /* * Initialize the intermediate result. Do this early to save double * conversion, once each for a^0 and intermediate result. - */ - if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)) - goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, window)) - goto err; - - /* Initialize computeTemp as a^1 with montgomery precalcs */ + */ + if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)) + goto err; + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, window)) + goto err; + + /* Initialize computeTemp as a^1 with montgomery precalcs */ computeTemp = BN_CTX_get(ctx); am = BN_CTX_get(ctx); if (computeTemp == NULL || am == NULL) @@ -703,13 +703,13 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr } else aa = a; if (!BN_to_montgomery(am, aa, mont, ctx)) - goto err; - if (!BN_copy(computeTemp, am)) - goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, window)) - goto err; - - /* + goto err; + if (!BN_copy(computeTemp, am)) + goto err; + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, window)) + goto err; + + /* * If the window size is greater than 1, then calculate * val[i=2..2^winsize-1]. Powers are computed as a*a^(i-1) (even powers * could instead be computed as (a^(i/2))^2 to use the slight performance @@ -718,14 +718,14 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr if (window > 1) { for (i = 2; i < numPowers; i++) { /* Calculate a^i = a^(i-1) * a */ - if (!BN_mod_mul_montgomery - (computeTemp, am, computeTemp, mont, ctx)) - goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(computeTemp, top, powerbuf, i, - window)) - goto err; - } - } + if (!BN_mod_mul_montgomery + (computeTemp, am, computeTemp, mont, ctx)) + goto err; + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(computeTemp, top, powerbuf, i, + window)) + goto err; + } + } /* * Adjust the number of bits up to a multiple of the window size. If the From owner-svn-src-stable-9@freebsd.org Thu Mar 10 07:45:01 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64C70ACA473; Thu, 10 Mar 2016 07:45:01 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B506D07; Thu, 10 Mar 2016 07:45:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2A7j073058507; Thu, 10 Mar 2016 07:45:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2A7ivQf058467; Thu, 10 Mar 2016 07:44:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201603100744.u2A7ivQf058467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 10 Mar 2016 07:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296608 - in stable/9/contrib/bind9: . bin/named bin/rndc doc/arm lib/dns lib/isccc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 07:45:01 -0000 Author: delphij Date: Thu Mar 10 07:44:56 2016 New Revision: 296608 URL: https://svnweb.freebsd.org/changeset/base/296608 Log: MFV r296599: BIND 9.9.8-P4. Security: CVE-2016-1285 Security: CVE-2016-1286 Security: CVE-2016-2088 Security: FreeBSD-SA-16:13.bind Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/COPYRIGHT stable/9/contrib/bind9/README stable/9/contrib/bind9/bin/named/control.c stable/9/contrib/bind9/bin/named/controlconf.c stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/bin/rndc/rndc.c stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html stable/9/contrib/bind9/doc/arm/Bv9ARM.html stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf stable/9/contrib/bind9/doc/arm/man.arpaname.html stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html stable/9/contrib/bind9/doc/arm/man.dig.html stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/9/contrib/bind9/doc/arm/man.dnssec-verify.html stable/9/contrib/bind9/doc/arm/man.genrandom.html stable/9/contrib/bind9/doc/arm/man.host.html stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html stable/9/contrib/bind9/doc/arm/man.named-checkconf.html stable/9/contrib/bind9/doc/arm/man.named-checkzone.html stable/9/contrib/bind9/doc/arm/man.named-journalprint.html stable/9/contrib/bind9/doc/arm/man.named.html stable/9/contrib/bind9/doc/arm/man.nsec3hash.html stable/9/contrib/bind9/doc/arm/man.nsupdate.html stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html stable/9/contrib/bind9/doc/arm/man.rndc.conf.html stable/9/contrib/bind9/doc/arm/man.rndc.html stable/9/contrib/bind9/doc/arm/notes.html stable/9/contrib/bind9/doc/arm/notes.pdf stable/9/contrib/bind9/doc/arm/notes.xml stable/9/contrib/bind9/lib/dns/api stable/9/contrib/bind9/lib/dns/resolver.c stable/9/contrib/bind9/lib/isccc/cc.c stable/9/contrib/bind9/version Directory Properties: stable/9/contrib/bind9/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/CHANGES Thu Mar 10 07:44:56 2016 (r296608) @@ -1,3 +1,12 @@ + --- 9.9.8-P4 released --- + +4319. [security] Fix resolver assertion failure due to improper + DNAME handling when parsing fetch reply messages. + (CVE-2016-1286) [RT #41753] + +4318. [security] Malformed control messages can trigger assertions + in named and rndc. (CVE-2016-1285) [RT #41666] + --- 9.9.8-P3 released --- 4288. [bug] Fixed a regression in resolver.c:possibly_mark() Modified: stable/9/contrib/bind9/COPYRIGHT ============================================================================== --- stable/9/contrib/bind9/COPYRIGHT Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/COPYRIGHT Thu Mar 10 07:44:56 2016 (r296608) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2016 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any Modified: stable/9/contrib/bind9/README ============================================================================== --- stable/9/contrib/bind9/README Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/README Thu Mar 10 07:44:56 2016 (r296608) @@ -51,6 +51,11 @@ BIND 9 For up-to-date release notes and errata, see http://www.isc.org/software/bind9/releasenotes +BIND 9.9.8-P4 + + BIND 9.9.8-P4 is a security release addressing the flaws + described in CVE-2016-1285 and CVE-2016-1286. + BIND 9.9.8-P3 BIND 9.9.8-P3 is a security release addressing the flaw described in Modified: stable/9/contrib/bind9/bin/named/control.c ============================================================================== --- stable/9/contrib/bind9/bin/named/control.c Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/bin/named/control.c Thu Mar 10 07:44:56 2016 (r296608) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009-2015 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -69,7 +69,7 @@ ns_control_docommand(isccc_sexpr_t *mess #endif data = isccc_alist_lookup(message, "_data"); - if (data == NULL) { + if (!isccc_alist_alistp(data)) { /* * No data section. */ Modified: stable/9/contrib/bind9/bin/named/controlconf.c ============================================================================== --- stable/9/contrib/bind9/bin/named/controlconf.c Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/bin/named/controlconf.c Thu Mar 10 07:44:56 2016 (r296608) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008, 2011-2014 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008, 2011-2014, 2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -397,7 +397,7 @@ control_recvmessage(isc_task_t *task, is * Limit exposure to replay attacks. */ _ctrl = isccc_alist_lookup(request, "_ctrl"); - if (_ctrl == NULL) { + if (!isccc_alist_alistp(_ctrl)) { log_invalid(&conn->ccmsg, ISC_R_FAILURE); goto cleanup_request; } Modified: stable/9/contrib/bind9/bin/named/query.c ============================================================================== --- stable/9/contrib/bind9/bin/named/query.c Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/bin/named/query.c Thu Mar 10 07:44:56 2016 (r296608) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -3221,7 +3221,8 @@ query_addbestns(ns_client_t *client) { goto cleanup; /* - * If the answer is secure only add NS records if they are secure * when the client may be looking for AD in the response. + * If the answer is secure only add NS records if they are secure + * when the client may be looking for AD in the response. */ if (SECURE(client) && (WANTDNSSEC(client) || WANTAD(client)) && ((rdataset->trust != dns_trust_secure) || Modified: stable/9/contrib/bind9/bin/rndc/rndc.c ============================================================================== --- stable/9/contrib/bind9/bin/rndc/rndc.c Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/bin/rndc/rndc.c Thu Mar 10 07:44:56 2016 (r296608) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -249,8 +249,8 @@ rndc_recvdone(isc_task_t *task, isc_even DO("parse message", isccc_cc_fromwire(&source, &response, &secret)); data = isccc_alist_lookup(response, "_data"); - if (data == NULL) - fatal("no data section in response"); + if (!isccc_alist_alistp(data)) + fatal("bad or missing data section in response"); result = isccc_cc_lookupstring(data, "err", &errormsg); if (result == ISC_R_SUCCESS) { failed = ISC_TRUE; @@ -313,8 +313,8 @@ rndc_recvnonce(isc_task_t *task, isc_eve DO("parse message", isccc_cc_fromwire(&source, &response, &secret)); _ctrl = isccc_alist_lookup(response, "_ctrl"); - if (_ctrl == NULL) - fatal("_ctrl section missing"); + if (!isccc_alist_alistp(_ctrl)) + fatal("bad or missing ctrl section in response"); nonce = 0; if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS) nonce = 0; Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html Thu Mar 10 07:44:56 2016 (r296608) @@ -556,6 +556,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html Thu Mar 10 07:44:56 2016 (r296608) @@ -154,6 +154,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html Thu Mar 10 07:44:56 2016 (r296608) @@ -665,6 +665,6 @@ controls { -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html Thu Mar 10 07:44:56 2016 (r296608) @@ -1935,6 +1935,6 @@ $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2. -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html Thu Mar 10 07:44:56 2016 (r296608) @@ -139,6 +139,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html Thu Mar 10 07:44:56 2016 (r296608) @@ -12177,6 +12177,6 @@ HOST-127.EXAMPLE. MX 0 . -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html Thu Mar 10 07:44:56 2016 (r296608) @@ -247,6 +247,6 @@ zone "example.com" { -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html Thu Mar 10 07:44:56 2016 (r296608) @@ -135,6 +135,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html Thu Mar 10 07:44:56 2016 (r296608) @@ -45,7 +45,7 @@

-Release Notes for BIND Version 9.9.8-P3

+Release Notes for BIND Version 9.9.8-P4

Introduction

@@ -68,6 +68,10 @@ This document summarizes changes since BIND 9.9.8:

+ BIND 9.9.8-P4 addresses the security issues described in + CVE-2016-1285 and CVE-2016-1286. +

+

BIND 9.9.8-P3 addresses the security issue described in CVE-2015-8704. It also fixes a serious regression in authoritative server selection that was introduced in 9.9.8. @@ -96,26 +100,35 @@ Security Fixes

  • + The resolver could abort with an assertion failure due to + improper DNAME handling when parsing fetch reply + messages. This flaw is disclosed in CVE-2016-1286. [RT #41753] +

  • +
  • + Malformed control messages can trigger assertions in named + and rndc. This flaw is disclosed in CVE-2016-1285. [RT + #41666] +

  • +
  • Specific APL data could trigger an INSIST. This flaw - was discovered by Brian Mitchell and is disclosed in - CVE-2015-8704. [RT #41396] + is disclosed in CVE-2015-8704. [RT #41396]

  • - Named is potentially vulnerable to the OpenSSL vulnerabilty + Named is potentially vulnerable to the OpenSSL vulnerability described in CVE-2015-3193.

  • + Incorrect reference counting could result in an INSIST + failure if a socket error occurred while performing a + lookup. This flaw is disclosed in CVE-2015-8461. [RT#40945] +

  • +
  • Insufficient testing when parsing a message allowed records with an incorrect class to be be accepted, triggering a REQUIRE failure when those records were subsequently cached. This flaw is disclosed in CVE-2015-8000. [RT #40987]

  • -
  • - Incorrect reference counting could result in an INSIST - failure if a socket error occurred while performing a - lookup. This flaw is disclosed in CVE-2015-8461. [RT#40945] -

@@ -143,7 +156,8 @@

End of Life

- The BIND 9.9 (Extended Support Version) will be supported until June, 2017. + The BIND 9.9 (Extended Support Version) will be supported until + December, 2017. https://www.isc.org/downloads/software-support-policy/

@@ -177,6 +191,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html Thu Mar 10 07:44:56 2016 (r296608) @@ -163,6 +163,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html Thu Mar 10 07:44:56 2016 (r296608) @@ -514,6 +514,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html Thu Mar 10 07:44:56 2016 (r296608) @@ -47,13 +47,13 @@
BIND 9 DNS Library Support
-
Prerequisite
-
Compilation
-
Installation
-
Known Defects/Restrictions
-
The dns.conf File
-
Sample Applications
-
Library References
+
Prerequisite
+
Compilation
+
Installation
+
Known Defects/Restrictions
+
The dns.conf File
+
Sample Applications
+
Library References
@@ -89,7 +89,7 @@

-Prerequisite

+Prerequisite

GNU make is required to build the export libraries (other part of BIND 9 can still be built with other types of make). In the reminder of this document, "make" means GNU make. Note that @@ -98,7 +98,7 @@

-Compilation

+Compilation
 $ ./configure --enable-exportlib [other flags]
 $ make
@@ -113,7 +113,7 @@ $ make
 

-Installation

+Installation
 $ cd lib/export
 $ make install
@@ -135,7 +135,7 @@ $ make i
 
 

-Known Defects/Restrictions

+Known Defects/Restrictions
  • Currently, win32 is not supported for the export library. (Normal BIND 9 application can be built as @@ -175,7 +175,7 @@ $ make

    -The dns.conf File

    +The dns.conf File

The IRS library supports an "advanced" configuration file related to the DNS library for configuration parameters that would be beyond the capability of the @@ -193,14 +193,14 @@ $ make

-Sample Applications

+Sample Applications

Some sample application programs using this API are provided for reference. The following is a brief description of these applications.

-sample: a simple stub resolver utility

+sample: a simple stub resolver utility

It sends a query of a given name (of a given optional RR type) to a specified recursive server, and prints the result as a list of @@ -264,7 +264,7 @@ $ make

-sample-async: a simple stub resolver, working asynchronously

+sample-async: a simple stub resolver, working asynchronously

Similar to "sample", but accepts a list of (query) domain names as a separate file and resolves the names @@ -305,7 +305,7 @@ $ make

-sample-request: a simple DNS transaction client

+sample-request: a simple DNS transaction client

It sends a query to a specified server, and prints the response with minimal processing. It doesn't act as a @@ -346,7 +346,7 @@ $ make

-sample-gai: getaddrinfo() and getnameinfo() test code

+sample-gai: getaddrinfo() and getnameinfo() test code

This is a test program to check getaddrinfo() and getnameinfo() behavior. It takes a @@ -363,7 +363,7 @@ $ make

-sample-update: a simple dynamic update client program

+sample-update: a simple dynamic update client program

It accepts a single update command as a command-line argument, sends an update request message to the @@ -458,7 +458,7 @@ $ sample

-nsprobe: domain/name server checker in terms of RFC 4074

+nsprobe: domain/name server checker in terms of RFC 4074

It checks a set of domains to see the name servers of the domains behave @@ -515,7 +515,7 @@ $ sample

-Library References

+Library References

As of this writing, there is no formal "manual" of the libraries, except this document, header files (some of them provide pretty detailed explanations), and sample application @@ -540,6 +540,6 @@ $ sample -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html Thu Mar 10 07:44:56 2016 (r296608) @@ -140,6 +140,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/Bv9ARM.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/Bv9ARM.html Thu Mar 10 07:44:56 2016 (r296608) @@ -41,7 +41,7 @@

BIND 9 Administrator Reference Manual

-

BIND Version 9.9.8-P3

+

BIND Version 9.9.8-P4

@@ -234,7 +234,7 @@
A. Release Notes
-
Release Notes for BIND Version 9.9.8-P3
+
Release Notes for BIND Version 9.9.8-P4
Introduction
Download
@@ -262,13 +262,13 @@
BIND 9 DNS Library Support
-
Prerequisite
-
Compilation
-
Installation
-
Known Defects/Restrictions
-
The dns.conf File
-
Sample Applications
-
Library References
+
Prerequisite
+
Compilation
+
Installation
+
Known Defects/Restrictions
+
The dns.conf File
+
Sample Applications
+
Library References
I. Manual pages
@@ -365,6 +365,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/9/contrib/bind9/doc/arm/man.arpaname.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.arpaname.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.arpaname.html Thu Mar 10 07:44:56 2016 (r296608) @@ -50,20 +50,20 @@

arpaname {ipaddress ...}

-

DESCRIPTION

+

DESCRIPTION

arpaname translates IP addresses (IPv4 and IPv6) to the corresponding IN-ADDR.ARPA or IP6.ARPA names.

-

SEE ALSO

+

SEE ALSO

BIND 9 Administrator Reference Manual.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -87,6 +87,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html Thu Mar 10 07:44:56 2016 (r296608) @@ -50,7 +50,7 @@

ddns-confgen [-a algorithm] [-h] [-k keyname] [-r randomfile] [ -s name | -z zone ] [-q] [name]

-

DESCRIPTION

+

DESCRIPTION

ddns-confgen generates a key for use by nsupdate and named. It simplifies configuration @@ -77,7 +77,7 @@

-

OPTIONS

+

OPTIONS

-a algorithm

@@ -144,7 +144,7 @@

-

SEE ALSO

+

SEE ALSO

nsupdate(1), named.conf(5), named(8), @@ -152,7 +152,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -176,6 +176,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dig.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dig.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dig.html Thu Mar 10 07:44:56 2016 (r296608) @@ -52,7 +52,7 @@

dig [global-queryopt...] [query...]

-

DESCRIPTION

+

DESCRIPTION

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and @@ -99,7 +99,7 @@

-

SIMPLE USAGE

+

SIMPLE USAGE

A typical invocation of dig looks like:

@@ -152,7 +152,7 @@

-

OPTIONS

+

OPTIONS

-4

@@ -280,7 +280,7 @@

-

QUERY OPTIONS

+

QUERY OPTIONS

dig provides a number of query options which affect the way in which lookups are made and the results displayed. Some of @@ -649,7 +649,7 @@

-

MULTIPLE QUERIES

+

MULTIPLE QUERIES

The BIND 9 implementation of dig supports @@ -695,7 +695,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc

-

IDN SUPPORT

+

IDN SUPPORT

If dig has been built with IDN (internationalized domain name) support, it can accept and display non-ASCII domain names. @@ -709,14 +709,14 @@ dig +qr www.isc.org any -x 127.0.0.1 isc

-

FILES

+

FILES

/etc/resolv.conf

${HOME}/.digrc

-

SEE ALSO

+

SEE ALSO

host(1), named(8), dnssec-keygen(8), @@ -724,7 +724,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc

-

BUGS

+

BUGS

There are probably too many query options.

@@ -747,6 +747,6 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
-

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html Thu Mar 10 07:44:56 2016 (r296608) @@ -51,7 +51,7 @@

dnssec-dsfromkey [-l domain] [-f file] [-d dig path] [-D dsfromkey path] {zone}

-

DESCRIPTION

+

DESCRIPTION

dnssec-checkds verifies the correctness of Delegation Signer (DS) or DNSSEC Lookaside Validation (DLV) resource records for keys in a specified @@ -59,7 +59,7 @@

-

OPTIONS

+

OPTIONS

-f file

@@ -88,14 +88,14 @@

-

SEE ALSO

+

SEE ALSO

dnssec-dsfromkey(8), dnssec-keygen(8), dnssec-signzone(8),

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -118,6 +118,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html Thu Mar 10 07:44:56 2016 (r296608) @@ -50,7 +50,7 @@

dnssec-coverage [-K directory] [-f file] [-d DNSKEY TTL] [-m max TTL] [-r interval] [-c compilezone path] [zone]

-

DESCRIPTION

+

DESCRIPTION

dnssec-coverage verifies that the DNSSEC keys for a given zone or a set of zones have timing metadata set properly to ensure no future lapses in DNSSEC @@ -78,7 +78,7 @@

-

OPTIONS

+

OPTIONS

-f file

@@ -168,7 +168,7 @@

-

SEE ALSO

+

SEE ALSO

dnssec-checkds(8), dnssec-dsfromkey(8), @@ -177,7 +177,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -201,6 +201,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html Thu Mar 10 07:44:56 2016 (r296608) @@ -52,14 +52,14 @@

dnssec-dsfromkey [-h] [-V]

-

DESCRIPTION

+

DESCRIPTION

dnssec-dsfromkey outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s).

-

OPTIONS

+

OPTIONS

-1

@@ -150,7 +150,7 @@

-

EXAMPLE

+

EXAMPLE

To build the SHA-256 DS RR from the Kexample.com.+003+26160 @@ -165,7 +165,7 @@

-

FILES

+

FILES

The keyfile can be designed by the key identification Knnnn.+aaa+iiiii or the full file name @@ -179,13 +179,13 @@

-

CAVEAT

+

CAVEAT

A keyfile error can give a "file not found" even if the file exists.

-

SEE ALSO

+

SEE ALSO

dnssec-keygen(8), dnssec-signzone(8), BIND 9 Administrator Reference Manual, @@ -195,7 +195,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -219,6 +219,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html Thu Mar 10 07:44:56 2016 (r296608) @@ -50,7 +50,7 @@

dnssec-keyfromlabel {-l label} [-3] [-a algorithm] [-A date/offset] [-c class] [-D date/offset] [-E engine] [-f flag] [-G] [-I date/offset] [-i interval] [-k] [-K directory] [-L ttl] [-n nametype] [-P date/offset] [-p protocol] [-R date/offset] [-S key] [-t type] [-v level] [-V] [-y] {name}

-

DESCRIPTION

+

DESCRIPTION

dnssec-keyfromlabel generates a key pair of files that referencing a key object stored in a cryptographic hardware service module (HSM). The private key @@ -66,7 +66,7 @@

-

OPTIONS

+

OPTIONS

-a algorithm
@@ -209,7 +209,7 @@
-

TIMING OPTIONS

+

TIMING OPTIONS

Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the argument begins with a '+' or '-', it is interpreted as @@ -281,7 +281,7 @@

-

GENERATED KEY FILES

+

GENERATED KEY FILES

When dnssec-keyfromlabel completes successfully, @@ -320,7 +320,7 @@

-

SEE ALSO

+

SEE ALSO

dnssec-keygen(8), dnssec-signzone(8), BIND 9 Administrator Reference Manual, @@ -328,7 +328,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -352,6 +352,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html Thu Mar 10 07:44:56 2016 (r296608) @@ -50,7 +50,7 @@

dnssec-keygen [-a algorithm] [-b keysize] [-n nametype] [-3] [-A date/offset] [-C] [-c class] [-D date/offset] [-E engine] [-f flag] [-G] [-g generator] [-h] [-I date/offset] [-i interval] [-K directory] [-L ttl] [-k] [-P date/offset] [-p protocol] [-q] [-R date/offset] [-r randomdev] [-S key] [-s strength] [-t type] [-v level] [-V] [-z] {name}

-

DESCRIPTION

+

DESCRIPTION

dnssec-keygen generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC 4034. It can also generate keys for use with @@ -64,7 +64,7 @@

-

OPTIONS

+

OPTIONS

-a algorithm
@@ -280,7 +280,7 @@
-

TIMING OPTIONS

+

TIMING OPTIONS

Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the argument begins with a '+' or '-', it is interpreted as @@ -354,7 +354,7 @@

-

GENERATED KEYS

+

GENERATED KEYS

When dnssec-keygen completes successfully, @@ -400,7 +400,7 @@

-

EXAMPLE

+

EXAMPLE

To generate a 768-bit DSA key for the domain example.com, the following command would be @@ -421,7 +421,7 @@

-

SEE ALSO

+

SEE ALSO

dnssec-signzone(8), BIND 9 Administrator Reference Manual, RFC 2539, @@ -430,7 +430,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

@@ -454,6 +454,6 @@ -

BIND 9.9.8-P3 (Extended Support Version)

+

BIND 9.9.8-P4 (Extended Support Version)

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html ============================================================================== --- stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html Thu Mar 10 06:25:47 2016 (r296607) +++ stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html Thu Mar 10 07:44:56 2016 (r296608) @@ -50,7 +50,7 @@

dnssec-revoke [-hr] [-v level] [-V] [-K directory] [-E engine] [-f] [-R] {keyfile}

-

DESCRIPTION

+

DESCRIPTION

dnssec-revoke reads a DNSSEC key file, sets the REVOKED bit on the key as defined *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@freebsd.org Fri Mar 11 01:41:11 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F9BDACB390; Fri, 11 Mar 2016 01:41:11 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D56F7D09; Fri, 11 Mar 2016 01:41:10 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2B1f9nl002524; Fri, 11 Mar 2016 01:41:09 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2B1f9BF002523; Fri, 11 Mar 2016 01:41:09 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201603110141.u2B1f9BF002523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Fri, 11 Mar 2016 01:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296639 - stable/9/usr.sbin/portsnap/portsnap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 01:41:11 -0000 Author: jgh (doc,ports committer) Date: Fri Mar 11 01:41:09 2016 New Revision: 296639 URL: https://svnweb.freebsd.org/changeset/base/296639 Log: MFC 296280: PR: 202971 Submitted by: adamw@FreeBSD.org Reviewed by: bdrewery@ Approved by: wblock@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5429 Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.8 Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.8 ============================================================================== --- stable/9/usr.sbin/portsnap/portsnap/portsnap.8 Fri Mar 11 01:39:28 2016 (r296638) +++ stable/9/usr.sbin/portsnap/portsnap/portsnap.8 Fri Mar 11 01:41:09 2016 (r296639) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2012 +.Dd March 1, 2016 .Dt PORTSNAP 8 .Os FreeBSD .Sh NAME @@ -208,7 +208,7 @@ However, running .Fl I .Cm update is probably safe, and can be used together with -.Xr portversion 1 +.Xr pkg-version 8 to identify installed software which is out of date. .It If you wish to use @@ -256,6 +256,8 @@ Default location where the ports tree is .Xr fetch 1 , .Xr sha256 1 , .Xr fetch 3 , -.Xr portsnap.conf 5 +.Xr portsnap.conf 5 , +.Xr pkg 7 , +.Xr pkg-version 8 .Sh AUTHORS .An Colin Percival Aq cperciva@FreeBSD.org From owner-svn-src-stable-9@freebsd.org Fri Mar 11 09:55:25 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D42F4ACC713; Fri, 11 Mar 2016 09:55:25 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A597C1AF; Fri, 11 Mar 2016 09:55:25 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2B9tOam055398; Fri, 11 Mar 2016 09:55:24 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2B9tOWL055397; Fri, 11 Mar 2016 09:55:24 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201603110955.u2B9tOWL055397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 11 Mar 2016 09:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296650 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 09:55:25 -0000 Author: ae Date: Fri Mar 11 09:55:24 2016 New Revision: 296650 URL: https://svnweb.freebsd.org/changeset/base/296650 Log: MFC r296348: Use correct size for malloc. Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/netpfil/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Mar 11 09:41:46 2016 (r296649) +++ stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Mar 11 09:55:24 2016 (r296650) @@ -487,7 +487,7 @@ resize_dynamic_table(struct ip_fw_chain V_curr_dyn_buckets, nbuckets); /* Allocate and initialize new hash */ - dyn_v = malloc(nbuckets * sizeof(ipfw_dyn_rule), M_IPFW, + dyn_v = malloc(nbuckets * sizeof(*dyn_v), M_IPFW, M_WAITOK | M_ZERO); for (i = 0 ; i < nbuckets; i++) From owner-svn-src-stable-9@freebsd.org Fri Mar 11 22:45:24 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB00ACDC93; Fri, 11 Mar 2016 22:45:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1585679; Fri, 11 Mar 2016 22:45:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2BMjNwC092020; Fri, 11 Mar 2016 22:45:23 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2BMjNMA092019; Fri, 11 Mar 2016 22:45:23 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201603112245.u2BMjNMA092019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 11 Mar 2016 22:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296686 - stable/9/usr.sbin/ntp/ntp-keygen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 22:45:25 -0000 Author: jkim Date: Fri Mar 11 22:45:23 2016 New Revision: 296686 URL: https://svnweb.freebsd.org/changeset/base/296686 Log: Link ntp-keygen(8) with pthread. Note this is a direct commit to stable/9 because head and stable/10 were fixed differently with r280849 and r285612, respectively. Modified: stable/9/usr.sbin/ntp/ntp-keygen/Makefile Modified: stable/9/usr.sbin/ntp/ntp-keygen/Makefile ============================================================================== --- stable/9/usr.sbin/ntp/ntp-keygen/Makefile Fri Mar 11 22:37:12 2016 (r296685) +++ stable/9/usr.sbin/ntp/ntp-keygen/Makefile Fri Mar 11 22:45:23 2016 (r296686) @@ -20,8 +20,8 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/n -I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \ -I${.CURDIR}/../ -DPADD= ${LIBNTP} ${LIBOPTS} -LDADD= ${LIBNTP} ${LIBOPTS} +DPADD= ${LIBNTP} ${LIBOPTS} ${LIBPTHREAD} +LDADD= ${LIBNTP} ${LIBOPTS} -lpthread .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} From owner-svn-src-stable-9@freebsd.org Sat Mar 12 18:38:14 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADC0ACEE7F; Sat, 12 Mar 2016 18:38:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACF2BC91; Sat, 12 Mar 2016 18:38:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CIcDQZ063885; Sat, 12 Mar 2016 18:38:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CIcDmB063884; Sat, 12 Mar 2016 18:38:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201603121838.u2CIcDmB063884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 12 Mar 2016 18:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296734 - stable/9/contrib/smbfs/smbutil X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 18:38:15 -0000 Author: ngie Date: Sat Mar 12 18:38:13 2016 New Revision: 296734 URL: https://svnweb.freebsd.org/changeset/base/296734 Log: MFstable/10 r296733: MFC r295118: Add #include to mute warning from clang/gcc about implicitly declaring strcmp(3) Modified: stable/9/contrib/smbfs/smbutil/print.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/smbfs/ (props changed) Modified: stable/9/contrib/smbfs/smbutil/print.c ============================================================================== --- stable/9/contrib/smbfs/smbutil/print.c Sat Mar 12 18:36:13 2016 (r296733) +++ stable/9/contrib/smbfs/smbutil/print.c Sat Mar 12 18:38:13 2016 (r296734) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-stable-9@freebsd.org Sat Mar 12 18:47:29 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2135ACC242; Sat, 12 Mar 2016 18:47:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5077B8; Sat, 12 Mar 2016 18:47:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CIlSoV067003; Sat, 12 Mar 2016 18:47:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CIlSvG067002; Sat, 12 Mar 2016 18:47:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201603121847.u2CIlSvG067002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 12 Mar 2016 18:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296738 - stable/9/sbin/rcorder X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 18:47:30 -0000 Author: ngie Date: Sat Mar 12 18:47:28 2016 New Revision: 296738 URL: https://svnweb.freebsd.org/changeset/base/296738 Log: MFstable/10 r296736: MFC r295119: Remove `r_tmp` to fix a -Wunused-but-set-variable warning with gcc 4.9 Modified: stable/9/sbin/rcorder/rcorder.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/rcorder/ (props changed) Modified: stable/9/sbin/rcorder/rcorder.c ============================================================================== --- stable/9/sbin/rcorder/rcorder.c Sat Mar 12 18:41:27 2016 (r296737) +++ stable/9/sbin/rcorder/rcorder.c Sat Mar 12 18:47:28 2016 (r296738) @@ -702,7 +702,7 @@ keep_ok(filenode *fnode) void do_file(filenode *fnode) { - f_reqnode *r, *r_tmp; + f_reqnode *r; f_provnode *p, *p_tmp; provnode *pnode; int was_set; @@ -729,13 +729,8 @@ do_file(filenode *fnode) */ r = fnode->req_list; while (r != NULL) { - r_tmp = r; satisfy_req(r, fnode->filename); r = r->next; -#if 0 - if (was_set == 0) - free(r_tmp); -#endif } fnode->req_list = NULL; From owner-svn-src-stable-9@freebsd.org Sat Mar 12 18:59:58 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4902BACC9C6; Sat, 12 Mar 2016 18:59:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B57989E; Sat, 12 Mar 2016 18:59:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CIxvgg070466; Sat, 12 Mar 2016 18:59:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CIxvtD070465; Sat, 12 Mar 2016 18:59:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603121859.u2CIxvtD070465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 12 Mar 2016 18:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296745 - stable/9/gnu/lib/libgcc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 18:59:58 -0000 Author: bdrewery Date: Sat Mar 12 18:59:56 2016 New Revision: 296745 URL: https://svnweb.freebsd.org/changeset/base/296745 Log: MFC r296002,r296012: r296002: Don't hide AR command as bsd.lib.mk's r283925 changed as well. r296012: OBJS and POBJS have not been used since r215127. Modified: stable/9/gnu/lib/libgcc/Makefile Directory Properties: stable/9/gnu/lib/libgcc/ (props changed) Modified: stable/9/gnu/lib/libgcc/Makefile ============================================================================== --- stable/9/gnu/lib/libgcc/Makefile Sat Mar 12 18:59:03 2016 (r296744) +++ stable/9/gnu/lib/libgcc/Makefile Sat Mar 12 18:59:56 2016 (r296745) @@ -30,7 +30,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F LDFLAGS+= -nodefaultlibs LDADD+= -lc -OBJS= # added to below in various ways depending on TARGET_CPUARCH +SOBJS= # added to below in various ways depending on TARGET_CPUARCH #--------------------------------------------------------------------------- # @@ -219,7 +219,7 @@ OBJ_GRPS += FPBIT DPBIT ${T}_OBJS_T = ${${T}_FUNCS:S/$/.o/} ${T}_OBJS_P = ${${T}_FUNCS:S/$/.po/} ${T}_OBJS_S = ${${T}_FUNCS:S/$/.So/} -OBJS += ${${T}_FUNCS:S/$/.o/} +SOBJS += ${${T}_FUNCS:S/$/.So/} ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS} ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} @@ -234,9 +234,7 @@ ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHD # Extra objects coming from separate files # .if !empty(LIB2ADD) -OBJS += ${LIB2ADD:R:S/$/.o/} SOBJS += ${LIB2ADD:R:S/$/.So/} -POBJS += ${LIB2ADD:R:S/$/.po/} .endif #----------------------------------------------------------------------- @@ -262,7 +260,7 @@ ASM_T = ${LIB1ASMFUNCS:S/$/.o/} ASM_P = ${LIB1ASMFUNCS:S/$/.po/} ASM_S = ${LIB1ASMFUNCS:S/$/.So/} ASM_V = ${LIB1ASMFUNCS:S/$/.vis/} -OBJS += ${LIB1ASMFUNCS:S/$/.o/} +SOBJS += ${LIB1ASMFUNCS:S/$/.So/} ${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis ${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \ @@ -324,7 +322,7 @@ SHLIB_MKMAP_OPTS = SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver VERSION_MAP = libgcc.map -libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/} +libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ( nm -pg ${SOBJS};echo %% ; \ cat ${SHLIB_MAPFILES} \ | sed -e '/^[ ]*#/d' \ @@ -341,7 +339,7 @@ CLEANFILES += libgcc.map libgcc_eh.a: ${EH_OBJS_T} @${ECHO} building static gcc_eh library @rm -f ${.TARGET} - @${AR} cq ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q` + ${AR} cq ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q` ${RANLIB} ${.TARGET} all: libgcc_eh.a @@ -350,7 +348,7 @@ all: libgcc_eh.a libgcc_eh_p.a: ${EH_OBJS_P} @${ECHO} building profiled gcc_eh library @rm -f ${.TARGET} - @${AR} cq ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q` + ${AR} cq ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q` ${RANLIB} ${.TARGET} all: libgcc_eh_p.a .endif From owner-svn-src-stable-9@freebsd.org Sat Mar 12 19:01:46 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80741ACCBF4; Sat, 12 Mar 2016 19:01:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51616CDF; Sat, 12 Mar 2016 19:01:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CJ1jnP073281; Sat, 12 Mar 2016 19:01:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CJ1j6K073280; Sat, 12 Mar 2016 19:01:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603121901.u2CJ1j6K073280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 12 Mar 2016 19:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296747 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 19:01:46 -0000 Author: bdrewery Date: Sat Mar 12 19:01:45 2016 New Revision: 296747 URL: https://svnweb.freebsd.org/changeset/base/296747 Log: MFC r295161,r296014: r295161: Add order for installworld/distribution. r296014: Add order for installworld/installkernel. Modified: stable/9/Makefile (contents, props changed) Modified: stable/9/Makefile ============================================================================== --- stable/9/Makefile Sat Mar 12 19:00:42 2016 (r296746) +++ stable/9/Makefile Sat Mar 12 19:01:45 2016 (r296747) @@ -113,6 +113,8 @@ TGTS+= ${BITGTS} .ORDER: buildworld installworld .ORDER: buildworld distributeworld .ORDER: buildworld buildkernel +.ORDER: installworld distribution +.ORDER: installworld installkernel .ORDER: buildkernel installkernel .ORDER: buildkernel installkernel.debug .ORDER: buildkernel reinstallkernel From owner-svn-src-stable-9@freebsd.org Sat Mar 12 19:07:09 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1FEDACCE93; Sat, 12 Mar 2016 19:07:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 836E7753; Sat, 12 Mar 2016 19:07:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CJ78VS073854; Sat, 12 Mar 2016 19:07:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CJ78tI073850; Sat, 12 Mar 2016 19:07:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603121907.u2CJ78tI073850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 12 Mar 2016 19:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296751 - in stable/9: share/man/man4 sys/dev/filemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 19:07:10 -0000 Author: bdrewery Date: Sat Mar 12 19:07:08 2016 New Revision: 296751 URL: https://svnweb.freebsd.org/changeset/base/296751 Log: MFC r296286,r296470,r296472,r296473,r296575: r296286: Remove filemon->lock wrappers. r296470: Only call bwillwrite() for logging to vnodes, as other fo_write() calls do. r296472: Require kldunload -f to unload. r296473: Add missing break for r296472. r296575: FILEMON_SET_FD: Disallow changing the fd. Modified: stable/9/share/man/man4/filemon.4 stable/9/sys/dev/filemon/filemon.c stable/9/sys/dev/filemon/filemon_lock.c stable/9/sys/dev/filemon/filemon_wrapper.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/filemon.4 ============================================================================== --- stable/9/share/man/man4/filemon.4 Sat Mar 12 19:05:49 2016 (r296750) +++ stable/9/share/man/man4/filemon.4 Sat Mar 12 19:07:08 2016 (r296751) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2016 +.Dd March 9, 2016 .Dt FILEMON 4 .Os .Sh NAME @@ -124,6 +124,19 @@ function returns the value 0 if successf otherwise the value \-1 is returned and the global variable .Va errno is set to indicate the error. +.Sh ERRORS +The +.Fn ioctl +system call +with +.Dv FILEMON_SET_FD +will fail if: +.Bl -tag -width Er +.It Bq Er EEXIST +The +.Nm +handle is already associated with a file descriptor. +.El .Sh FILES .Bl -tag -width ".Pa /dev/filemon" .It Pa /dev/filemon @@ -195,3 +208,6 @@ Only children of the set process are log Processes can escape being traced by double forking. This is not seen as a problem as the intended use is build monitoring, which does not make sense to have daemons for. +.Pp +Unloading the module may panic the system, thus requires using +.Ic kldunload -f . Modified: stable/9/sys/dev/filemon/filemon.c ============================================================================== --- stable/9/sys/dev/filemon/filemon.c Sat Mar 12 19:05:49 2016 (r296750) +++ stable/9/sys/dev/filemon/filemon.c Sat Mar 12 19:07:08 2016 (r296751) @@ -71,8 +71,6 @@ extern struct sysentvec elf64_freebsd_sy static d_close_t filemon_close; static d_ioctl_t filemon_ioctl; static d_open_t filemon_open; -static int filemon_unload(void); -static void filemon_load(void *); static struct cdevsw filemon_cdevsw = { .d_version = D_VERSION, @@ -130,7 +128,7 @@ filemon_dtr(void *data) /* Follow same locking order as filemon_pid_check. */ filemon_lock_write(); - filemon_filemon_lock(filemon); + sx_xlock(&filemon->lock); /* Remove from the in-use list. */ TAILQ_REMOVE(&filemons_inuse, filemon, link); @@ -143,7 +141,7 @@ filemon_dtr(void *data) TAILQ_INSERT_TAIL(&filemons_free, filemon, link); /* Give up write access. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); filemon_unlock_write(); if (fp != NULL) @@ -162,13 +160,15 @@ filemon_ioctl(struct cdev *dev, u_long c if ((error = devfs_get_cdevpriv((void **) &filemon)) != 0) return (error); - filemon_filemon_lock(filemon); + sx_xlock(&filemon->lock); switch (cmd) { /* Set the output file descriptor. */ case FILEMON_SET_FD: - if (filemon->fp != NULL) - fdrop(filemon->fp, td); + if (filemon->fp != NULL) { + error = EEXIST; + break; + } #if __FreeBSD_version < 900041 #define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) @@ -195,7 +195,7 @@ filemon_ioctl(struct cdev *dev, u_long c break; } - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); return (error); } @@ -305,6 +305,14 @@ filemon_modevent(module_t mod __unused, error = filemon_unload(); break; + case MOD_QUIESCE: + /* + * The wrapper implementation is unsafe for reliable unload. + * Require forcing an unload. + */ + error = EBUSY; + break; + case MOD_SHUTDOWN: break; Modified: stable/9/sys/dev/filemon/filemon_lock.c ============================================================================== --- stable/9/sys/dev/filemon/filemon_lock.c Sat Mar 12 19:05:49 2016 (r296750) +++ stable/9/sys/dev/filemon/filemon_lock.c Sat Mar 12 19:07:08 2016 (r296751) @@ -29,20 +29,6 @@ __FBSDID("$FreeBSD$"); static __inline void -filemon_filemon_lock(struct filemon *filemon) -{ - - sx_xlock(&filemon->lock); -} - -static __inline void -filemon_filemon_unlock(struct filemon *filemon) -{ - - sx_xunlock(&filemon->lock); -} - -static __inline void filemon_lock_read(void) { Modified: stable/9/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- stable/9/sys/dev/filemon/filemon_wrapper.c Sat Mar 12 19:05:49 2016 (r296750) +++ stable/9/sys/dev/filemon/filemon_wrapper.c Sat Mar 12 19:07:08 2016 (r296751) @@ -80,7 +80,8 @@ filemon_output(struct filemon *filemon, auio.uio_td = curthread; auio.uio_offset = (off_t) -1; - bwillwrite(); + if (filemon->fp->f_type == DTYPE_VNODE) + bwillwrite(); fo_write(filemon->fp, &auio, curthread->td_ucred, 0, curthread); } @@ -100,7 +101,7 @@ filemon_pid_check(struct proc *p) TAILQ_FOREACH(filemon, &filemons_inuse, link) { if (p == filemon->p) { sx_sunlock(&proctree_lock); - filemon_filemon_lock(filemon); + sx_xlock(&filemon->lock); filemon_unlock_read(); return (filemon); } @@ -131,8 +132,7 @@ filemon_wrapper_chdir(struct thread *td, filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -160,8 +160,7 @@ filemon_event_process_exec(void *arg __u filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); free(freepath, M_TEMP); } @@ -199,8 +198,7 @@ filemon_wrapper_open(struct thread *td, curproc->p_pid, filemon->fname1); filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -252,8 +250,7 @@ filemon_wrapper_openat(struct thread *td curproc->p_pid, filemon->fname2, filemon->fname1); filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -281,8 +278,7 @@ filemon_wrapper_rename(struct thread *td filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -310,8 +306,7 @@ filemon_wrapper_link(struct thread *td, filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -339,8 +334,7 @@ filemon_wrapper_symlink(struct thread *t filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -369,8 +363,7 @@ filemon_wrapper_linkat(struct thread *td filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -397,8 +390,7 @@ filemon_wrapper_stat(struct thread *td, filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -426,8 +418,7 @@ filemon_wrapper_freebsd32_stat(struct th filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -462,8 +453,7 @@ filemon_event_process_exit(void *arg __u filemon->p = NULL; } - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -486,8 +476,7 @@ filemon_wrapper_unlink(struct thread *td filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -508,8 +497,7 @@ filemon_event_process_fork(void *arg __u filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } From owner-svn-src-stable-9@freebsd.org Sat Mar 12 19:08:48 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 272D1ACD04E; Sat, 12 Mar 2016 19:08:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA71B64; Sat, 12 Mar 2016 19:08:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CJ8kvu074043; Sat, 12 Mar 2016 19:08:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CJ8kxk074042; Sat, 12 Mar 2016 19:08:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603121908.u2CJ8kxk074042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 12 Mar 2016 19:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296754 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 19:08:48 -0000 Author: bdrewery Date: Sat Mar 12 19:08:46 2016 New Revision: 296754 URL: https://svnweb.freebsd.org/changeset/base/296754 Log: MFC r296322: Remove self-reference to destroy_dev_drain(9). Modified: stable/9/share/man/man9/make_dev.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/make_dev.9 ============================================================================== --- stable/9/share/man/man9/make_dev.9 Sat Mar 12 19:08:13 2016 (r296753) +++ stable/9/share/man/man9/make_dev.9 Sat Mar 12 19:08:46 2016 (r296754) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd March 2, 2016 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -372,7 +372,6 @@ flag was specified and the provided devi .Sh SEE ALSO .Xr devctl 4 , .Xr devfs 5 , -.Xr destroy_dev_drain 9 , .Xr dev_clone 9 .Sh HISTORY The From owner-svn-src-stable-9@freebsd.org Sat Mar 12 19:11:46 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 660DBACD36A; Sat, 12 Mar 2016 19:11:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3442E11E4; Sat, 12 Mar 2016 19:11:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CJBjDe074488; Sat, 12 Mar 2016 19:11:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CJBjCD074487; Sat, 12 Mar 2016 19:11:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201603121911.u2CJBjCD074487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 12 Mar 2016 19:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296757 - stable/9/libexec/atrun X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 19:11:46 -0000 Author: ngie Date: Sat Mar 12 19:11:45 2016 New Revision: 296757 URL: https://svnweb.freebsd.org/changeset/base/296757 Log: MFstable/10 r296756: MFC r295079: Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on 64-bit architectures where sizeof(int) != sizeof(size_t). PR: 206758 Modified: stable/9/libexec/atrun/atrun.c Directory Properties: stable/9/ (props changed) stable/9/libexec/atrun/ (props changed) Modified: stable/9/libexec/atrun/atrun.c ============================================================================== --- stable/9/libexec/atrun/atrun.c Sat Mar 12 19:09:51 2016 (r296756) +++ stable/9/libexec/atrun/atrun.c Sat Mar 12 19:11:45 2016 (r296757) @@ -458,8 +458,9 @@ main(int argc, char *argv[]) int c; int run_batch; #ifdef __FreeBSD__ - size_t ncpu, ncpusz; + size_t ncpusz; double load_avg = -1; + int ncpu; #else double load_avg = LOADAVG_MX; #endif From owner-svn-src-stable-9@freebsd.org Sat Mar 12 19:18:55 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE7FACD7DE; Sat, 12 Mar 2016 19:18:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CA091D1C; Sat, 12 Mar 2016 19:18:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CJIsAX077847; Sat, 12 Mar 2016 19:18:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CJIsdS077845; Sat, 12 Mar 2016 19:18:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603121918.u2CJIsdS077845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 12 Mar 2016 19:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296762 - stable/9/sys/dev/filemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 19:18:55 -0000 Author: bdrewery Date: Sat Mar 12 19:18:53 2016 New Revision: 296762 URL: https://svnweb.freebsd.org/changeset/base/296762 Log: MFC r296148: Remove old compatibility checks. Modified: stable/9/sys/dev/filemon/filemon.c stable/9/sys/dev/filemon/filemon_wrapper.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/filemon/filemon.c ============================================================================== --- stable/9/sys/dev/filemon/filemon.c Sat Mar 12 19:18:27 2016 (r296761) +++ stable/9/sys/dev/filemon/filemon.c Sat Mar 12 19:18:53 2016 (r296762) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -52,10 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 900041 -#include -#endif - #include "filemon.h" #if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32) @@ -170,11 +167,7 @@ filemon_ioctl(struct cdev *dev, u_long c break; } -#if __FreeBSD_version < 900041 -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) -#else #define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) -#endif if ((error = FGET_WRITE(td, *(int *)data, &filemon->fp)) == 0) /* Write the file header. */ filemon_comment(filemon); Modified: stable/9/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- stable/9/sys/dev/filemon/filemon_wrapper.c Sat Mar 12 19:18:27 2016 (r296761) +++ stable/9/sys/dev/filemon/filemon_wrapper.c Sat Mar 12 19:18:53 2016 (r296762) @@ -36,27 +36,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if __FreeBSD_version > 800032 -#define FILEMON_HAS_LINKAT -#endif - -#if __FreeBSD_version < 900044 /* r225617 (2011-09-16) failed to bump - __FreeBSD_version. This really should - be based on "900045". "900044" is r225469 - (2011-09-10) so this code is broken for - 9-CURRENT September 10th-16th. */ -#define sys_chdir chdir -#define sys_link link -#define sys_open open -#define sys_rename rename -#define sys_stat stat -#define sys_symlink symlink -#define sys_unlink unlink -#ifdef FILEMON_HAS_LINKAT -#define sys_linkat linkat -#endif -#endif /* __FreeBSD_version */ - static eventhandler_tag filemon_exec_tag; static eventhandler_tag filemon_exit_tag; static eventhandler_tag filemon_fork_tag; @@ -341,7 +320,6 @@ filemon_wrapper_symlink(struct thread *t return (ret); } -#ifdef FILEMON_HAS_LINKAT static int filemon_wrapper_linkat(struct thread *td, struct linkat_args *uap) { @@ -369,7 +347,6 @@ filemon_wrapper_linkat(struct thread *td return (ret); } -#endif static int filemon_wrapper_stat(struct thread *td, struct stat_args *uap) @@ -520,9 +497,7 @@ filemon_wrapper_install(void) sv_table[SYS_unlink].sy_call = (sy_call_t *) filemon_wrapper_unlink; sv_table[SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link; sv_table[SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink; -#ifdef FILEMON_HAS_LINKAT sv_table[SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat; -#endif #if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32) sv_table = ia32_freebsd_sysvec.sv_table; @@ -535,9 +510,7 @@ filemon_wrapper_install(void) sv_table[FREEBSD32_SYS_unlink].sy_call = (sy_call_t *) filemon_wrapper_unlink; sv_table[FREEBSD32_SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link; sv_table[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink; -#ifdef FILEMON_HAS_LINKAT sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat; -#endif #endif /* COMPAT_ARCH32 */ filemon_exec_tag = EVENTHANDLER_REGISTER(process_exec, @@ -567,9 +540,7 @@ filemon_wrapper_deinstall(void) sv_table[SYS_unlink].sy_call = (sy_call_t *)sys_unlink; sv_table[SYS_link].sy_call = (sy_call_t *)sys_link; sv_table[SYS_symlink].sy_call = (sy_call_t *)sys_symlink; -#ifdef FILEMON_HAS_LINKAT sv_table[SYS_linkat].sy_call = (sy_call_t *)sys_linkat; -#endif #if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32) sv_table = ia32_freebsd_sysvec.sv_table; @@ -582,9 +553,7 @@ filemon_wrapper_deinstall(void) sv_table[FREEBSD32_SYS_unlink].sy_call = (sy_call_t *)sys_unlink; sv_table[FREEBSD32_SYS_link].sy_call = (sy_call_t *)sys_link; sv_table[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *)sys_symlink; -#ifdef FILEMON_HAS_LINKAT sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *)sys_linkat; -#endif #endif /* COMPAT_ARCH32 */ EVENTHANDLER_DEREGISTER(process_exec, filemon_exec_tag); From owner-svn-src-stable-9@freebsd.org Sat Mar 12 23:12:25 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFF32ACEB5A; Sat, 12 Mar 2016 23:12:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7A9A1BC7; Sat, 12 Mar 2016 23:12:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CNCNBk051432; Sat, 12 Mar 2016 23:12:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CNCNYB051429; Sat, 12 Mar 2016 23:12:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201603122312.u2CNCNYB051429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 12 Mar 2016 23:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296778 - stable/9/tools/regression/geom_concat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 23:12:25 -0000 Author: ngie Date: Sat Mar 12 23:12:23 2016 New Revision: 296778 URL: https://svnweb.freebsd.org/changeset/base/296778 Log: MFstable/10 r296777: MFC r293434: - Use attach_md for memory disks so they can be tracked. - Add a geom_concat specific cleanup function and trap on that function at exit so things are cleaned up properly - Don't hardcode /tmp for temporary files, which violates the kyua sandbox Modified: stable/9/tools/regression/geom_concat/conf.sh stable/9/tools/regression/geom_concat/test-1.t stable/9/tools/regression/geom_concat/test-2.t Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/geom_concat/conf.sh ============================================================================== --- stable/9/tools/regression/geom_concat/conf.sh Sat Mar 12 23:11:08 2016 (r296777) +++ stable/9/tools/regression/geom_concat/conf.sh Sat Mar 12 23:12:23 2016 (r296778) @@ -5,4 +5,11 @@ name="$(mktemp -u concat.XXXXXX)" class="concat" base=`basename $0` +gconcat_test_cleanup() +{ + [ -c /dev/$class/$name ] && gconcat destroy $name + geom_test_cleanup +} +trap gconcat_test_cleanup ABRT EXIT INT TERM + . `dirname $0`/../geom_subr.sh Modified: stable/9/tools/regression/geom_concat/test-1.t ============================================================================== --- stable/9/tools/regression/geom_concat/test-1.t Sat Mar 12 23:11:08 2016 (r296777) +++ stable/9/tools/regression/geom_concat/test-1.t Sat Mar 12 23:12:23 2016 (r296778) @@ -5,13 +5,11 @@ echo '1..1' -us=45 +us0=$(attach_md -t malloc -s 1M) || exit 1 +us1=$(attach_md -t malloc -s 2M) || exit 1 +us2=$(attach_md -t malloc -s 3M) || exit 1 -mdconfig -a -t malloc -s 1M -u $us || exit 1 -mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 -mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 - -gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 +gconcat create $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 devwait # Size of created device should be 1MB + 2MB + 3MB. @@ -23,8 +21,3 @@ if [ $size -eq 6291456 ]; then else echo "not ok - Size is 6291456" fi - -gconcat destroy $name -mdconfig -d -u $us -mdconfig -d -u `expr $us + 1` -mdconfig -d -u `expr $us + 2` Modified: stable/9/tools/regression/geom_concat/test-2.t ============================================================================== --- stable/9/tools/regression/geom_concat/test-2.t Sat Mar 12 23:11:08 2016 (r296777) +++ stable/9/tools/regression/geom_concat/test-2.t Sat Mar 12 23:12:23 2016 (r296778) @@ -5,18 +5,17 @@ echo '1..1' -us=45 tsize=6 -src=`mktemp /tmp/$base.XXXXXX` || exit 1 -dst=`mktemp /tmp/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 1 -dd if=/dev/random of=${src} bs=1m count=$tsize >/dev/null 2>&1 +us0=$(attach_md -t malloc -s 1M) || exit 1 +us1=$(attach_md -t malloc -s 2M) || exit 1 +us2=$(attach_md -t malloc -s 3M) || exit 1 -mdconfig -a -t malloc -s 1M -u $us || exit 1 -mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 -mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 +dd if=/dev/random of=${src} bs=1m count=$tsize >/dev/null 2>&1 -gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 +gconcat create $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 devwait dd if=${src} of=/dev/concat/${name} bs=1m count=$tsize >/dev/null 2>&1 @@ -28,8 +27,4 @@ else echo "ok - md5 checksum comparison" fi -gconcat destroy $name -mdconfig -d -u $us -mdconfig -d -u `expr $us + 1` -mdconfig -d -u `expr $us + 2` rm -f ${src} ${dst} From owner-svn-src-stable-9@freebsd.org Sat Mar 12 23:50:21 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C0CACDC1A; Sat, 12 Mar 2016 23:50:21 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20354D62; Sat, 12 Mar 2016 23:50:21 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CNoK9Y060559; Sat, 12 Mar 2016 23:50:20 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CNoKuJ060558; Sat, 12 Mar 2016 23:50:20 GMT (envelope-from des@FreeBSD.org) Message-Id: <201603122350.u2CNoKuJ060558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 12 Mar 2016 23:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r296780 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 23:50:21 -0000 Author: des Date: Sat Mar 12 23:50:19 2016 New Revision: 296780 URL: https://svnweb.freebsd.org/changeset/base/296780 Log: Apply patch from 7.2p2 for xauth command injection bug. Security: CVE-2016-3115 Modified: stable/9/crypto/openssh/session.c Modified: stable/9/crypto/openssh/session.c ============================================================================== --- stable/9/crypto/openssh/session.c Sat Mar 12 23:25:05 2016 (r296779) +++ stable/9/crypto/openssh/session.c Sat Mar 12 23:50:19 2016 (r296780) @@ -48,6 +48,7 @@ __RCSID("$FreeBSD$"); #include +#include #include #include #include @@ -294,6 +295,21 @@ do_authenticated(Authctxt *authctxt) do_cleanup(authctxt); } +/* Check untrusted xauth strings for metacharacters */ +static int +xauth_valid_string(const char *s) +{ + size_t i; + + for (i = 0; s[i] != '\0'; i++) { + if (!isalnum((u_char)s[i]) && + s[i] != '.' && s[i] != ':' && s[i] != '/' && + s[i] != '-' && s[i] != '_') + return 0; + } + return 1; +} + /* * Prepares for an interactive session. This is called after the user has * been successfully authenticated. During this message exchange, pseudo @@ -367,7 +383,13 @@ do_authenticated1(Authctxt *authctxt) s->screen = 0; } packet_check_eom(); - success = session_setup_x11fwd(s); + if (xauth_valid_string(s->auth_proto) && + xauth_valid_string(s->auth_data)) + success = session_setup_x11fwd(s); + else { + success = 0; + error("Invalid X11 forwarding data"); + } if (!success) { free(s->auth_proto); free(s->auth_data); @@ -2199,7 +2221,13 @@ session_x11_req(Session *s) s->screen = packet_get_int(); packet_check_eom(); - success = session_setup_x11fwd(s); + if (xauth_valid_string(s->auth_proto) && + xauth_valid_string(s->auth_data)) + success = session_setup_x11fwd(s); + else { + success = 0; + error("Invalid X11 forwarding data"); + } if (!success) { free(s->auth_proto); free(s->auth_data);