From owner-svn-src-all@freebsd.org Sun Mar 6 00:31:12 2016 Return-Path: Delivered-To: svn-src-all@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 B12E6A13A95; Sun, 6 Mar 2016 00:31:12 +0000 (UTC) (envelope-from kib@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 73361E86; Sun, 6 Mar 2016 00:31:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u260VBZw027533; Sun, 6 Mar 2016 00:31:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u260VBSb027532; Sun, 6 Mar 2016 00:31:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201603060031.u260VBSb027532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 6 Mar 2016 00:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296419 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 00:31:12 -0000 Author: kib Date: Sun Mar 6 00:31:11 2016 New Revision: 296419 URL: https://svnweb.freebsd.org/changeset/base/296419 Log: 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 after: 2 weeks Modified: head/sys/kern/link_elf_obj.c Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Sat Mar 5 21:10:34 2016 (r296418) +++ head/sys/kern/link_elf_obj.c Sun Mar 6 00:31:11 2016 (r296419) @@ -257,6 +257,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: @@ -327,9 +330,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; @@ -575,6 +585,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: @@ -681,6 +694,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; @@ -748,6 +764,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; @@ -760,6 +779,10 @@ link_elf_load_file(linker_class_t cls, c } } 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 && @@ -781,7 +804,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-all@freebsd.org Sun Mar 6 01:21:58 2016 Return-Path: Delivered-To: svn-src-all@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 1BA9B9DBCEC; Sun, 6 Mar 2016 01:21:58 +0000 (UTC) (envelope-from marius@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 E14A5C82; Sun, 6 Mar 2016 01:21:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u261Lu3I045564; Sun, 6 Mar 2016 01:21:56 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u261Lui5045563; Sun, 6 Mar 2016 01:21:56 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201603060121.u261Lui5045563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 6 Mar 2016 01:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r296420 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 01:21:58 -0000 Author: marius Date: Sun Mar 6 01:21:56 2016 New Revision: 296420 URL: https://svnweb.freebsd.org/changeset/base/296420 Log: Change the stable/10 branch no longer require explicit re@ approval for commits. Committers are asked to please exercise caution when merging changes to stable/10 for the duration of the 10.3-RELEASE cycle. Approved by: re (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sun Mar 6 00:31:11 2016 (r296419) +++ svnadmin/conf/approvers Sun Mar 6 01:21:56 2016 (r296420) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -^stable/10/ re +#^stable/10/ re ^releng/10.3/ re ^releng/10.[0-2]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) From owner-svn-src-all@freebsd.org Sun Mar 6 02:33:04 2016 Return-Path: Delivered-To: svn-src-all@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 0E754A92338; Sun, 6 Mar 2016 02:33:04 +0000 (UTC) (envelope-from rpokala@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 C0EC8AED; Sun, 6 Mar 2016 02:33:03 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u262X2De066639; Sun, 6 Mar 2016 02:33:02 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u262X2Ju066636; Sun, 6 Mar 2016 02:33:02 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201603060233.u262X2Ju066636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Sun, 6 Mar 2016 02:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296421 - in stable/10/sys: cam/ata dev/ata sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 02:33:04 -0000 Author: rpokala Date: Sun Mar 6 02:33:02 2016 New Revision: 296421 URL: https://svnweb.freebsd.org/changeset/base/296421 Log: MFC r295276: Add defines for WRITE_UNCORRECTABLE ATA command, and improve command logging Add #defines for ATA_WRITE_UNCORRECTABLE48 and its features. Update the decoding in ATACAM to recognize the new values. Also improve command decoding for a few other commands (SMART, NOP, SET_FEATURES). Bring the decoding in ata(4) up to parity with ATACAM. Sponsored by: Panasas, Inc. Modified: stable/10/sys/cam/ata/ata_all.c stable/10/sys/dev/ata/ata-all.c stable/10/sys/sys/ata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_all.c ============================================================================== --- stable/10/sys/cam/ata/ata_all.c Sun Mar 6 01:21:56 2016 (r296420) +++ stable/10/sys/cam/ata/ata_all.c Sun Mar 6 02:33:02 2016 (r296421) @@ -75,13 +75,18 @@ ata_op_string(struct ata_cmd *cmd) if (cmd->control & 0x04) return ("SOFT_RESET"); switch (cmd->command) { - case 0x00: return ("NOP"); + case 0x00: + switch (cmd->features) { + case 0x00: return ("NOP FLUSHQUEUE"); + case 0x01: return ("NOP AUTOPOLL"); + } + return ("NOP"); case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); case 0x06: switch (cmd->features) { - case 0x01: return ("DSM TRIM"); - } - return "DSM"; + case 0x01: return ("DSM TRIM"); + } + return "DSM"; case 0x08: return ("DEVICE_RESET"); case 0x20: return ("READ"); case 0x24: return ("READ48"); @@ -105,6 +110,12 @@ ata_op_string(struct ata_cmd *cmd) case 0x3f: return ("WRITE_LOG_EXT"); case 0x40: return ("READ_VERIFY"); case 0x42: return ("READ_VERIFY48"); + case 0x45: + switch (cmd->features) { + case 0x55: return ("WRITE_UNCORRECTABLE48 PSEUDO"); + case 0xaa: return ("WRITE_UNCORRECTABLE48 FLAGGED"); + } + return "WRITE_UNCORRECTABLE48"; case 0x51: return ("CONFIGURE_STREAM"); case 0x60: return ("READ_FPDMA_QUEUED"); case 0x61: return ("WRITE_FPDMA_QUEUED"); @@ -128,7 +139,18 @@ ata_op_string(struct ata_cmd *cmd) case 0xa0: return ("PACKET"); case 0xa1: return ("ATAPI_IDENTIFY"); case 0xa2: return ("SERVICE"); - case 0xb0: return ("SMART"); + case 0xb0: + switch(cmd->features) { + case 0xd0: return ("SMART READ ATTR VALUES"); + case 0xd1: return ("SMART READ ATTR THRESHOLDS"); + case 0xd3: return ("SMART SAVE ATTR VALUES"); + case 0xd4: return ("SMART EXECUTE OFFLINE IMMEDIATE"); + case 0xd5: return ("SMART READ LOG DATA"); + case 0xd8: return ("SMART ENABLE OPERATION"); + case 0xd9: return ("SMART DISABLE OPERATION"); + case 0xda: return ("SMART RETURN STATUS"); + } + return ("SMART"); case 0xb1: return ("DEVICE CONFIGURATION"); case 0xc0: return ("CFA_ERASE"); case 0xc4: return ("READ_MUL"); @@ -158,18 +180,22 @@ ata_op_string(struct ata_cmd *cmd) case 0xed: return ("MEDIA_EJECT"); case 0xef: switch (cmd->features) { - case 0x03: return ("SETFEATURES SET TRANSFER MODE"); - case 0x02: return ("SETFEATURES ENABLE WCACHE"); - case 0x82: return ("SETFEATURES DISABLE WCACHE"); - case 0x06: return ("SETFEATURES ENABLE PUIS"); - case 0x86: return ("SETFEATURES DISABLE PUIS"); - case 0x07: return ("SETFEATURES SPIN-UP"); - case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); - case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); - case 0xaa: return ("SETFEATURES ENABLE RCACHE"); - case 0x55: return ("SETFEATURES DISABLE RCACHE"); - } - return "SETFEATURES"; + case 0x03: return ("SETFEATURES SET TRANSFER MODE"); + case 0x02: return ("SETFEATURES ENABLE WCACHE"); + case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); + case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); + case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); + case 0xaa: return ("SETFEATURES ENABLE RCACHE"); + case 0x55: return ("SETFEATURES DISABLE RCACHE"); + case 0x5d: return ("SETFEATURES ENABLE RELIRQ"); + case 0xdd: return ("SETFEATURES DISABLE RELIRQ"); + case 0x5e: return ("SETFEATURES ENABLE SRVIRQ"); + case 0xde: return ("SETFEATURES DISABLE SRVIRQ"); + } + return "SETFEATURES"; case 0xf1: return ("SECURITY_SET_PASSWORD"); case 0xf2: return ("SECURITY_UNLOCK"); case 0xf3: return ("SECURITY_ERASE_PREPARE"); Modified: stable/10/sys/dev/ata/ata-all.c ============================================================================== --- stable/10/sys/dev/ata/ata-all.c Sun Mar 6 01:21:56 2016 (r296420) +++ stable/10/sys/dev/ata/ata-all.c Sun Mar 6 02:33:02 2016 (r296421) @@ -497,7 +497,18 @@ ata_cmd2str(struct ata_request *request) } } else { switch (request->u.ata.command) { - case 0x00: return ("NOP"); + case 0x00: + switch (request->u.ata.feature) { + case 0x00: return ("NOP FLUSHQUEUE"); + case 0x01: return ("NOP AUTOPOLL"); + } + return ("NOP"); + case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); + case 0x06: + switch (request->u.ata.feature) { + case 0x01: return ("DSM TRIM"); + } + return "DSM"; case 0x08: return ("DEVICE_RESET"); case 0x20: return ("READ"); case 0x24: return ("READ48"); @@ -505,18 +516,65 @@ ata_cmd2str(struct ata_request *request) case 0x26: return ("READ_DMA_QUEUED48"); case 0x27: return ("READ_NATIVE_MAX_ADDRESS48"); case 0x29: return ("READ_MUL48"); + case 0x2a: return ("READ_STREAM_DMA48"); + case 0x2b: return ("READ_STREAM48"); + case 0x2f: return ("READ_LOG_EXT"); case 0x30: return ("WRITE"); case 0x34: return ("WRITE48"); case 0x35: return ("WRITE_DMA48"); case 0x36: return ("WRITE_DMA_QUEUED48"); case 0x37: return ("SET_MAX_ADDRESS48"); case 0x39: return ("WRITE_MUL48"); + case 0x3a: return ("WRITE_STREAM_DMA48"); + case 0x3b: return ("WRITE_STREAM48"); + case 0x3d: return ("WRITE_DMA_FUA48"); + case 0x3e: return ("WRITE_DMA_QUEUED_FUA48"); + case 0x3f: return ("WRITE_LOG_EXT"); + case 0x40: return ("READ_VERIFY"); + case 0x42: return ("READ_VERIFY48"); + case 0x45: + switch (request->u.ata.feature) { + case 0x55: return ("WRITE_UNCORRECTABLE48 PSEUDO"); + case 0xaa: return ("WRITE_UNCORRECTABLE48 FLAGGED"); + } + return "WRITE_UNCORRECTABLE48"; + case 0x51: return ("CONFIGURE_STREAM"); + case 0x60: return ("READ_FPDMA_QUEUED"); + case 0x61: return ("WRITE_FPDMA_QUEUED"); + case 0x63: return ("NCQ_NON_DATA"); + case 0x64: return ("SEND_FPDMA_QUEUED"); + case 0x65: return ("RECEIVE_FPDMA_QUEUED"); + case 0x67: + if (request->u.ata.feature == 0xec) + return ("SEP_ATTN IDENTIFY"); + switch (request->u.ata.lba) { + case 0x00: return ("SEP_ATTN READ BUFFER"); + case 0x02: return ("SEP_ATTN RECEIVE DIAGNOSTIC RESULTS"); + case 0x80: return ("SEP_ATTN WRITE BUFFER"); + case 0x82: return ("SEP_ATTN SEND DIAGNOSTIC"); + } + return ("SEP_ATTN"); case 0x70: return ("SEEK"); - case 0xa0: return ("PACKET_CMD"); + case 0x87: return ("CFA_TRANSLATE_SECTOR"); + case 0x90: return ("EXECUTE_DEVICE_DIAGNOSTIC"); + case 0x92: return ("DOWNLOAD_MICROCODE"); + case 0xa0: return ("PACKET"); case 0xa1: return ("ATAPI_IDENTIFY"); case 0xa2: return ("SERVICE"); - case 0xb0: return ("SMART"); - case 0xc0: return ("CFA ERASE"); + case 0xb0: + switch(request->u.ata.feature) { + case 0xd0: return ("SMART READ ATTR VALUES"); + case 0xd1: return ("SMART READ ATTR THRESHOLDS"); + case 0xd3: return ("SMART SAVE ATTR VALUES"); + case 0xd4: return ("SMART EXECUTE OFFLINE IMMEDIATE"); + case 0xd5: return ("SMART READ LOG DATA"); + case 0xd8: return ("SMART ENABLE OPERATION"); + case 0xd9: return ("SMART DISABLE OPERATION"); + case 0xda: return ("SMART RETURN STATUS"); + } + return ("SMART"); + case 0xb1: return ("DEVICE CONFIGURATION"); + case 0xc0: return ("CFA_ERASE"); case 0xc4: return ("READ_MUL"); case 0xc5: return ("WRITE_MUL"); case 0xc6: return ("SET_MULTI"); @@ -524,22 +582,48 @@ ata_cmd2str(struct ata_request *request) case 0xc8: return ("READ_DMA"); case 0xca: return ("WRITE_DMA"); case 0xcc: return ("WRITE_DMA_QUEUED"); + case 0xcd: return ("CFA_WRITE_MULTIPLE_WITHOUT_ERASE"); + case 0xce: return ("WRITE_MUL_FUA48"); + case 0xd1: return ("CHECK_MEDIA_CARD_TYPE"); + case 0xda: return ("GET_MEDIA_STATUS"); + case 0xde: return ("MEDIA_LOCK"); + case 0xdf: return ("MEDIA_UNLOCK"); + case 0xe0: return ("STANDBY_IMMEDIATE"); + case 0xe1: return ("IDLE_IMMEDIATE"); + case 0xe2: return ("STANDBY"); + case 0xe3: return ("IDLE"); + case 0xe4: return ("READ_BUFFER/PM"); + case 0xe5: return ("CHECK_POWER_MODE"); case 0xe6: return ("SLEEP"); case 0xe7: return ("FLUSHCACHE"); + case 0xe8: return ("WRITE_PM"); case 0xea: return ("FLUSHCACHE48"); case 0xec: return ("ATA_IDENTIFY"); + case 0xed: return ("MEDIA_EJECT"); case 0xef: switch (request->u.ata.feature) { case 0x03: return ("SETFEATURES SET TRANSFER MODE"); case 0x02: return ("SETFEATURES ENABLE WCACHE"); case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); + case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); + case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); case 0xaa: return ("SETFEATURES ENABLE RCACHE"); case 0x55: return ("SETFEATURES DISABLE RCACHE"); + case 0x5d: return ("SETFEATURES ENABLE RELIRQ"); + case 0xdd: return ("SETFEATURES DISABLE RELIRQ"); + case 0x5e: return ("SETFEATURES ENABLE SRVIRQ"); + case 0xde: return ("SETFEATURES DISABLE SRVIRQ"); } - sprintf(buffer, "SETFEATURES 0x%02x", - request->u.ata.feature); - return (buffer); - case 0xf5: return ("SECURITY_FREE_LOCK"); + return "SETFEATURES"; + case 0xf1: return ("SECURITY_SET_PASSWORD"); + case 0xf2: return ("SECURITY_UNLOCK"); + case 0xf3: return ("SECURITY_ERASE_PREPARE"); + case 0xf4: return ("SECURITY_ERASE_UNIT"); + case 0xf5: return ("SECURITY_FREEZE_LOCK"); + case 0xf6: return ("SECURITY_DISABLE_PASSWORD"); case 0xf8: return ("READ_NATIVE_MAX_ADDRESS"); case 0xf9: return ("SET_MAX_ADDRESS"); } Modified: stable/10/sys/sys/ata.h ============================================================================== --- stable/10/sys/sys/ata.h Sun Mar 6 01:21:56 2016 (r296420) +++ stable/10/sys/sys/ata.h Sun Mar 6 02:33:02 2016 (r296421) @@ -368,6 +368,9 @@ struct ata_params { #define ATA_WRITE_LOG_EXT 0x3f #define ATA_READ_VERIFY 0x40 #define ATA_READ_VERIFY48 0x42 +#define ATA_WRITE_UNCORRECTABLE48 0x45 /* write uncorrectable 48bit LBA */ +#define ATA_WU_PSEUDO 0x55 /* pseudo-uncorrectable error */ +#define ATA_WU_FLAGGED 0xaa /* flagged-uncorrectable error */ #define ATA_READ_LOG_DMA_EXT 0x47 /* read log DMA ext - PIO Data-In */ #define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */ #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ From owner-svn-src-all@freebsd.org Sun Mar 6 04:38:09 2016 Return-Path: Delivered-To: svn-src-all@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 6E8DDA93E5C; Sun, 6 Mar 2016 04:38:09 +0000 (UTC) (envelope-from lidl@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 3C36D26C; Sun, 6 Mar 2016 04:38:09 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u264c8PL003682; Sun, 6 Mar 2016 04:38:08 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u264c8J6003681; Sun, 6 Mar 2016 04:38:08 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201603060438.u264c8J6003681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Sun, 6 Mar 2016 04:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296423 - head/lib/libc/db/db X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 04:38:09 -0000 Author: lidl Date: Sun Mar 6 04:38:08 2016 New Revision: 296423 URL: https://svnweb.freebsd.org/changeset/base/296423 Log: Allow O_CLOEXEC to be used in dbopen() flags There is also a small portability crutch, also present in NetBSD, to allow compiling on a system that doesn't define O_CLOEXEC. Approved by: rpaulo (mentor) Obtained from: NetBSD (r1.17, r1.18) Differential Revision: https://reviews.freebsd.org/D5549 Modified: head/lib/libc/db/db/db.c Modified: head/lib/libc/db/db/db.c ============================================================================== --- head/lib/libc/db/db/db.c Sun Mar 6 04:13:17 2016 (r296422) +++ head/lib/libc/db/db/db.c Sun Mar 6 04:38:08 2016 (r296423) @@ -44,6 +44,10 @@ __FBSDID("$FreeBSD$"); static int __dberr(void); +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + DB * dbopen(const char *fname, int flags, int mode, DBTYPE type, const void *openinfo) { @@ -51,7 +55,7 @@ dbopen(const char *fname, int flags, int #define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN) #define USE_OPEN_FLAGS \ (O_CREAT | O_EXCL | O_EXLOCK | O_NOFOLLOW | O_NONBLOCK | \ - O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC) + O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC) if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0) switch (type) { From owner-svn-src-all@freebsd.org Sun Mar 6 08:40:23 2016 Return-Path: Delivered-To: svn-src-all@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 7C10B9DAAAA; Sun, 6 Mar 2016 08:40:23 +0000 (UTC) (envelope-from dwmalone@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 57C61AEE; Sun, 6 Mar 2016 08:40:23 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u268eM5M000720; Sun, 6 Mar 2016 08:40:22 GMT (envelope-from dwmalone@FreeBSD.org) Received: (from dwmalone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u268eMW9000716; Sun, 6 Mar 2016 08:40:22 GMT (envelope-from dwmalone@FreeBSD.org) Message-Id: <201603060840.u268eMW9000716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dwmalone set sender to dwmalone@FreeBSD.org using -f From: David Malone Date: Sun, 6 Mar 2016 08:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296424 - in stable/10: lib/libc/db/hash usr.bin/cap_mkdb usr.sbin/pwd_mkdb usr.sbin/services_mkdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 08:40:23 -0000 Author: dwmalone Date: Sun Mar 6 08:40:21 2016 New Revision: 296424 URL: https://svnweb.freebsd.org/changeset/base/296424 Log: MFC: r295924: Make sure that hash-based db files fsync befor closing/syncing. r295925: We no longer need O_SYNC pwd_mkd r295465: We no longer need O_SYNC on services_mkdb r295800: We no longer need O_SYNC on cap_mkdb This should improve the performance of building db files. Modified: stable/10/lib/libc/db/hash/hash.c stable/10/usr.bin/cap_mkdb/cap_mkdb.c stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c stable/10/usr.sbin/services_mkdb/services_mkdb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/db/hash/hash.c ============================================================================== --- stable/10/lib/libc/db/hash/hash.c Sun Mar 6 04:38:08 2016 (r296423) +++ stable/10/lib/libc/db/hash/hash.c Sun Mar 6 08:40:21 2016 (r296424) @@ -422,8 +422,10 @@ hdestroy(HTAB *hashp) if (hashp->tmp_buf) free(hashp->tmp_buf); - if (hashp->fp != -1) + if (hashp->fp != -1) { + (void)_fsync(hashp->fp); (void)_close(hashp->fp); + } free(hashp); @@ -458,6 +460,8 @@ hash_sync(const DB *dbp, u_int32_t flags return (0); if (__buf_free(hashp, 0, 1) || flush_meta(hashp)) return (ERROR); + if (hashp->fp != -1 && _fsync(hashp->fp) != 0) + return (ERROR); hashp->new_file = 0; return (0); } Modified: stable/10/usr.bin/cap_mkdb/cap_mkdb.c ============================================================================== --- stable/10/usr.bin/cap_mkdb/cap_mkdb.c Sun Mar 6 04:38:08 2016 (r296423) +++ stable/10/usr.bin/cap_mkdb/cap_mkdb.c Sun Mar 6 08:40:21 2016 (r296424) @@ -119,7 +119,7 @@ main(int argc, char *argv[]) (void)snprintf(buf, sizeof(buf), "%s.db", capname ? capname : *argv); if ((capname = strdup(buf)) == NULL) errx(1, "strdup failed"); - if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR | O_SYNC, + if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR, DEFFILEMODE, DB_HASH, &openinfo)) == NULL) err(1, "%s", buf); Modified: stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c Sun Mar 6 04:38:08 2016 (r296423) +++ stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c Sun Mar 6 08:40:21 2016 (r296424) @@ -225,14 +225,14 @@ main(int argc, char *argv[]) clean = FILE_INSECURE; cp(buf2, buf, PERM_INSECURE); dp = dbopen(buf, - O_RDWR|O_EXCL|O_SYNC, PERM_INSECURE, DB_HASH, &openinfo); + O_RDWR|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo); if (dp == NULL) error(buf); clean = FILE_SECURE; cp(sbuf2, sbuf, PERM_SECURE); sdp = dbopen(sbuf, - O_RDWR|O_EXCL|O_SYNC, PERM_SECURE, DB_HASH, &openinfo); + O_RDWR|O_EXCL, PERM_SECURE, DB_HASH, &openinfo); if (sdp == NULL) error(sbuf); @@ -289,13 +289,13 @@ main(int argc, char *argv[]) method = 0; } else { dp = dbopen(buf, - O_RDWR|O_CREAT|O_EXCL|O_SYNC, PERM_INSECURE, DB_HASH, &openinfo); + O_RDWR|O_CREAT|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo); if (dp == NULL) error(buf); clean = FILE_INSECURE; sdp = dbopen(sbuf, - O_RDWR|O_CREAT|O_EXCL|O_SYNC, PERM_SECURE, DB_HASH, &openinfo); + O_RDWR|O_CREAT|O_EXCL, PERM_SECURE, DB_HASH, &openinfo); if (sdp == NULL) error(sbuf); clean = FILE_SECURE; Modified: stable/10/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- stable/10/usr.sbin/services_mkdb/services_mkdb.c Sun Mar 6 04:38:08 2016 (r296423) +++ stable/10/usr.sbin/services_mkdb/services_mkdb.c Sun Mar 6 08:40:21 2016 (r296424) @@ -141,7 +141,7 @@ main(int argc, char *argv[]) err(1, "Cannot install exit handler"); (void)snprintf(tname, sizeof(tname), "%s.tmp", dbname); - db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL | O_SYNC, + db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL, (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), DB_HASH, &hinfo); if (!db) err(1, "Error opening temporary database `%s'", tname); From owner-svn-src-all@freebsd.org Sun Mar 6 08:52:05 2016 Return-Path: Delivered-To: svn-src-all@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 2420F9DAF47; Sun, 6 Mar 2016 08:52:05 +0000 (UTC) (envelope-from kp@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 F40B9174; Sun, 6 Mar 2016 08:52:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u268q4Be004419; Sun, 6 Mar 2016 08:52:04 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u268q3ws004416; Sun, 6 Mar 2016 08:52:03 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201603060852.u268q3ws004416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 6 Mar 2016 08:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296425 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 08:52:05 -0000 Author: kp Date: Sun Mar 6 08:52:03 2016 New Revision: 296425 URL: https://svnweb.freebsd.org/changeset/base/296425 Log: MFC r295836: ifconfig(8): can't use 'name' or 'description' when creating interface with auto numbering If one does 'ifconfig tap create name blah', it will return error because the 'name' command doesn't properly populate the request sent to ioctl(...). The 'description' command has the same bug, and is also fixed with this patch. If one does 'ifconfig tap create mtu 9000 name blah', it DOES work, but 'tap0' (or other sequence number) is echoed, instead of the expected 'blah'. (assuming the name change actually succeeded) PR: 206876 Submitted by: Marie Helene Kvello-Aune Differential Revision: https://reviews.freebsd.org/D5341 Modified: stable/10/sbin/ifconfig/ifclone.c stable/10/sbin/ifconfig/ifconfig.c stable/10/sbin/ifconfig/ifconfig.h Modified: stable/10/sbin/ifconfig/ifclone.c ============================================================================== --- stable/10/sbin/ifconfig/ifclone.c Sun Mar 6 08:40:21 2016 (r296424) +++ stable/10/sbin/ifconfig/ifclone.c Sun Mar 6 08:52:03 2016 (r296425) @@ -144,11 +144,12 @@ ifclonecreate(int s, void *arg) } /* - * If we get a different name back than we put in, print it. + * If we get a different name back than we put in, update record and + * indicate it should be printed later. */ if (strncmp(name, ifr.ifr_name, sizeof(name)) != 0) { strlcpy(name, ifr.ifr_name, sizeof(name)); - printf("%s\n", name); + printifname = 1; } } Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Sun Mar 6 08:40:21 2016 (r296424) +++ stable/10/sbin/ifconfig/ifconfig.c Sun Mar 6 08:52:03 2016 (r296425) @@ -93,6 +93,7 @@ int clearaddr; int newaddr = 1; int verbose; int noload; +int printifname = 0; int supmedia = 0; int printkeys = 0; /* Print keying material for interfaces. */ @@ -108,6 +109,8 @@ static struct afswtch *af_getbyname(cons static struct afswtch *af_getbyfamily(int af); static void af_other_status(int); +void printifnamemaybe(void); + static struct option *opts = NULL; void @@ -141,6 +144,12 @@ usage(void) exit(1); } +void printifnamemaybe() +{ + if (printifname) + printf("%s\n", name); +} + int main(int argc, char *argv[]) { @@ -156,6 +165,12 @@ main(int argc, char *argv[]) size_t iflen; all = downonly = uponly = namesonly = noload = verbose = 0; + + /* + * Ensure we print interface name when expected to, + * even if we terminate early due to error. + */ + atexit(printifnamemaybe); /* Parse leading line options */ strlcpy(options, "adklmnuv", sizeof(options)); @@ -856,6 +871,8 @@ setifname(const char *val, int dummy __u const struct afswtch *afp) { char *newname; + + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); newname = strdup(val); if (newname == NULL) @@ -865,6 +882,7 @@ setifname(const char *val, int dummy __u free(newname); err(1, "ioctl SIOCSIFNAME (set name)"); } + printifname = 1; strlcpy(name, newname, sizeof(name)); free(newname); } @@ -876,6 +894,8 @@ setifdescr(const char *val, int dummy __ { char *newdescr; + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + ifr.ifr_buffer.length = strlen(val) + 1; if (ifr.ifr_buffer.length == 1) { ifr.ifr_buffer.buffer = newdescr = NULL; Modified: stable/10/sbin/ifconfig/ifconfig.h ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.h Sun Mar 6 08:40:21 2016 (r296424) +++ stable/10/sbin/ifconfig/ifconfig.h Sun Mar 6 08:52:03 2016 (r296425) @@ -133,6 +133,7 @@ extern int supmedia; extern int printkeys; extern int newaddr; extern int verbose; +extern int printifname; void setifcap(const char *, int value, int s, const struct afswtch *); From owner-svn-src-all@freebsd.org Sun Mar 6 11:41:10 2016 Return-Path: Delivered-To: svn-src-all@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 1142DA95F7E; Sun, 6 Mar 2016 11:41:10 +0000 (UTC) (envelope-from andrew@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 E0F1BF9; Sun, 6 Mar 2016 11:41:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u26Bf8P3055835; Sun, 6 Mar 2016 11:41:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26Bf8EW055830; Sun, 6 Mar 2016 11:41:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201603061141.u26Bf8EW055830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 6 Mar 2016 11:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296426 - in head/sys/arm: allwinner allwinner/a20 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 11:41:10 -0000 Author: andrew Date: Sun Mar 6 11:41:08 2016 New Revision: 296426 URL: https://svnweb.freebsd.org/changeset/base/296426 Log: Add SMP support for the Allwinner A31 and A31s. This updated the existing code for the A20 to use the new PLATFORM_SMP interface, and extends it to add support for the new SoCs allowing for both to coexist within the same kernel. Submitted by: Emmanuel Vadot Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D5342 Added: head/sys/arm/allwinner/aw_mp.c - copied, changed from r296425, head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/allwinner/aw_mp.h (contents, props changed) Deleted: head/sys/arm/allwinner/a20/a20_mp.c Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/allwinner/allwinner_machdep.c head/sys/arm/conf/A20 Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Sun Mar 6 08:52:03 2016 (r296425) +++ head/sys/arm/allwinner/a20/files.a20 Sun Mar 6 11:41:08 2016 (r296426) @@ -1,5 +1,5 @@ # $FreeBSD$ arm/allwinner/a20/a20_padconf.c standard -arm/allwinner/a20/a20_mp.c optional smp +arm/allwinner/aw_mp.c optional smp arm/allwinner/a20/a20_if_dwc.c optional dwc Modified: head/sys/arm/allwinner/allwinner_machdep.c ============================================================================== --- head/sys/arm/allwinner/allwinner_machdep.c Sun Mar 6 08:52:03 2016 (r296425) +++ head/sys/arm/allwinner/allwinner_machdep.c Sun Mar 6 11:41:08 2016 (r296426) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -152,6 +153,10 @@ static platform_method_t a20_methods[] = PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, a20_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid), +#endif PLATFORMMETHOD_END, }; @@ -160,6 +165,10 @@ static platform_method_t a31_methods[] = PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, a31_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid), +#endif PLATFORMMETHOD_END, }; @@ -168,6 +177,10 @@ static platform_method_t a31s_methods[] PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, a31_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid), +#endif PLATFORMMETHOD_END, }; Copied and modified: head/sys/arm/allwinner/aw_mp.c (from r296425, head/sys/arm/allwinner/a20/a20_mp.c) ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Mar 6 08:52:03 2016 (r296425, copy source) +++ head/sys/arm/allwinner/aw_mp.c Sun Mar 6 11:41:08 2016 (r296426) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2014 Ganbold Tsagaankhuu + * Copyright (c) 2016 Emmanuel Vadot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,53 +39,69 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include +#include -#define CPUCFG_BASE 0x01c25c00 +#include +#include + +/* Register for all dual-core SoC */ +#define A20_CPUCFG_BASE 0x01c25c00 +/* Register for all quad-core SoC */ +#define CPUCFG_BASE 0x01f01c00 #define CPUCFG_SIZE 0x400 +#define PRCM_BASE 0x01f01400 +#define PRCM_SIZE 0x800 + +#define CPU_OFFSET 0x40 +#define CPU_OFFSET_CTL 0x04 +#define CPU_OFFSET_STATUS 0x08 +#define CPU_RST_CTL(cpuid) ((cpuid + 1) * CPU_OFFSET) +#define CPU_CTL(cpuid) (((cpuid + 1) * CPU_OFFSET) + CPU_OFFSET_CTL) +#define CPU_STATUS(cpuid) (((cpuid + 1) * CPU_OFFSET) + CPU_OFFSET_STATUS) + +#define CPU_RESET (1 << 0) +#define CPU_CORE_RESET (1 << 1) -#define CPU0_RST_CTL 0x40 -#define CPU0_CTL 0x44 -#define CPU0_STATUS 0x48 -#define CPU1_RST_CTL 0x80 -#define CPU1_CTL 0x84 -#define CPU1_STATUS 0x88 #define CPUCFG_GENCTL 0x184 #define CPUCFG_P_REG0 0x1a4 -#define CPU1_PWR_CLAMP 0x1b0 -#define CPU1_PWROFF_REG 0x1b4 + +#define A20_CPU1_PWR_CLAMP 0x1b0 +#define CPU_PWR_CLAMP_REG 0x140 +#define CPU_PWR_CLAMP(cpu) ((cpu * 4) + CPU_PWR_CLAMP_REG) +#define CPU_PWR_CLAMP_STEPS 8 + +#define A20_CPU1_PWROFF_REG 0x1b4 +#define CPU_PWROFF 0x100 + #define CPUCFG_DBGCTL0 0x1e0 #define CPUCFG_DBGCTL1 0x1e4 void -platform_mp_setmaxid(void) +aw_mp_setmaxid(platform_t plat) { int ncpu; + uint32_t reg; if (mp_ncpus != 0) return; - /* Read the number of cores from the CP15 L2 Control Register. */ - __asm __volatile("mrc p15, 1, %0, c9, c0, 2" : "=r" (ncpu)); - ncpu = ((ncpu >> 24) & 0x3) + 1; + reg = cp15_l2ctlr_get(); + ncpu = CPUV7_L2CTLR_NPROC(reg); mp_ncpus = ncpu; mp_maxid = ncpu - 1; } -void -platform_mp_start_ap(void) +static void +aw_common_mp_start_ap(bus_space_handle_t cpucfg, bus_space_handle_t prcm) { - bus_space_handle_t cpucfg; - + int i, j; uint32_t val; - if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, 0, - &cpucfg) != 0) - panic("Couldn't map the CPUCFG\n"); - dcache_wbinv_poc_all(); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0, @@ -95,44 +112,93 @@ platform_mp_start_ap(void) * Ensure DBGPWRDUP is set to LOW to prevent any external * debug access to the processor. */ - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 0); + for (i = 1; i < mp_ncpus; i++) + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU_RST_CTL(i), 0); /* Set L1RSTDISABLE low */ val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL); - val &= ~(1 << 1); + for (i = 1; i < mp_ncpus; i++) + val &= ~(1 << i); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL, val); /* Set DBGPWRDUP low */ val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); - val &= ~(1 << 1); + for (i = 1; i < mp_ncpus; i++) + val &= ~(1 << i); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); /* Release power clamp */ - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0xff); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x7f); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x3f); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x1f); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x0f); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x07); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x03); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x01); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x00); + for (i = 1; i < mp_ncpus; i++) + for (j = 0; j <= CPU_PWR_CLAMP_STEPS; j++) { + if (prcm) { + bus_space_write_4(fdtbus_bs_tag, prcm, + CPU_PWR_CLAMP(i), 0xff >> j); + } else { + bus_space_write_4(fdtbus_bs_tag, + cpucfg, A20_CPU1_PWR_CLAMP, 0xff >> j); + } + } DELAY(10000); /* Clear power-off gating */ - val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPU1_PWROFF_REG); - val &= ~(1 << 0); - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWROFF_REG, val); + if (prcm) { + val = bus_space_read_4(fdtbus_bs_tag, prcm, CPU_PWROFF); + for (i = 0; i < mp_ncpus; i++) + val &= ~(1 << i); + bus_space_write_4(fdtbus_bs_tag, prcm, CPU_PWROFF, val); + } else { + val = bus_space_read_4(fdtbus_bs_tag, + cpucfg, A20_CPU1_PWROFF_REG); + val &= ~(1 << 0); + bus_space_write_4(fdtbus_bs_tag, cpucfg, + A20_CPU1_PWROFF_REG, val); + } DELAY(1000); /* De-assert cpu core reset */ - bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 3); + for (i = 1; i < mp_ncpus; i++) + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU_RST_CTL(i), + CPU_RESET | CPU_CORE_RESET); /* Assert DBGPWRDUP signal */ val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); - val |= (1 << 1); + for (i = 1; i < mp_ncpus; i++) + val |= (1 << i); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); armv7_sev(); bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); } + +void +a20_mp_start_ap(platform_t plat) +{ + bus_space_handle_t cpucfg; + + if (bus_space_map(fdtbus_bs_tag, A20_CPUCFG_BASE, CPUCFG_SIZE, + 0, &cpucfg) != 0) + panic("Couldn't map the CPUCFG\n"); + + aw_common_mp_start_ap(cpucfg, 0); + armv7_sev(); + bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); +} + +void +a31_mp_start_ap(platform_t plat) +{ + bus_space_handle_t cpucfg; + bus_space_handle_t prcm; + + if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, + 0, &cpucfg) != 0) + panic("Couldn't map the CPUCFG\n"); + if (bus_space_map(fdtbus_bs_tag, PRCM_BASE, PRCM_SIZE, 0, + &prcm) != 0) + panic("Couldn't map the PRCM\n"); + + aw_common_mp_start_ap(cpucfg, prcm); + armv7_sev(); + bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); + bus_space_unmap(fdtbus_bs_tag, prcm, PRCM_SIZE); +} Added: head/sys/arm/allwinner/aw_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/aw_mp.h Sun Mar 6 11:41:08 2016 (r296426) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2016 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * 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 AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _AW_MP_H_ +#define _AW_MP_H_ + +void aw_mp_setmaxid(platform_t plat); +void a20_mp_start_ap(platform_t plat); +void a31_mp_start_ap(platform_t plat); + +#endif /* _AW_MP_H_ */ Modified: head/sys/arm/conf/A20 ============================================================================== --- head/sys/arm/conf/A20 Sun Mar 6 08:52:03 2016 (r296425) +++ head/sys/arm/conf/A20 Sun Mar 6 11:41:08 2016 (r296426) @@ -31,6 +31,7 @@ options HZ=100 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM +options PLATFORM_SMP # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols From owner-svn-src-all@freebsd.org Sun Mar 6 14:37:50 2016 Return-Path: Delivered-To: svn-src-all@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 B5480AC032B; Sun, 6 Mar 2016 14:37:50 +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 878038CC; Sun, 6 Mar 2016 14:37:50 +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 u26Ebnt4009656; Sun, 6 Mar 2016 14:37:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26EbnZf009655; Sun, 6 Mar 2016 14:37:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603061437.u26EbnZf009655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Mar 2016 14:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296427 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 14:37:50 -0000 Author: dim Date: Sun Mar 6 14:37:49 2016 New Revision: 296427 URL: https://svnweb.freebsd.org/changeset/base/296427 Log: Add another libclang_rt library to ObsoleteFiles, so the enclosing directory can be removed completely. Noticed by: Oliver Hartmann Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 6 11:41:08 2016 (r296426) +++ head/ObsoleteFiles.inc Sun Mar 6 14:37:49 2016 (r296427) @@ -106,6 +106,8 @@ OLD_FILES+=usr/lib/clang/3.7.1/include/x OLD_FILES+=usr/lib/clang/3.7.1/include/xtestintrin.h OLD_DIRS+=usr/lib/clang/3.7.1/include OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-x86_64.a OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-i386.a OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a From owner-svn-src-all@freebsd.org Sun Mar 6 15:57:44 2016 Return-Path: Delivered-To: svn-src-all@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 7E3DBA9523B; Sun, 6 Mar 2016 15:57:44 +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 504D1C0; Sun, 6 Mar 2016 15:57:44 +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 u26FvhS6033983; Sun, 6 Mar 2016 15:57:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26FvhMi033982; Sun, 6 Mar 2016 15:57:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603061557.u26FvhMi033982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Mar 2016 15:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296428 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 15:57:44 -0000 Author: dim Date: Sun Mar 6 15:57:43 2016 New Revision: 296428 URL: https://svnweb.freebsd.org/changeset/base/296428 Log: 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 MFC after: 2 weeks X-MFC-With: r296419 Modified: head/sys/boot/common/load_elf_obj.c Modified: head/sys/boot/common/load_elf_obj.c ============================================================================== --- head/sys/boot/common/load_elf_obj.c Sun Mar 6 14:37:49 2016 (r296427) +++ head/sys/boot/common/load_elf_obj.c Sun Mar 6 15:57:43 2016 (r296428) @@ -221,6 +221,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; From owner-svn-src-all@freebsd.org Sun Mar 6 16:00:06 2016 Return-Path: Delivered-To: svn-src-all@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 C9DF8A9537B for ; Sun, 6 Mar 2016 16:00:06 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 659F52C1 for ; Sun, 6 Mar 2016 16:00:06 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x231.google.com with SMTP id l68so44443969wml.1 for ; Sun, 06 Mar 2016 08:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=jR6GAcbcqgcBpTxT2c8AaXCUeVmrw7T6W98nFpOn0q8=; b=WGjU9GMrTQhEllNLck0vXgMysxelvci5qYw8BrYY/UVNNU8mIgMCDJCOwTryazWVVW fp+uEsn1escCiVZEEzowx8Arpuzk3PPzJQpkAbKgceCzuKwMKMr+h3HDw/5pid+IhpwV XWt7fu5xKadvQIFC9v3owO9ksEkkBWJPAaNhyigXmlLQihXpYoQNXGaPYDVAjwil93Dt WylI/TrY3F2ELSje1un0serCRv/+2p3GDYLFPpYR3T2HhE537CEmwoqCNhivwq5F1QLe ln7WJ1a9aNfStT2atlna38sUVpcN6LFQmLDze+ZL7tFUsXljPvGHgQgS/hELgb6LDU6B ZZVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=jR6GAcbcqgcBpTxT2c8AaXCUeVmrw7T6W98nFpOn0q8=; b=cBkm38ZfccCsoRA9zpQDCbnFsGXKSl4zVWAxKHXUkUaYBzMGIJw/qWF1qV8t/dBjLc czOwhAeo6heLMSblqCBEI+phEZ0rm7ZUlM1hRPNhDuVFX2M+y7WSmyLbMbJ6KNb3j5D3 BdwbZXaAOPiAKPR+4pGH81jFJyKMsDTcxNLSozOeFgBHGYlVgk/Cqm9BAQvTmazfqRLi 8y3oMy0TVX7TMSrP+tPkGxuTEdMNGwhsjIbGQHj3BqaOvEYeSv/m/SgkcmGykkSJ0gJ6 u0sz7Df7Pi+iRnXAIeUew4ZT0Lb26LvQl4ukzK8apsPanHzI5bcoa361RRzUVYdGs5JQ CJkQ== X-Gm-Message-State: AD7BkJKB2VaiK32ya//7AHDNmBdVhcmosyBEyXu7yO9L8qJruyC5cZi5tCP/R43dDS0/AOINe/UHVyKwJDlc/l3u MIME-Version: 1.0 X-Received: by 10.194.77.193 with SMTP id u1mr18393225wjw.73.1457280004586; Sun, 06 Mar 2016 08:00:04 -0800 (PST) Received: by 10.194.243.98 with HTTP; Sun, 6 Mar 2016 08:00:04 -0800 (PST) In-Reply-To: <201603061557.u26FvhMi033982@repo.freebsd.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> Date: Sun, 6 Mar 2016 17:00:04 +0100 Message-ID: Subject: Re: svn commit: r296428 - head/sys/boot/common From: Oliver Pinter To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 16:00:07 -0000 On 3/6/16, Dimitry Andric wrote: > Author: dim > Date: Sun Mar 6 15:57:43 2016 > New Revision: 296428 > URL: https://svnweb.freebsd.org/changeset/base/296428 > > Log: > 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. Could you please add a note about this to UPDATING file? > > Reviewed by: kib > MFC after: 2 weeks > X-MFC-With: r296419 > > Modified: > head/sys/boot/common/load_elf_obj.c > > Modified: head/sys/boot/common/load_elf_obj.c > ============================================================================== > --- head/sys/boot/common/load_elf_obj.c Sun Mar 6 14:37:49 2016 (r296427) > +++ head/sys/boot/common/load_elf_obj.c Sun Mar 6 15:57:43 2016 (r296428) > @@ -221,6 +221,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; > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Sun Mar 6 16:17:17 2016 Return-Path: Delivered-To: svn-src-all@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 EEE51A95AE5; Sun, 6 Mar 2016 16:17:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5BF3DD3; Sun, 6 Mar 2016 16:17:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::c8cc:92f5:a9cb:d8ee] (unknown [IPv6:2001:7b8:3a7:0:c8cc:92f5:a9cb:d8ee]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CB2583E090; Sun, 6 Mar 2016 17:17:13 +0100 (CET) Subject: Re: svn commit: r296428 - head/sys/boot/common Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/signed; boundary="Apple-Mail=_72ACE11D-052B-47DC-8126-B8A539029FA9"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 (ebbf3ef) From: Dimitry Andric In-Reply-To: Date: Sun, 6 Mar 2016 17:17:05 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> To: Oliver Pinter X-Mailer: Apple Mail (2.3112) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 16:17:17 -0000 --Apple-Mail=_72ACE11D-052B-47DC-8126-B8A539029FA9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 06 Mar 2016, at 17:00, Oliver Pinter = wrote: >=20 > On 3/6/16, Dimitry Andric wrote: >> Author: dim >> Date: Sun Mar 6 15:57:43 2016 >> New Revision: 296428 >> URL: https://svnweb.freebsd.org/changeset/base/296428 >>=20 >> Log: >> 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. >>=20 >> Unfortunately this will require installing boot loaders from = sys/boot >> before attempting to boot with a new kernel. >=20 > Could you please add a note about this to UPDATING file? I am a bit torn on this, because normally we always tell people to install the kernel first, reboot, then run make installworld (which also installs the boot loaders). However, in this case, people might depend on their boot loader loading modules which are required to make the system boot at all. So if they happened to forget updating their boot loader first, a panic might be the result. I wonder what a failsafe and acceptable upgrade scenario is, in this case. Normally the procedure is something like: make buildworld make buildkernel (with KERNCONF=3Dwhatever, if needed) make installkernel (again with KERNCONF, if needed) reboot (to single user, but cheating is possible usually) mergemaster -p make installworld This could maybe be modified to: make buildworld make buildkernel (with KERNCONF=3Dwhatever, if needed) make installkernel (again with KERNCONF, if needed) make -C sys/boot install reboot (to single user, but cheating is possible usually) mergemaster -p make installworld E.g. insert the step which installs the boot loaders just after (or before) the step which installs the kernel. Is something like this acceptable as a one-time workaround, or maybe it is better in general, in case we ever add other new features to the boot loaders? -Dimitry --Apple-Mail=_72ACE11D-052B-47DC-8126-B8A539029FA9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.29 iEYEARECAAYFAlbcWAkACgkQsF6jCi4glqPv4gCfT90/wveAL2rshN8QccQ8noAa Sg8AmwSMje31dxJwVng3Dih4/ru882/S =jeHf -----END PGP SIGNATURE----- --Apple-Mail=_72ACE11D-052B-47DC-8126-B8A539029FA9-- From owner-svn-src-all@freebsd.org Sun Mar 6 17:10:15 2016 Return-Path: Delivered-To: svn-src-all@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 6BAA69DBCFE for ; Sun, 6 Mar 2016 17:10:15 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06573E56 for ; Sun, 6 Mar 2016 17:10:15 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x234.google.com with SMTP id n186so55452501wmn.1 for ; Sun, 06 Mar 2016 09:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=+1UdcWC12E+2aNYB994kxCrSA9YwheJZd02E3CbYQ0I=; b=DqYioVcHqQEs9pydGO5/I7vj6+nVC2CdHo+/mKgGPbHwPmDK86MQzcYziCIIGFqg19 kpE6m3H/7s9B1S4t79F/ZCPrE81goF6rehFWE2GlOsHfQB8RKhyPAcfVGAD/a5HaL86B vgJhTmq+/g4Oh6yB775aEGt830bvzjJdrO0zyWLC53XEcfE8ps3HADpTMBTH9MAYXwAk TMQPDHFsbMAhbwwpHVOGnaLfEmc8qVndG9dfvGkg1PGhs1kXH8946WAfYyrP32+iyps+ NIBxk9gOMjZRcBAbpUHr/MlI07nL4xNB9L97drvLD8m0i/qGwSuz1m5lM6VS3v6bIIfR W0NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=+1UdcWC12E+2aNYB994kxCrSA9YwheJZd02E3CbYQ0I=; b=i0JjOlqdoPLxfRmKHeOaeoy2MBaj/1o8cHikiV3iQELCv9Eja+31kIqqj3iH5I/+du HIc6Hx3FT8J7lyOOE9zj8j8NwZ+5VXJhxRAtiy68KjqhA67ZG0tbLmD9hCGcaECAL1XM IOJx5/sRrRO4vejktf5ZRNUWFylAaWEEU9SR9dzNZKKwK2WJgmbPN7f8p951QvDplgQS xOL09/vBbAvf1arfwQEKWmi34GQyaqZoVJvY/xEP08QnbY5EaJtQL7Jr8Ad2ihuBTidJ ckaUk/i2Eyt3dVoJTxvVIeoVZka+8YjqbuBeMcuIKzIWan/uHPGTu26Qf4ALrVF2227l l/qQ== X-Gm-Message-State: AD7BkJLmhr86mU5Rwz/w+04SxtwqohCD0IxxSawl/pgTMk7MQMzxgF56apeh4iNOchl3Xar2aQUbhd7xffGWo9rl MIME-Version: 1.0 X-Received: by 10.194.200.194 with SMTP id ju2mr17936563wjc.63.1457284213298; Sun, 06 Mar 2016 09:10:13 -0800 (PST) Received: by 10.194.243.98 with HTTP; Sun, 6 Mar 2016 09:10:13 -0800 (PST) In-Reply-To: <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> Date: Sun, 6 Mar 2016 18:10:13 +0100 Message-ID: Subject: Re: svn commit: r296428 - head/sys/boot/common From: Oliver Pinter To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 17:10:15 -0000 On 3/6/16, Dimitry Andric wrote: > On 06 Mar 2016, at 17:00, Oliver Pinter > wrote: >> >> On 3/6/16, Dimitry Andric wrote: >>> Author: dim >>> Date: Sun Mar 6 15:57:43 2016 >>> New Revision: 296428 >>> URL: https://svnweb.freebsd.org/changeset/base/296428 >>> >>> Log: >>> 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. >> >> Could you please add a note about this to UPDATING file? > > I am a bit torn on this, because normally we always tell people to > install the kernel first, reboot, then run make installworld (which also > installs the boot loaders). > > However, in this case, people might depend on their boot loader loading > modules which are required to make the system boot at all. So if they > happened to forget updating their boot loader first, a panic might be > the result. > > I wonder what a failsafe and acceptable upgrade scenario is, in this > case. Normally the procedure is something like: > > make buildworld > make buildkernel (with KERNCONF=whatever, if needed) > make installkernel (again with KERNCONF, if needed) > reboot (to single user, but cheating is possible usually) > mergemaster -p > make installworld > > This could maybe be modified to: > > make buildworld > make buildkernel (with KERNCONF=whatever, if needed) > make installkernel (again with KERNCONF, if needed) > make -C sys/boot install > reboot (to single user, but cheating is possible usually) > mergemaster -p > make installworld > > E.g. insert the step which installs the boot loaders just after (or > before) the step which installs the kernel. > > Is something like this acceptable as a one-time workaround, or maybe it > is better in general, in case we ever add other new features to the boot > loaders? If I'm not wrong, the bootloaders are self-contained (using libstand, and statically linked) same as the kernel, so they are not depend from the other parts of the system, and they already lives under the ${SRCTOP}/sys with the kernel, so logically bootloader belong to the kernel and it's acceptable from me to update them under the installkernel phase. The question is with this method everything working fine or this would break something? > > -Dimitry > > From owner-svn-src-all@freebsd.org Sun Mar 6 17:24:04 2016 Return-Path: Delivered-To: svn-src-all@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 703ECA952B3; Sun, 6 Mar 2016 17:24:04 +0000 (UTC) (envelope-from jilles@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 4196A8CE; Sun, 6 Mar 2016 17:24:04 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u26HO33R060919; Sun, 6 Mar 2016 17:24:03 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26HO3K4060917; Sun, 6 Mar 2016 17:24:03 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201603061724.u26HO3K4060917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 6 Mar 2016 17:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296429 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 17:24:04 -0000 Author: jilles Date: Sun Mar 6 17:24:02 2016 New Revision: 296429 URL: https://svnweb.freebsd.org/changeset/base/296429 Log: sh: Fix some dead stores. Found by: clang static analyzer Modified: head/bin/sh/expand.c head/bin/sh/histedit.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun Mar 6 15:57:43 2016 (r296428) +++ head/bin/sh/expand.c Sun Mar 6 17:24:02 2016 (r296429) @@ -463,7 +463,6 @@ expbackq(union node *cmd, int quoted, in argbackq = saveargbackq; p = in.buf; - lastc = '\0'; nnl = 0; if (!quoted && flag & EXP_SPLIT) ifs = ifsset() ? ifsval() : " \t\n"; @@ -1288,7 +1287,7 @@ patmatch(const char *pattern, const char if (wc == 0) goto backtrack; } else - wc = (unsigned char)*q++; + q++; break; case '*': c = *p; Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Sun Mar 6 15:57:43 2016 (r296428) +++ head/bin/sh/histedit.c Sun Mar 6 17:24:02 2016 (r296429) @@ -359,7 +359,7 @@ histcmd(int argc, char **argv __unused) * cursor, set it back to the current * entry. */ - retval = history(hist, &he, + history(hist, &he, H_NEXT_EVENT, oldhistnum); } } else From owner-svn-src-all@freebsd.org Sun Mar 6 17:34:23 2016 Return-Path: Delivered-To: svn-src-all@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 05222A9585C; Sun, 6 Mar 2016 17:34:23 +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 CAC0AFD3; Sun, 6 Mar 2016 17:34:22 +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 u26HYLfQ064287; Sun, 6 Mar 2016 17:34:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26HYLnG064286; Sun, 6 Mar 2016 17:34:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603061734.u26HYLnG064286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Mar 2016 17:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296430 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 17:34:23 -0000 Author: dim Date: Sun Mar 6 17:34:21 2016 New Revision: 296430 URL: https://svnweb.freebsd.org/changeset/base/296430 Log: Add an UPDATING entry about installing the boot loaders after installing the kernel, on amd64. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Mar 6 17:24:02 2016 (r296429) +++ head/UPDATING Sun Mar 6 17:34:21 2016 (r296430) @@ -31,6 +31,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160306: + On amd64, clang 3.8.0 can now insert sections of type AMD64_UNWIND into + kernel modules. Therefore, if you load any kernel modules at boot time, + please install the boot loaders after you install the kernel, but before + rebooting, e.g.: + + make buildworld + make kernel KERNCONF=YOUR_KERNEL_HERE + make -C sys/boot install + + + Then follow the usual steps, described in the General Notes section, + below. + 20160305: Clang, llvm, lldb and compiler-rt have been upgraded to 3.8.0. Please see the 20141231 entry below for information about prerequisites and From owner-svn-src-all@freebsd.org Sun Mar 6 18:22:25 2016 Return-Path: Delivered-To: svn-src-all@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 C1C1DAB6B93; Sun, 6 Mar 2016 18:22:25 +0000 (UTC) (envelope-from dwmalone@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 9D02BDCE; Sun, 6 Mar 2016 18:22:25 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u26IMO6E079879; Sun, 6 Mar 2016 18:22:24 GMT (envelope-from dwmalone@FreeBSD.org) Received: (from dwmalone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26IMO9p079875; Sun, 6 Mar 2016 18:22:24 GMT (envelope-from dwmalone@FreeBSD.org) Message-Id: <201603061822.u26IMO9p079875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dwmalone set sender to dwmalone@FreeBSD.org using -f From: David Malone Date: Sun, 6 Mar 2016 18:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r296431 - in releng/10.3: lib/libc/db/hash usr.bin/cap_mkdb usr.sbin/pwd_mkdb usr.sbin/services_mkdb X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 18:22:25 -0000 Author: dwmalone Date: Sun Mar 6 18:22:24 2016 New Revision: 296431 URL: https://svnweb.freebsd.org/changeset/base/296431 Log: Merge 296424 from stable/10 - contains the following changes to -current: r295924: Make sure that hash-based db files fsync befor closing/syncing. r295925: We no longer need O_SYNC pwd_mkd r295465: We no longer need O_SYNC on services_mkdb r295800: We no longer need O_SYNC on cap_mkdb Approved by: re (marius) Modified: releng/10.3/lib/libc/db/hash/hash.c releng/10.3/usr.bin/cap_mkdb/cap_mkdb.c releng/10.3/usr.sbin/pwd_mkdb/pwd_mkdb.c releng/10.3/usr.sbin/services_mkdb/services_mkdb.c Directory Properties: releng/10.3/ (props changed) Modified: releng/10.3/lib/libc/db/hash/hash.c ============================================================================== --- releng/10.3/lib/libc/db/hash/hash.c Sun Mar 6 17:34:21 2016 (r296430) +++ releng/10.3/lib/libc/db/hash/hash.c Sun Mar 6 18:22:24 2016 (r296431) @@ -422,8 +422,10 @@ hdestroy(HTAB *hashp) if (hashp->tmp_buf) free(hashp->tmp_buf); - if (hashp->fp != -1) + if (hashp->fp != -1) { + (void)_fsync(hashp->fp); (void)_close(hashp->fp); + } free(hashp); @@ -458,6 +460,8 @@ hash_sync(const DB *dbp, u_int32_t flags return (0); if (__buf_free(hashp, 0, 1) || flush_meta(hashp)) return (ERROR); + if (hashp->fp != -1 && _fsync(hashp->fp) != 0) + return (ERROR); hashp->new_file = 0; return (0); } Modified: releng/10.3/usr.bin/cap_mkdb/cap_mkdb.c ============================================================================== --- releng/10.3/usr.bin/cap_mkdb/cap_mkdb.c Sun Mar 6 17:34:21 2016 (r296430) +++ releng/10.3/usr.bin/cap_mkdb/cap_mkdb.c Sun Mar 6 18:22:24 2016 (r296431) @@ -119,7 +119,7 @@ main(int argc, char *argv[]) (void)snprintf(buf, sizeof(buf), "%s.db", capname ? capname : *argv); if ((capname = strdup(buf)) == NULL) errx(1, "strdup failed"); - if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR | O_SYNC, + if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR, DEFFILEMODE, DB_HASH, &openinfo)) == NULL) err(1, "%s", buf); Modified: releng/10.3/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- releng/10.3/usr.sbin/pwd_mkdb/pwd_mkdb.c Sun Mar 6 17:34:21 2016 (r296430) +++ releng/10.3/usr.sbin/pwd_mkdb/pwd_mkdb.c Sun Mar 6 18:22:24 2016 (r296431) @@ -225,14 +225,14 @@ main(int argc, char *argv[]) clean = FILE_INSECURE; cp(buf2, buf, PERM_INSECURE); dp = dbopen(buf, - O_RDWR|O_EXCL|O_SYNC, PERM_INSECURE, DB_HASH, &openinfo); + O_RDWR|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo); if (dp == NULL) error(buf); clean = FILE_SECURE; cp(sbuf2, sbuf, PERM_SECURE); sdp = dbopen(sbuf, - O_RDWR|O_EXCL|O_SYNC, PERM_SECURE, DB_HASH, &openinfo); + O_RDWR|O_EXCL, PERM_SECURE, DB_HASH, &openinfo); if (sdp == NULL) error(sbuf); @@ -289,13 +289,13 @@ main(int argc, char *argv[]) method = 0; } else { dp = dbopen(buf, - O_RDWR|O_CREAT|O_EXCL|O_SYNC, PERM_INSECURE, DB_HASH, &openinfo); + O_RDWR|O_CREAT|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo); if (dp == NULL) error(buf); clean = FILE_INSECURE; sdp = dbopen(sbuf, - O_RDWR|O_CREAT|O_EXCL|O_SYNC, PERM_SECURE, DB_HASH, &openinfo); + O_RDWR|O_CREAT|O_EXCL, PERM_SECURE, DB_HASH, &openinfo); if (sdp == NULL) error(sbuf); clean = FILE_SECURE; Modified: releng/10.3/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- releng/10.3/usr.sbin/services_mkdb/services_mkdb.c Sun Mar 6 17:34:21 2016 (r296430) +++ releng/10.3/usr.sbin/services_mkdb/services_mkdb.c Sun Mar 6 18:22:24 2016 (r296431) @@ -141,7 +141,7 @@ main(int argc, char *argv[]) err(1, "Cannot install exit handler"); (void)snprintf(tname, sizeof(tname), "%s.tmp", dbname); - db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL | O_SYNC, + db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL, (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), DB_HASH, &hinfo); if (!db) err(1, "Error opening temporary database `%s'", tname); From owner-svn-src-all@freebsd.org Sun Mar 6 18:41:50 2016 Return-Path: Delivered-To: svn-src-all@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 373A2AC03B8; Sun, 6 Mar 2016 18:41:50 +0000 (UTC) (envelope-from jilles@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 E97971ACA; Sun, 6 Mar 2016 18:41:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u26Ifmct086260; Sun, 6 Mar 2016 18:41:48 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26Ifmnm086258; Sun, 6 Mar 2016 18:41:48 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201603061841.u26Ifmnm086258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 6 Mar 2016 18:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296434 - head/lib/libc/tests/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 18:41:50 -0000 Author: jilles Date: Sun Mar 6 18:41:48 2016 New Revision: 296434 URL: https://svnweb.freebsd.org/changeset/base/296434 Log: libc: Add some tests for memcmp(). Added: head/lib/libc/tests/string/memcmp_test.c (contents, props changed) Modified: head/lib/libc/tests/string/Makefile Modified: head/lib/libc/tests/string/Makefile ============================================================================== --- head/lib/libc/tests/string/Makefile Sun Mar 6 18:40:02 2016 (r296433) +++ head/lib/libc/tests/string/Makefile Sun Mar 6 18:41:48 2016 (r296434) @@ -1,5 +1,6 @@ # $FreeBSD$ +ATF_TESTS_C+= memcmp_test ATF_TESTS_C+= stpncpy_test ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= wcscasecmp_test Added: head/lib/libc/tests/string/memcmp_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/tests/string/memcmp_test.c Sun Mar 6 18:41:48 2016 (r296434) @@ -0,0 +1,124 @@ +/*- + * Copyright (c) 2016 Jilles Tjoelker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * 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 AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(zero); +ATF_TC_BODY(zero, tc) +{ + + assert(memcmp("a", "b", 0) == 0); + assert(memcmp("", "", 0) == 0); +} + +ATF_TC_WITHOUT_HEAD(eq); +ATF_TC_BODY(eq, tc) +{ + unsigned char data1[256], data2[256]; + int i; + + for (i = 0; i < 256; i++) + data1[i] = data2[i] = i ^ 0x55; + for (i = 1; i < 256; i++) + assert(memcmp(data1, data2, i) == 0); + for (i = 1; i < 256; i++) + assert(memcmp(data1 + i, data2 + i, 256 - i) == 0); +} + +ATF_TC_WITHOUT_HEAD(neq); +ATF_TC_BODY(neq, tc) +{ + unsigned char data1[256], data2[256]; + int i; + + for (i = 0; i < 256; i++) { + data1[i] = i; + data2[i] = i ^ 0x55; + } + for (i = 1; i < 256; i++) + assert(memcmp(data1, data2, i) != 0); + for (i = 1; i < 256; i++) + assert(memcmp(data1 + i, data2 + i, 256 - i) != 0); +} + +ATF_TC_WITHOUT_HEAD(diff); +ATF_TC_BODY(diff, tc) +{ + unsigned char data1[256], data2[256]; + int i; + + memset(data1, 'a', sizeof(data1)); + memset(data2, 'a', sizeof(data2)); + data1[128] = 255; + data2[128] = 0; + for (i = 1; i < 66; i++) { + assert(memcmp(data1 + 128, data2 + 128, i) == 255); + assert(memcmp(data2 + 128, data1 + 128, i) == -255); + assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == 255); + assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == -255); + assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == 255); + assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == -255); + } + data1[128] = 'c'; + data2[128] = 'e'; + for (i = 1; i < 66; i++) { + assert(memcmp(data1 + 128, data2 + 128, i) == -2); + assert(memcmp(data2 + 128, data1 + 128, i) == 2); + assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == -2); + assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == 2); + assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); + assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); + } + memset(data1 + 129, 'A', sizeof(data1) - 129); + memset(data2 + 129, 'Z', sizeof(data2) - 129); + for (i = 1; i < 66; i++) { + assert(memcmp(data1 + 128, data2 + 128, i) == -2); + assert(memcmp(data2 + 128, data1 + 128, i) == 2); + assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == -2); + assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == 2); + assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); + assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, zero); + ATF_TP_ADD_TC(tp, eq); + ATF_TP_ADD_TC(tp, neq); + ATF_TP_ADD_TC(tp, diff); + + return (atf_no_error()); +} From owner-svn-src-all@freebsd.org Sun Mar 6 19:57:35 2016 Return-Path: Delivered-To: svn-src-all@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 DA2C5AC1116; Sun, 6 Mar 2016 19:57:34 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (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 C6A35EEC; Sun, 6 Mar 2016 19:57:34 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: by mail.lifanov.com (Postfix, from userid 58) id E3028239746; Sun, 6 Mar 2016 14:57:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.lifanov.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.1 Received: from app.lifanov.com (chat.lifanov.com [206.125.175.13]) by mail.lifanov.com (Postfix) with ESMTPA id 1824523958D; Sun, 6 Mar 2016 14:57:33 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 06 Mar 2016 14:57:32 -0500 From: Nikolai Lifanov To: Dimitry Andric Cc: Oliver Pinter , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, owner-svn-src-head@freebsd.org Subject: Re: svn commit: r296428 - head/sys/boot/common In-Reply-To: <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> Message-ID: <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com> X-Sender: lifanov@mail.lifanov.com User-Agent: Roundcube Webmail/1.1.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 19:57:35 -0000 On 2016-03-06 11:17, Dimitry Andric wrote: > On 06 Mar 2016, at 17:00, Oliver Pinter > wrote: >> >> On 3/6/16, Dimitry Andric wrote: >>> Author: dim >>> Date: Sun Mar 6 15:57:43 2016 >>> New Revision: 296428 >>> URL: https://svnweb.freebsd.org/changeset/base/296428 >>> >>> Log: >>> 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. >> >> Could you please add a note about this to UPDATING file? > > I am a bit torn on this, because normally we always tell people to > install the kernel first, reboot, then run make installworld (which > also > installs the boot loaders). > > However, in this case, people might depend on their boot loader loading > modules which are required to make the system boot at all. So if they > happened to forget updating their boot loader first, a panic might be > the result. > > I wonder what a failsafe and acceptable upgrade scenario is, in this > case. Normally the procedure is something like: > > make buildworld > make buildkernel (with KERNCONF=whatever, if needed) > make installkernel (again with KERNCONF, if needed) > reboot (to single user, but cheating is possible usually) > mergemaster -p > make installworld > > This could maybe be modified to: > > make buildworld > make buildkernel (with KERNCONF=whatever, if needed) > make installkernel (again with KERNCONF, if needed) > make -C sys/boot install > reboot (to single user, but cheating is possible usually) > mergemaster -p > make installworld > > E.g. insert the step which installs the boot loaders just after (or > before) the step which installs the kernel. > > Is something like this acceptable as a one-time workaround, or maybe it > is better in general, in case we ever add other new features to the > boot > loaders? > > -Dimitry In my opinion, boot *blocks* (boot1) should be updated seldomly and not on every install. All (?) instances of not updating these resulting in a failed boot have an UPDATING entry or a similar warning (like the one during "zpool upgrade"). - Nikolai Lifanov From owner-svn-src-all@freebsd.org Sun Mar 6 21:13:42 2016 Return-Path: Delivered-To: svn-src-all@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 A968DA952CB; Sun, 6 Mar 2016 21:13:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1DF689; Sun, 6 Mar 2016 21:13:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::3cb7:2161:babb:f26f] (unknown [IPv6:2001:7b8:3a7:0:3cb7:2161:babb:f26f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6A7033E45D; Sun, 6 Mar 2016 22:13:39 +0100 (CET) Subject: Re: svn commit: r296428 - head/sys/boot/common Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 (ebbf3ef) From: Dimitry Andric In-Reply-To: <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com> Date: Sun, 6 Mar 2016 22:13:34 +0100 Cc: Oliver Pinter , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, owner-svn-src-head@freebsd.org Message-Id: <0D2DFD32-B29F-48EA-8D60-458960993E97@FreeBSD.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com> To: Nikolai Lifanov X-Mailer: Apple Mail (2.3112) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 21:13:42 -0000 --Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 06 Mar 2016, at 20:57, Nikolai Lifanov = wrote: >=20 > On 2016-03-06 11:17, Dimitry Andric wrote: >> On 06 Mar 2016, at 17:00, Oliver Pinter = wrote: >>> On 3/6/16, Dimitry Andric wrote: >>>> Author: dim >>>> Date: Sun Mar 6 15:57:43 2016 >>>> New Revision: 296428 >>>> URL: https://svnweb.freebsd.org/changeset/base/296428 >>>> Log: >>>> 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. >>> Could you please add a note about this to UPDATING file? >> I am a bit torn on this, because normally we always tell people to >> install the kernel first, reboot, then run make installworld (which = also >> installs the boot loaders). >> However, in this case, people might depend on their boot loader = loading >> modules which are required to make the system boot at all. So if = they >> happened to forget updating their boot loader first, a panic might be >> the result. >> I wonder what a failsafe and acceptable upgrade scenario is, in this >> case. Normally the procedure is something like: >> make buildworld >> make buildkernel (with KERNCONF=3Dwhatever, if needed) >> make installkernel (again with KERNCONF, if needed) >> reboot (to single user, but cheating is possible usually) >> mergemaster -p >> make installworld >> This could maybe be modified to: >> make buildworld >> make buildkernel (with KERNCONF=3Dwhatever, if needed) >> make installkernel (again with KERNCONF, if needed) >> make -C sys/boot install >> reboot (to single user, but cheating is possible usually) >> mergemaster -p >> make installworld >> E.g. insert the step which installs the boot loaders just after (or >> before) the step which installs the kernel. >> Is something like this acceptable as a one-time workaround, or maybe = it >> is better in general, in case we ever add other new features to the = boot >> loaders? >> -Dimitry >=20 > In my opinion, boot *blocks* (boot1) should be updated seldomly and = not on every install. > All (?) instances of not updating these resulting in a failed boot = have an UPDATING > entry or a similar warning (like the one during "zpool upgrade"). Well, each time you run make installworld, almost all the files in /boot (except for configuration) get reinstalled. For e.g. mbr, boot1 and such, this has no consequences at all, until you install them into some partition using gpart, but changes to loader, loader.efi or zfsloader *will* affect the next startup. Per a suggestion from Kostik, maybe it would be nice to have a separate "make installboot" target, which installs just the components in /boot. This could then be used before or after "make installkernel". -Dimitry --Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.29 iEYEARECAAYFAlbcnYIACgkQsF6jCi4glqMjDwCgyp/oUg3vwXo/7JZBMwexMmk5 FMIAoNXpEXyq4Iem3Uotn4FNkR2UbILn =Xu6U -----END PGP SIGNATURE----- --Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4-- From owner-svn-src-all@freebsd.org Sun Mar 6 21:32:57 2016 Return-Path: Delivered-To: svn-src-all@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 2964CA95B60; Sun, 6 Mar 2016 21:32:57 +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 BC5901AF; Sun, 6 Mar 2016 21:32:56 +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 u26LWtaO038242; Sun, 6 Mar 2016 21:32:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u26LWsCd038229; Sun, 6 Mar 2016 21:32:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603062132.u26LWsCd038229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 6 Mar 2016 21:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296435 - in head/lib/libedit: . TEST edit/readline X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 21:32:57 -0000 Author: pfg Date: Sun Mar 6 21:32:54 2016 New Revision: 296435 URL: https://svnweb.freebsd.org/changeset/base/296435 Log: Revert r296175 Undo update of libedit 2016-02-27 Something in libedit appears to be causing breakage in lldb38. The changes are not generally huge but they are suficient to to justify reverting for now. Reported by: novel, bapt Modified: head/lib/libedit/Makefile head/lib/libedit/TEST/tc1.c head/lib/libedit/TEST/wtc1.c head/lib/libedit/chared.c head/lib/libedit/chared.h head/lib/libedit/chartype.c head/lib/libedit/chartype.h head/lib/libedit/common.c head/lib/libedit/config.h head/lib/libedit/edit/readline/readline.h head/lib/libedit/editline.3 head/lib/libedit/el.c head/lib/libedit/el.h head/lib/libedit/eln.c head/lib/libedit/emacs.c head/lib/libedit/filecomplete.c head/lib/libedit/hist.c head/lib/libedit/hist.h head/lib/libedit/histedit.h head/lib/libedit/history.c head/lib/libedit/keymacro.c head/lib/libedit/makelist head/lib/libedit/map.c head/lib/libedit/parse.c head/lib/libedit/prompt.c head/lib/libedit/prompt.h head/lib/libedit/read.c head/lib/libedit/read.h head/lib/libedit/readline.c head/lib/libedit/refresh.c head/lib/libedit/refresh.h head/lib/libedit/search.c head/lib/libedit/search.h head/lib/libedit/sig.c head/lib/libedit/sig.h head/lib/libedit/sys.h head/lib/libedit/terminal.c head/lib/libedit/terminal.h head/lib/libedit/tokenizer.c head/lib/libedit/tty.c head/lib/libedit/tty.h head/lib/libedit/vi.c Directory Properties: head/lib/libedit/ (props changed) head/lib/libedit/edit/readline/ (props changed) Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/Makefile Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.55 2016/02/24 14:25:38 christos Exp $ +# $NetBSD: Makefile,v 1.37 2009/01/18 12:17:49 lukem Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ @@ -6,7 +6,7 @@ LIB= edit SHLIB_MAJOR= 7 SHLIBDIR?= /lib -OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ +OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \ parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c @@ -34,6 +34,7 @@ CLEANFILES+= common.h editline.c emacs.h INCS= histedit.h +OSRCS+= eln.c SRCS+= tokenizern.c historyn.c CLEANFILES+= tokenizern.c historyn.c CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR Modified: head/lib/libedit/TEST/tc1.c ============================================================================== --- head/lib/libedit/TEST/tc1.c Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/TEST/tc1.c Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ __FBSDID("$FreeBSD$"); @@ -50,15 +50,15 @@ __FBSDID("$FreeBSD$"); /* * test.c: A little test program */ +#include +#include +#include #include #include -#include -#include -#include -#include #include -#include #include +#include +#include #include "histedit.h" @@ -158,7 +158,7 @@ main(int argc, char *argv[]) /* Add a user-defined function */ el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete); - /* Bind tab to it */ + /* Bind tab to it */ el_set(el, EL_BIND, "^I", "ed-complete", NULL); /* Modified: head/lib/libedit/TEST/wtc1.c ============================================================================== --- head/lib/libedit/TEST/wtc1.c Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/TEST/wtc1.c Sun Mar 6 21:32:54 2016 (r296435) @@ -5,16 +5,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include #include -#include #include #include -#include -#include -#include -#include -#include #include "../histedit.h" Modified: head/lib/libedit/chared.c ============================================================================== --- head/lib/libedit/chared.c Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/chared.c Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $ */ +/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $"); +__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -46,12 +46,8 @@ __FBSDID("$FreeBSD$"); /* * chared.c: Character editor utilities */ -#include #include -#include - #include "el.h" -#include "common.h" private void ch__clearmacro (EditLine *); @@ -205,7 +201,7 @@ c_delbefore1(EditLine *el) * Return if p is part of a word according to emacs */ protected int -ce__isword(wint_t p) +ce__isword(Int p) { return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; } @@ -215,7 +211,7 @@ ce__isword(wint_t p) * Return if p is part of a word according to vi */ protected int -cv__isword(wint_t p) +cv__isword(Int p) { if (Isalnum(p) || p == '_') return 1; @@ -229,7 +225,7 @@ cv__isword(wint_t p) * Return if p is part of a big word according to vi */ protected int -cv__isWord(wint_t p) +cv__isWord(Int p) { return !Isspace(p); } @@ -239,7 +235,7 @@ cv__isWord(wint_t p) * Find the previous word */ protected Char * -c__prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) +c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) { p--; @@ -263,7 +259,7 @@ c__prev_word(Char *p, Char *low, int n, * Find the next word */ protected Char * -c__next_word(Char *p, Char *high, int n, int (*wtest)(wint_t)) +c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) { while (n--) { while ((p < high) && !(*wtest)(*p)) @@ -281,7 +277,7 @@ c__next_word(Char *p, Char *high, int n, * Find the next word vi style */ protected Char * -cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(wint_t)) +cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) { int test; @@ -310,7 +306,7 @@ cv_next_word(EditLine *el, Char *p, Char * Find the previous word vi style */ protected Char * -cv_prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) +cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) { int test; @@ -374,7 +370,7 @@ cv_delfini(EditLine *el) * Go to the end of this word according to vi */ protected Char * -cv__endword(Char *p, Char *high, int n, int (*wtest)(wint_t)) +cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) { int test; @@ -528,7 +524,7 @@ ch_enlargebufs(EditLine *el, size_t addl /* zero the newly added memory, leave old data in */ (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - + oldbuf = el->el_line.buffer; el->el_line.buffer = newbuffer; @@ -577,7 +573,7 @@ ch_enlargebufs(EditLine *el, size_t addl el->el_chared.c_redo.lim = newbuffer + (el->el_chared.c_redo.lim - el->el_chared.c_redo.buf); el->el_chared.c_redo.buf = newbuffer; - + if (!hist_enlargebuf(el, sz, newsz)) return 0; @@ -677,9 +673,9 @@ out: protected int c_gets(EditLine *el, Char *buf, const Char *prompt) { - wchar_t wch; + Char ch; ssize_t len; - Char *cp = el->el_line.buffer, ch; + Char *cp = el->el_line.buffer; if (prompt) { len = (ssize_t)Strlen(prompt); @@ -694,28 +690,26 @@ c_gets(EditLine *el, Char *buf, const Ch el->el_line.lastchar = cp + 1; re_refresh(el); - if (el_wgetc(el, &wch) != 1) { + if (FUN(el,getc)(el, &ch) != 1) { ed_end_of_file(el, 0); len = -1; break; } - ch = (Char)wch; switch (ch) { - case L'\b': /* Delete and backspace */ + case 0010: /* Delete and backspace */ case 0177: if (len == 0) { len = -1; break; } - len--; cp--; continue; case 0033: /* ESC */ - case L'\r': /* Newline */ - case L'\n': + case '\r': /* Newline */ + case '\n': buf[len] = ch; break; Modified: head/lib/libedit/chared.h ============================================================================== --- head/lib/libedit/chared.h Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/chared.h Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.h,v 1.27 2016/02/16 22:53:14 christos Exp $ */ +/* $NetBSD: chared.h,v 1.22 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,6 +41,11 @@ #ifndef _h_el_chared #define _h_el_chared +#include +#include + +#include "histedit.h" + #define EL_MAXMACRO 10 /* @@ -135,18 +140,24 @@ typedef struct el_chared_t { #define MODE_REPLACE 1 #define MODE_REPLACE_1 2 +#include "common.h" +#include "vi.h" +#include "emacs.h" +#include "search.h" +#include "fcns.h" + -protected int cv__isword(wint_t); -protected int cv__isWord(wint_t); +protected int cv__isword(Int); +protected int cv__isWord(Int); protected void cv_delfini(EditLine *); -protected Char *cv__endword(Char *, Char *, int, int (*)(wint_t)); -protected int ce__isword(wint_t); +protected Char *cv__endword(Char *, Char *, int, int (*)(Int)); +protected int ce__isword(Int); protected void cv_undo(EditLine *); protected void cv_yank(EditLine *, const Char *, int); -protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t)); -protected Char *cv_prev_word(Char *, Char *, int, int (*)(wint_t)); -protected Char *c__next_word(Char *, Char *, int, int (*)(wint_t)); -protected Char *c__prev_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int)); +protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int)); +protected Char *c__next_word(Char *, Char *, int, int (*)(Int)); +protected Char *c__prev_word(Char *, Char *, int, int (*)(Int)); protected void c_insert(EditLine *, int); protected void c_delbefore(EditLine *, int); protected void c_delbefore1(EditLine *); Modified: head/lib/libedit/chartype.c ============================================================================== --- head/lib/libedit/chartype.c Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/chartype.c Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $ */ +/* $NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -31,16 +31,13 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $"); +__RCSID("$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); -#include -#include -#include - #include "el.h" +#include #define CT_BUFSIZ ((size_t)1024) @@ -71,7 +68,7 @@ ct_conv_wbuff_resize(ct_buffer_t *conv, { void *p; - if (wsize <= conv->wsize) + if (wsize <= conv->wsize) return 0; conv->wsize = wsize; @@ -209,28 +206,6 @@ ct_encode_char(char *dst, size_t len, Ch } return l; } - -size_t -ct_mbrtowc(wchar_t *wc, const char *s, size_t n) -{ - mbstate_t mbs; - /* This only works because UTF-8 is stateless */ - memset(&mbs, 0, sizeof(mbs)); - return mbrtowc(wc, s, n, &mbs); -} - -#else - -size_t -ct_mbrtowc(wchar_t *wc, const char *s, size_t n) - if (s == NULL) - return 0; - if (n == 0) - return (size_t)-2; - if (wc != NULL) - *wc = *s; - return *s != '\0'; -} #endif protected const Char * @@ -354,7 +329,7 @@ ct_visual_char(Char *dst, size_t len, Ch return c > 0xffff ? 8 : 7; #else *dst++ = '\\'; -#define tooctaldigit(v) (Char)((v) + '0') +#define tooctaldigit(v) ((v) + '0') *dst++ = tooctaldigit(((unsigned int) c >> 6) & 0x7); *dst++ = tooctaldigit(((unsigned int) c >> 3) & 0x7); *dst++ = tooctaldigit(((unsigned int) c ) & 0x7); Modified: head/lib/libedit/chartype.h ============================================================================== --- head/lib/libedit/chartype.h Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/chartype.h Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.23 2016/02/24 17:20:01 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.15 2015/05/17 13:14:41 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -32,6 +32,7 @@ #define _h_chartype_f + #ifdef WIDECHAR /* Ideally we should also test the value of the define to see if it @@ -54,18 +55,21 @@ #warning Build environment does not support non-BMP characters #endif -#define ct_wctob wctob +#define ct_mbtowc mbtowc +#define ct_mbtowc_reset mbtowc(0,0,(size_t)0) #define ct_wctomb wctomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs #define Char wchar_t +#define Int wint_t #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W +#define FCHAR "%lc" #define FSTR "%ls" -#define STR(x) L ## x +#define STR(x) L ## x #define UC(c) c #define Isalpha(x) iswalpha(x) #define Isalnum(x) iswalnum(x) @@ -106,18 +110,21 @@ Width(wchar_t c) #else /* NARROW */ -#define ct_wctob(w) ((int)(w)) +#define ct_mbtowc error +#define ct_mbtowc_reset #define ct_wctomb error -#define ct_wctomb_reset +#define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) #define Char char +#define Int int #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type +#define FCHAR "%c" #define FSTR "%s" -#define STR(x) x +#define STR(x) x #define UC(c) (unsigned char)(c) #define Isalpha(x) isalpha((unsigned char)x) @@ -206,7 +213,7 @@ protected size_t ct_enc_width(Char); #define VISUAL_WIDTH_MAX ((size_t)8) /* The terminal is thought of in terms of X columns by Y lines. In the cases - * where a wide character takes up more than one column, the adjacent + * where a wide character takes up more than one column, the adjacent * occupied column entries will contain this faux character. */ #define MB_FILL_CHAR ((Char)-1) @@ -238,7 +245,5 @@ protected const Char *ct_visual_string(c protected int ct_chr_class(Char c); #endif -size_t ct_mbrtowc(wchar_t *, const char *, size_t); - #endif /* _chartype_f */ Modified: head/lib/libedit/common.c ============================================================================== --- head/lib/libedit/common.c Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/common.c Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $ */ +/* $NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -46,13 +46,7 @@ __FBSDID("$FreeBSD$"); /* * common.c: Common Editor functions */ -#include -#include - #include "el.h" -#include "common.h" -#include "parse.h" -#include "vi.h" /* ed_end_of_file(): * Indicate end of file @@ -60,7 +54,7 @@ __FBSDID("$FreeBSD$"); */ protected el_action_t /*ARGSUSED*/ -ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__))) +ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) { re_goto_bottom(el); @@ -74,7 +68,7 @@ ed_end_of_file(EditLine *el, wint_t c __ * Insert a character [bound to all insert keys] */ protected el_action_t -ed_insert(EditLine *el, wint_t c) +ed_insert(EditLine *el, Int c) { int count = el->el_state.argument; @@ -93,14 +87,14 @@ ed_insert(EditLine *el, wint_t c) || el->el_line.cursor >= el->el_line.lastchar) c_insert(el, 1); - *el->el_line.cursor++ = (Char)c; + *el->el_line.cursor++ = c; re_fastaddc(el); /* fast refresh for one char. */ } else { if (el->el_state.inputmode != MODE_REPLACE_1) c_insert(el, el->el_state.argument); while (count-- && el->el_line.cursor < el->el_line.lastchar) - *el->el_line.cursor++ = (Char)c; + *el->el_line.cursor++ = c; re_refresh(el); } @@ -117,7 +111,7 @@ ed_insert(EditLine *el, wint_t c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) +ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) { Char *cp, *p, *kp; @@ -145,7 +139,7 @@ ed_delete_prev_word(EditLine *el, wint_t */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(EditLine *el, wint_t c __attribute__((__unused__))) +ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__))) { #ifdef DEBUG_EDIT #define EL el->el_line @@ -192,7 +186,7 @@ ed_delete_next_char(EditLine *el, wint_t */ protected el_action_t /*ARGSUSED*/ -ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__))) +ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) { Char *kp, *cp; @@ -213,7 +207,7 @@ ed_kill_line(EditLine *el, wint_t c __at */ protected el_action_t /*ARGSUSED*/ -ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__))) +ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.lastchar; @@ -236,7 +230,7 @@ ed_move_to_end(EditLine *el, wint_t c __ */ protected el_action_t /*ARGSUSED*/ -ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__))) +ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -259,7 +253,7 @@ ed_move_to_beg(EditLine *el, wint_t c __ * [^T] [^T] */ protected el_action_t -ed_transpose_chars(EditLine *el, wint_t c) +ed_transpose_chars(EditLine *el, Int c) { if (el->el_line.cursor < el->el_line.lastchar) { @@ -272,7 +266,7 @@ ed_transpose_chars(EditLine *el, wint_t /* must have at least two chars entered */ c = el->el_line.cursor[-2]; el->el_line.cursor[-2] = el->el_line.cursor[-1]; - el->el_line.cursor[-1] = (Char)c; + el->el_line.cursor[-1] = c; return CC_REFRESH; } else return CC_ERROR; @@ -285,7 +279,7 @@ ed_transpose_chars(EditLine *el, wint_t */ protected el_action_t /*ARGSUSED*/ -ed_next_char(EditLine *el, wint_t c __attribute__((__unused__))) +ed_next_char(EditLine *el, Int c __attribute__((__unused__))) { Char *lim = el->el_line.lastchar; @@ -314,7 +308,7 @@ ed_next_char(EditLine *el, wint_t c __at */ protected el_action_t /*ARGSUSED*/ -ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) +ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -340,7 +334,7 @@ ed_prev_word(EditLine *el, wint_t c __at */ protected el_action_t /*ARGSUSED*/ -ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) +ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) { if (el->el_line.cursor > el->el_line.buffer) { @@ -364,12 +358,14 @@ ed_prev_char(EditLine *el, wint_t c __at * [^V] [^V] */ protected el_action_t -ed_quoted_insert(EditLine *el, wint_t c) +ed_quoted_insert(EditLine *el, Int c) { int num; + Char tc; tty_quotemode(el); - num = el_wgetc(el, &c); + num = FUN(el,getc)(el, &tc); + c = tc; tty_noquotemode(el); if (num == 1) return ed_insert(el, c); @@ -382,7 +378,7 @@ ed_quoted_insert(EditLine *el, wint_t c) * Adds to argument or enters a digit */ protected el_action_t -ed_digit(EditLine *el, wint_t c) +ed_digit(EditLine *el, Int c) { if (!Isdigit(c)) @@ -410,7 +406,7 @@ ed_digit(EditLine *el, wint_t c) * For ESC-n */ protected el_action_t -ed_argument_digit(EditLine *el, wint_t c) +ed_argument_digit(EditLine *el, Int c) { if (!Isdigit(c)) @@ -436,7 +432,7 @@ ed_argument_digit(EditLine *el, wint_t c protected el_action_t /*ARGSUSED*/ ed_unassigned(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) + Int c __attribute__((__unused__))) { return CC_ERROR; @@ -453,8 +449,8 @@ ed_unassigned(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigint(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_sigint(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -467,8 +463,8 @@ ed_tty_sigint(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_dsusp(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_dsusp(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -481,8 +477,8 @@ ed_tty_dsusp(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_tty_flush_output(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_flush_output(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -495,8 +491,8 @@ ed_tty_flush_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigquit(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_sigquit(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -509,8 +505,8 @@ ed_tty_sigquit(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -523,8 +519,8 @@ ed_tty_sigtstp(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_stop_output(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_stop_output(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -537,8 +533,8 @@ ed_tty_stop_output(EditLine *el __attrib */ protected el_action_t /*ARGSUSED*/ -ed_tty_start_output(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_tty_start_output(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -551,7 +547,7 @@ ed_tty_start_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_newline(EditLine *el, wint_t c __attribute__((__unused__))) +ed_newline(EditLine *el, Int c __attribute__((__unused__))) { re_goto_bottom(el); @@ -567,7 +563,7 @@ ed_newline(EditLine *el, wint_t c __attr */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) +ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) @@ -587,7 +583,7 @@ ed_delete_prev_char(EditLine *el, wint_t */ protected el_action_t /*ARGSUSED*/ -ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__))) +ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) { terminal_clear_screen(el); /* clear the whole real screen */ @@ -602,8 +598,8 @@ ed_clear_screen(EditLine *el, wint_t c _ */ protected el_action_t /*ARGSUSED*/ -ed_redisplay(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_redisplay(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_REDISPLAY; @@ -616,7 +612,7 @@ ed_redisplay(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_start_over(EditLine *el, wint_t c __attribute__((__unused__))) +ed_start_over(EditLine *el, Int c __attribute__((__unused__))) { ch_reset(el, 0); @@ -630,8 +626,8 @@ ed_start_over(EditLine *el, wint_t c __a */ protected el_action_t /*ARGSUSED*/ -ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), - wint_t c __attribute__((__unused__))) +ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) { return CC_NORM; @@ -644,7 +640,7 @@ ed_sequence_lead_in(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) +ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) { char beep = 0; int sv_event = el->el_history.eventno; @@ -664,6 +660,7 @@ ed_prev_history(EditLine *el, wint_t c _ if (hist_get(el) == CC_ERROR) { if (el->el_map.type == MAP_VI) { el->el_history.eventno = sv_event; + } beep = 1; /* el->el_history.eventno was fixed by first call */ @@ -681,7 +678,7 @@ ed_prev_history(EditLine *el, wint_t c _ */ protected el_action_t /*ARGSUSED*/ -ed_next_history(EditLine *el, wint_t c __attribute__((__unused__))) +ed_next_history(EditLine *el, Int c __attribute__((__unused__))) { el_action_t beep = CC_REFRESH, rval; @@ -708,11 +705,11 @@ ed_next_history(EditLine *el, wint_t c _ */ protected el_action_t /*ARGSUSED*/ -ed_search_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) +ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) { const Char *hp; int h; - int found = 0; + bool_t found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -751,7 +748,7 @@ ed_search_prev_history(EditLine *el, win (el->el_line.lastchar - el->el_line.buffer)) || hp[el->el_line.lastchar - el->el_line.buffer]) && c_hmatch(el, hp)) { - found = 1; + found++; break; } h++; @@ -776,11 +773,11 @@ ed_search_prev_history(EditLine *el, win */ protected el_action_t /*ARGSUSED*/ -ed_search_next_history(EditLine *el, wint_t c __attribute__((__unused__))) +ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) { const Char *hp; int h; - int found = 0; + bool_t found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -830,7 +827,7 @@ ed_search_next_history(EditLine *el, win */ protected el_action_t /*ARGSUSED*/ -ed_prev_line(EditLine *el, wint_t c __attribute__((__unused__))) +ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -873,7 +870,7 @@ ed_prev_line(EditLine *el, wint_t c __at */ protected el_action_t /*ARGSUSED*/ -ed_next_line(EditLine *el, wint_t c __attribute__((__unused__))) +ed_next_line(EditLine *el, Int c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -907,7 +904,7 @@ ed_next_line(EditLine *el, wint_t c __at */ protected el_action_t /*ARGSUSED*/ -ed_command(EditLine *el, wint_t c __attribute__((__unused__))) +ed_command(EditLine *el, Int c __attribute__((__unused__))) { Char tmpbuf[EL_BUFSIZ]; int tmplen; Modified: head/lib/libedit/config.h ============================================================================== --- head/lib/libedit/config.h Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/config.h Sun Mar 6 21:32:54 2016 (r296435) @@ -21,8 +21,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have the `getline' function. */ -#define HAVE_GETLINE 1 +/* Define to 1 if you have the `fgetln' function. */ +#define HAVE_FGETLN 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 @@ -188,6 +188,9 @@ /* Define to 1 if you have the `vis' function. */ #define HAVE_VIS 1 +/* Define to 1 if you have the `wcsdup' function. */ +#define HAVE_WCSDUP 1 + /* Define to 1 if `fork' works. */ #define HAVE_WORKING_FORK 1 @@ -254,9 +257,6 @@ /* Version number of package */ #define VERSION "3.0" -/* Define to 1 if the system provides the SIZE_MAX constant */ -#define HAVE_SIZE_MAX 1 - /* Define to 1 if you want wide-character code */ /* #undef WIDECHAR */ Modified: head/lib/libedit/edit/readline/readline.h ============================================================================== --- head/lib/libedit/edit/readline/readline.h Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/edit/readline/readline.h Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.39 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: readline.h,v 1.37 2015/06/02 15:36:45 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ typedef void *histdata_t; typedef struct _hist_entry { const char *line; - histdata_t data; + histdata_t data; } HIST_ENTRY; typedef struct _keymap_entry { @@ -89,7 +89,7 @@ typedef KEYMAP_ENTRY *Keymap; #define RUBOUT 0x7f #define ABORT_CHAR CTRL('G') -#define RL_READLINE_VERSION 0x0402 +#define RL_READLINE_VERSION 0x0402 #define RL_PROMPT_START_IGNORE '\1' #define RL_PROMPT_END_IGNORE '\2' @@ -98,7 +98,7 @@ typedef KEYMAP_ENTRY *Keymap; extern "C" { #endif extern const char *rl_library_version; -extern int rl_readline_version; +extern int rl_readline_version; extern char *rl_readline_name; extern FILE *rl_instream; extern FILE *rl_outstream; @@ -199,10 +199,10 @@ int rl_add_defun(const char *, rl_comm HISTORY_STATE *history_get_history_state(void); void rl_get_screen_size(int *, int *); void rl_set_screen_size(int, int); -char *rl_filename_completion_function (const char *, int); +char *rl_filename_completion_function (const char *, int); int _rl_abort_internal(void); int _rl_qsort_string_compare(char **, char **); -char **rl_completion_matches(const char *, rl_compentry_func_t *); +char **rl_completion_matches(const char *, rl_compentry_func_t *); void rl_forced_update_display(void); int rl_set_prompt(const char *); int rl_on_new_line(void); @@ -218,8 +218,6 @@ int rl_generic_bind(int, const char *, int rl_bind_key_in_map(int, rl_command_func_t *, Keymap); void rl_cleanup_after_signal(void); void rl_free_line_state(void); -int rl_set_keyboard_input_timeout(int); - #ifdef __cplusplus } #endif Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Sun Mar 6 18:41:48 2016 (r296434) +++ head/lib/libedit/editline.3 Sun Mar 6 21:32:54 2016 (r296435) @@ -1,4 +1,4 @@ -.\" $NetBSD: editline.3,v 1.88 2016/02/25 14:59:22 wiz Exp $ +.\" $NetBSD: editline.3,v 1.85 2015/11/03 21:36:59 christos Exp $ .\" .\" Copyright (c) 1997-2014 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2016 +.Dd November 3, 2015 .Dt EDITLINE 3 .Os .Sh NAME *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Mar 6 23:44:22 2016 Return-Path: Delivered-To: svn-src-all@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 E1844A95B2A; Sun, 6 Mar 2016 23:44:21 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (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 CCD262F3; Sun, 6 Mar 2016 23:44:21 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: by mail.lifanov.com (Postfix, from userid 58) id C4DC1239744; Sun, 6 Mar 2016 18:44:15 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.lifanov.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.1 Received: from android-bedfe57c17b4b0b3 (107-134-20-191.lightspeed.rlghnc.sbcglobal.net [107.134.20.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 5DC94239403; Sun, 6 Mar 2016 18:44:14 -0500 (EST) User-Agent: K-9 Mail for Android In-Reply-To: <0D2DFD32-B29F-48EA-8D60-458960993E97@FreeBSD.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com> <0D2DFD32-B29F-48EA-8D60-458960993E97@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: svn commit: r296428 - head/sys/boot/common From: Nikolai Lifanov Date: Sun, 06 Mar 2016 18:44:11 -0500 To: Dimitry Andric CC: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, owner-svn-src-head@freebsd.org, Oliver Pinter Message-ID: X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 23:44:22 -0000 On March 6, 2016 4:13:34 PM EST, Dimitry Andric wrote: >On 06 Mar 2016, at 20:57, Nikolai Lifanov >wrote: >> >> On 2016-03-06 11:17, Dimitry Andric wrote: >>> On 06 Mar 2016, at 17:00, Oliver Pinter > wrote: >>>> On 3/6/16, Dimitry Andric wrote: >>>>> Author: dim >>>>> Date: Sun Mar 6 15:57:43 2016 >>>>> New Revision: 296428 >>>>> URL: https://svnweb.freebsd.org/changeset/base/296428 >>>>> Log: >>>>> 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. >>>> Could you please add a note about this to UPDATING file? >>> I am a bit torn on this, because normally we always tell people to >>> install the kernel first, reboot, then run make installworld (which >also >>> installs the boot loaders). >>> However, in this case, people might depend on their boot loader >loading >>> modules which are required to make the system boot at all. So if >they >>> happened to forget updating their boot loader first, a panic might >be >>> the result. >>> I wonder what a failsafe and acceptable upgrade scenario is, in this >>> case. Normally the procedure is something like: >>> make buildworld >>> make buildkernel (with KERNCONF=whatever, if needed) >>> make installkernel (again with KERNCONF, if needed) >>> reboot (to single user, but cheating is possible usually) >>> mergemaster -p >>> make installworld >>> This could maybe be modified to: >>> make buildworld >>> make buildkernel (with KERNCONF=whatever, if needed) >>> make installkernel (again with KERNCONF, if needed) >>> make -C sys/boot install >>> reboot (to single user, but cheating is possible usually) >>> mergemaster -p >>> make installworld >>> E.g. insert the step which installs the boot loaders just after (or >>> before) the step which installs the kernel. >>> Is something like this acceptable as a one-time workaround, or maybe >it >>> is better in general, in case we ever add other new features to the >boot >>> loaders? >>> -Dimitry >> >> In my opinion, boot *blocks* (boot1) should be updated seldomly and >not on every install. >> All (?) instances of not updating these resulting in a failed boot >have an UPDATING >> entry or a similar warning (like the one during "zpool upgrade"). > >Well, each time you run make installworld, almost all the files in >/boot >(except for configuration) get reinstalled. For e.g. mbr, boot1 and >such, this has no consequences at all, until you install them into some >partition using gpart, but changes to loader, loader.efi or zfsloader >*will* affect the next startup. > >Per a suggestion from Kostik, maybe it would be nice to have a separate >"make installboot" target, which installs just the components in /boot. >This could then be used before or after "make installkernel". > >-Dimitry The bootcode gets installed to boot, but deployed with gpart, cp, sliced in half and dd, etc. And that's to one or more partitions. I don't think that a separate install target that just stages boot1 to /boot is valuable. - Nikolai Lifanov From owner-svn-src-all@freebsd.org Mon Mar 7 00:38:54 2016 Return-Path: Delivered-To: svn-src-all@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 41F54AC1CA5 for ; Mon, 7 Mar 2016 00:38:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07EF6863 for ; Mon, 7 Mar 2016 00:38:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22e.google.com with SMTP id m184so115464301iof.1 for ; Sun, 06 Mar 2016 16:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=NXQOs8vL6zG7D4RisOAPdmtJON1AedIHxbVCqDRXGBc=; b=rKsYddddX7tkr8kGdFnv5FJkNKlRCnXzhl2j0efuavu4Z+j6eWZjRpuHCWQbAk3U7Z 0uh6r9pAB0j018Bji8m+E1HVAMUVCp/uAXxWqWys7DoyJo32G4y1Bmyen5KIQAcs7l/a H/ELyDk+XPa/9vQjbEVj+L6ioD4SwN1bykv8XeXhwcKbD4UzxqC862qmYimSLzHvPPgJ W05VAggIRy6g73amOF/8zfC//Vi3r5/J/QKgy7sF7Q9TAigz4HfxhRZo4F1hQN1a5T8e I4+m7QlDsNkXS26O/TI+uypVK04utD9GGecc9AC77/3O5SV/DQ2kl/m7LzEe7FPD+j8e wQLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=NXQOs8vL6zG7D4RisOAPdmtJON1AedIHxbVCqDRXGBc=; b=Xjo7/lMrk4t1KwBvBF0nDd8seePqcvEPgcSfa2Q4W2q71jQqLqFOEQ6EyIndgXezfn ScP0Wd9ftY6aAqidOY8YnK2ktzEQCnLIFaUjU1RXXNpt4CmjSBq8W+DDl6cB0ZUIeuKX J9K7UE8pMJUQhhbPJcRCJNwfYyR5VMyAgOUg8r767cfJhGnY756JV38z9cBoAbAPg5qZ DL6faJ/YMdedAXj/zwlT3czYHNf2I+bWSjVyJqcotSJwKkJfk6jUu2SXMVGLl3xSy7cD QzW/lZH87Mz6gy7lyVzysYt7jy4rGlJ9xfrfvuYbLREnA8R3qagL8Y6up6Ku0qDipVay iGxQ== X-Gm-Message-State: AD7BkJKn8SGgBWXtWGtUDo24BcRZuS8u2VnoQUjrac7HH/MIwDCXZpD1L/LlNbNkpizG1xyVchwwA8c3oum9WQ== MIME-Version: 1.0 X-Received: by 10.107.14.209 with SMTP id 200mr18007774ioo.73.1457311133134; Sun, 06 Mar 2016 16:38:53 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.36.65.167 with HTTP; Sun, 6 Mar 2016 16:38:53 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201603061557.u26FvhMi033982@repo.freebsd.org> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com> <0D2DFD32-B29F-48EA-8D60-458960993E97@FreeBSD.org> Date: Sun, 6 Mar 2016 17:38:53 -0700 X-Google-Sender-Auth: SZTxryjxMKnWCAvG-LxYRiKW0BE Message-ID: Subject: Re: svn commit: r296428 - head/sys/boot/common From: Warner Losh To: Nikolai Lifanov Cc: Dimitry Andric , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , owner-svn-src-head@freebsd.org, Oliver Pinter Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 00:38:54 -0000 On Sun, Mar 6, 2016 at 4:44 PM, Nikolai Lifanov wrote: > On March 6, 2016 4:13:34 PM EST, Dimitry Andric wrote: > >On 06 Mar 2016, at 20:57, Nikolai Lifanov > >wrote: > >> > >> On 2016-03-06 11:17, Dimitry Andric wrote: > >>> On 06 Mar 2016, at 17:00, Oliver Pinter > > wrote: > >>>> On 3/6/16, Dimitry Andric wrote: > >>>>> Author: dim > >>>>> Date: Sun Mar 6 15:57:43 2016 > >>>>> New Revision: 296428 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/296428 > >>>>> Log: > >>>>> 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. > >>>> Could you please add a note about this to UPDATING file? > >>> I am a bit torn on this, because normally we always tell people to > >>> install the kernel first, reboot, then run make installworld (which > >also > >>> installs the boot loaders). > >>> However, in this case, people might depend on their boot loader > >loading > >>> modules which are required to make the system boot at all. So if > >they > >>> happened to forget updating their boot loader first, a panic might > >be > >>> the result. > >>> I wonder what a failsafe and acceptable upgrade scenario is, in this > >>> case. Normally the procedure is something like: > >>> make buildworld > >>> make buildkernel (with KERNCONF=whatever, if needed) > >>> make installkernel (again with KERNCONF, if needed) > >>> reboot (to single user, but cheating is possible usually) > >>> mergemaster -p > >>> make installworld > >>> This could maybe be modified to: > >>> make buildworld > >>> make buildkernel (with KERNCONF=whatever, if needed) > >>> make installkernel (again with KERNCONF, if needed) > >>> make -C sys/boot install > >>> reboot (to single user, but cheating is possible usually) > >>> mergemaster -p > >>> make installworld > >>> E.g. insert the step which installs the boot loaders just after (or > >>> before) the step which installs the kernel. > >>> Is something like this acceptable as a one-time workaround, or maybe > >it > >>> is better in general, in case we ever add other new features to the > >boot > >>> loaders? > >>> -Dimitry > >> > >> In my opinion, boot *blocks* (boot1) should be updated seldomly and > >not on every install. > >> All (?) instances of not updating these resulting in a failed boot > >have an UPDATING > >> entry or a similar warning (like the one during "zpool upgrade"). > > > >Well, each time you run make installworld, almost all the files in > >/boot > >(except for configuration) get reinstalled. For e.g. mbr, boot1 and > >such, this has no consequences at all, until you install them into some > >partition using gpart, but changes to loader, loader.efi or zfsloader > >*will* affect the next startup. > > > >Per a suggestion from Kostik, maybe it would be nice to have a separate > >"make installboot" target, which installs just the components in /boot. > >This could then be used before or after "make installkernel". > > > >-Dimitry > > The bootcode gets installed to boot, but deployed with gpart, cp, sliced > in half and dd, etc. And that's to one or more partitions. > I don't think that a separate install target that just stages boot1 to > /boot is valuable. > I think it is. First, the boot code you talk about doesn't matter *AT*ALL* for this change. It needn't be deployed to be safe. We've had a few rare cases where you do need new boot code as well, but they seem to happen about once a decade or so. Personally, I always install both a kernel and userspace at the same time when upgrading, though sometimes just the kernel. Usually it just doesn't matter. In this case, I'll know I need new boot blocks. I'm kinda of the opinion that the boot loader should be part of installkernel, but I can see how others may disagree and that's likely too much POLA to do now (it should have been done in the 4.0 time frame when we went to a tertiary boot loader). With the recent expansion of limits, however, it's become critical that you have a new kernel on boot so that limits used by the rc system are set correctly (the new code has no fallback, but fails for limits it doesn't know about, which is super lame, and should be fixed, but until it is we're stuck with needing a new kernel. This also means, btw, that a 10.x kernel has no chance of booting an 11.x userland, which is somewhat contrary to traditional practice in the project). Warner From owner-svn-src-all@freebsd.org Mon Mar 7 00:56:22 2016 Return-Path: Delivered-To: svn-src-all@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 1E8D8A931C9; Mon, 7 Mar 2016 00:56:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4580E68; Mon, 7 Mar 2016 00:56:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x229.google.com with SMTP id n190so115822056iof.0; Sun, 06 Mar 2016 16:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=Jhn/jbM0sPTc33EMk+a9Zk51lTvXska81qc0H5mSPDY=; b=eIyBpsmnQAWispn/1LtzyRm6a7gH9jupzI9RezfdskM4umt1adVlhZCyzZHVMlEUaW 6gzSu/XjlgMhBcRKdiB9sZLGywNVlQj9a+3jYjSDR9SCJO59UsPofCErXm0VviAWBCq1 gwygbq3WHWjrFMF8iY1dOEflJyaYY8Xztc7EXviLSpqswve7uApEv4zZVc3/7sDmERir t52+IbgVInchEZECFTxDHu29ceYccQVDHCAIPtDVLSaBNjWamBsUTuoe/fVCuWk+zQ9B E+MGBsMusiqc+/rtbTQpZ5cmj45Z8LWX6UvTdeP1e5syvelSGYzcuyupLrjHOZM2yA+8 vYQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Jhn/jbM0sPTc33EMk+a9Zk51lTvXska81qc0H5mSPDY=; b=HwDYbpU5EHxc4mD+t2gGfxVtjU7fJU10YiLah0blNmtuC30RhN3CqNtm4Tgvlu6TQH 3arPZHesvOIi6GqO83jNDsx2GXaMsa82P4VdEL9d2aPuxqV1vJqJLfVdsXzcVEMc2Bxc v4tVxu32KvnSxvPkctEK/SPIIvWDQztBZV2N1uVNURMirMH7VDzweUE8422Pfty3EA1x mhD4Y4ZXe+ZLKEfGKYtAY/QYVzXLMEvOZLDn58L/ERTGr6hb6CKez6P7H276nses68Ho vLFCNHLZ706hTF9WoKIbhBZvs24q5a2Ld4CVz5Jn0/V8xJmD/crpynZqc1jmTegqDDj2 unrA== X-Gm-Message-State: AD7BkJLmIyuqNbZdUuy5+vAAmEwfLOx5k8/kHEW+HW6gAv+9WG6RVbVQntG6ffKF7q0K3BLCo+Bn9n8ErMWQPA== MIME-Version: 1.0 X-Received: by 10.107.162.144 with SMTP id l138mr17578219ioe.123.1457312181148; Sun, 06 Mar 2016 16:56:21 -0800 (PST) Received: by 10.36.14.19 with HTTP; Sun, 6 Mar 2016 16:56:21 -0800 (PST) In-Reply-To: References: <201603061557.u26FvhMi033982@repo.freebsd.org> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com> <0D2DFD32-B29F-48EA-8D60-458960993E97@FreeBSD.org> Date: Sun, 6 Mar 2016 16:56:21 -0800 Message-ID: Subject: Re: svn commit: r296428 - head/sys/boot/common From: Adrian Chadd To: Warner Losh Cc: Nikolai Lifanov , Dimitry Andric , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , owner-svn-src-head@freebsd.org, Oliver Pinter Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 00:56:22 -0000 Oh wow, i didn't know at all that limits broke booting in this way. Sorry :( This is the first time I've heard about it. -a On 6 March 2016 at 16:38, Warner Losh wrote: > > > On Sun, Mar 6, 2016 at 4:44 PM, Nikolai Lifanov > wrote: >> >> On March 6, 2016 4:13:34 PM EST, Dimitry Andric wrote: >> >On 06 Mar 2016, at 20:57, Nikolai Lifanov >> >wrote: >> >> >> >> On 2016-03-06 11:17, Dimitry Andric wrote: >> >>> On 06 Mar 2016, at 17:00, Oliver Pinter >> > wrote: >> >>>> On 3/6/16, Dimitry Andric wrote: >> >>>>> Author: dim >> >>>>> Date: Sun Mar 6 15:57:43 2016 >> >>>>> New Revision: 296428 >> >>>>> URL: https://svnweb.freebsd.org/changeset/base/296428 >> >>>>> Log: >> >>>>> 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. >> >>>> Could you please add a note about this to UPDATING file? >> >>> I am a bit torn on this, because normally we always tell people to >> >>> install the kernel first, reboot, then run make installworld (which >> >also >> >>> installs the boot loaders). >> >>> However, in this case, people might depend on their boot loader >> >loading >> >>> modules which are required to make the system boot at all. So if >> >they >> >>> happened to forget updating their boot loader first, a panic might >> >be >> >>> the result. >> >>> I wonder what a failsafe and acceptable upgrade scenario is, in this >> >>> case. Normally the procedure is something like: >> >>> make buildworld >> >>> make buildkernel (with KERNCONF=whatever, if needed) >> >>> make installkernel (again with KERNCONF, if needed) >> >>> reboot (to single user, but cheating is possible usually) >> >>> mergemaster -p >> >>> make installworld >> >>> This could maybe be modified to: >> >>> make buildworld >> >>> make buildkernel (with KERNCONF=whatever, if needed) >> >>> make installkernel (again with KERNCONF, if needed) >> >>> make -C sys/boot install >> >>> reboot (to single user, but cheating is possible usually) >> >>> mergemaster -p >> >>> make installworld >> >>> E.g. insert the step which installs the boot loaders just after (or >> >>> before) the step which installs the kernel. >> >>> Is something like this acceptable as a one-time workaround, or maybe >> >it >> >>> is better in general, in case we ever add other new features to the >> >boot >> >>> loaders? >> >>> -Dimitry >> >> >> >> In my opinion, boot *blocks* (boot1) should be updated seldomly and >> >not on every install. >> >> All (?) instances of not updating these resulting in a failed boot >> >have an UPDATING >> >> entry or a similar warning (like the one during "zpool upgrade"). >> > >> >Well, each time you run make installworld, almost all the files in >> >/boot >> >(except for configuration) get reinstalled. For e.g. mbr, boot1 and >> >such, this has no consequences at all, until you install them into some >> >partition using gpart, but changes to loader, loader.efi or zfsloader >> >*will* affect the next startup. >> > >> >Per a suggestion from Kostik, maybe it would be nice to have a separate >> >"make installboot" target, which installs just the components in /boot. >> >This could then be used before or after "make installkernel". >> > >> >-Dimitry >> >> The bootcode gets installed to boot, but deployed with gpart, cp, sliced >> in half and dd, etc. And that's to one or more partitions. >> I don't think that a separate install target that just stages boot1 to >> /boot is valuable. > > > I think it is. First, the boot code you talk about doesn't matter *AT*ALL* > for this > change. It needn't be deployed to be safe. We've had a few rare cases where > you > do need new boot code as well, but they seem to happen about once a decade > or so. > > Personally, I always install both a kernel and userspace at the same time > when > upgrading, though sometimes just the kernel. Usually it just doesn't matter. > In > this case, I'll know I need new boot blocks. I'm kinda of the opinion that > the boot > loader should be part of installkernel, but I can see how others may > disagree and > that's likely too much POLA to do now (it should have been done in the 4.0 > time > frame when we went to a tertiary boot loader). > > With the recent expansion of limits, however, it's become critical that you > have > a new kernel on boot so that limits used by the rc system are set correctly > (the > new code has no fallback, but fails for limits it doesn't know about, which > is > super lame, and should be fixed, but until it is we're stuck with needing a > new kernel. This also means, btw, that a 10.x kernel has no chance of > booting > an 11.x userland, which is somewhat contrary to traditional practice in the > project). > > Warner From owner-svn-src-all@freebsd.org Mon Mar 7 01:11:25 2016 Return-Path: Delivered-To: svn-src-all@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 2C6C1A93570; Mon, 7 Mar 2016 01:11:25 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 09E015E6; Mon, 7 Mar 2016 01:11:24 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u271BGRV068456 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 6 Mar 2016 17:11:18 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r296428 - head/sys/boot/common To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201603061557.u26FvhMi033982@repo.freebsd.org> From: Julian Elischer Message-ID: <56DCD52F.4010709@freebsd.org> Date: Sun, 6 Mar 2016 17:11:11 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <201603061557.u26FvhMi033982@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 01:11:25 -0000 On 6/03/2016 7:57 AM, Dimitry Andric wrote: > Author: dim > Date: Sun Mar 6 15:57:43 2016 > New Revision: 296428 > URL: https://svnweb.freebsd.org/changeset/base/296428 > > Log: > 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. what happens to someone who doesn't replace their bootblocks? Or is this just the loader? The general way we have handled this sort of thing in the past is that we do something that produces a nagging message for a decent time before it becomes mandatory. I don't like the idea of people being caught unaware by this.. Can you please give a more detailed description of what happens? > > Reviewed by: kib > MFC after: 2 weeks > X-MFC-With: r296419 > > Modified: > head/sys/boot/common/load_elf_obj.c > > Modified: head/sys/boot/common/load_elf_obj.c > ============================================================================== > --- head/sys/boot/common/load_elf_obj.c Sun Mar 6 14:37:49 2016 (r296427) > +++ head/sys/boot/common/load_elf_obj.c Sun Mar 6 15:57:43 2016 (r296428) > @@ -221,6 +221,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; > > From owner-svn-src-all@freebsd.org Mon Mar 7 01:44:12 2016 Return-Path: Delivered-To: svn-src-all@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 96561A954B5; Mon, 7 Mar 2016 01:44:12 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77D5693A; Mon, 7 Mar 2016 01:44:12 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date; bh=oi9moqdip1ouYnoLRooSkYsU01G58wCV9qVyP5J5V/8=; b=m L0IdOcN/QHeC783zb4ZP6o6nN3h9XZkXfTzDqEWQ1FcjJmyVNejjCTcTujZEM4+SbqbG/A/qgRN/t WD3hmWx6d7U9r6VWoBbtZJA1cYPg/KYI5UPAQrYUJuopkCRbjYznYam4dOV0rKyYbPykIigt2JzZ4 lbaxAqxqYdfMlchE=; Received: from cpe-70-113-41-107.austin.res.rr.com ([70.113.41.107]:20816 helo=pita.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1ackDT-0000bY-Q3; Sun, 06 Mar 2016 19:44:11 -0600 Date: Sun, 6 Mar 2016 19:44:09 -0600 From: Larry Rosenman To: Julian Elischer Cc: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r296428 - head/sys/boot/common Message-ID: <20160307014409.GB1299@pita.lerctr.org> References: <201603061557.u26FvhMi033982@repo.freebsd.org> <56DCD52F.4010709@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DCD52F.4010709@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -1.0 (-) X-LERCTR-Spam-Score: -1.0 (-) X-Spam-Report: SpamScore (-1.0/5.0) ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 X-LERCTR-Spam-Report: SpamScore (-1.0/5.0) ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 01:44:12 -0000 On Sun, Mar 06, 2016 at 05:11:11PM -0800, Julian Elischer wrote: > On 6/03/2016 7:57 AM, Dimitry Andric wrote: > > Author: dim > > Date: Sun Mar 6 15:57:43 2016 > > New Revision: 296428 > > URL: https://svnweb.freebsd.org/changeset/base/296428 > > > > Log: > > 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. > > what happens to someone who doesn't replace their bootblocks? > Or is this just the loader? > > The general way we have handled this sort of thing in the past is that > we do something > that produces a nagging message for a decent time before it becomes > mandatory. > > I don't like the idea of people being caught unaware by this.. > > Can you please give a more detailed description of what happens? In this case it's the loader. I just upgraded a second laptop and did NOT replace the boot block (boot1.efi), but DID populate /boot (and actually a full world), and it booted fine, > > > > > Reviewed by: kib > > MFC after: 2 weeks > > X-MFC-With: r296419 > > > > Modified: > > head/sys/boot/common/load_elf_obj.c > > > > Modified: head/sys/boot/common/load_elf_obj.c > > ============================================================================== > > --- head/sys/boot/common/load_elf_obj.c Sun Mar 6 14:37:49 2016 (r296427) > > +++ head/sys/boot/common/load_elf_obj.c Sun Mar 6 15:57:43 2016 (r296428) > > @@ -221,6 +221,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; > > > > > > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 7011 W Parmer Ln, Apt 1115, Austin, TX 78729-6961 From owner-svn-src-all@freebsd.org Mon Mar 7 07:41:21 2016 Return-Path: Delivered-To: svn-src-all@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 284BAAC1D67; Mon, 7 Mar 2016 07:41:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3ED9C56; Mon, 7 Mar 2016 07:41:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::c9b:ab2d:8d31:128e] (unknown [IPv6:2001:7b8:3a7:0:c9b:ab2d:8d31:128e]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 602A83EC1C; Mon, 7 Mar 2016 08:41:17 +0100 (CET) Subject: Re: svn commit: r296428 - head/sys/boot/common Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4A2362DC-FF43-4011-B769-2B8EF67F4E4D"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 (ebbf3ef) From: Dimitry Andric In-Reply-To: <56DCD52F.4010709@freebsd.org> Date: Mon, 7 Mar 2016 08:41:10 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201603061557.u26FvhMi033982@repo.freebsd.org> <56DCD52F.4010709@freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.3112) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 07:41:21 -0000 --Apple-Mail=_4A2362DC-FF43-4011-B769-2B8EF67F4E4D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 07 Mar 2016, at 02:11, Julian Elischer wrote: >=20 > On 6/03/2016 7:57 AM, Dimitry Andric wrote: >> Author: dim >> Date: Sun Mar 6 15:57:43 2016 >> New Revision: 296428 >> URL: https://svnweb.freebsd.org/changeset/base/296428 >>=20 >> Log: >> 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. >=20 > what happens to someone who doesn't replace their bootblocks? > Or is this just the loader? This just about the loaders, e.g. loader, loader.efi and zfsloader. > The general way we have handled this sort of thing in the past is that = we do something > that produces a nagging message for a decent time before it becomes = mandatory. >=20 > I don't like the idea of people being caught unaware by this.. >=20 > Can you please give a more detailed description of what happens? If you preload modules with .eh_frame sections in them (such as aesni.ko) from your loader.conf, your kernel will panic very early in the boot. If you don't preload any modules, or load only modules without .eh_frame sections (most of of them), there is no issue at all. -Dimitry --Apple-Mail=_4A2362DC-FF43-4011-B769-2B8EF67F4E4D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.29 iEYEARECAAYFAlbdMJwACgkQsF6jCi4glqNmnwCghjU+Gnvlp0htxawIFeEwm4Pp eeAAoNfuD4Ak1gyuKmjJKA8QixQ/Mo7p =H4e8 -----END PGP SIGNATURE----- --Apple-Mail=_4A2362DC-FF43-4011-B769-2B8EF67F4E4D-- From owner-svn-src-all@freebsd.org Mon Mar 7 07:46:19 2016 Return-Path: Delivered-To: svn-src-all@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 51389AC2001; Mon, 7 Mar 2016 07:46:19 +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 08998EEE; Mon, 7 Mar 2016 07:46:18 +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 u277kIBD023224; Mon, 7 Mar 2016 07:46:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u277kHwv023222; Mon, 7 Mar 2016 07:46:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603070746.u277kHwv023222@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:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296436 - in stable/10/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 07:46:19 -0000 Author: dim Date: Mon Mar 7 07:46:17 2016 New Revision: 296436 URL: https://svnweb.freebsd.org/changeset/base/296436 Log: MFC r295844: Fix "invalid type '(null)'" usage messages in zfs(8) and zpool(8). Currently, zfs(8) and zpool(8) print "invalid type '(null)'" or similar messages, if you pass in invalid types, sources or column names for "zfs get", "zfs list" and "zpool get". This is because the commands use getsubopt(3), and in case of failure, they print 'value', which is NULL when sub options don't match. They should print 'suboptarg' instead, which is the documented way to get at the non-matching sub option value. Reviewed by: smh Differential Revision: https://reviews.freebsd.org/D5365 Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Mar 6 21:32:54 2016 (r296435) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Mar 7 07:46:17 2016 (r296436) @@ -1712,7 +1712,7 @@ zfs_do_get(int argc, char **argv) default: (void) fprintf(stderr, gettext("invalid column name " - "'%s'\n"), value); + "'%s'\n"), suboptarg); usage(B_FALSE); } } @@ -1749,7 +1749,7 @@ zfs_do_get(int argc, char **argv) default: (void) fprintf(stderr, gettext("invalid source " - "'%s'\n"), value); + "'%s'\n"), suboptarg); usage(B_FALSE); } } @@ -1785,7 +1785,7 @@ zfs_do_get(int argc, char **argv) default: (void) fprintf(stderr, gettext("invalid type '%s'\n"), - value); + suboptarg); usage(B_FALSE); } } @@ -3155,7 +3155,7 @@ zfs_do_list(int argc, char **argv) default: (void) fprintf(stderr, gettext("invalid type '%s'\n"), - value); + suboptarg); usage(B_FALSE); } } Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Mar 6 21:32:54 2016 (r296435) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Mar 7 07:46:17 2016 (r296436) @@ -5431,7 +5431,7 @@ zpool_do_get(int argc, char **argv) default: (void) fprintf(stderr, gettext("invalid column name " - "'%s'\n"), value); + "'%s'\n"), suboptarg); usage(B_FALSE); } } From owner-svn-src-all@freebsd.org Mon Mar 7 07:49:03 2016 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Mar 7 07:49:03 2016 Return-Path: Delivered-To: svn-src-all@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 49ACDAC20A5; 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 1B349CC; Mon, 7 Mar 2016 07:49:03 +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 u277n2jd023388; Mon, 7 Mar 2016 07:49:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u277n26T023387; Mon, 7 Mar 2016 07:49:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603070749.u277n26T023387@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:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296437 - in stable: 10/contrib/binutils/bfd 9/contrib/binutils/bfd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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/10/contrib/binutils/bfd/elf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: 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) Modified: stable/10/contrib/binutils/bfd/elf.c ============================================================================== --- stable/10/contrib/binutils/bfd/elf.c Mon Mar 7 07:46:17 2016 (r296436) +++ stable/10/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-all@freebsd.org Mon Mar 7 07:54:49 2016 Return-Path: Delivered-To: svn-src-all@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 EEAF7AC236D; Mon, 7 Mar 2016 07:54:49 +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 CA8B48AC; Mon, 7 Mar 2016 07:54:49 +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 u277smUn026232; Mon, 7 Mar 2016 07:54:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u277sm86026230; Mon, 7 Mar 2016 07:54:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603070754.u277sm86026230@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:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296438 - in stable/10/sys: boot/common kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 07:54:50 -0000 Author: dim Date: Mon Mar 7 07:54:48 2016 New Revision: 296438 URL: https://svnweb.freebsd.org/changeset/base/296438 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/10/sys/boot/common/load_elf_obj.c stable/10/sys/kern/link_elf_obj.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/load_elf_obj.c ============================================================================== --- stable/10/sys/boot/common/load_elf_obj.c Mon Mar 7 07:49:01 2016 (r296437) +++ stable/10/sys/boot/common/load_elf_obj.c Mon Mar 7 07:54:48 2016 (r296438) @@ -221,6 +221,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/10/sys/kern/link_elf_obj.c ============================================================================== --- stable/10/sys/kern/link_elf_obj.c Mon Mar 7 07:49:01 2016 (r296437) +++ stable/10/sys/kern/link_elf_obj.c Mon Mar 7 07:54:48 2016 (r296438) @@ -257,6 +257,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: @@ -327,9 +330,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; @@ -726,6 +742,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; @@ -734,6 +753,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 && @@ -755,7 +778,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-all@freebsd.org Mon Mar 7 07:57:58 2016 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Mar 7 08:57:52 2016 Return-Path: Delivered-To: svn-src-all@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 6CA7EAC3EC6; Mon, 7 Mar 2016 08:57:52 +0000 (UTC) (envelope-from mav@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 3DCACCBD; Mon, 7 Mar 2016 08:57:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u278vp8K045048; Mon, 7 Mar 2016 08:57:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u278vpea045047; Mon, 7 Mar 2016 08:57:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603070857.u278vpea045047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 7 Mar 2016 08:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296440 - stable/10/etc/periodic/daily X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 08:57:52 -0000 Author: mav Date: Mon Mar 7 08:57:51 2016 New Revision: 296440 URL: https://svnweb.freebsd.org/changeset/base/296440 Log: MFC r295324: Add error check to not leak logs with syntax errors in case of failed `zpool history`. Modified: stable/10/etc/periodic/daily/800.scrub-zfs Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/daily/800.scrub-zfs ============================================================================== --- stable/10/etc/periodic/daily/800.scrub-zfs Mon Mar 7 07:57:57 2016 (r296439) +++ stable/10/etc/periodic/daily/800.scrub-zfs Mon Mar 7 08:57:51 2016 (r296440) @@ -63,6 +63,11 @@ case "$daily_scrub_zfs_enable" in _last_scrub=$(zpool history ${pool} | \ sed -ne '2s/ .*$//p') fi + if [ -z "${_last_scrub}" ]; then + echo " skipping scrubbing of pool '${pool}':" + echo " can't get last scrubbing date" + continue + fi # Now minus last scrub (both in seconds) converted to days. _scrub_diff=$(expr -e \( $(date +%s) - \ From owner-svn-src-all@freebsd.org Mon Mar 7 08:59:08 2016 Return-Path: Delivered-To: svn-src-all@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 435D8AC3F6B; Mon, 7 Mar 2016 08:59:08 +0000 (UTC) (envelope-from mav@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 15CACE2A; Mon, 7 Mar 2016 08:59:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u278x7aU045157; Mon, 7 Mar 2016 08:59:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u278x7Ds045156; Mon, 7 Mar 2016 08:59:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603070859.u278x7Ds045156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 7 Mar 2016 08:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296441 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 08:59:08 -0000 Author: mav Date: Mon Mar 7 08:59:06 2016 New Revision: 296441 URL: https://svnweb.freebsd.org/changeset/base/296441 Log: MFC r295562: Don't check CmdSN for initial login request. This fixes connection errors for some initiators not starting CmdSN from zero. While there, fix wrong status details reported for couple errors. Modified: stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Mon Mar 7 08:57:51 2016 (r296440) +++ stable/10/usr.sbin/ctld/login.c Mon Mar 7 08:59:06 2016 (r296441) @@ -126,15 +126,16 @@ login_receive(struct connection *conn, b log_errx(1, "received Login PDU with unsupported " "Version-min 0x%x", bhslr->bhslr_version_min); } - if (ISCSI_SNLT(ntohl(bhslr->bhslr_cmdsn), conn->conn_cmdsn)) { - login_send_error(request, 0x02, 0x05); + if (initial == false && + ISCSI_SNLT(ntohl(bhslr->bhslr_cmdsn), conn->conn_cmdsn)) { + login_send_error(request, 0x02, 0x00); log_errx(1, "received Login PDU with decreasing CmdSN: " "was %u, is %u", conn->conn_cmdsn, ntohl(bhslr->bhslr_cmdsn)); } if (initial == false && ntohl(bhslr->bhslr_expstatsn) != conn->conn_statsn) { - login_send_error(request, 0x02, 0x05); + login_send_error(request, 0x02, 0x00); log_errx(1, "received Login PDU with wrong ExpStatSN: " "is %u, should be %u", ntohl(bhslr->bhslr_expstatsn), conn->conn_statsn); From owner-svn-src-all@freebsd.org Mon Mar 7 09:00:29 2016 Return-Path: Delivered-To: svn-src-all@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 194E5AC11E7; Mon, 7 Mar 2016 09:00:29 +0000 (UTC) (envelope-from mav@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 DEC86F81; Mon, 7 Mar 2016 09:00:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2790RH3045287; Mon, 7 Mar 2016 09:00:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2790RZO045286; Mon, 7 Mar 2016 09:00:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603070900.u2790RZO045286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 7 Mar 2016 09:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296442 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 09:00:29 -0000 Author: mav Date: Mon Mar 7 09:00:27 2016 New Revision: 296442 URL: https://svnweb.freebsd.org/changeset/base/296442 Log: MFC r296392: Set bhsdi_target_transfer_tag to reserved value, which is 0xffffffff. This should be a purely cosmetic change. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Mar 7 08:59:06 2016 (r296441) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Mar 7 09:00:27 2016 (r296442) @@ -2369,6 +2369,7 @@ cfiscsi_datamove_in(union ctl_io *io) bhsdi->bhsdi_opcode = ISCSI_BHS_OPCODE_SCSI_DATA_IN; bhsdi->bhsdi_initiator_task_tag = bhssc->bhssc_initiator_task_tag; + bhsdi->bhsdi_target_transfer_tag = 0xffffffff; bhsdi->bhsdi_datasn = htonl(PDU_EXPDATASN(request)); PDU_EXPDATASN(request)++; bhsdi->bhsdi_buffer_offset = htonl(buffer_offset); From owner-svn-src-all@freebsd.org Mon Mar 7 09:35:22 2016 Return-Path: Delivered-To: svn-src-all@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 0039FA9504A; Mon, 7 Mar 2016 09:35:22 +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 C5B721A9; Mon, 7 Mar 2016 09:35:21 +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 u279ZKOf057050; Mon, 7 Mar 2016 09:35:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u279ZKOx057049; Mon, 7 Mar 2016 09:35:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603070935.u279ZKOx057049@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:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296443 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 09:35:22 -0000 Author: hselasky Date: Mon Mar 7 09:35:20 2016 New Revision: 296443 URL: https://svnweb.freebsd.org/changeset/base/296443 Log: MFC r295608: Fix variable assignment inside if-clause in the smsc driver. Found by D5245 / PVS. Modified: stable/10/sys/dev/usb/net/if_smsc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_smsc.c ============================================================================== --- stable/10/sys/dev/usb/net/if_smsc.c Mon Mar 7 09:00:27 2016 (r296442) +++ stable/10/sys/dev/usb/net/if_smsc.c Mon Mar 7 09:35:20 2016 (r296443) @@ -1341,7 +1341,7 @@ smsc_chip_init(struct smsc_softc *sc) /* Reset the PHY */ smsc_write_reg(sc, SMSC_PM_CTRL, SMSC_PM_CTRL_PHY_RST); - if ((err = smsc_wait_for_bits(sc, SMSC_PM_CTRL, SMSC_PM_CTRL_PHY_RST) != 0)) { + if ((err = smsc_wait_for_bits(sc, SMSC_PM_CTRL, SMSC_PM_CTRL_PHY_RST)) != 0) { smsc_warn_printf(sc, "timed-out waiting for phy reset to complete\n"); goto init_failed; } From owner-svn-src-all@freebsd.org Mon Mar 7 09:37:09 2016 Return-Path: Delivered-To: svn-src-all@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 2D8A0A95190; Mon, 7 Mar 2016 09:37:09 +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 F0E05366; Mon, 7 Mar 2016 09:37:08 +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 u279b8PJ057161; Mon, 7 Mar 2016 09:37:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u279b8di057160; Mon, 7 Mar 2016 09:37:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603070937.u279b8di057160@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:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296444 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 09:37:09 -0000 Author: hselasky Date: Mon Mar 7 09:37:07 2016 New Revision: 296444 URL: https://svnweb.freebsd.org/changeset/base/296444 Log: MFC r295923: Be more verbose when truncating number of HID items. Suggested by: Larry Rosenman Modified: stable/10/sys/dev/usb/usb_hid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_hid.c ============================================================================== --- stable/10/sys/dev/usb/usb_hid.c Mon Mar 7 09:35:20 2016 (r296443) +++ stable/10/sys/dev/usb/usb_hid.c Mon Mar 7 09:37:07 2016 (r296444) @@ -354,7 +354,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-all@freebsd.org Mon Mar 7 09:39:37 2016 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Mar 7 09:42:18 2016 Return-Path: Delivered-To: svn-src-all@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 73E2BA953B5; Mon, 7 Mar 2016 09:42:18 +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 2B409AF4; Mon, 7 Mar 2016 09:42:18 +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 u279gHAw060034; Mon, 7 Mar 2016 09:42:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u279gHk3060032; Mon, 7 Mar 2016 09:42:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603070942.u279gHk3060032@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:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296446 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 09:42:18 -0000 Author: hselasky Date: Mon Mar 7 09:42:16 2016 New Revision: 296446 URL: https://svnweb.freebsd.org/changeset/base/296446 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/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Mon Mar 7 09:39:35 2016 (r296445) +++ stable/10/sys/dev/usb/controller/xhci.c Mon Mar 7 09:42:16 2016 (r296446) @@ -2363,6 +2363,8 @@ xhci_configure_endpoint(struct usb_devic /* store endpoint mode */ pepext->trb_ep_mode = ep_mode; + /* store bMaxPacketSize for control endpoints */ + pepext->trb_ep_maxp = edesc->wMaxPacketSize[0]; usb_pc_cpu_flush(pepext->page_cache); if (ep_mode == USB_EP_MODE_STREAMS) { @@ -2909,6 +2911,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/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Mon Mar 7 09:39:35 2016 (r296445) +++ stable/10/sys/dev/usb/controller/xhci.h Mon Mar 7 09:42:16 2016 (r296446) @@ -383,6 +383,7 @@ struct xhci_endpoint_ext { uint8_t trb_halted; uint8_t trb_running; uint8_t trb_ep_mode; + uint8_t trb_ep_maxp; }; enum { From owner-svn-src-all@freebsd.org Mon Mar 7 10:02:32 2016 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Mar 7 10:07:02 2016 Return-Path: Delivered-To: svn-src-all@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 C15DAAC2186; Mon, 7 Mar 2016 10:07:02 +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 9C9F3C65; Mon, 7 Mar 2016 10:07:02 +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 u27A71Mj066498; Mon, 7 Mar 2016 10:07:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27A71oH066496; Mon, 7 Mar 2016 10:07:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603071007.u27A71oH066496@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:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r296448 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 10:07:02 -0000 Author: hselasky Date: Mon Mar 7 10:07:01 2016 New Revision: 296448 URL: https://svnweb.freebsd.org/changeset/base/296448 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/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/controller/xhci.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Mon Mar 7 10:02:31 2016 (r296447) +++ stable/8/sys/dev/usb/controller/xhci.c Mon Mar 7 10:07:01 2016 (r296448) @@ -135,8 +135,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 *, @@ -1393,7 +1393,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) { @@ -2289,13 +2289,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; @@ -2326,6 +2328,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); @@ -2445,7 +2451,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, @@ -2837,6 +2843,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/8/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.h Mon Mar 7 10:02:31 2016 (r296447) +++ stable/8/sys/dev/usb/controller/xhci.h Mon Mar 7 10:07:01 2016 (r296448) @@ -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-all@freebsd.org Mon Mar 7 10:56:22 2016 Return-Path: Delivered-To: svn-src-all@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 A8C07AC160E; Mon, 7 Mar 2016 10:56:22 +0000 (UTC) (envelope-from mav@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 7A97819A2; Mon, 7 Mar 2016 10:56:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27AuLbf082010; Mon, 7 Mar 2016 10:56:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27AuLjd082009; Mon, 7 Mar 2016 10:56:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603071056.u27AuLjd082009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 7 Mar 2016 10:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296449 - head/sbin/mdmfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 10:56:22 -0000 Author: mav Date: Mon Mar 7 10:56:21 2016 New Revision: 296449 URL: https://svnweb.freebsd.org/changeset/base/296449 Log: Update meaning of -n argument. Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/sbin/mdmfs/mdmfs.8 Modified: head/sbin/mdmfs/mdmfs.8 ============================================================================== --- head/sbin/mdmfs/mdmfs.8 Mon Mar 7 10:07:01 2016 (r296448) +++ head/sbin/mdmfs/mdmfs.8 Mon Mar 7 10:56:21 2016 (r296449) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2011 +.Dd March 7, 2016 .Dt MDMFS 8 .Os .Sh NAME @@ -36,7 +36,7 @@ driver .Sh SYNOPSIS .Nm -.Op Fl DLlMNPStUX +.Op Fl DLlMNnPStUX .Op Fl a Ar maxcontig .Op Fl b Ar block-size .Op Fl c Ar blocks-per-cylinder-group @@ -47,7 +47,6 @@ driver .Op Fl f Ar frag-size .Op Fl i Ar bytes .Op Fl m Ar percent-free -.Op Fl n Ar rotational-positions .Op Fl O Ar optimization .Op Fl o Ar mount-options .Op Fl p Ar permissions @@ -167,8 +166,10 @@ The percentage of space reserved for the Do not actually run the helper programs. This is most useful in conjunction with .Fl X . -.It Fl n Ar rotational-positions -The default number of rotational positions to distinguish. +.It Fl n +Do not create a +.Pa .snap +directory on the new file system. .It Fl O Ar optimization Select the optimization preference; valid choices are From owner-svn-src-all@freebsd.org Mon Mar 7 10:56:40 2016 Return-Path: Delivered-To: svn-src-all@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 3E0B8AC16B8; Mon, 7 Mar 2016 10:56:40 +0000 (UTC) (envelope-from hrs@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 F3FE31B03; Mon, 7 Mar 2016 10:56:39 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27AudxO082068; Mon, 7 Mar 2016 10:56:39 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27AucF7082062; Mon, 7 Mar 2016 10:56:38 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201603071056.u27AucF7082062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 7 Mar 2016 10:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296450 - in stable/10/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/readme en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 10:56:40 -0000 Author: hrs Date: Mon Mar 7 10:56:38 2016 New Revision: 296450 URL: https://svnweb.freebsd.org/changeset/base/296450 Log: - Use FPI and catalog resolution instead of system entities. This change fixes build with a non-standard DOC_PREFIX, but it is still a temporal measure because some of them should be done by using XInclude, not by entity reference. - Trim old entries and bump version numbers. Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml stable/10/release/doc/en_US.ISO8859-1/readme/article.xml stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/catalog.xml stable/10/release/doc/share/xml/release.ent Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Mar 7 10:56:21 2016 (r296449) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Mar 7 10:56:38 2016 (r296450) @@ -4,8 +4,10 @@ %release; - - + + ]>
%release; Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Mar 7 10:56:21 2016 (r296449) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Mar 7 10:56:38 2016 (r296450) @@ -1,6 +1,6 @@ %release; ]> Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 7 10:56:21 2016 (r296449) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 7 10:56:38 2016 (r296450) @@ -1,14 +1,19 @@ + "http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd" [ + %release; - + %sponsor; - + %vendor; - - + + ]>
@@ -26,7 +31,7 @@ - 2015 + 2016 The &os; Documentation Project @@ -166,42 +171,13 @@ Userland Application Changes - The &man.jail.8; utility has been - updated to include a new flag, -l, which - ensures a clean environment in the target jail when used. - Additionally, &man.jail.8; will run a shell within the target - jail when run no commands are specified. - - The &man.mkimg.1; utility has been - updated to include support for NTFS - filesystems in both MBR and - GPT partitioning schemes. - - The - &man.ar.1; utility now enables deterministic mode - (-D) by default. This behavior can be - disabled by specifying the -U flag. - - The &man.pciconf.8; utility has been - updated to use the PCI ID database from the misc/pciids package, if present, - falling back to the PCI ID database in the &os; base - system. - - A - new utility, &man.sesutil.8;, has been added, which is used - to manage &man.ses.4; devices. +   Contributed Software - The &man.libarchive.3; library has been - updated to properly skip a sparse file entry in a &man.tar.1; - file, which would previously produce errors. - - Timezone data files have been updated to - version 2015f. +   @@ -247,10 +223,7 @@ Kernel Bug Fixes - The &man.kqueue.2; system call has been - updated to handle write events to files larger than 2 - gigabytes. + @@ -262,10 +235,7 @@ System Tuning and Controls - The &man.uart.4; driver has been - updated to allow tuning pulses per second captured in the - CTS line during runtime, whereas previously only the DCD line - could be used without rebuilding the kernel. + @@ -284,12 +254,7 @@ Storage Drivers - The - CTL High Availability implementation has - been rewritten. - - The &man.ctl.4; driver has been updated - to support CD-ROM and removable devices. + @@ -316,9 +281,7 @@ Virtualization Support - The &man.xen.4; driver has been updated - to include support for blkif indirect - segment I/O. + @@ -349,11 +312,7 @@ ZFS - The &man.zfs.8; l2arc - code has been updated to take ashift into - account when gathering buffers to be written to the - l2arc device. + Modified: stable/10/release/doc/share/xml/catalog.xml ============================================================================== --- stable/10/release/doc/share/xml/catalog.xml Mon Mar 7 10:56:21 2016 (r296449) +++ stable/10/release/doc/share/xml/catalog.xml Mon Mar 7 10:56:38 2016 (r296450) @@ -9,5 +9,8 @@ + + + Modified: stable/10/release/doc/share/xml/release.ent ============================================================================== --- stable/10/release/doc/share/xml/release.ent Mon Mar 7 10:56:21 2016 (r296449) +++ stable/10/release/doc/share/xml/release.ent Mon Mar 7 10:56:38 2016 (r296450) @@ -6,23 +6,23 @@ - + - + - + - + From owner-svn-src-all@freebsd.org Mon Mar 7 10:59:29 2016 Return-Path: Delivered-To: svn-src-all@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 EAD64AC1879; Mon, 7 Mar 2016 10:59:29 +0000 (UTC) (envelope-from hrs@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 AC7991D40; Mon, 7 Mar 2016 10:59:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27AxS3p082203; Mon, 7 Mar 2016 10:59:28 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27AxSlT082201; Mon, 7 Mar 2016 10:59:28 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201603071059.u27AxSlT082201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 7 Mar 2016 10:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296451 - stable/10/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 10:59:30 -0000 Author: hrs Date: Mon Mar 7 10:59:28 2016 New Revision: 296451 URL: https://svnweb.freebsd.org/changeset/base/296451 Log: Trim old entries. Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Mon Mar 7 10:56:38 2016 (r296450) +++ stable/10/release/doc/share/xml/errata.xml Mon Mar 7 10:59:28 2016 (r296451) @@ -19,98 +19,7 @@ - FreeBSD-EN-15:11.toolchain - 18 August 2015 - Fix &man.make.1; syntax errors when upgrading - from &os; 9.x and earlier. - - - - FreeBSD-EN-15:12.netstat - 18 August 2015 - Fix incorrect &man.netstat.1; data handling on - 32-bit systems. - - - - FreeBSD-EN-15:13.vidcontrol - 18 August 2015 - Allow size argument to &man.vidcontrol.1; for - &man.syscons.4;. - - - - FreeBSD-EN-15:15.pkg - 25 August 2015 - Insufficient check of supported &man.pkg.7; - signature methods. - - - - FreeBSD-EN-15:16.pw - 16 September 2015 - Fix &man.pw.8; regression when creating numeric - users or groups. - - - - FreeBSD-EN-15:17.libc - 16 September 2015 - Fix libc handling of signals for multi-threaded - processes. - - - - FreeBSD-EN-15:18.pkg - 16 September 2015 - Implement pubkey support for - &man.pkg.7; bootstrap. - - - - FreeBSD-EN-15:19.kqueue - 4 November 2015 - &man.kqueue.2; write events never fire for files - larger than 2GB. - - - - FreeBSD-EN-15:20.vm - 4 November 2015 - Applications exiting due to segmentation - violation on a correct memory address. - - - - FreeBSD-EN-16:01.filemon - 14 January 2016 - bmake and - &man.filemon.4; stability issues. - - - - FreeBSD-EN-16:02.pf - 14 January 2016 - Invalid TCP checksum issue. - - - - FreeBSD-EN-16:03.yplib - 14 January 2016 - YP/NIS library - bug. + Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Mon Mar 7 10:56:38 2016 (r296450) +++ stable/10/release/doc/share/xml/security.xml Mon Mar 7 10:59:28 2016 (r296451) @@ -19,116 +19,7 @@ - FreeBSD-SA-15:20.expat - 18 August 2015 - Fix multiple integer overflows in - &man.libbsdxml.3;. - - - - FreeBSD-SA-15:22.openssh - 25 August 2015 - Multiple vulnerabilities - - - - FreeBSD-SA-15:24.rpcbind - 29 September 2015 - Remote denial of service - - - - FreeBSD-SA-15:25.ntp - 26 October 2015 - Multiple vulnerabilities - - - - FreeBSD-SA-15:26.openssl - 5 December 2015 - Multiple vulnerabilities - - - - FreeBSD-SA-16:01.sctp - 14 January 2016 - ICMPv6 error message vulnerability - - - - FreeBSD-SA-16:02.ntp - 14 January 2016 - Panic threshold bypass - vulnerability - - - - FreeBSD-SA-16:03.linux - 14 January 2016 - Incorrect futex - handling - - - - FreeBSD-SA-16:04.linux - 14 January 2016 - &man.setgroups.2; system call - vulnerability - - - - FreeBSD-SA-16:05.tcp - 14 January 2016 - MD5 signature denial of service - - - - FreeBSD-SA-16:06.bsnmpd - 14 January 2016 - Insecure default configuration file - permissions - - - - FreeBSD-SA-16:07.openssh - 14 January 2016 - OpenSSH client - information leak - - - - FreeBSD-SA-16:09.ntp - 27 January 2016 - Multiple vulnerabilities. - - - - FreeBSD-SA-16:10.linux - 27 January 2016 - &man.issetugid.2; system call - vulnerability. - - - - FreeBSD-SA-16:11.openssl - 30 January 2016 - SSLv2 cipher suite downgrade - vulnerability. + From owner-svn-src-all@freebsd.org Mon Mar 7 13:43:25 2016 Return-Path: Delivered-To: svn-src-all@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 2456DAB9424; Mon, 7 Mar 2016 13:43:25 +0000 (UTC) (envelope-from sbruno@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 E9ABE9AC; Mon, 7 Mar 2016 13:43:24 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27DhNCf033019; Mon, 7 Mar 2016 13:43:23 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27DhN3a033018; Mon, 7 Mar 2016 13:43:23 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201603071343.u27DhN3a033018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 7 Mar 2016 13:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296452 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 13:43:25 -0000 Author: sbruno Date: Mon Mar 7 13:43:23 2016 New Revision: 296452 URL: https://svnweb.freebsd.org/changeset/base/296452 Log: Spell "maximum" correctly. noted by mav@ Modified: stable/10/sys/dev/ixgbe/if_ix.c Modified: stable/10/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ix.c Mon Mar 7 10:59:28 2016 (r296451) +++ stable/10/sys/dev/ixgbe/if_ix.c Mon Mar 7 13:43:23 2016 (r296452) @@ -332,7 +332,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix static int ixgbe_num_queues = 0; TUNABLE_INT("hw.ix.num_queues", &ixgbe_num_queues); SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0, - "Number of queues to configure up to a mximum of 8," + "Number of queues to configure up to a maximum of 8," "0 indicates autoconfigure"); /* From owner-svn-src-all@freebsd.org Mon Mar 7 14:35:33 2016 Return-Path: Delivered-To: svn-src-all@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 4B0A9AC0BA4; Mon, 7 Mar 2016 14:35:33 +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 1D499A63; Mon, 7 Mar 2016 14:35:33 +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 u27EZWnO047995; Mon, 7 Mar 2016 14:35:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27EZWfH047994; Mon, 7 Mar 2016 14:35:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201603071435.u27EZWfH047994@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 14:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296453 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 14:35:33 -0000 Author: hselasky Date: Mon Mar 7 14:35:31 2016 New Revision: 296453 URL: https://svnweb.freebsd.org/changeset/base/296453 Log: Run the LinuxKPI PCI shutdown handler free of the Giant mutex. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Mon Mar 7 13:43:23 2016 (r296452) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Mon Mar 7 14:35:31 2016 (r296453) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -209,8 +209,11 @@ linux_pci_shutdown(device_t dev) struct pci_dev *pdev; pdev = device_get_softc(dev); - if (pdev->pdrv->shutdown != NULL) + if (pdev->pdrv->shutdown != NULL) { + DROP_GIANT(); pdev->pdrv->shutdown(pdev); + PICKUP_GIANT(); + } return (0); } From owner-svn-src-all@freebsd.org Mon Mar 7 14:59:51 2016 Return-Path: Delivered-To: svn-src-all@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 2A951AC14E0; Mon, 7 Mar 2016 14:59:51 +0000 (UTC) (envelope-from jtl@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 F04496A4; Mon, 7 Mar 2016 14:59:50 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27Exo9O054152; Mon, 7 Mar 2016 14:59:50 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27ExnMc054151; Mon, 7 Mar 2016 14:59:49 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201603071459.u27ExnMc054151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Mon, 7 Mar 2016 14:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296454 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 14:59:51 -0000 Author: jtl Date: Mon Mar 7 14:59:49 2016 New Revision: 296454 URL: https://svnweb.freebsd.org/changeset/base/296454 Log: Some cleanup in tcp_respond() in preparation for another change: - Reorder variables by size - Move initializer closer to where it is used - Remove unneeded variable Differential Revision: https://reviews.freebsd.org/D4808 Reviewed by: hiren MFC after: 2 weeks Sponsored by: Juniper Networks Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Mar 7 14:35:31 2016 (r296453) +++ head/sys/netinet/tcp_subr.c Mon Mar 7 14:59:49 2016 (r296454) @@ -864,16 +864,14 @@ void tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, tcp_seq ack, tcp_seq seq, int flags) { - int tlen; - int win = 0; + struct inpcb *inp; struct ip *ip; struct tcphdr *nth; #ifdef INET6 struct ip6_hdr *ip6; int isipv6; #endif /* INET6 */ - int ipflags = 0; - struct inpcb *inp; + int tlen, win; KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL")); @@ -890,6 +888,7 @@ tcp_respond(struct tcpcb *tp, void *ipge } else inp = NULL; + win = 0; if (tp != NULL) { if (!(flags & TH_RST)) { win = sbspace(&inp->inp_socket->so_rcv); @@ -1034,13 +1033,13 @@ tcp_respond(struct tcpcb *tp, void *ipge TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth); #ifdef INET6 if (isipv6) - (void) ip6_output(m, NULL, NULL, ipflags, NULL, NULL, inp); + (void) ip6_output(m, NULL, NULL, 0, NULL, NULL, inp); #endif /* INET6 */ #if defined(INET) && defined(INET6) else #endif #ifdef INET - (void) ip_output(m, NULL, NULL, ipflags, NULL, inp); + (void) ip_output(m, NULL, NULL, 0, NULL, inp); #endif } From owner-svn-src-all@freebsd.org Mon Mar 7 15:00:36 2016 Return-Path: Delivered-To: svn-src-all@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 0CA4BAC1556; Mon, 7 Mar 2016 15:00:36 +0000 (UTC) (envelope-from jtl@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 C243A885; Mon, 7 Mar 2016 15:00:35 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u27F0YpR054253; Mon, 7 Mar 2016 15:00:34 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27F0Y3Q054252; Mon, 7 Mar 2016 15:00:34 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201603071500.u27F0Y3Q054252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Mon, 7 Mar 2016 15:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296455 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 15:00:36 -0000 Author: jtl Date: Mon Mar 7 15:00:34 2016 New Revision: 296455 URL: https://svnweb.freebsd.org/changeset/base/296455 Log: As reported on the transport@ and current@ mailing lists, the FreeBSD TCP stack is not compliant with RFC 7323, which requires that TCP stacks send a timestamp option on all packets (except, optionally, RSTs) after the session is established. This patch adds that support. It also adds a TCP signature option to the packet, if appropriate. PR: 206047 Differential Revision: https://reviews.freebsd.org/D4808 Reviewed by: hiren MFC after: 2 weeks Sponsored by: Juniper Networks Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Mar 7 14:59:49 2016 (r296454) +++ head/sys/netinet/tcp_subr.c Mon Mar 7 15:00:34 2016 (r296455) @@ -864,14 +864,18 @@ void tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, tcp_seq ack, tcp_seq seq, int flags) { + struct tcpopt to; struct inpcb *inp; struct ip *ip; + struct mbuf *optm; struct tcphdr *nth; + u_char *optp; #ifdef INET6 struct ip6_hdr *ip6; int isipv6; #endif /* INET6 */ - int tlen, win; + int optlen, tlen, win; + bool incl_opts; KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL")); @@ -888,6 +892,7 @@ tcp_respond(struct tcpcb *tp, void *ipge } else inp = NULL; + incl_opts = false; win = 0; if (tp != NULL) { if (!(flags & TH_RST)) { @@ -895,12 +900,13 @@ tcp_respond(struct tcpcb *tp, void *ipge if (win > (long)TCP_MAXWIN << tp->rcv_scale) win = (long)TCP_MAXWIN << tp->rcv_scale; } + if ((tp->t_flags & TF_NOOPT) == 0) + incl_opts = true; } if (m == NULL) { m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return; - tlen = 0; m->m_data += max_linkhdr; #ifdef INET6 if (isipv6) { @@ -926,7 +932,6 @@ tcp_respond(struct tcpcb *tp, void *ipge m->m_next = NULL; m->m_data = (caddr_t)ipgen; /* m_len is set later */ - tlen = 0; #define xchg(a,b,type) { type t; t=a; a=b; b=t; } #ifdef INET6 if (isipv6) { @@ -950,12 +955,64 @@ tcp_respond(struct tcpcb *tp, void *ipge xchg(nth->th_dport, nth->th_sport, uint16_t); #undef xchg } + tlen = 0; +#ifdef INET6 + if (isipv6) + tlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr); +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET + tlen = sizeof (struct tcpiphdr); +#endif +#ifdef INVARIANTS + m->m_len = 0; + KASSERT(M_TRAILINGSPACE(m) >= tlen, + ("Not enough trailing space for message (m=%p, need=%d, have=%ld)", + m, tlen, (long)M_TRAILINGSPACE(m))); +#endif + m->m_len = tlen; + to.to_flags = 0; + if (incl_opts) { + /* Make sure we have room. */ + if (M_TRAILINGSPACE(m) < TCP_MAXOLEN) { + m->m_next = m_get(M_NOWAIT, MT_DATA); + if (m->m_next) { + optp = mtod(m->m_next, u_char *); + optm = m->m_next; + } else + incl_opts = false; + } else { + optp = (u_char *) (nth + 1); + optm = m; + } + } + if (incl_opts) { + /* Timestamps. */ + if (tp->t_flags & TF_RCVD_TSTMP) { + to.to_tsval = tcp_ts_getticks() + tp->ts_offset; + to.to_tsecr = tp->ts_recent; + to.to_flags |= TOF_TS; + } +#ifdef TCP_SIGNATURE + /* TCP-MD5 (RFC2385). */ + if (tp->t_flags & TF_SIGNATURE) + to.to_flags |= TOF_SIGNATURE; +#endif + + /* Add the options. */ + tlen += optlen = tcp_addoptions(&to, optp); + + /* Update m_len in the correct mbuf. */ + optm->m_len += optlen; + } else + optlen = 0; #ifdef INET6 if (isipv6) { ip6->ip6_flow = 0; ip6->ip6_vfc = IPV6_VERSION; ip6->ip6_nxt = IPPROTO_TCP; - tlen += sizeof (struct ip6_hdr) + sizeof (struct tcphdr); ip6->ip6_plen = htons(tlen - sizeof(*ip6)); } #endif @@ -964,14 +1021,12 @@ tcp_respond(struct tcpcb *tp, void *ipge #endif #ifdef INET { - tlen += sizeof (struct tcpiphdr); ip->ip_len = htons(tlen); ip->ip_ttl = V_ip_defttl; if (V_path_mtu_discovery) ip->ip_off |= htons(IP_DF); } #endif - m->m_len = tlen; m->m_pkthdr.len = tlen; m->m_pkthdr.rcvif = NULL; #ifdef MAC @@ -993,7 +1048,7 @@ tcp_respond(struct tcpcb *tp, void *ipge nth->th_seq = htonl(seq); nth->th_ack = htonl(ack); nth->th_x2 = 0; - nth->th_off = sizeof (struct tcphdr) >> 2; + nth->th_off = (sizeof (struct tcphdr) + optlen) >> 2; nth->th_flags = flags; if (tp != NULL) nth->th_win = htons((u_short) (win >> tp->rcv_scale)); @@ -1001,6 +1056,13 @@ tcp_respond(struct tcpcb *tp, void *ipge nth->th_win = htons((u_short)win); nth->th_urp = 0; +#ifdef TCP_SIGNATURE + if (to.to_flags & TOF_SIGNATURE) { + tcp_signature_compute(m, 0, 0, optlen, to.to_signature, + IPSEC_DIR_OUTBOUND); + } +#endif + m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); #ifdef INET6 if (isipv6) { From owner-svn-src-all@freebsd.org Mon Mar 7 15:21:01 2016 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Mar 7 15:39:55 2016 Return-Path: Delivered-To: svn-src-all@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 EC63FAC2619 for ; Mon, 7 Mar 2016 15:39:55 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 CD4A4F16 for ; Mon, 7 Mar 2016 15:39:55 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 126b9f51-e47b-11e5-8de6-958346fd02ba X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 7 Mar 2016 15:41:34 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u27Fdlgq001184; Mon, 7 Mar 2016 08:39:47 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1457365187.13785.174.camel@freebsd.org> Subject: Re: svn commit: r296428 - head/sys/boot/common From: Ian Lepore To: Dimitry Andric , Julian Elischer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 07 Mar 2016 08:39:47 -0700 In-Reply-To: References: <201603061557.u26FvhMi033982@repo.freebsd.org> <56DCD52F.4010709@freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 15:39:56 -0000 On Mon, 2016-03-07 at 08:41 +0100, Dimitry Andric wrote: > On 07 Mar 2016, at 02:11, Julian Elischer wrote: > > > > On 6/03/2016 7:57 AM, Dimitry Andric wrote: > > > Author: dim > > > Date: Sun Mar 6 15:57:43 2016 > > > New Revision: 296428 > > > URL: https://svnweb.freebsd.org/changeset/base/296428 > > > > > > Log: > > > 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. > > > > what happens to someone who doesn't replace their bootblocks? > > Or is this just the loader? > > This just about the loaders, e.g. loader, loader.efi and zfsloader. > > > > The general way we have handled this sort of thing in the past is > > that we do something > > that produces a nagging message for a decent time before it becomes > > mandatory. > > > > I don't like the idea of people being caught unaware by this.. > > > > Can you please give a more detailed description of what happens? > > If you preload modules with .eh_frame sections in them (such as > aesni.ko) from your loader.conf, your kernel will panic very early in > the boot. > > If you don't preload any modules, or load only modules without > .eh_frame > sections (most of of them), there is no issue at all. > > -Dimitry > Is there no way to prevent the panic other than making the unwind data be present? Why can't the kernel be fixed to cope with the missing data in some gentler way during a transition period? Perhaps valid-but -fake data could be generated if necessary? Being unable to get a stack traceback through a loaded module would be a small price to pay for trouble-free updgrades. -- Ian From owner-svn-src-all@freebsd.org Mon Mar 7 15:52:23 2016 Return-Path: Delivered-To: svn-src-all@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 EFDFAAC2F75; Mon, 7 Mar 2016 15:52:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 702B6F67; Mon, 7 Mar 2016 15:52:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u27FqHWS074879 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 7 Mar 2016 17:52:18 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u27FqHWS074879 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u27FqH7p074878; Mon, 7 Mar 2016 17:52:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 7 Mar 2016 17:52:17 +0200 From: Konstantin Belousov To: Ian Lepore Cc: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r296428 - head/sys/boot/common Message-ID: <20160307155217.GJ67250@kib.kiev.ua> References: <201603061557.u26FvhMi033982@repo.freebsd.org> <56DCD52F.4010709@freebsd.org> <1457365187.13785.174.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457365187.13785.174.camel@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 15:52:24 -0000 On Mon, Mar 07, 2016 at 08:39:47AM -0700, Ian Lepore wrote: > Is there no way to prevent the panic other than making the unwind data > be present? Why can't the kernel be fixed to cope with the missing > data in some gentler way during a transition period? Perhaps valid-but > -fake data could be generated if necessary? Being unable to get a > stack traceback through a loaded module would be a small price to pay > for trouble-free updgrades. It is practically impossible to recover from partially-loaded object file' module. The loader workaround currently only affects HEAD and since the MFC was done, 10.3 should be safe. We always required lastest stable for the jump to next major branch. What could be done is demoting the panics (there are several, besides the one which was triggered) to a message and refusing to load the affected module. OTOH, if the reaction would be a message and not panic, it definitely go ignored for quite some time. From owner-svn-src-all@freebsd.org Mon Mar 7 15:52:53 2016 Return-Path: Delivered-To: svn-src-all@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 02B81AC2FF1; Mon, 7 Mar 2016 15:52:53 +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 C8025188; Mon, 7 Mar 2016 15:52:52 +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 u27Fqpo7073635; Mon, 7 Mar 2016 15:52:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27FqpMm073634; Mon, 7 Mar 2016 15:52:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603071552.u27FqpMm073634@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:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296458 - stable/10/sys/dev/firewire X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 15:52:53 -0000 Author: pfg Date: Mon Mar 7 15:52:51 2016 New Revision: 296458 URL: https://svnweb.freebsd.org/changeset/base/296458 Log: MFC r295810: firewire: fix a mismatch introduced in r230558. Found by: PVS Static Analysis Reviewed by: sbruno Modified: stable/10/sys/dev/firewire/sbp_targ.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/firewire/sbp_targ.c ============================================================================== --- stable/10/sys/dev/firewire/sbp_targ.c Mon Mar 7 15:44:54 2016 (r296457) +++ stable/10/sys/dev/firewire/sbp_targ.c Mon Mar 7 15:52:51 2016 (r296458) @@ -1327,7 +1327,7 @@ sbp_targ_action1(struct cam_sim *sim, un | PIT_DISCONNECT | PIT_TERM_IO; cpi->transport = XPORT_SPI; /* FIXME add XPORT_FW type to cam */ - cpi->hba_misc = PIM_NOBUSRESET | PIM_NOBUSRESET; + cpi->hba_misc = PIM_NOBUSRESET | PIM_NO_6_BYTE; cpi->hba_eng_cnt = 0; cpi->max_target = 7; /* XXX */ cpi->max_lun = MAX_LUN - 1; From owner-svn-src-all@freebsd.org Mon Mar 7 16:05:55 2016 Return-Path: Delivered-To: svn-src-all@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 4D65DAC3704; Mon, 7 Mar 2016 16:05:55 +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 1C40DC50; Mon, 7 Mar 2016 16:05: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 u27G5sPe076721; Mon, 7 Mar 2016 16:05:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27G5sM9076720; Mon, 7 Mar 2016 16:05:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603071605.u27G5sM9076720@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:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296459 - stable/10/sys/dev/pms/freebsd/driver/ini/src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 16:05:55 -0000 Author: pfg Date: Mon Mar 7 16:05:53 2016 New Revision: 296459 URL: https://svnweb.freebsd.org/changeset/base/296459 Log: MFC r295861: ostiInitiatorIOCompleted(): wrong sizeof() argument. Detected by: PVS Static Analysis CID: 1331601, 1331523 Modified: stable/10/sys/dev/pms/freebsd/driver/ini/src/osapi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pms/freebsd/driver/ini/src/osapi.c ============================================================================== --- stable/10/sys/dev/pms/freebsd/driver/ini/src/osapi.c Mon Mar 7 15:52:51 2016 (r296458) +++ stable/10/sys/dev/pms/freebsd/driver/ini/src/osapi.c Mon Mar 7 16:05:53 2016 (r296459) @@ -313,7 +313,7 @@ ostiInitiatorIOCompleted(tiRoot_t * } sense_len = MIN( pSenseData->senseLen, pccb->senseLen - csio->sense_resid ); - bzero(&csio->sense_data, sizeof(&csio->sense_data)); + bzero(&csio->sense_data, sizeof(csio->sense_data)); AGTIAPI_PRINTK("ostiInitiatorIOCompleted: check condition copying\n"); memcpy( (void *)pccb->pSenseData, pSenseData->senseData, From owner-svn-src-all@freebsd.org Mon Mar 7 16:12:06 2016 Return-Path: Delivered-To: svn-src-all@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 547B6AC3947; Mon, 7 Mar 2016 16:12:06 +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 23963EF; Mon, 7 Mar 2016 16:12:06 +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 u27GC52b077635; Mon, 7 Mar 2016 16:12:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u27GC5Ru077634; Mon, 7 Mar 2016 16:12:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603071612.u27GC5Ru077634@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:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296460 - stable/10/usr.sbin/cron/cron X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 16:12:06 -0000 Author: pfg Date: Mon Mar 7 16:12:04 2016 New Revision: 296460 URL: https://svnweb.freebsd.org/changeset/base/296460 Log: MFC r295671: cron: use (char *)NULL instead of (char *)0 in execle. Obtained from: OpenBSD (CVS Rev 1.25) Modified: stable/10/usr.sbin/cron/cron/do_command.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/cron/cron/do_command.c ============================================================================== --- stable/10/usr.sbin/cron/cron/do_command.c Mon Mar 7 16:05:53 2016 (r296459) +++ stable/10/usr.sbin/cron/cron/do_command.c Mon Mar 7 16:12:04 2016 (r296460) @@ -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-all@freebsd.org Mon Mar 7 16:13:56 2016 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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);