From owner-svn-src-all@freebsd.org Sun Sep 25 07:48: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 73602BE81A3; Sun, 25 Sep 2016 07:48:09 +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 4A641284; Sun, 25 Sep 2016 07:48: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 u8P7m8Vq006738; Sun, 25 Sep 2016 07:48:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8P7m8cE006737; Sun, 25 Sep 2016 07:48:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609250748.u8P7m8cE006737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 25 Sep 2016 07:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306307 - head/sys/arm/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.23 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, 25 Sep 2016 07:48:09 -0000 Author: andrew Date: Sun Sep 25 07:48:08 2016 New Revision: 306307 URL: https://svnweb.freebsd.org/changeset/base/306307 Log: Add the start of a GENERIC armv6 kernel config. This supports the Allwinner SMP SoCs and qemu virt. Further SoCs can be supported if they support the PLATFORM, PLATFORM_SMP, and MULTIDELAY options. Tested by: manu Sponsored by: ABT Systems Ltd Added: head/sys/arm/conf/GENERIC (contents, props changed) Added: head/sys/arm/conf/GENERIC ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/GENERIC Sun Sep 25 07:48:08 2016 (r306307) @@ -0,0 +1,145 @@ +# +# GENERICV6 -- Generic(ish) kernel config. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident GENERIC + +cpu CPU_CORTEXA +machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a" + +makeoptions KERNVIRTADDR=0xc0000000 +options KERNVIRTADDR=0xc0000000 + +include "std.armv6" +files "../allwinner/files.allwinner" +files "../allwinner/a20/files.a20" +files "../allwinner/a31/files.a31" +files "../allwinner/a83t/files.a83t" +files "../allwinner/h3/files.h3" +files "../qemu/files.qemu" + +options SOC_ALLWINNER_A20 +options SOC_ALLWINNER_A31 +options SOC_ALLWINNER_A31S +options SOC_ALLWINNER_A83T +options SOC_ALLWINNER_H3 + +options SCHED_ULE # ULE scheduler +options SMP # Enable multiple cores +options PLATFORM +options PLATFORM_SMP +options MULTIDELAY + +# EXT_RESOURCES pseudo devices +options EXT_RESOURCES +device clk +device phy +device hwreset +device regulator + +# Interrupt controller +options INTRNG +device gic + +# ARM Generic Timer +device generic_timer + +# MMC/SD/SDIO Card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# ATA controllers +device ahci # AHCI-compatible SATA controllers +#device ata # Legacy ATA/SATA controllers + +# VirtIO +device virtio +device virtio_mmio +device virtio_blk +device vtnet + +# Console and misc +device uart +device uart_snps +device pl011 +device pty +device snp +device md +device random # Entropy device +device psci + +# I2C support +device iicbus +device iic +device twsi +device rsb +device axp209 # AXP209 Power Management Unit +device axp81x # AXP813/818 Power Management Unit + +# GPIO +device gpio +device gpioled + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +device usb +#device uhci +device ohci +device ehci + +device umass + +# Ethernet +device loop +device ether +device mii +device bpf + +#device emac # 10/100 integrated EMAC controller +device dwc # 10/100/1000 integrated GMAC controller +device awg # 10/100/1000 integrated EMAC controller + +# USB ethernet support, requires miibus +device miibus + +# Sound support +device sound + +# Framebuffer support +device vt +device kbdmux +device ums +device ukbd +device videomode +device hdmi + +# Pinmux +device fdt_pinctrl + +# Extensible Firmware Interface +options EFI + +# Flattened Device Tree +options FDT # Configure using FDT/DTB data +makeoptions MODULES_EXTRA=dtb/allwinner From owner-svn-src-all@freebsd.org Sun Sep 25 09:36: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 EA3BDBE614B; Sun, 25 Sep 2016 09:36:53 +0000 (UTC) (envelope-from roberto@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 A235A1562; Sun, 25 Sep 2016 09:36:53 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8P9aqQF048132; Sun, 25 Sep 2016 09:36:52 GMT (envelope-from roberto@FreeBSD.org) Received: (from roberto@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8P9aqtl048130; Sun, 25 Sep 2016 09:36:52 GMT (envelope-from roberto@FreeBSD.org) Message-Id: <201609250936.u8P9aqtl048130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: roberto set sender to roberto@FreeBSD.org using -f From: Ollivier Robert Date: Sun, 25 Sep 2016 09:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306308 - stable/11/lib/libpam/modules/pam_ssh X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 09:36:54 -0000 Author: roberto Date: Sun Sep 25 09:36:52 2016 New Revision: 306308 URL: https://svnweb.freebsd.org/changeset/base/306308 Log: MFC: 304626,304635: r304626: Add support for Ed25519 keys. r304635: Remove support for SSH1, already disabled in our OpenSSH. Submitted by: mwlucas (r304626), vangyzen (r304635) Modified: stable/11/lib/libpam/modules/pam_ssh/pam_ssh.8 stable/11/lib/libpam/modules/pam_ssh/pam_ssh.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpam/modules/pam_ssh/pam_ssh.8 ============================================================================== --- stable/11/lib/libpam/modules/pam_ssh/pam_ssh.8 Sun Sep 25 07:48:08 2016 (r306307) +++ stable/11/lib/libpam/modules/pam_ssh/pam_ssh.8 Sun Sep 25 09:36:52 2016 (r306308) @@ -128,15 +128,15 @@ Start an agent even if no keys were decr authentication phase. .El .Sh FILES -.Bl -tag -width ".Pa $HOME/.ssh/identity" -compact -.It Pa $HOME/.ssh/identity -SSH1 RSA key +.Bl -tag -width ".Pa $HOME/.ssh/id_ed25519" -compact .It Pa $HOME/.ssh/id_rsa SSH2 RSA key .It Pa $HOME/.ssh/id_dsa SSH2 DSA key .It Pa $HOME/.ssh/id_ecdsa SSH2 ECDSA key +.It Pa $HOME/.ssh/id_ed25519 +SSH2 Ed25519 key .El .Sh SEE ALSO .Xr ssh-agent 1 , Modified: stable/11/lib/libpam/modules/pam_ssh/pam_ssh.c ============================================================================== --- stable/11/lib/libpam/modules/pam_ssh/pam_ssh.c Sun Sep 25 07:48:08 2016 (r306307) +++ stable/11/lib/libpam/modules/pam_ssh/pam_ssh.c Sun Sep 25 09:36:52 2016 (r306308) @@ -77,10 +77,10 @@ static const char *pam_ssh_prompt = "SSH static const char *pam_ssh_have_keys = "pam_ssh_have_keys"; static const char *pam_ssh_keyfiles[] = { - ".ssh/identity", /* SSH1 RSA key */ ".ssh/id_rsa", /* SSH2 RSA key */ ".ssh/id_dsa", /* SSH2 DSA key */ ".ssh/id_ecdsa", /* SSH2 ECDSA key */ + ".ssh/id_ed25519", /* SSH2 Ed25519 key */ NULL }; From owner-svn-src-all@freebsd.org Sun Sep 25 13:52: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 55364BE8603; Sun, 25 Sep 2016 13:52:57 +0000 (UTC) (envelope-from kevlo@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 0171DEE0; Sun, 25 Sep 2016 13:52:56 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PDqukT044739; Sun, 25 Sep 2016 13:52:56 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PDquEf044736; Sun, 25 Sep 2016 13:52:56 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609251352.u8PDquEf044736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 25 Sep 2016 13:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306309 - in stable/11: share/man/man4 sys/dev/re sys/dev/rl X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 13:52:57 -0000 Author: kevlo Date: Sun Sep 25 13:52:55 2016 New Revision: 306309 URL: https://svnweb.freebsd.org/changeset/base/306309 Log: MFC r306102: Add support for the TP-Link TG-3468 v2. This is an RTL8168 chip, which we already support so all we have to do is add the vendor ID. PR: 212876 Submitted by: Tobias Kortkamp Modified: stable/11/share/man/man4/re.4 stable/11/sys/dev/re/if_re.c stable/11/sys/dev/rl/if_rlreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/re.4 ============================================================================== --- stable/11/share/man/man4/re.4 Sun Sep 25 09:36:52 2016 (r306308) +++ stable/11/share/man/man4/re.4 Sun Sep 25 13:52:55 2016 (r306309) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2011 +.Dd September 21, 2016 .Dt RE 4 .Os .Sh NAME @@ -165,6 +165,8 @@ LinkSys EG1032 (32-bit PCI) .It PLANEX COMMUNICATIONS Inc.\& GN-1200TC (8169S) .It +TP-Link TG-3468 v2 Gigabit Ethernet (8168) +.It USRobotics USR997902 Gigabit Ethernet (8169S) .It Xterasys XN-152 10/100/1000 NIC (8169) Modified: stable/11/sys/dev/re/if_re.c ============================================================================== --- stable/11/sys/dev/re/if_re.c Sun Sep 25 09:36:52 2016 (r306308) +++ stable/11/sys/dev/re/if_re.c Sun Sep 25 13:52:55 2016 (r306309) @@ -183,6 +183,8 @@ static const struct rl_type re_devs[] = "RealTek 810xE PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet" }, + { NCUBE_VENDORID, RT_DEVICEID_8168, 0, + "TP-Link TG-3468 v2 (RTL8168) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, Modified: stable/11/sys/dev/rl/if_rlreg.h ============================================================================== --- stable/11/sys/dev/rl/if_rlreg.h Sun Sep 25 09:36:52 2016 (r306308) +++ stable/11/sys/dev/rl/if_rlreg.h Sun Sep 25 13:52:55 2016 (r306309) @@ -1158,3 +1158,8 @@ struct rl_softc { /* US Robotics 997902 device ID */ #define USR_DEVICEID_997902 0x0116 + +/* + * NCube vendor ID + */ +#define NCUBE_VENDORID 0x10FF From owner-svn-src-all@freebsd.org Sun Sep 25 14:56: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 A5FC6BE9605; Sun, 25 Sep 2016 14:56:25 +0000 (UTC) (envelope-from bde@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 7E5E798E; Sun, 25 Sep 2016 14:56:25 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PEuOD4067751; Sun, 25 Sep 2016 14:56:24 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PEuO0S067749; Sun, 25 Sep 2016 14:56:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609251456.u8PEuO0S067749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 25 Sep 2016 14:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306310 - in head/sys: amd64/amd64 i386/i386 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.23 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, 25 Sep 2016 14:56:25 -0000 Author: bde Date: Sun Sep 25 14:56:24 2016 New Revision: 306310 URL: https://svnweb.freebsd.org/changeset/base/306310 Log: Fix vm86 initialization, part 3 of 2 and a half. (Actually, just fix early printfs and debugging of vm86 initialization and some other early initialization in some cases.) Add an option debug.late_console (with default 1=off) to move console and kdb initialization back where it was. Do the same for amd64 although there is no vm86 there. On my test system, debug.late_console=0 works for the syscons, sio and uart console drivers on amd64 and i386, and for vt on i386 but not on amd64. The early printfs fixed by debug.late_console=0 are: - on i386, the message about lost memory above 4G - with -v in otherwise normal use, about 20 printfs for SMAP - other debugging messages for memory sizing. Mostly under -v and not printed in normal use. Document in a comment how much earlier the initialization and early printf()s can be. That is very early for the console. Not much more than curthread is needed. kdb use obviously needs to be not so early, since it needs IDT initialization and that is done relatively late for convenience and historical reasons. Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Sep 25 13:52:55 2016 (r306309) +++ head/sys/amd64/amd64/machdep.c Sun Sep 25 14:56:24 2016 (r306310) @@ -1506,6 +1506,16 @@ native_parse_preload_data(u_int64_t modu return (kmdp); } +static void +amd64_kdb_init(void) +{ + kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); +#endif +} + u_int64_t hammer_time(u_int64_t modulep, u_int64_t physfree) { @@ -1517,6 +1527,7 @@ hammer_time(u_int64_t modulep, u_int64_t u_int64_t msr; char *env; size_t kstack0_sz; + int late_console; /* * This may be done better later if it gets more high level @@ -1561,6 +1572,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree += DPCPU_SIZE; PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); + /* Non-late cninit() and printf() can be moved up to here. */ PCPU_SET(tssp, &common_tss[0]); PCPU_SET(commontssp, &common_tss[0]); PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]); @@ -1660,12 +1672,26 @@ hammer_time(u_int64_t modulep, u_int64_t wrmsr(MSR_STAR, msr); wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D); + /* + * The console and kdb should be initialized even earlier than here, + * but some console drivers don't work until after getmemsize(). + * Default to late console initialization to support these drivers. + * This loses mainly printf()s in getmemsize() and early debugging. + */ + late_console = 1; + TUNABLE_INT_FETCH("debug.late_console", &late_console); + if (!late_console) { + cninit(); + amd64_kdb_init(); + } + getmemsize(kmdp, physfree); init_param2(physmem); /* now running on new page tables, configured,and u/iom is accessible */ - cninit(); + if (late_console) + cninit(); #ifdef DEV_ISA #ifdef DEV_ATPIC @@ -1686,13 +1712,8 @@ hammer_time(u_int64_t modulep, u_int64_t #error "have you forgotten the isa device?"; #endif - kdb_init(); - -#ifdef KDB - if (boothowto & RB_KDB) - kdb_enter(KDB_WHY_BOOTFLAGS, - "Boot flags requested debugger"); -#endif + if (late_console) + amd64_kdb_init(); msgbufinit(msgbufp, msgbufsize); fpuinit(); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Sep 25 13:52:55 2016 (r306309) +++ head/sys/i386/i386/machdep.c Sun Sep 25 14:56:24 2016 (r306310) @@ -2089,7 +2089,6 @@ getmemsize(int first) * use that and do not make any VM86 calls. */ physmap_idx = 0; - smapbase = NULL; kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) kmdp = preload_search_by_type("elf32 kernel"); @@ -2223,6 +2222,9 @@ physmap_done: * highest page of the physical address space. It should be * called something like "Maxphyspage". We may adjust this * based on ``hw.physmem'' and the results of the memory test. + * + * This is especially confusing when it is much larger than the + * memory size and is displayed as "realmem". */ Maxmem = atop(physmap[physmap_idx + 1]); @@ -2428,6 +2430,19 @@ do_next: } #endif /* PC98 */ +static void +i386_kdb_init(void) +{ +#ifdef DDB + db_fetch_ksymtab(bootinfo.bi_symtab, bootinfo.bi_esymtab); +#endif + kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); +#endif +} + register_t init386(first) int first; @@ -2438,6 +2453,7 @@ init386(first) #ifdef CPU_ENABLE_SSE struct xstate_hdr *xhdr; #endif + int late_console; thread0.td_kstack = proc0kstack; thread0.td_kstack_pages = TD0_KSTACK_PAGES; @@ -2502,6 +2518,7 @@ init386(first) first += DPCPU_SIZE; PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); + /* Non-late cninit() and printf() can be moved up to here. */ /* * Initialize mutexes. @@ -2668,30 +2685,33 @@ init386(first) #endif #endif + /* + * The console and kdb should be initialized even earlier than here, + * but some console drivers don't work until after getmemsize(). + * Default to late console initialization to support these drivers. + * This loses mainly printf()s in getmemsize() and early debugging. + */ + late_console = 1; + TUNABLE_INT_FETCH("debug.late_console", &late_console); + if (!late_console) { + cninit(); + i386_kdb_init(); + } + vm86_initialize(); getmemsize(first); init_param2(physmem); /* now running on new page tables, configured,and u/iom is accessible */ - /* - * Initialize the console before we print anything out. - */ - cninit(); + if (late_console) + cninit(); if (metadata_missing) printf("WARNING: loader(8) metadata is missing!\n"); -#ifdef DDB - db_fetch_ksymtab(bootinfo.bi_symtab, bootinfo.bi_esymtab); -#endif - - kdb_init(); - -#ifdef KDB - if (boothowto & RB_KDB) - kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); -#endif + if (late_console) + i386_kdb_init(); msgbufinit(msgbufp, msgbufsize); #ifdef DEV_NPX From owner-svn-src-all@freebsd.org Sun Sep 25 16:30:31 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 BFF6ABE8A5C; Sun, 25 Sep 2016 16:30:31 +0000 (UTC) (envelope-from bde@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 815B5D30; Sun, 25 Sep 2016 16:30:31 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PGUUVw001474; Sun, 25 Sep 2016 16:30:30 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PGUUwU001468; Sun, 25 Sep 2016 16:30:30 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609251630.u8PGUUwU001468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 25 Sep 2016 16:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306311 - in head: share/man/man4 sys/ddb sys/i386/i386 sys/i386/include 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.23 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, 25 Sep 2016 16:30:31 -0000 Author: bde Date: Sun Sep 25 16:30:29 2016 New Revision: 306311 URL: https://svnweb.freebsd.org/changeset/base/306311 Log: Determine the operand/address size of %cs in a new function db_segsize(). Use db_segsize() to set the default operand/address size for disassembling. Allow overriding this with the "alternate" display format /I. The API of db_disasm() should be debooleanized to pass a more general request (amd64 needs overrides to sizes of 16, 32, and 64, but this commit doesn't implement anything for amd64 since much larger changes are needed to restore the amd64 disassmbler's support for non-default sizes). Fix db_print_loc_and_inst() to ask for the normal format and not the alternate in normal operation. This is most useful for vm86 mode, but also works for 16-bit protected mode. Use db_segsize() to avoid trying to print a garbage stack trace if %cs is 16 bits. Print something like the stack trace termination message for a trap boundary instead. Document that the alternate format is now useful on i386. Modified: head/share/man/man4/ddb.4 head/sys/ddb/db_examine.c head/sys/i386/i386/db_disasm.c head/sys/i386/i386/db_interface.c head/sys/i386/i386/db_trace.c head/sys/i386/include/db_machdep.h Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Sun Sep 25 14:56:24 2016 (r306310) +++ head/share/man/man4/ddb.4 Sun Sep 25 16:30:29 2016 (r306311) @@ -264,7 +264,9 @@ The location is also displayed in hex at display as an instruction .It Cm I display as an instruction with possible alternate formats depending on the -machine, but none of the supported architectures have an alternate format +machine. +On i386, this selects the alternate format for the instruction decoding +(16 bits in a 32-bit code segment and vice versa). .It Cm S display a symbol name for the pointer stored at the address .El Modified: head/sys/ddb/db_examine.c ============================================================================== --- head/sys/ddb/db_examine.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/ddb/db_examine.c Sun Sep 25 16:30:29 2016 (r306311) @@ -241,7 +241,7 @@ db_print_loc_and_inst(db_addr_t loc) db_printsym(loc, DB_STGY_PROC); if (db_search_symbol(loc, DB_STGY_PROC, &off) != C_DB_SYM_NULL) { db_printf(":\t"); - (void)db_disasm(loc, true); + (void)db_disasm(loc, false); } } Modified: head/sys/i386/i386/db_disasm.c ============================================================================== --- head/sys/i386/i386/db_disasm.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/i386/db_disasm.c Sun Sep 25 16:30:29 2016 (r306311) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); * Instruction disassembler. */ #include +#include #include #include @@ -1168,9 +1169,17 @@ db_disasm(db_addr_t loc, bool altfmt) int len; struct i_addr address; + if (db_segsize(kdb_frame) == 16) + altfmt = !altfmt; get_value_inc(inst, loc, 1, FALSE); - short_addr = FALSE; - size = LONG; + if (altfmt) { + short_addr = TRUE; + size = WORD; + } + else { + short_addr = FALSE; + size = LONG; + } seg = NULL; /* Modified: head/sys/i386/i386/db_interface.c ============================================================================== --- head/sys/i386/i386/db_interface.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/i386/db_interface.c Sun Sep 25 16:30:29 2016 (r306311) @@ -135,6 +135,30 @@ db_write_bytes(vm_offset_t addr, size_t return (ret); } +int +db_segsize(struct trapframe *tfp) +{ + struct proc_ldt *plp; + struct segment_descriptor *sdp; + int sel; + + if (tfp == NULL) + return (32); + if (tfp->tf_eflags & PSL_VM) + return (16); + sel = tfp->tf_cs & 0xffff; + if (sel == GSEL(GCODE_SEL, SEL_KPL)) + return (32); + /* Rare cases follow. User mode cases are currently unreachable. */ + if (ISLDT(sel)) { + plp = curthread->td_proc->p_md.md_ldt; + sdp = (plp != NULL) ? &plp->ldt_sd : &ldt[0].sd; + } else { + sdp = &gdt[PCPU_GET(cpuid) * NGDT].sd; + } + return (sdp[IDXSEL(sel)].sd_def32 == 0 ? 16 : 32); +} + void db_show_mdpcpu(struct pcpu *pc) { Modified: head/sys/i386/i386/db_trace.c ============================================================================== --- head/sys/i386/i386/db_trace.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/i386/db_trace.c Sun Sep 25 16:30:29 2016 (r306311) @@ -421,6 +421,17 @@ db_backtrace(struct thread *td, struct t int instr, narg; boolean_t first; + if (db_segsize(tf) == 16) { + db_printf( +"--- 16-bit%s, cs:eip = %#x:%#x, ss:esp = %#x:%#x, ebp = %#x, tf = %p ---\n", + (tf->tf_eflags & PSL_VM) ? " (vm86)" : "", + tf->tf_cs, tf->tf_eip, + TF_HAS_STACKREGS(tf) ? tf->tf_ss : rss(), + TF_HAS_STACKREGS(tf) ? tf->tf_esp : (intptr_t)&tf->tf_esp, + tf->tf_ebp, tf); + return (0); + } + /* * If an indirect call via an invalid pointer caused a trap, * %pc contains the invalid address while the return address Modified: head/sys/i386/include/db_machdep.h ============================================================================== --- head/sys/i386/include/db_machdep.h Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/include/db_machdep.h Sun Sep 25 16:30:29 2016 (r306311) @@ -98,4 +98,6 @@ do { \ #define DB_SMALL_VALUE_MAX 0x7fffffff #define DB_SMALL_VALUE_MIN (-0x400001) +int db_segsize(struct trapframe *tfp); + #endif /* !_MACHINE_DB_MACHDEP_H_ */ From owner-svn-src-all@freebsd.org Sun Sep 25 16:39: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 C1525BE8CE2; Sun, 25 Sep 2016 16:39:19 +0000 (UTC) (envelope-from marcel@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 8EDD934A; Sun, 25 Sep 2016 16:39:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PGdI7k005261; Sun, 25 Sep 2016 16:39:18 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PGdIfT005260; Sun, 25 Sep 2016 16:39:18 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609251639.u8PGdIfT005260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 25 Sep 2016 16:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306312 - 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.23 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, 25 Sep 2016 16:39:19 -0000 Author: marcel Date: Sun Sep 25 16:39:18 2016 New Revision: 306312 URL: https://svnweb.freebsd.org/changeset/base/306312 Log: Relocatable object files are renamed from *.So to *.pico Reminder by: imp@ Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 25 16:30:29 2016 (r306311) +++ head/UPDATING Sun Sep 25 16:39:18 2016 (r306312) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160924: + Relocatable object files with the extension of .So have been renamed + to use an extension of .pico instead. The purpose of this change is + to avoid a name clash with shared libraries on case-insensitive file + systems. On those file systems, foo.So is the same file as foo.so. + 20160918: GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. From owner-svn-src-all@freebsd.org Sun Sep 25 16:50: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 13030BE8F19; Sun, 25 Sep 2016 16:50:33 +0000 (UTC) (envelope-from marcel@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 D0BD59F9; Sun, 25 Sep 2016 16:50:32 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PGoWp7008980; Sun, 25 Sep 2016 16:50:32 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PGoWVX008979; Sun, 25 Sep 2016 16:50:32 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609251650.u8PGoWVX008979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 25 Sep 2016 16:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306313 - head/share/mk 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.23 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, 25 Sep 2016 16:50:33 -0000 Author: marcel Date: Sun Sep 25 16:50:31 2016 New Revision: 306313 URL: https://svnweb.freebsd.org/changeset/base/306313 Log: Document the ".pico" extension for object files. Suggested by: emaste@ Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Sun Sep 25 16:39:18 2016 (r306312) +++ head/share/mk/bsd.README Sun Sep 25 16:50:31 2016 (r306313) @@ -114,7 +114,7 @@ the tree where the file gets installed. The profiled libraries are no longer built in a different directory than the regular libraries. A new suffix, ".po", is used to denote a profiled -object. +object, and ".pico" denotes a position-independent relocatable object. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From owner-svn-src-all@freebsd.org Sun Sep 25 17:24:11 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 C066DBE9C1A; Sun, 25 Sep 2016 17:24:11 +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 80C94F76; Sun, 25 Sep 2016 17:24:11 +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 u8PHOAjR023994; Sun, 25 Sep 2016 17:24:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PHOA1e023990; Sun, 25 Sep 2016 17:24:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609251724.u8PHOA1e023990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Sep 2016 17:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306314 - in stable/11: share/man/man9 sys/amd64/amd64 sys/amd64/include X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 17:24:11 -0000 Author: kib Date: Sun Sep 25 17:24:10 2016 New Revision: 306314 URL: https://svnweb.freebsd.org/changeset/base/306314 Log: MFC r305692: Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64. Modified: stable/11/share/man/man9/fpu_kern.9 stable/11/sys/amd64/amd64/fpu.c stable/11/sys/amd64/include/fpu.h stable/11/sys/amd64/include/pcb.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/fpu_kern.9 ============================================================================== --- stable/11/share/man/man9/fpu_kern.9 Sun Sep 25 16:50:31 2016 (r306313) +++ stable/11/share/man/man9/fpu_kern.9 Sun Sep 25 17:24:10 2016 (r306314) @@ -120,6 +120,16 @@ could be used from both kernel thread an The .Fn fpu_kern_leave function correctly handles such contexts. +.It Dv FPU_KERN_NOCTX +Avoid nesting save area. +If the flag is specified, the +.Fa ctx +must be passed as +.Va NULL . +The flag should only be used for really short code blocks +which can be executed in a critical section. +It avoids the need to allocate the FPU context by the cost +of increased system latency. .El .El .Pp Modified: stable/11/sys/amd64/amd64/fpu.c ============================================================================== --- stable/11/sys/amd64/amd64/fpu.c Sun Sep 25 16:50:31 2016 (r306313) +++ stable/11/sys/amd64/amd64/fpu.c Sun Sep 25 17:24:10 2016 (r306314) @@ -633,6 +633,8 @@ fpudna(void) */ critical_enter(); + KASSERT((curpcb->pcb_flags & PCB_FPUNOSAVE) == 0, + ("fpudna while in fpu_kern_enter(FPU_KERN_NOCTX)")); if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread\n"); stop_emulating(); @@ -964,13 +966,39 @@ fpu_kern_enter(struct thread *td, struct { struct pcb *pcb; - KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("using inuse ctx")); + pcb = td->td_pcb; + KASSERT((flags & FPU_KERN_NOCTX) != 0 || ctx != NULL, + ("ctx is required when !FPU_KERN_NOCTX")); + KASSERT(ctx == NULL || (ctx->flags & FPU_KERN_CTX_INUSE) == 0, + ("using inuse ctx")); + KASSERT((pcb->pcb_flags & PCB_FPUNOSAVE) == 0, + ("recursive fpu_kern_enter while in PCB_FPUNOSAVE state")); + if ((flags & FPU_KERN_NOCTX) != 0) { + critical_enter(); + stop_emulating(); + if (curthread == PCPU_GET(fpcurthread)) { + fpusave(curpcb->pcb_save); + PCPU_SET(fpcurthread, NULL); + } else { + KASSERT(PCPU_GET(fpcurthread) == NULL, + ("invalid fpcurthread")); + } + + /* + * This breaks XSAVEOPT tracker, but + * PCB_FPUNOSAVE state is supposed to never need to + * save FPU context at all. + */ + fpurestore(fpu_initialstate); + set_pcb_flags(pcb, PCB_KERNFPU | PCB_FPUNOSAVE | + PCB_FPUINITDONE); + return (0); + } if ((flags & FPU_KERN_KTHR) != 0 && is_fpu_kern_thread(0)) { ctx->flags = FPU_KERN_CTX_DUMMY | FPU_KERN_CTX_INUSE; return (0); } - pcb = td->td_pcb; KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); ctx->flags = FPU_KERN_CTX_INUSE; @@ -989,19 +1017,34 @@ fpu_kern_leave(struct thread *td, struct { struct pcb *pcb; - KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, - ("leaving not inuse ctx")); - ctx->flags &= ~FPU_KERN_CTX_INUSE; - - if (is_fpu_kern_thread(0) && (ctx->flags & FPU_KERN_CTX_DUMMY) != 0) - return (0); - KASSERT((ctx->flags & FPU_KERN_CTX_DUMMY) == 0, ("dummy ctx")); pcb = td->td_pcb; - critical_enter(); - if (curthread == PCPU_GET(fpcurthread)) - fpudrop(); - critical_exit(); - pcb->pcb_save = ctx->prev; + + if ((pcb->pcb_flags & PCB_FPUNOSAVE) != 0) { + KASSERT(ctx == NULL, ("non-null ctx after FPU_KERN_NOCTX")); + KASSERT(PCPU_GET(fpcurthread) == NULL, + ("non-NULL fpcurthread for PCB_FPUNOSAVE")); + CRITICAL_ASSERT(td); + + clear_pcb_flags(pcb, PCB_FPUNOSAVE | PCB_FPUINITDONE); + start_emulating(); + critical_exit(); + } else { + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, + ("leaving not inuse ctx")); + ctx->flags &= ~FPU_KERN_CTX_INUSE; + + if (is_fpu_kern_thread(0) && + (ctx->flags & FPU_KERN_CTX_DUMMY) != 0) + return (0); + KASSERT((ctx->flags & FPU_KERN_CTX_DUMMY) == 0, + ("dummy ctx")); + critical_enter(); + if (curthread == PCPU_GET(fpcurthread)) + fpudrop(); + critical_exit(); + pcb->pcb_save = ctx->prev; + } + if (pcb->pcb_save == get_pcb_user_save_pcb(pcb)) { if ((pcb->pcb_flags & PCB_USERFPUINITDONE) != 0) { set_pcb_flags(pcb, PCB_FPUINITDONE); Modified: stable/11/sys/amd64/include/fpu.h ============================================================================== --- stable/11/sys/amd64/include/fpu.h Sun Sep 25 16:50:31 2016 (r306313) +++ stable/11/sys/amd64/include/fpu.h Sun Sep 25 17:24:10 2016 (r306314) @@ -86,6 +86,7 @@ void fpu_save_area_reset(struct savefpu #define FPU_KERN_NORMAL 0x0000 #define FPU_KERN_NOWAIT 0x0001 #define FPU_KERN_KTHR 0x0002 +#define FPU_KERN_NOCTX 0x0004 #endif Modified: stable/11/sys/amd64/include/pcb.h ============================================================================== --- stable/11/sys/amd64/include/pcb.h Sun Sep 25 16:50:31 2016 (r306313) +++ stable/11/sys/amd64/include/pcb.h Sun Sep 25 17:24:10 2016 (r306314) @@ -83,6 +83,7 @@ struct pcb { #define PCB_FPUINITDONE 0x08 /* fpu state is initialized */ #define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ #define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ +#define PCB_FPUNOSAVE 0x80 /* no save area for current FPU ctx */ uint16_t pcb_initial_fpucw; From owner-svn-src-all@freebsd.org Sun Sep 25 17:43:45 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 CE76ABE9F8D; Sun, 25 Sep 2016 17:43:45 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2j.cmail.yandex.net (forward2j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7585316C1; Sun, 25 Sep 2016 17:43:45 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [IPv6:2a02:6b8:0:f05::117]) by forward2j.cmail.yandex.net (Yandex) with ESMTP id 6049020C89; Sun, 25 Sep 2016 20:43:42 +0300 (MSK) Received: from smtp3h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 9696B440C75; Sun, 25 Sep 2016 20:43:40 +0300 (MSK) Received: by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id DP1L6FaOr9-hdFuIvEv; Sun, 25 Sep 2016 20:43:39 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1474825419; bh=xf/P9bTAc3o2PSsjkdys93JrwJyHfMJyA1FB4JXLuuA=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=kI30Hjwbw91geCJa/8dNl5S87bFqI5nMGDQ1+WwmKGtKxL08YeLBJojtLbfcQs98D C5cN0zJpTB1aRMxr0wqYO7WU0I/rLki3v6MaGyzeDCCDV9AA1MM7UZr7cOCEaOniIR jZyAfWxpLfurqUeUCPDfXMYrrHRavn/eVyzgUJgs= Authentication-Results: smtp3h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r306312 - head To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609251639.u8PGdIfT005260@repo.freebsd.org> From: "Andrey V. Elsukov" Message-ID: <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> Date: Sun, 25 Sep 2016 20:41:32 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609251639.u8PGdIfT005260@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 25 Sep 2016 17:43:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO Content-Type: multipart/mixed; boundary="fKdQpVWdEE9sCMwjEWDf7OBDNkVEHBTG8" From: "Andrey V. Elsukov" To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> Subject: Re: svn commit: r306312 - head References: <201609251639.u8PGdIfT005260@repo.freebsd.org> In-Reply-To: <201609251639.u8PGdIfT005260@repo.freebsd.org> --fKdQpVWdEE9sCMwjEWDf7OBDNkVEHBTG8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 25.09.16 19:39, Marcel Moolenaar wrote: > +20160924: > + Relocatable object files with the extension of .So have been renamed > + to use an extension of .pico instead. The purpose of this change is > + to avoid a name clash with shared libraries on case-insensitive file > + systems. On those file systems, foo.So is the same file as foo.so. Hi, probably old *.So files now should be removed using `make delete-old` or something like this. --=20 WBR, Andrey V. Elsukov --fKdQpVWdEE9sCMwjEWDf7OBDNkVEHBTG8-- --iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEvBAEBCAAZBQJX6AxQEhxidTdjaGVyQHlhbmRleC5ydQAKCRABxeoEEMihehos CACqUYBRrDN8y5Dhj/VzY8PNQWfAtXLogVRMLdslHUP1nSi3lvY62PMvbo6+zMj6 AgXIr2XDMwzJrzY8YKcjcw/zLSuFtYY++ElGdl3Tmo5HD8tpLxHQXwpTWI+7vdVS igQ1B0cdjEY+H4JhIjFC/MB+NSmetu2Om/uzCc5S4ArDW1/OdPXHw7L+OMNLGOFO fP6joEsmApvvPtKfR9QCkFFkjvgwrhkBNdzFa3rkM3VoXsw1LmAJ7lwoOrff9Cnt /tPhjGcGeKVnAkFJ9f61G3OKCgjIV9C1NQIVHBntW4XxDrCOYnpUoSl4GCL5o4LI cfufPPnGyZlXpv5S5LwKcPbX =pbyq -----END PGP SIGNATURE----- --iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO-- From owner-svn-src-all@freebsd.org Sun Sep 25 17:55: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 68F7ABDE25F; Sun, 25 Sep 2016 17:55:54 +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 3B3371B0F; Sun, 25 Sep 2016 17:55:54 +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 u8PHtr7q034989; Sun, 25 Sep 2016 17:55:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PHtrmd034988; Sun, 25 Sep 2016 17:55:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609251755.u8PHtrmd034988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Sep 2016 17:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306315 - stable/11/sys/boot/efi/include X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 17:55:54 -0000 Author: kib Date: Sun Sep 25 17:55:53 2016 New Revision: 306315 URL: https://svnweb.freebsd.org/changeset/base/306315 Log: MFC r305941: Add double-inclusion protection. MFC r305947: Add comment for the closing guard. Modified: stable/11/sys/boot/efi/include/efilib.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/include/efilib.h ============================================================================== --- stable/11/sys/boot/efi/include/efilib.h Sun Sep 25 17:24:10 2016 (r306314) +++ stable/11/sys/boot/efi/include/efilib.h Sun Sep 25 17:55:53 2016 (r306315) @@ -27,6 +27,9 @@ * $FreeBSD$ */ +#ifndef _LOADER_EFILIB_H +#define _LOADER_EFILIB_H + #include extern EFI_HANDLE IH; @@ -61,3 +64,5 @@ void efi_time_fini(void); EFI_STATUS main(int argc, CHAR16 *argv[]); void exit(EFI_STATUS status); void delay(int usecs); + +#endif /* _LOADER_EFILIB_H */ From owner-svn-src-all@freebsd.org Sun Sep 25 17:57: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 AD9B8BDE3F2; Sun, 25 Sep 2016 17:57:54 +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 46D561DDF; Sun, 25 Sep 2016 17:57:54 +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 u8PHvrMa035110; Sun, 25 Sep 2016 17:57:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PHvrBC035105; Sun, 25 Sep 2016 17:57:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609251757.u8PHvrBC035105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Sep 2016 17:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306316 - in stable/11: sbin/sysctl sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/sys X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 17:57:54 -0000 Author: kib Date: Sun Sep 25 17:57:52 2016 New Revision: 306316 URL: https://svnweb.freebsd.org/changeset/base/306316 Log: MFC r305942: Consolidate four efi_next_descriptor() definitions. Modified: stable/11/sbin/sysctl/sysctl.c stable/11/sys/amd64/amd64/machdep.c stable/11/sys/arm/arm/machdep.c stable/11/sys/arm64/arm64/machdep.c stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/sysctl/sysctl.c ============================================================================== --- stable/11/sbin/sysctl/sysctl.c Sun Sep 25 17:55:53 2016 (r306315) +++ stable/11/sbin/sysctl/sysctl.c Sun Sep 25 17:57:52 2016 (r306316) @@ -637,9 +637,6 @@ S_vmtotal(size_t l2, void *p) } #ifdef __amd64__ -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static int S_efi_map(size_t l2, void *p) { Modified: stable/11/sys/amd64/amd64/machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/machdep.c Sun Sep 25 17:55:53 2016 (r306315) +++ stable/11/sys/amd64/amd64/machdep.c Sun Sep 25 17:57:52 2016 (r306316) @@ -1064,9 +1064,6 @@ bios_add_smap_entries(struct bios_smap * } } -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, int *physmap_idx) Modified: stable/11/sys/arm/arm/machdep.c ============================================================================== --- stable/11/sys/arm/arm/machdep.c Sun Sep 25 17:55:53 2016 (r306315) +++ stable/11/sys/arm/arm/machdep.c Sun Sep 25 17:57:52 2016 (r306316) @@ -1398,9 +1398,6 @@ set_stackptrs(int cpu) #endif #ifdef EFI -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, int *mrcnt) Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Sun Sep 25 17:55:53 2016 (r306315) +++ stable/11/sys/arm64/arm64/machdep.c Sun Sep 25 17:57:52 2016 (r306316) @@ -690,9 +690,6 @@ add_fdt_mem_regions(struct mem_region *m } #endif -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, u_int *physmap_idxp) Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Sun Sep 25 17:55:53 2016 (r306315) +++ stable/11/sys/sys/efi.h Sun Sep 25 17:57:52 2016 (r306316) @@ -85,6 +85,9 @@ struct efi_md { #define EFI_MD_ATTR_RT 0x8000000000000000UL }; +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *)(ptr)) + (size))) + struct efi_tm { uint16_t tm_year; /* 1998 - 20XX */ uint8_t tm_mon; /* 1 - 12 */ From owner-svn-src-all@freebsd.org Sun Sep 25 17:58: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 CF4FCBDE494; Sun, 25 Sep 2016 17:58:56 +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 8F0461F36; Sun, 25 Sep 2016 17:58:56 +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 u8PHwtou035197; Sun, 25 Sep 2016 17:58:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PHwtMo035196; Sun, 25 Sep 2016 17:58:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609251758.u8PHwtMo035196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Sep 2016 17:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306317 - stable/11/sys/boot/efi/loader/arch/amd64 X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 17:58:56 -0000 Author: kib Date: Sun Sep 25 17:58:55 2016 New Revision: 306317 URL: https://svnweb.freebsd.org/changeset/base/306317 Log: MFC r305943: Utilize pmap.h names. Modified: stable/11/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c ============================================================================== --- stable/11/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Sun Sep 25 17:57:52 2016 (r306316) +++ stable/11/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Sun Sep 25 17:58:55 2016 (r306317) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -57,8 +59,14 @@ extern int bi_load(char *args, vm_offset static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); -static struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; -static struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; +static struct file_format amd64_elf = { + .l_load = elf64_loadfile, + .l_exec = elf64_exec, +}; +static struct file_format amd64_elf_obj = { + .l_load = elf64_obj_loadfile, + .l_exec = elf64_obj_exec, +}; struct file_format *file_formats[] = { &amd64_elf, @@ -66,21 +74,12 @@ struct file_format *file_formats[] = { NULL }; -#define PG_V 0x001 -#define PG_RW 0x002 -#define PG_U 0x004 -#define PG_PS 0x080 - -typedef u_int64_t p4_entry_t; -typedef u_int64_t p3_entry_t; -typedef u_int64_t p2_entry_t; -static p4_entry_t *PT4; -static p3_entry_t *PT3; -static p2_entry_t *PT2; +static pml4_entry_t *PT4; +static pdp_entry_t *PT3; +static pd_entry_t *PT2; static void (*trampoline)(uint64_t stack, void *copy_finish, uint64_t kernend, - uint64_t modulep, p4_entry_t *pagetable, - uint64_t entry); + uint64_t modulep, pml4_entry_t *pagetable, uint64_t entry); extern uintptr_t amd64_tramp; extern uint32_t amd64_tramp_size; @@ -157,7 +156,7 @@ elf64_exec(struct preloaded_file *fp) bcopy((void *)&amd64_tramp, (void *)trampcode, amd64_tramp_size); trampoline = (void *)trampcode; - PT4 = (p4_entry_t *)0x0000000040000000; + PT4 = (pml4_entry_t *)0x0000000040000000; err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 3, (EFI_PHYSICAL_ADDRESS *)&PT4); bzero(PT4, 3 * EFI_PAGE_SIZE); @@ -172,11 +171,11 @@ elf64_exec(struct preloaded_file *fp) */ for (i = 0; i < 512; i++) { /* Each slot of the L4 pages points to the same L3 page. */ - PT4[i] = (p4_entry_t)PT3; + PT4[i] = (pml4_entry_t)PT3; PT4[i] |= PG_V | PG_RW | PG_U; /* Each slot of the L3 pages points to the same L2 page. */ - PT3[i] = (p3_entry_t)PT2; + PT3[i] = (pdp_entry_t)PT2; PT3[i] |= PG_V | PG_RW | PG_U; /* The L2 page slots are mapped with 2MB pages for 1GB. */ @@ -204,5 +203,6 @@ elf64_exec(struct preloaded_file *fp) static int elf64_obj_exec(struct preloaded_file *fp) { + return (EFTYPE); } From owner-svn-src-all@freebsd.org Sun Sep 25 18:29: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 20F8CBE9104; Sun, 25 Sep 2016 18:29:04 +0000 (UTC) (envelope-from tijl@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 E573C231; Sun, 25 Sep 2016 18:29:03 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PIT3iI046703; Sun, 25 Sep 2016 18:29:03 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PIT33V046702; Sun, 25 Sep 2016 18:29:03 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201609251829.u8PIT33V046702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sun, 25 Sep 2016 18:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306318 - head/sys/i386/i386 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.23 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, 25 Sep 2016 18:29:04 -0000 Author: tijl Date: Sun Sep 25 18:29:02 2016 New Revision: 306318 URL: https://svnweb.freebsd.org/changeset/base/306318 Log: MFamd64: r266901 Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com MFC after: 2 weeks Modified: head/sys/i386/i386/sys_machdep.c Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Sun Sep 25 17:58:55 2016 (r306317) +++ head/sys/i386/i386/sys_machdep.c Sun Sep 25 18:29:02 2016 (r306318) @@ -438,7 +438,7 @@ user_ldt_alloc(struct mdproc *mdp, int l new_ldt->ldt_len = len = NEW_MAX_LD(len); new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena, - len * sizeof(union descriptor), M_WAITOK); + len * sizeof(union descriptor), M_WAITOK | M_ZERO); new_ldt->ldt_refcnt = 1; new_ldt->ldt_active = 0; From owner-svn-src-all@freebsd.org Sun Sep 25 18:39: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 7F744BE9573; Sun, 25 Sep 2016 18:39:25 +0000 (UTC) (envelope-from bde@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 36B9DAF0; Sun, 25 Sep 2016 18:39:25 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PIdOaT050381; Sun, 25 Sep 2016 18:39:24 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PIdO7t050380; Sun, 25 Sep 2016 18:39:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609251839.u8PIdO7t050380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 25 Sep 2016 18:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306319 - head/sys/i386/i386 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.23 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, 25 Sep 2016 18:39:25 -0000 Author: bde Date: Sun Sep 25 18:39:24 2016 New Revision: 306319 URL: https://svnweb.freebsd.org/changeset/base/306319 Log: Minor fixes for 160-bit disassembly: (1) Print the default segment %ss before adresses relative to %bp. This is too cluttered for me, but so is printing some other default prefixes, and this is a reasonable reminder that %ss is quite likely to be different from %ds in 16-bit mode. db_disasm still handles prefixes poorly, by trying to discard redundant ones. This loses information, and sometimes the result is wrong or misleading. Clean up nearby initializations and dead code. (2) Fix decoding of operand and address size prefixes in 16-bit mode. They reverse the default in all modes. Obtained from: (1) is partly from r1.4 (2003/11/08) in DFlyBSD (?) Modified: head/sys/i386/i386/db_disasm.c Modified: head/sys/i386/i386/db_disasm.c ============================================================================== --- head/sys/i386/i386/db_disasm.c Sun Sep 25 18:29:02 2016 (r306318) +++ head/sys/i386/i386/db_disasm.c Sun Sep 25 18:39:24 2016 (r306319) @@ -884,6 +884,7 @@ struct i_addr { const char * base; const char * index; int ss; + bool defss; /* set if %ss is the default segment */ }; static const char * const db_index_reg_16[8] = { @@ -955,10 +956,12 @@ db_read_address(loc, short_addr, regmodr } addrp->is_reg = FALSE; addrp->index = NULL; + addrp->ss = 0; + addrp->defss = FALSE; if (short_addr) { - addrp->index = NULL; - addrp->ss = 0; + if (rm == 2 || rm == 3 || (rm == 6 && mod != 0)) + addrp->defss = TRUE; switch (mod) { case 0: if (rm == 6) { @@ -985,7 +988,7 @@ db_read_address(loc, short_addr, regmodr } } else { - if (mod != 3 && rm == 4) { + if (rm == 4) { get_value_inc(sib, loc, 1, FALSE); rm = sib_base(sib); index = sib_index(sib); @@ -1036,6 +1039,9 @@ db_print_address(seg, size, addrp) if (seg) { db_printf("%s:", seg); } + else if (addrp->defss) { + db_printf("%%ss:"); + } db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); if (addrp->base != NULL || addrp->index != NULL) { @@ -1189,11 +1195,11 @@ db_disasm(db_addr_t loc, bool altfmt) prefix = TRUE; do { switch (inst) { - case 0x66: /* data16 */ - size = WORD; + case 0x66: + size = (altfmt ? LONG : WORD); break; case 0x67: - short_addr = TRUE; + short_addr = !altfmt; break; case 0x26: seg = "%es"; From owner-svn-src-all@freebsd.org Sun Sep 25 19:13: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 8D7C5BE9E1E; Sun, 25 Sep 2016 19:13:08 +0000 (UTC) (envelope-from avos@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 5CBD6B26; Sun, 25 Sep 2016 19:13:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PJD7Y8064894; Sun, 25 Sep 2016 19:13:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PJD7QA064893; Sun, 25 Sep 2016 19:13:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609251913.u8PJD7QA064893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 25 Sep 2016 19:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306320 - head/sys/dev/usb/wlan 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.23 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, 25 Sep 2016 19:13:08 -0000 Author: avos Date: Sun Sep 25 19:13:07 2016 New Revision: 306320 URL: https://svnweb.freebsd.org/changeset/base/306320 Log: rsu: do not restart calibration task when going out of RUN state. Clear 'sc_calibrating' flag and stop calibration task when interface is not associated; this fixes possible panic after detach. Reported and tested by: hselasky Reviewed by: adrian MFC after: 6 days Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 25 18:39:24 2016 (r306319) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 25 19:13:07 2016 (r306320) @@ -1270,9 +1270,12 @@ rsu_newstate(struct ieee80211vap *vap, e default: break; } - sc->sc_calibrating = 1; - /* Start periodic calibration. */ - taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz); + if (startcal != 0) { + sc->sc_calibrating = 1; + /* Start periodic calibration. */ + taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, + hz); + } RSU_UNLOCK(sc); IEEE80211_LOCK(ic); return (uvp->newstate(vap, nstate, arg)); From owner-svn-src-all@freebsd.org Sun Sep 25 19:58:11 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 DEE41BE9A55 for ; Sun, 25 Sep 2016 19:58:11 +0000 (UTC) (envelope-from 0100015762ed08e1-65d5886b-6279-46c1-8ac9-16761a78a4ad-000000@amazonses.com) Received: from a8-56.smtp-out.amazonses.com (a8-56.smtp-out.amazonses.com [54.240.8.56]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5D02D50 for ; Sun, 25 Sep 2016 19:58:11 +0000 (UTC) (envelope-from 0100015762ed08e1-65d5886b-6279-46c1-8ac9-16761a78a4ad-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1474833484; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=PmxC31rIYZwY0rs2B7+gZ5XE3YJ4oMfPG47V43KpdEQ=; b=bIzf7GohImnaLPizCG8HFTJqMP0jHal6T0ETwxoDCbobND5UsRJwhzdHOTAJfEHj VkdprTiuwRmJlJe9A9ZI1IyrE8eDeYpInsOpOC6iog4H+XsN+T7/Xnbr5zWV3adB2ex hBr3ztE2dnVvVg6hTiZ22K8dq6qmlbFvaoYfknpA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1474833484; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=PmxC31rIYZwY0rs2B7+gZ5XE3YJ4oMfPG47V43KpdEQ=; b=W2Ygr6hv+h9ttogXAfNLITE0fmc9G3//u1xXiLnBSNVVFDktXfobKvDaV11vOMDu qiUIHY3971303OzLu6zeKr1tVdOLslFm8MIKEKARBZp86EAp40J4XWi3RWOHN0AGbdt 0fvjlPdHd4TdezJWQGASm7Jw5J/aROqKMagC/jWY= Subject: Re: svn commit: r306319 - head/sys/i386/i386 To: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609251839.u8PIdO7t050380@repo.freebsd.org> From: Colin Percival Message-ID: <0100015762ed08e1-65d5886b-6279-46c1-8ac9-16761a78a4ad-000000@email.amazonses.com> Date: Sun, 25 Sep 2016 19:58:04 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609251839.u8PIdO7t050380@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.09.25-54.240.8.56 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 25 Sep 2016 19:58:12 -0000 On 09/25/16 11:39, Bruce Evans wrote: > Author: bde > Date: Sun Sep 25 18:39:24 2016 > New Revision: 306319 > URL: https://svnweb.freebsd.org/changeset/base/306319 > > Log: > Minor fixes for 160-bit disassembly: I thought the x86 architecture was limited to 120-bit instructions? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Sun Sep 25 22:02: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 85087BEA411; Sun, 25 Sep 2016 22:02:29 +0000 (UTC) (envelope-from mm@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 221A2283; Sun, 25 Sep 2016 22:02:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PM2SEL028774; Sun, 25 Sep 2016 22:02:28 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PM2RDA028766; Sun, 25 Sep 2016 22:02:27 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201609252202.u8PM2RDA028766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sun, 25 Sep 2016 22:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306321 - in stable/11: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Group: stable-11 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.23 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, 25 Sep 2016 22:02:29 -0000 Author: mm Date: Sun Sep 25 22:02:27 2016 New Revision: 306321 URL: https://svnweb.freebsd.org/changeset/base/306321 Log: MFC r305819: Sync libarchive with vendor including important security fixes. Issues fixed (FreeBSD): PR #778: ACL error handling Issue #745: Symlink check prefix optimization is too aggressive Issue #746: Hard links with data can evade sandboxing restrictions This update fixes the vulnerability #3 and vulnerability #4 as reported in "non-cryptanalytic attacks against FreeBSD update components". https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f Fix for vulnerability #2 has already been merged in r305188. Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f Modified: stable/11/contrib/libarchive/libarchive/archive_platform.h stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/11/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/11/contrib/libarchive/libarchive/test/test_write_disk_secure745.c stable/11/contrib/libarchive/libarchive/test/test_write_disk_secure746.c stable/11/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c stable/11/lib/libarchive/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_platform.h Sun Sep 25 19:13:07 2016 (r306320) +++ stable/11/contrib/libarchive/libarchive/archive_platform.h Sun Sep 25 22:02:27 2016 (r306321) @@ -159,6 +159,15 @@ #define CAN_RESTORE_METADATA_FD #endif +/* + * glibc 2.24 deprecates readdir_r + */ +#if defined(HAVE_READDIR_R) && (!defined(__GLIBC__) || !defined(__GLIBC_MINOR__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24)) +#define USE_READDIR_R 1 +#else +#undef USE_READDIR_R +#endif + /* Set up defaults for internal error codes. */ #ifndef ARCHIVE_ERRNO_FILE_FORMAT #if HAVE_EFTYPE Modified: stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Sun Sep 25 19:13:07 2016 (r306320) +++ stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Sun Sep 25 22:02:27 2016 (r306321) @@ -411,9 +411,7 @@ setup_acls(struct archive_read_disk *a, { const char *accpath; acl_t acl; -#if HAVE_ACL_IS_TRIVIAL_NP int r; -#endif accpath = archive_entry_sourcepath(entry); if (accpath == NULL) @@ -473,9 +471,13 @@ setup_acls(struct archive_read_disk *a, } #endif if (acl != NULL) { - translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); acl_free(acl); - return (ARCHIVE_OK); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate NFSv4 ACLs: %s", accpath); + } + return (r); } #endif /* ACL_TYPE_NFS4 */ @@ -506,19 +508,30 @@ setup_acls(struct archive_read_disk *a, #endif if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); acl_free(acl); acl = NULL; + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate access ACLs: %s", accpath); + return (r); + } } /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_DEFAULT); acl_free(acl); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate default ACLs: %s", + accpath); + return (r); + } } } return (ARCHIVE_OK); @@ -574,19 +587,23 @@ translate_acl(struct archive_read_disk * #ifdef ACL_TYPE_NFS4 acl_entry_type_t acl_type; acl_flagset_t acl_flagset; - int brand, r; + int brand; #endif acl_entry_t acl_entry; acl_permset_t acl_permset; int i, entry_acl_type; - int s, ae_id, ae_tag, ae_perm; + int r, s, ae_id, ae_tag, ae_perm; const char *ae_name; #ifdef ACL_TYPE_NFS4 // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 // Make sure the "brand" on this ACL is consistent // with the default_entry_acl_type bits provided. - acl_get_brand_np(acl, &brand); + if (acl_get_brand_np(acl, &brand) != 0) { + archive_set_error(&a->archive, errno, + "Failed to read ACL brand"); + return (ARCHIVE_WARN); + } switch (brand) { case ACL_BRAND_POSIX: switch (default_entry_acl_type) { @@ -594,31 +611,43 @@ translate_acl(struct archive_read_disk * case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for POSIX.1e ACL"); + return (ARCHIVE_WARN); } break; case ACL_BRAND_NFS4: if (default_entry_acl_type & ~ARCHIVE_ENTRY_ACL_TYPE_NFS4) { - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for NFSv4 ACL"); + return (ARCHIVE_WARN); } break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Unknown ACL brand"); + return (ARCHIVE_WARN); break; } #endif s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get first ACL entry"); + return (ARCHIVE_WARN); + } while (s == 1) { ae_id = -1; ae_name = NULL; ae_perm = 0; - acl_get_tag_type(acl_entry, &acl_tag); + if (acl_get_tag_type(acl_entry, &acl_tag) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL tag type"); + return (ARCHIVE_WARN); + } switch (acl_tag) { case ACL_USER: ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry); @@ -653,13 +682,18 @@ translate_acl(struct archive_read_disk * continue; } - // XXX acl type maps to allow/deny/audit/YYYY bits - // XXX acl_get_entry_type_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs + // XXX acl_type maps to allow/deny/audit/YYYY bits entry_acl_type = default_entry_acl_type; #ifdef ACL_TYPE_NFS4 - r = acl_get_entry_type_np(acl_entry, &acl_type); - if (r == 0) { + if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_entry_type_np() falis with non-NFSv4 ACLs + */ + if (acl_get_entry_type_np(acl_entry, &acl_type) != 0) { + archive_set_error(&a->archive, errno, "Failed " + "to get ACL type from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } switch (acl_type) { case ACL_ENTRY_TYPE_ALLOW: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; @@ -673,32 +707,53 @@ translate_acl(struct archive_read_disk * case ACL_ENTRY_TYPE_ALARM: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; break; + default: + archive_set_error(&a->archive, errno, + "Invalid NFSv4 ACL entry type"); + return (ARCHIVE_WARN); } - } - /* - * Libarchive stores "flag" (NFSv4 inheritance bits) - * in the ae_perm bitmap. - */ - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { + /* + * Libarchive stores "flag" (NFSv4 inheritance bits) + * in the ae_perm bitmap. + * + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get flagset from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (acl_get_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit)) + r = acl_get_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check flag in a NFSv4 " + "ACL flagset"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_inherit_map[i].archive_inherit; } } #endif - acl_get_permset(acl_entry, &acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL permission set"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { /* * acl_get_perm() is spelled differently on different * platforms; see above. */ - if (ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm)) + r = ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check permission in an ACL permission set"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_perm_map[i].archive_perm; } @@ -707,6 +762,11 @@ translate_acl(struct archive_read_disk * ae_id, ae_name); s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get next ACL entry"); + return (ARCHIVE_WARN); + } } return (ARCHIVE_OK); } Modified: stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c Sun Sep 25 19:13:07 2016 (r306320) +++ stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c Sun Sep 25 22:02:27 2016 (r306321) @@ -165,7 +165,7 @@ struct filesystem { int synthetic; int remote; int noatime; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t name_max; #endif long incr_xfer_size; @@ -200,7 +200,7 @@ struct tree { DIR *d; #define INVALID_DIR_HANDLE NULL struct dirent *de; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) struct dirent *dirent; size_t dirent_allocated; #endif @@ -1592,7 +1592,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ #if defined(HAVE_STRUCT_STATFS_F_NAMEMAX) t->current_filesystem->name_max = sfs.f_namemax; @@ -1615,7 +1615,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; #endif -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -1817,7 +1817,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namelen; #endif @@ -1901,7 +1901,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namemax; #endif @@ -1918,7 +1918,7 @@ static int setup_current_filesystem(struct archive_read_disk *a) { struct tree *t = a->tree; -#if defined(_PC_NAME_MAX) && defined(HAVE_READDIR_R) +#if defined(_PC_NAME_MAX) && defined(USE_READDIR_R) long nm; #endif t->current_filesystem->synthetic = -1;/* Not supported */ @@ -1930,7 +1930,7 @@ setup_current_filesystem(struct archive_ t->current_filesystem->min_xfer_size = -1; t->current_filesystem->incr_xfer_size = -1; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ # if defined(_PC_NAME_MAX) if (tree_current_is_symblic_link_target(t)) { @@ -1958,7 +1958,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; # endif /* _PC_NAME_MAX */ -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -2366,7 +2366,7 @@ tree_dir_next_posix(struct tree *t) size_t namelen; if (t->d == NULL) { -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t dirent_size; #endif @@ -2387,7 +2387,7 @@ tree_dir_next_posix(struct tree *t) t->visit_type = r != 0 ? r : TREE_ERROR_DIR; return (t->visit_type); } -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) dirent_size = offsetof(struct dirent, d_name) + t->filesystem_table[t->current->filesystem_id].name_max + 1; if (t->dirent == NULL || t->dirent_allocated < dirent_size) { @@ -2404,11 +2404,11 @@ tree_dir_next_posix(struct tree *t) } t->dirent_allocated = dirent_size; } -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ } for (;;) { errno = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) r = readdir_r(t->d, t->dirent, &t->de); #ifdef _AIX /* Note: According to the man page, return value 9 indicates @@ -2660,7 +2660,7 @@ tree_free(struct tree *t) if (t == NULL) return; archive_string_free(&t->path); -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) free(t->dirent); #endif free(t->sparse_list); Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sun Sep 25 19:13:07 2016 (r306320) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sun Sep 25 22:02:27 2016 (r306321) @@ -136,6 +136,7 @@ struct tar { int64_t entry_padding; int64_t entry_bytes_unconsumed; int64_t realsize; + int sparse_allowed; struct sparse_block *sparse_list; struct sparse_block *sparse_last; int64_t sparse_offset; @@ -1271,6 +1272,14 @@ header_common(struct archive_read *a, st * sparse information in the extended area. */ /* FALLTHROUGH */ + case '0': + /* + * Enable sparse file "read" support only for regular + * files and explicit GNU sparse files. However, we + * don't allow non-standard file types to be sparse. + */ + tar->sparse_allowed = 1; + /* FALLTHROUGH */ default: /* Regular file and non-standard types */ /* * Per POSIX: non-recognized types should always be @@ -1730,6 +1739,14 @@ pax_attribute(struct archive_read *a, st #endif switch (key[0]) { case 'G': + /* Reject GNU.sparse.* headers on non-regular files. */ + if (strncmp(key, "GNU.sparse", 10) == 0 && + !tar->sparse_allowed) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Non-regular file cannot be sparse"); + return (ARCHIVE_FATAL); + } + /* GNU "0.0" sparse pax format. */ if (strcmp(key, "GNU.sparse.numblocks") == 0) { tar->sparse_offset = -1; Modified: stable/11/contrib/libarchive/libarchive/archive_write_disk_acl.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_write_disk_acl.c Sun Sep 25 19:13:07 2016 (r306320) +++ stable/11/contrib/libarchive/libarchive/archive_write_disk_acl.c Sun Sep 25 22:02:27 2016 (r306321) @@ -153,9 +153,19 @@ set_acl(struct archive *a, int fd, const if (entries == 0) return (ARCHIVE_OK); acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { - acl_create_entry(&acl, &acl_entry); + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } switch (ae_tag) { case ARCHIVE_ENTRY_ACL_USER: @@ -186,53 +196,96 @@ set_acl(struct archive *a, int fd, const break; #endif default: - /* XXX */ - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; } #ifdef ACL_TYPE_NFS4 + r = 0; switch (ae_type) { case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); break; case ARCHIVE_ENTRY_ACL_TYPE_DENY: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); break; case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); break; case ARCHIVE_ENTRY_ACL_TYPE_ALARM: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); break; case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: // These don't translate directly into the system ACL. break; default: - // XXX error handling here. - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (r != 0) { + archive_set_error(a, errno, + "Failed to set ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; } #endif - acl_get_permset(acl_entry, &acl_permset); - acl_clear_perms(acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { if (ae_permset & acl_perm_map[i].archive_perm) - acl_add_perm(acl_permset, - acl_perm_map[i].platform_perm); + if (acl_add_perm(acl_permset, + acl_perm_map[i].platform_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } } #ifdef ACL_TYPE_NFS4 - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { - acl_clear_flags_np(acl_flagset); + if (acl_type == ACL_TYPE_NFS4) { + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (ae_permset & acl_inherit_map[i].archive_inherit) - acl_add_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit); + if (ae_permset & acl_inherit_map[i].archive_inherit) { + if (acl_add_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit) != 0) { + archive_set_error(a, errno, + "Failed to add flag to NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } } } #endif @@ -262,6 +315,7 @@ set_acl(struct archive *a, int fd, const ret = ARCHIVE_WARN; } #endif +exit_free: acl_free(acl); return (ret); } Modified: stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c Sun Sep 25 19:13:07 2016 (r306320) +++ stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c Sun Sep 25 22:02:27 2016 (r306321) @@ -140,7 +140,17 @@ __FBSDID("$FreeBSD$"); #define O_BINARY 0 #endif #ifndef O_CLOEXEC -#define O_CLOEXEC 0 +#define O_CLOEXEC 0 +#endif + +/* Ignore non-int O_NOFOLLOW constant. */ +/* gnulib's fcntl.h does this on AIX, but it seems practical everywhere */ +#if defined O_NOFOLLOW && !(INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) +#undef O_NOFOLLOW +#endif + +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 #endif struct fixup_entry { @@ -326,12 +336,14 @@ struct archive_write_disk { #define HFS_BLOCKS(s) ((s) >> 12) +static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int check_symlinks(struct archive_write_disk *); static int create_filesystem_object(struct archive_write_disk *); static struct fixup_entry *current_fixup(struct archive_write_disk *, const char *pathname); #if defined(HAVE_FCHDIR) && defined(PATH_MAX) static void edit_deep_directories(struct archive_write_disk *ad); #endif +static int cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int cleanup_pathname(struct archive_write_disk *); static int create_dir(struct archive_write_disk *, char *); static int create_parent_dir(struct archive_write_disk *, char *); @@ -2014,6 +2026,10 @@ create_filesystem_object(struct archive_ const char *linkname; mode_t final_mode, mode; int r; + /* these for check_symlinks_fsobj */ + char *linkname_copy; /* non-const copy of linkname */ + struct archive_string error_string; + int error_number; /* We identify hard/symlinks according to the link names. */ /* Since link(2) and symlink(2) don't handle modes, we're done here. */ @@ -2022,6 +2038,27 @@ create_filesystem_object(struct archive_ #if !HAVE_LINK return (EPERM); #else + archive_string_init(&error_string); + linkname_copy = strdup(linkname); + if (linkname_copy == NULL) { + return (EPERM); + } + /* TODO: consider using the cleaned-up path as the link target? */ + r = cleanup_pathname_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + r = check_symlinks_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + free(linkname_copy); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries @@ -2040,7 +2077,7 @@ create_filesystem_object(struct archive_ a->deferred = 0; } else if (r == 0 && a->filesize > 0) { a->fd = open(a->name, - O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC); + O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC | O_NOFOLLOW); __archive_ensure_cloexec_flag(a->fd); if (a->fd < 0) r = errno; @@ -2351,126 +2388,233 @@ current_fixup(struct archive_write_disk return (a->current_fixup); } -/* TODO: Make this work. */ -/* - * TODO: The deep-directory support bypasses this; disable deep directory - * support if we're doing symlink checks. - */ /* * TODO: Someday, integrate this with the deep dir support; they both * scan the path and both can be optimized by comparing against other * recent paths. */ /* TODO: Extend this to support symlinks on Windows Vista and later. */ + +/* + * Checks the given path to see if any elements along it are symlinks. Returns + * ARCHIVE_OK if there are none, otherwise puts an error in errmsg. + */ static int -check_symlinks(struct archive_write_disk *a) +check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { #if !defined(HAVE_LSTAT) /* Platform doesn't have lstat, so we can't look for symlinks. */ - (void)a; /* UNUSED */ + (void)path; /* UNUSED */ + (void)error_number; /* UNUSED */ + (void)error_string; /* UNUSED */ + (void)flags; /* UNUSED */ return (ARCHIVE_OK); #else - char *pn; + int res = ARCHIVE_OK; + char *tail; + char *head; + int last; char c; int r; struct stat st; + int restore_pwd; + + /* Nothing to do here if name is empty */ + if(path[0] == '\0') + return (ARCHIVE_OK); /* * Guard against symlink tricks. Reject any archive entry whose * destination would be altered by a symlink. - */ - /* Whatever we checked last time doesn't need to be re-checked. */ - pn = a->name; - if (archive_strlen(&(a->path_safe)) > 0) { - char *p = a->path_safe.s; - while ((*pn != '\0') && (*p == *pn)) - ++p, ++pn; - } + * + * Walk the filename in chunks separated by '/'. For each segment: + * - if it doesn't exist, continue + * - if it's symlink, abort or remove it + * - if it's a directory and it's not the last chunk, cd into it + * As we go: + * head points to the current (relative) path + * tail points to the temporary \0 terminating the segment we're currently examining + * c holds what used to be in *tail + * last is 1 if this is the last tail + */ + restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); + __archive_ensure_cloexec_flag(restore_pwd); + if (restore_pwd < 0) + return (ARCHIVE_FATAL); + head = path; + tail = path; + last = 0; + /* TODO: reintroduce a safe cache here? */ /* Skip the root directory if the path is absolute. */ - if(pn == a->name && pn[0] == '/') - ++pn; - c = pn[0]; - /* Keep going until we've checked the entire name. */ - while (pn[0] != '\0' && (pn[0] != '/' || pn[1] != '\0')) { + if(tail == path && tail[0] == '/') + ++tail; + /* Keep going until we've checked the entire name. + * head, tail, path all alias the same string, which is + * temporarily zeroed at tail, so be careful restoring the + * stashed (c=tail[0]) for error messages. + * Exiting the loop with break is okay; continue is not. + */ + while (!last) { + /* Skip the separator we just consumed, plus any adjacent ones */ + while (*tail == '/') + ++tail; /* Skip the next path element. */ - while (*pn != '\0' && *pn != '/') - ++pn; - c = pn[0]; - pn[0] = '\0'; + while (*tail != '\0' && *tail != '/') + ++tail; + /* is this the last path component? */ + last = (tail[0] == '\0') || (tail[0] == '/' && tail[1] == '\0'); + /* temporarily truncate the string here */ + c = tail[0]; + tail[0] = '\0'; /* Check that we haven't hit a symlink. */ - r = lstat(a->name, &st); + r = lstat(head, &st); if (r != 0) { + tail[0] = c; /* We've hit a dir that doesn't exist; stop now. */ if (errno == ENOENT) { break; } else { - /* Note: This effectively disables deep directory + /* Treat any other error as fatal - best to be paranoid here + * Note: This effectively disables deep directory * support when security checks are enabled. * Otherwise, very long pathnames that trigger * an error here could evade the sandbox. * TODO: We could do better, but it would probably * require merging the symlink checks with the * deep-directory editing. */ - return (ARCHIVE_FAILED); + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not stat %s", + path); + res = ARCHIVE_FAILED; + break; + } + } else if (S_ISDIR(st.st_mode)) { + if (!last) { + if (chdir(head) != 0) { + tail[0] = c; + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not chdir %s", + path); + res = (ARCHIVE_FATAL); + break; + } + /* Our view is now from inside this dir: */ + head = tail + 1; } } else if (S_ISLNK(st.st_mode)) { - if (c == '\0') { + if (last) { /* * Last element is symlink; remove it * so we can overwrite it with the * item being extracted. */ - if (unlink(a->name)) { - archive_set_error(&a->archive, errno, - "Could not remove symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + if (unlink(head)) { + tail[0] = c; + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not remove symlink %s", + path); + res = ARCHIVE_FAILED; + break; } - a->pst = NULL; /* * Even if we did remove it, a warning * is in order. The warning is silly, * though, if we're just replacing one * symlink with another symlink. */ - if (!S_ISLNK(a->mode)) { - archive_set_error(&a->archive, 0, - "Removing symlink %s", - a->name); + tail[0] = c; + /* FIXME: not sure how important this is to restore + if (!S_ISLNK(path)) { + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Removing symlink %s", + path); } + */ /* Symlink gone. No more problem! */ - pn[0] = c; - return (0); - } else if (a->flags & ARCHIVE_EXTRACT_UNLINK) { + res = ARCHIVE_OK; + break; + } else if (flags & ARCHIVE_EXTRACT_UNLINK) { /* User asked us to remove problems. */ - if (unlink(a->name) != 0) { - archive_set_error(&a->archive, 0, - "Cannot remove intervening symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + if (unlink(head) != 0) { + tail[0] = c; + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Cannot remove intervening symlink %s", + path); + res = ARCHIVE_FAILED; + break; } - a->pst = NULL; + tail[0] = c; } else { - archive_set_error(&a->archive, 0, - "Cannot extract through symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + tail[0] = c; + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Cannot extract through symlink %s", + path); + res = ARCHIVE_FAILED; + break; } } - pn[0] = c; - if (pn[0] != '\0') - pn++; /* Advance to the next segment. */ - } - pn[0] = c; - /* We've checked and/or cleaned the whole path, so remember it. */ - archive_strcpy(&a->path_safe, a->name); - return (ARCHIVE_OK); + /* be sure to always maintain this */ + tail[0] = c; + if (tail[0] != '\0') + tail++; /* Advance to the next segment. */ + } + /* Catches loop exits via break */ + tail[0] = c; +#ifdef HAVE_FCHDIR + /* If we changed directory above, restore it here. */ + if (restore_pwd >= 0) { + r = fchdir(restore_pwd); + if (r != 0) { + if(error_number) *error_number = errno; + if(error_string) + archive_string_sprintf(error_string, + "chdir() failure"); + } + close(restore_pwd); + restore_pwd = -1; + if (r != 0) { + res = (ARCHIVE_FATAL); + } + } +#endif + /* TODO: reintroduce a safe cache here? */ + return res; #endif } +/* + * Check a->name for symlinks, returning ARCHIVE_OK if its clean, otherwise + * calls archive_set_error and returns ARCHIVE_{FATAL,FAILED} + */ +static int +check_symlinks(struct archive_write_disk *a) +{ + struct archive_string error_string; + int error_number; + int rc; + archive_string_init(&error_string); + rc = check_symlinks_fsobj(a->name, &error_number, &error_string, a->flags); + if (rc != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + } + archive_string_free(&error_string); + a->pst = NULL; /* to be safe */ + return rc; +} + + #if defined(__CYGWIN__) /* * 1. Convert a path separator from '\' to '/' . @@ -2544,15 +2688,17 @@ cleanup_pathname_win(struct archive_writ * is set) if the path is absolute. */ static int -cleanup_pathname(struct archive_write_disk *a) +cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { char *dest, *src; char separator = '\0'; - dest = src = a->name; + dest = src = path; if (*src == '\0') { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid empty pathname"); + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; + if (error_string) + archive_string_sprintf(error_string, + "Invalid empty pathname"); return (ARCHIVE_FAILED); } @@ -2561,9 +2707,11 @@ cleanup_pathname(struct archive_write_di #endif /* Skip leading '/'. */ if (*src == '/') { - if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Path is absolute"); + if (flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; + if (error_string) + archive_string_sprintf(error_string, + "Path is absolute"); return (ARCHIVE_FAILED); } @@ -2590,10 +2738,11 @@ cleanup_pathname(struct archive_write_di } else if (src[1] == '.') { if (src[2] == '/' || src[2] == '\0') { /* Conditionally warn about '..' */ - if (a->flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) { - archive_set_error(&a->archive, - ARCHIVE_ERRNO_MISC, - "Path contains '..'"); + if (flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) { + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 25 22:04: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 DC4D6BEA48A; Sun, 25 Sep 2016 22:04:03 +0000 (UTC) (envelope-from mm@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 7F90862C; Sun, 25 Sep 2016 22:04:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PM42re028878; Sun, 25 Sep 2016 22:04:02 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PM426S028871; Sun, 25 Sep 2016 22:04:02 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201609252204.u8PM426S028871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sun, 25 Sep 2016 22:04: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: r306322 - in stable/10: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests 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.23 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, 25 Sep 2016 22:04:04 -0000 Author: mm Date: Sun Sep 25 22:04:02 2016 New Revision: 306322 URL: https://svnweb.freebsd.org/changeset/base/306322 Log: MFC r305819: Sync libarchive with vendor including important security fixes. Issues fixed (FreeBSD): PR #778: ACL error handling Issue #745: Symlink check prefix optimization is too aggressive Issue #746: Hard links with data can evade sandboxing restrictions This update fixes the vulnerability #3 and vulnerability #4 as reported in "non-cryptanalytic attacks against FreeBSD update components". https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f Fix for vulnerability #2 has already been merged in r305192. Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f Modified: stable/10/contrib/libarchive/libarchive/archive_platform.h stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/test/test_write_disk_secure745.c stable/10/contrib/libarchive/libarchive/test/test_write_disk_secure746.c stable/10/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c stable/10/lib/libarchive/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_platform.h Sun Sep 25 22:02:27 2016 (r306321) +++ stable/10/contrib/libarchive/libarchive/archive_platform.h Sun Sep 25 22:04:02 2016 (r306322) @@ -159,6 +159,15 @@ #define CAN_RESTORE_METADATA_FD #endif +/* + * glibc 2.24 deprecates readdir_r + */ +#if defined(HAVE_READDIR_R) && (!defined(__GLIBC__) || !defined(__GLIBC_MINOR__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24)) +#define USE_READDIR_R 1 +#else +#undef USE_READDIR_R +#endif + /* Set up defaults for internal error codes. */ #ifndef ARCHIVE_ERRNO_FILE_FORMAT #if HAVE_EFTYPE Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Sun Sep 25 22:02:27 2016 (r306321) +++ stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Sun Sep 25 22:04:02 2016 (r306322) @@ -411,9 +411,7 @@ setup_acls(struct archive_read_disk *a, { const char *accpath; acl_t acl; -#if HAVE_ACL_IS_TRIVIAL_NP int r; -#endif accpath = archive_entry_sourcepath(entry); if (accpath == NULL) @@ -473,9 +471,13 @@ setup_acls(struct archive_read_disk *a, } #endif if (acl != NULL) { - translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); acl_free(acl); - return (ARCHIVE_OK); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate NFSv4 ACLs: %s", accpath); + } + return (r); } #endif /* ACL_TYPE_NFS4 */ @@ -506,19 +508,30 @@ setup_acls(struct archive_read_disk *a, #endif if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); acl_free(acl); acl = NULL; + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate access ACLs: %s", accpath); + return (r); + } } /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_DEFAULT); acl_free(acl); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate default ACLs: %s", + accpath); + return (r); + } } } return (ARCHIVE_OK); @@ -574,19 +587,23 @@ translate_acl(struct archive_read_disk * #ifdef ACL_TYPE_NFS4 acl_entry_type_t acl_type; acl_flagset_t acl_flagset; - int brand, r; + int brand; #endif acl_entry_t acl_entry; acl_permset_t acl_permset; int i, entry_acl_type; - int s, ae_id, ae_tag, ae_perm; + int r, s, ae_id, ae_tag, ae_perm; const char *ae_name; #ifdef ACL_TYPE_NFS4 // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 // Make sure the "brand" on this ACL is consistent // with the default_entry_acl_type bits provided. - acl_get_brand_np(acl, &brand); + if (acl_get_brand_np(acl, &brand) != 0) { + archive_set_error(&a->archive, errno, + "Failed to read ACL brand"); + return (ARCHIVE_WARN); + } switch (brand) { case ACL_BRAND_POSIX: switch (default_entry_acl_type) { @@ -594,31 +611,43 @@ translate_acl(struct archive_read_disk * case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for POSIX.1e ACL"); + return (ARCHIVE_WARN); } break; case ACL_BRAND_NFS4: if (default_entry_acl_type & ~ARCHIVE_ENTRY_ACL_TYPE_NFS4) { - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for NFSv4 ACL"); + return (ARCHIVE_WARN); } break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Unknown ACL brand"); + return (ARCHIVE_WARN); break; } #endif s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get first ACL entry"); + return (ARCHIVE_WARN); + } while (s == 1) { ae_id = -1; ae_name = NULL; ae_perm = 0; - acl_get_tag_type(acl_entry, &acl_tag); + if (acl_get_tag_type(acl_entry, &acl_tag) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL tag type"); + return (ARCHIVE_WARN); + } switch (acl_tag) { case ACL_USER: ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry); @@ -653,13 +682,18 @@ translate_acl(struct archive_read_disk * continue; } - // XXX acl type maps to allow/deny/audit/YYYY bits - // XXX acl_get_entry_type_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs + // XXX acl_type maps to allow/deny/audit/YYYY bits entry_acl_type = default_entry_acl_type; #ifdef ACL_TYPE_NFS4 - r = acl_get_entry_type_np(acl_entry, &acl_type); - if (r == 0) { + if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_entry_type_np() falis with non-NFSv4 ACLs + */ + if (acl_get_entry_type_np(acl_entry, &acl_type) != 0) { + archive_set_error(&a->archive, errno, "Failed " + "to get ACL type from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } switch (acl_type) { case ACL_ENTRY_TYPE_ALLOW: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; @@ -673,32 +707,53 @@ translate_acl(struct archive_read_disk * case ACL_ENTRY_TYPE_ALARM: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; break; + default: + archive_set_error(&a->archive, errno, + "Invalid NFSv4 ACL entry type"); + return (ARCHIVE_WARN); } - } - /* - * Libarchive stores "flag" (NFSv4 inheritance bits) - * in the ae_perm bitmap. - */ - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { + /* + * Libarchive stores "flag" (NFSv4 inheritance bits) + * in the ae_perm bitmap. + * + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get flagset from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (acl_get_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit)) + r = acl_get_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check flag in a NFSv4 " + "ACL flagset"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_inherit_map[i].archive_inherit; } } #endif - acl_get_permset(acl_entry, &acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL permission set"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { /* * acl_get_perm() is spelled differently on different * platforms; see above. */ - if (ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm)) + r = ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check permission in an ACL permission set"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_perm_map[i].archive_perm; } @@ -707,6 +762,11 @@ translate_acl(struct archive_read_disk * ae_id, ae_name); s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get next ACL entry"); + return (ARCHIVE_WARN); + } } return (ARCHIVE_OK); } Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Sun Sep 25 22:02:27 2016 (r306321) +++ stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Sun Sep 25 22:04:02 2016 (r306322) @@ -165,7 +165,7 @@ struct filesystem { int synthetic; int remote; int noatime; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t name_max; #endif long incr_xfer_size; @@ -200,7 +200,7 @@ struct tree { DIR *d; #define INVALID_DIR_HANDLE NULL struct dirent *de; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) struct dirent *dirent; size_t dirent_allocated; #endif @@ -1592,7 +1592,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ #if defined(HAVE_STRUCT_STATFS_F_NAMEMAX) t->current_filesystem->name_max = sfs.f_namemax; @@ -1615,7 +1615,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; #endif -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -1817,7 +1817,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namelen; #endif @@ -1901,7 +1901,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namemax; #endif @@ -1918,7 +1918,7 @@ static int setup_current_filesystem(struct archive_read_disk *a) { struct tree *t = a->tree; -#if defined(_PC_NAME_MAX) && defined(HAVE_READDIR_R) +#if defined(_PC_NAME_MAX) && defined(USE_READDIR_R) long nm; #endif t->current_filesystem->synthetic = -1;/* Not supported */ @@ -1930,7 +1930,7 @@ setup_current_filesystem(struct archive_ t->current_filesystem->min_xfer_size = -1; t->current_filesystem->incr_xfer_size = -1; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ # if defined(_PC_NAME_MAX) if (tree_current_is_symblic_link_target(t)) { @@ -1958,7 +1958,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; # endif /* _PC_NAME_MAX */ -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -2366,7 +2366,7 @@ tree_dir_next_posix(struct tree *t) size_t namelen; if (t->d == NULL) { -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t dirent_size; #endif @@ -2387,7 +2387,7 @@ tree_dir_next_posix(struct tree *t) t->visit_type = r != 0 ? r : TREE_ERROR_DIR; return (t->visit_type); } -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) dirent_size = offsetof(struct dirent, d_name) + t->filesystem_table[t->current->filesystem_id].name_max + 1; if (t->dirent == NULL || t->dirent_allocated < dirent_size) { @@ -2404,11 +2404,11 @@ tree_dir_next_posix(struct tree *t) } t->dirent_allocated = dirent_size; } -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ } for (;;) { errno = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) r = readdir_r(t->d, t->dirent, &t->de); #ifdef _AIX /* Note: According to the man page, return value 9 indicates @@ -2660,7 +2660,7 @@ tree_free(struct tree *t) if (t == NULL) return; archive_string_free(&t->path); -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) free(t->dirent); #endif free(t->sparse_list); Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sun Sep 25 22:02:27 2016 (r306321) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sun Sep 25 22:04:02 2016 (r306322) @@ -136,6 +136,7 @@ struct tar { int64_t entry_padding; int64_t entry_bytes_unconsumed; int64_t realsize; + int sparse_allowed; struct sparse_block *sparse_list; struct sparse_block *sparse_last; int64_t sparse_offset; @@ -1271,6 +1272,14 @@ header_common(struct archive_read *a, st * sparse information in the extended area. */ /* FALLTHROUGH */ + case '0': + /* + * Enable sparse file "read" support only for regular + * files and explicit GNU sparse files. However, we + * don't allow non-standard file types to be sparse. + */ + tar->sparse_allowed = 1; + /* FALLTHROUGH */ default: /* Regular file and non-standard types */ /* * Per POSIX: non-recognized types should always be @@ -1730,6 +1739,14 @@ pax_attribute(struct archive_read *a, st #endif switch (key[0]) { case 'G': + /* Reject GNU.sparse.* headers on non-regular files. */ + if (strncmp(key, "GNU.sparse", 10) == 0 && + !tar->sparse_allowed) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Non-regular file cannot be sparse"); + return (ARCHIVE_FATAL); + } + /* GNU "0.0" sparse pax format. */ if (strcmp(key, "GNU.sparse.numblocks") == 0) { tar->sparse_offset = -1; Modified: stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c Sun Sep 25 22:02:27 2016 (r306321) +++ stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c Sun Sep 25 22:04:02 2016 (r306322) @@ -153,9 +153,19 @@ set_acl(struct archive *a, int fd, const if (entries == 0) return (ARCHIVE_OK); acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { - acl_create_entry(&acl, &acl_entry); + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } switch (ae_tag) { case ARCHIVE_ENTRY_ACL_USER: @@ -186,53 +196,96 @@ set_acl(struct archive *a, int fd, const break; #endif default: - /* XXX */ - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; } #ifdef ACL_TYPE_NFS4 + r = 0; switch (ae_type) { case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); break; case ARCHIVE_ENTRY_ACL_TYPE_DENY: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); break; case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); break; case ARCHIVE_ENTRY_ACL_TYPE_ALARM: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); break; case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: // These don't translate directly into the system ACL. break; default: - // XXX error handling here. - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (r != 0) { + archive_set_error(a, errno, + "Failed to set ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; } #endif - acl_get_permset(acl_entry, &acl_permset); - acl_clear_perms(acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { if (ae_permset & acl_perm_map[i].archive_perm) - acl_add_perm(acl_permset, - acl_perm_map[i].platform_perm); + if (acl_add_perm(acl_permset, + acl_perm_map[i].platform_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } } #ifdef ACL_TYPE_NFS4 - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { - acl_clear_flags_np(acl_flagset); + if (acl_type == ACL_TYPE_NFS4) { + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (ae_permset & acl_inherit_map[i].archive_inherit) - acl_add_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit); + if (ae_permset & acl_inherit_map[i].archive_inherit) { + if (acl_add_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit) != 0) { + archive_set_error(a, errno, + "Failed to add flag to NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } } } #endif @@ -262,6 +315,7 @@ set_acl(struct archive *a, int fd, const ret = ARCHIVE_WARN; } #endif +exit_free: acl_free(acl); return (ret); } Modified: stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c Sun Sep 25 22:02:27 2016 (r306321) +++ stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c Sun Sep 25 22:04:02 2016 (r306322) @@ -140,7 +140,17 @@ __FBSDID("$FreeBSD$"); #define O_BINARY 0 #endif #ifndef O_CLOEXEC -#define O_CLOEXEC 0 +#define O_CLOEXEC 0 +#endif + +/* Ignore non-int O_NOFOLLOW constant. */ +/* gnulib's fcntl.h does this on AIX, but it seems practical everywhere */ +#if defined O_NOFOLLOW && !(INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) +#undef O_NOFOLLOW +#endif + +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 #endif struct fixup_entry { @@ -326,12 +336,14 @@ struct archive_write_disk { #define HFS_BLOCKS(s) ((s) >> 12) +static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int check_symlinks(struct archive_write_disk *); static int create_filesystem_object(struct archive_write_disk *); static struct fixup_entry *current_fixup(struct archive_write_disk *, const char *pathname); #if defined(HAVE_FCHDIR) && defined(PATH_MAX) static void edit_deep_directories(struct archive_write_disk *ad); #endif +static int cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int cleanup_pathname(struct archive_write_disk *); static int create_dir(struct archive_write_disk *, char *); static int create_parent_dir(struct archive_write_disk *, char *); @@ -2014,6 +2026,10 @@ create_filesystem_object(struct archive_ const char *linkname; mode_t final_mode, mode; int r; + /* these for check_symlinks_fsobj */ + char *linkname_copy; /* non-const copy of linkname */ + struct archive_string error_string; + int error_number; /* We identify hard/symlinks according to the link names. */ /* Since link(2) and symlink(2) don't handle modes, we're done here. */ @@ -2022,6 +2038,27 @@ create_filesystem_object(struct archive_ #if !HAVE_LINK return (EPERM); #else + archive_string_init(&error_string); + linkname_copy = strdup(linkname); + if (linkname_copy == NULL) { + return (EPERM); + } + /* TODO: consider using the cleaned-up path as the link target? */ + r = cleanup_pathname_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + r = check_symlinks_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + free(linkname_copy); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries @@ -2040,7 +2077,7 @@ create_filesystem_object(struct archive_ a->deferred = 0; } else if (r == 0 && a->filesize > 0) { a->fd = open(a->name, - O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC); + O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC | O_NOFOLLOW); __archive_ensure_cloexec_flag(a->fd); if (a->fd < 0) r = errno; @@ -2351,126 +2388,233 @@ current_fixup(struct archive_write_disk return (a->current_fixup); } -/* TODO: Make this work. */ -/* - * TODO: The deep-directory support bypasses this; disable deep directory - * support if we're doing symlink checks. - */ /* * TODO: Someday, integrate this with the deep dir support; they both * scan the path and both can be optimized by comparing against other * recent paths. */ /* TODO: Extend this to support symlinks on Windows Vista and later. */ + +/* + * Checks the given path to see if any elements along it are symlinks. Returns + * ARCHIVE_OK if there are none, otherwise puts an error in errmsg. + */ static int -check_symlinks(struct archive_write_disk *a) +check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { #if !defined(HAVE_LSTAT) /* Platform doesn't have lstat, so we can't look for symlinks. */ - (void)a; /* UNUSED */ + (void)path; /* UNUSED */ + (void)error_number; /* UNUSED */ + (void)error_string; /* UNUSED */ + (void)flags; /* UNUSED */ return (ARCHIVE_OK); #else - char *pn; + int res = ARCHIVE_OK; + char *tail; + char *head; + int last; char c; int r; struct stat st; + int restore_pwd; + + /* Nothing to do here if name is empty */ + if(path[0] == '\0') + return (ARCHIVE_OK); /* * Guard against symlink tricks. Reject any archive entry whose * destination would be altered by a symlink. - */ - /* Whatever we checked last time doesn't need to be re-checked. */ - pn = a->name; - if (archive_strlen(&(a->path_safe)) > 0) { - char *p = a->path_safe.s; - while ((*pn != '\0') && (*p == *pn)) - ++p, ++pn; - } + * + * Walk the filename in chunks separated by '/'. For each segment: + * - if it doesn't exist, continue + * - if it's symlink, abort or remove it + * - if it's a directory and it's not the last chunk, cd into it + * As we go: + * head points to the current (relative) path + * tail points to the temporary \0 terminating the segment we're currently examining + * c holds what used to be in *tail + * last is 1 if this is the last tail + */ + restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); + __archive_ensure_cloexec_flag(restore_pwd); + if (restore_pwd < 0) + return (ARCHIVE_FATAL); + head = path; + tail = path; + last = 0; + /* TODO: reintroduce a safe cache here? */ /* Skip the root directory if the path is absolute. */ - if(pn == a->name && pn[0] == '/') - ++pn; - c = pn[0]; - /* Keep going until we've checked the entire name. */ - while (pn[0] != '\0' && (pn[0] != '/' || pn[1] != '\0')) { + if(tail == path && tail[0] == '/') + ++tail; + /* Keep going until we've checked the entire name. + * head, tail, path all alias the same string, which is + * temporarily zeroed at tail, so be careful restoring the + * stashed (c=tail[0]) for error messages. + * Exiting the loop with break is okay; continue is not. + */ + while (!last) { + /* Skip the separator we just consumed, plus any adjacent ones */ + while (*tail == '/') + ++tail; /* Skip the next path element. */ - while (*pn != '\0' && *pn != '/') - ++pn; - c = pn[0]; - pn[0] = '\0'; + while (*tail != '\0' && *tail != '/') + ++tail; + /* is this the last path component? */ + last = (tail[0] == '\0') || (tail[0] == '/' && tail[1] == '\0'); + /* temporarily truncate the string here */ + c = tail[0]; + tail[0] = '\0'; /* Check that we haven't hit a symlink. */ - r = lstat(a->name, &st); + r = lstat(head, &st); if (r != 0) { + tail[0] = c; /* We've hit a dir that doesn't exist; stop now. */ if (errno == ENOENT) { break; } else { - /* Note: This effectively disables deep directory + /* Treat any other error as fatal - best to be paranoid here + * Note: This effectively disables deep directory * support when security checks are enabled. * Otherwise, very long pathnames that trigger * an error here could evade the sandbox. * TODO: We could do better, but it would probably * require merging the symlink checks with the * deep-directory editing. */ - return (ARCHIVE_FAILED); + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not stat %s", + path); + res = ARCHIVE_FAILED; + break; + } + } else if (S_ISDIR(st.st_mode)) { + if (!last) { + if (chdir(head) != 0) { + tail[0] = c; + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not chdir %s", + path); + res = (ARCHIVE_FATAL); + break; + } + /* Our view is now from inside this dir: */ + head = tail + 1; } } else if (S_ISLNK(st.st_mode)) { - if (c == '\0') { + if (last) { /* * Last element is symlink; remove it * so we can overwrite it with the * item being extracted. */ - if (unlink(a->name)) { - archive_set_error(&a->archive, errno, - "Could not remove symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + if (unlink(head)) { + tail[0] = c; + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not remove symlink %s", + path); + res = ARCHIVE_FAILED; + break; } - a->pst = NULL; /* * Even if we did remove it, a warning * is in order. The warning is silly, * though, if we're just replacing one * symlink with another symlink. */ - if (!S_ISLNK(a->mode)) { - archive_set_error(&a->archive, 0, - "Removing symlink %s", - a->name); + tail[0] = c; + /* FIXME: not sure how important this is to restore + if (!S_ISLNK(path)) { + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Removing symlink %s", + path); } + */ /* Symlink gone. No more problem! */ - pn[0] = c; - return (0); - } else if (a->flags & ARCHIVE_EXTRACT_UNLINK) { + res = ARCHIVE_OK; + break; + } else if (flags & ARCHIVE_EXTRACT_UNLINK) { /* User asked us to remove problems. */ - if (unlink(a->name) != 0) { - archive_set_error(&a->archive, 0, - "Cannot remove intervening symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + if (unlink(head) != 0) { + tail[0] = c; + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Cannot remove intervening symlink %s", + path); + res = ARCHIVE_FAILED; + break; } - a->pst = NULL; + tail[0] = c; } else { - archive_set_error(&a->archive, 0, - "Cannot extract through symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + tail[0] = c; + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Cannot extract through symlink %s", + path); + res = ARCHIVE_FAILED; + break; } } - pn[0] = c; - if (pn[0] != '\0') - pn++; /* Advance to the next segment. */ - } - pn[0] = c; - /* We've checked and/or cleaned the whole path, so remember it. */ - archive_strcpy(&a->path_safe, a->name); - return (ARCHIVE_OK); + /* be sure to always maintain this */ + tail[0] = c; + if (tail[0] != '\0') + tail++; /* Advance to the next segment. */ + } + /* Catches loop exits via break */ + tail[0] = c; +#ifdef HAVE_FCHDIR + /* If we changed directory above, restore it here. */ + if (restore_pwd >= 0) { + r = fchdir(restore_pwd); + if (r != 0) { + if(error_number) *error_number = errno; + if(error_string) + archive_string_sprintf(error_string, + "chdir() failure"); + } + close(restore_pwd); + restore_pwd = -1; + if (r != 0) { + res = (ARCHIVE_FATAL); + } + } +#endif + /* TODO: reintroduce a safe cache here? */ + return res; #endif } +/* + * Check a->name for symlinks, returning ARCHIVE_OK if its clean, otherwise + * calls archive_set_error and returns ARCHIVE_{FATAL,FAILED} + */ +static int +check_symlinks(struct archive_write_disk *a) +{ + struct archive_string error_string; + int error_number; + int rc; + archive_string_init(&error_string); + rc = check_symlinks_fsobj(a->name, &error_number, &error_string, a->flags); + if (rc != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + } + archive_string_free(&error_string); + a->pst = NULL; /* to be safe */ + return rc; +} + + #if defined(__CYGWIN__) /* * 1. Convert a path separator from '\' to '/' . @@ -2544,15 +2688,17 @@ cleanup_pathname_win(struct archive_writ * is set) if the path is absolute. */ static int -cleanup_pathname(struct archive_write_disk *a) +cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { char *dest, *src; char separator = '\0'; - dest = src = a->name; + dest = src = path; if (*src == '\0') { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid empty pathname"); + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; + if (error_string) + archive_string_sprintf(error_string, + "Invalid empty pathname"); return (ARCHIVE_FAILED); } @@ -2561,9 +2707,11 @@ cleanup_pathname(struct archive_write_di #endif /* Skip leading '/'. */ if (*src == '/') { - if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Path is absolute"); + if (flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; + if (error_string) + archive_string_sprintf(error_string, + "Path is absolute"); return (ARCHIVE_FAILED); } @@ -2590,10 +2738,11 @@ cleanup_pathname(struct archive_write_di } else if (src[1] == '.') { if (src[2] == '/' || src[2] == '\0') { /* Conditionally warn about '..' */ - if (a->flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) { - archive_set_error(&a->archive, - ARCHIVE_ERRNO_MISC, - "Path contains '..'"); + if (flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) { + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 25 22:07:43 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 34E59BEA55D; Sun, 25 Sep 2016 22:07:43 +0000 (UTC) (envelope-from adrian@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 1036283E; Sun, 25 Sep 2016 22:07:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PM7gqg029064; Sun, 25 Sep 2016 22:07:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PM7fOJ029060; Sun, 25 Sep 2016 22:07:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609252207.u8PM7fOJ029060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 25 Sep 2016 22:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306323 - in head/sys/dev/ath/ath_hal: . ah_regdomain 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.23 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, 25 Sep 2016 22:07:43 -0000 Author: adrian Date: Sun Sep 25 22:07:41 2016 New Revision: 306323 URL: https://svnweb.freebsd.org/changeset/base/306323 Log: [ath_hal] Add FCC6_FCCA regulatory domain (0x0014). Tested: * TP-Link N900, AR9380, regdomain 0x0014 (FCC6_FCCA). Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Sep 25 22:07:41 2016 (r306323) @@ -134,7 +134,7 @@ struct ath_hal_rf *ath_hal_rfprobe(struc * right now. */ #ifndef AH_MAXCHAN -#define AH_MAXCHAN 96 +#define AH_MAXCHAN 128 #endif #define HAL_NF_CAL_HIST_LEN_FULL 5 Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h Sun Sep 25 22:07:41 2016 (r306323) @@ -242,6 +242,17 @@ static REG_DOMAIN regDomains[] = { .chan11a_quarter = BM3(F8_5180_5240, F8_5260_5320,F10_5745_5825), }, + {.regDmnEnum = FCC6, + .conformanceTestLimit = FCC, + .chan11a = BM5(F8_5180_5240, F5_5260_5320, F1_5500_5580, F2_5660_5720, F6_5745_5825), + .chan11a_turbo = BM3(T7_5210_5210, T3_5250_5290, T2_5760_5800), + .chan11a_dyn_turbo = BM4(T7_5200_5200, T1_5240_5240, T2_5280_5280, T1_5765_5805), +#if 0 + .chan11a_half = BM3(F7_5180_5240, F7_5260_5320, F9_5745_5825), + .chan11a_quarter = BM3(F8_5180_5240, F8_5260_5320,F10_5745_5825), +#endif + }, + {.regDmnEnum = MKK1, .conformanceTestLimit = MKK, .pscan = PSCAN_MKK1, Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h Sun Sep 25 22:07:41 2016 (r306323) @@ -125,8 +125,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[ { 5280, 5320, 17, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC }, #define F1_5280_5320 AFTER(F3_5260_5700) + { 5500, 5580, 23, 6, 20, 20, DFS_FCC3, PSCAN_FCC }, +#define F1_5500_5580 AFTER(F1_5280_5320) + { 5500, 5620, 30, 6, 20, 20, DFS_ETSI, PSCAN_ETSI }, -#define F1_5500_5620 AFTER(F1_5280_5320) +#define F1_5500_5620 AFTER(F1_5500_5580) { 5500, 5700, 20, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC }, #define F1_5500_5700 AFTER(F1_5500_5620) @@ -136,9 +139,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[ #define F3_5500_5700 AFTER(F2_5500_5700) { 5500, 5700, 23, 0, 20, 20, DFS_FCC3 | DFS_ETSI | DFS_MKK4, PSCAN_MKK3 | PSCAN_FCC }, #define F4_5500_5700 AFTER(F3_5500_5700) + { 5660, 5720, 23, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC | PSCAN_ETSI }, +#define F2_5660_5720 AFTER(F4_5500_5700) { 5745, 5805, 23, 0, 20, 20, NO_DFS, NO_PSCAN }, -#define F1_5745_5805 AFTER(F4_5500_5700) +#define F1_5745_5805 AFTER(F2_5660_5720) { 5745, 5805, 30, 6, 20, 20, NO_DFS, NO_PSCAN }, #define F2_5745_5805 AFTER(F1_5745_5805) { 5745, 5805, 30, 6, 20, 20, DFS_ETSI, PSCAN_ETSI }, @@ -191,6 +196,7 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[ #define W2_5825_5825 AFTER(W2_5180_5240) }; + /* * 5GHz Turbo (dynamic & static) tags */ @@ -203,13 +209,14 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurbo #define T1_5370_5490 AFTER(T1_5250_5330) { 5530, 5650, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, #define T1_5530_5650 AFTER(T1_5370_5490) - + { 5200, 5200, 23, 6, 40, 40, NO_DFS, NO_PSCAN }, +#define T7_5200_5200 AFTER(T1_5530_5650) { 5150, 5190, 5, 6, 40, 40, NO_DFS, NO_PSCAN }, -#define T1_5150_5190 AFTER(T1_5530_5650) - { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, -#define T1_5230_5310 AFTER(T1_5150_5190) +#define T1_5230_5310 AFTER(T7_5200_5200) { 5350, 5470, 5, 6, 40, 40, NO_DFS, NO_PSCAN }, -#define T1_5350_5470 AFTER(T1_5230_5310) +#define T1_5150_5190 AFTER(T1_5230_5310) + { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, +#define T1_5350_5470 AFTER(T1_5150_5190) { 5510, 5670, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, #define T1_5510_5670 AFTER(T1_5350_5470) @@ -221,9 +228,13 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurbo #define T1_5210_5210 AFTER(T2_5200_5240) { 5210, 5210, 23, 0, 40, 40, NO_DFS, NO_PSCAN }, #define T2_5210_5210 AFTER(T1_5210_5210) + { 5210, 5210, 23, 6, 40, 40, NO_DFS, NO_PSCAN }, +#define T7_5210_5210 AFTER(T2_5210_5210) + { 5240, 5240, 23, 6, 40, 40, NO_DFS, PSCAN_FCC_T }, +#define T1_5240_5240 AFTER(T7_5210_5210) { 5280, 5280, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, -#define T1_5280_5280 AFTER(T2_5210_5210) +#define T1_5280_5280 AFTER(T1_5240_5240) { 5280, 5280, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, #define T2_5280_5280 AFTER(T1_5280_5280) { 5250, 5250, 17, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T }, @@ -234,9 +245,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurbo #define T1_5250_5290 AFTER(T1_5290_5290) { 5250, 5290, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, #define T2_5250_5290 AFTER(T1_5250_5290) + { 5250, 5290, 23, 6, 40, 40, NO_DFS, PSCAN_FCC_T }, +#define T3_5250_5290 AFTER(T2_5250_5290) { 5540, 5660, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, -#define T1_5540_5660 AFTER(T2_5250_5290) +#define T1_5540_5660 AFTER(T3_5250_5290) { 5760, 5800, 20, 0, 40, 40, NO_DFS, NO_PSCAN }, #define T1_5760_5800 AFTER(T1_5540_5660) { 5760, 5800, 30, 6, 40, 40, NO_DFS, NO_PSCAN }, Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Sun Sep 25 22:07:41 2016 (r306323) @@ -41,6 +41,7 @@ static REG_DMN_PAIR_MAPPING regDomainPai {FCC3_WORLD, FCC3, WORLD, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {FCC4_FCCA, FCC4, FCCA, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {FCC5_FCCB, FCC5, FCCB, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, + {FCC6_FCCA, FCC6, FCCA, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {ETSI1_WORLD, ETSI1, WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {ETSI2_WORLD, ETSI2, WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, From owner-svn-src-all@freebsd.org Sun Sep 25 22:17:48 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 1D702BEA7D4; Sun, 25 Sep 2016 22:17:48 +0000 (UTC) (envelope-from adrian@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 E2B18F2B; Sun, 25 Sep 2016 22:17:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PMHlG1032759; Sun, 25 Sep 2016 22:17:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PMHlRu032758; Sun, 25 Sep 2016 22:17:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609252217.u8PMHlRu032758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 25 Sep 2016 22:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306324 - head/sys/dev/ath/ath_hal 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.23 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, 25 Sep 2016 22:17:48 -0000 Author: adrian Date: Sun Sep 25 22:17:46 2016 New Revision: 306324 URL: https://svnweb.freebsd.org/changeset/base/306324 Log: [ath_hal] add a comment for the channel 144 regdomain flag. I'm .. still trying to figure out what's going on. Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.c Sun Sep 25 22:07:41 2016 (r306323) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Sun Sep 25 22:17:46 2016 (r306324) @@ -548,6 +548,14 @@ add_chanlist_mode(struct ath_hal *ah, st continue; } #endif + + /* + * XXX TODO: handle REG_EXT_FCC_CH_144. + * + * Figure out which instances/uses cause us to not + * be allowed to use channel 144 (pri or sec overlap.) + */ + bfreq_lo = MAX(fband->lowChannel + low_adj, freq_lo); bfreq_hi = MIN(fband->highChannel + hi_adj, freq_hi); if (fband->channelSep >= channelSep) From owner-svn-src-all@freebsd.org Sun Sep 25 22:58: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 5D550BEAF07; Sun, 25 Sep 2016 22:58:01 +0000 (UTC) (envelope-from marcel@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 35C551A5; Sun, 25 Sep 2016 22:58:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PMw0IN047437; Sun, 25 Sep 2016 22:58:00 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PMvxUx047428; Sun, 25 Sep 2016 22:57:59 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609252257.u8PMvxUx047428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 25 Sep 2016 22:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306325 - head/usr.bin/mkimg 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.23 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, 25 Sep 2016 22:58:01 -0000 Author: marcel Date: Sun Sep 25 22:57:59 2016 New Revision: 306325 URL: https://svnweb.freebsd.org/changeset/base/306325 Log: Replace the use of linker sets with constructors for both the formats and schemes. Formats and schemes are registered at runtime now, rather than collected at link time. Modified: head/usr.bin/mkimg/format.c head/usr.bin/mkimg/format.h head/usr.bin/mkimg/mkimg.c head/usr.bin/mkimg/scheme.c head/usr.bin/mkimg/scheme.h Modified: head/usr.bin/mkimg/format.c ============================================================================== --- head/usr.bin/mkimg/format.c Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/format.c Sun Sep 25 22:57:59 2016 (r306325) @@ -28,8 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include #include #include @@ -42,8 +40,24 @@ __FBSDID("$FreeBSD$"); #include "format.h" #include "mkimg.h" +static struct mkimg_format *first; static struct mkimg_format *format; +struct mkimg_format * +format_iterate(struct mkimg_format *f) +{ + + return ((f == NULL) ? first : f->next); +} + +void +format_register(struct mkimg_format *f) +{ + + f->next = first; + first = f; +} + int format_resize(lba_t end) { @@ -56,10 +70,10 @@ format_resize(lba_t end) int format_select(const char *spec) { - struct mkimg_format *f, **iter; + struct mkimg_format *f; - SET_FOREACH(iter, formats) { - f = *iter; + f = NULL; + while ((f = format_iterate(f)) != NULL) { if (strcasecmp(spec, f->name) == 0) { format = f; return (0); Modified: head/usr.bin/mkimg/format.h ============================================================================== --- head/usr.bin/mkimg/format.h Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/format.h Sun Sep 25 22:57:59 2016 (r306325) @@ -29,21 +29,24 @@ #ifndef _MKIMG_FORMAT_H_ #define _MKIMG_FORMAT_H_ -#include - struct mkimg_format { + struct mkimg_format *next; const char *name; const char *description; int (*resize)(lba_t); int (*write)(int); }; -SET_DECLARE(formats, struct mkimg_format); -#define FORMAT_DEFINE(nm) DATA_SET(formats, nm) +#define FORMAT_DEFINE(nm) \ +static void format_register_##nm(void) __attribute__((constructor)); \ +static void format_register_##nm(void) { format_register(&nm); } -int format_resize(lba_t); +struct mkimg_format *format_iterate(struct mkimg_format *); +void format_register(struct mkimg_format *); int format_select(const char *); struct mkimg_format *format_selected(void); + +int format_resize(lba_t); int format_write(int); #endif /* _MKIMG_FORMAT_H_ */ Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:57:59 2016 (r306325) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include @@ -77,20 +76,20 @@ u_int blksz = 0; static void print_formats(int usage) { - struct mkimg_format *f, **f_iter; + struct mkimg_format *f; const char *sep; if (usage) { fprintf(stderr, " formats:\n"); - SET_FOREACH(f_iter, formats) { - f = *f_iter; + f = NULL; + while ((f = format_iterate(f)) != NULL) { fprintf(stderr, "\t%s\t- %s\n", f->name, f->description); } } else { sep = ""; - SET_FOREACH(f_iter, formats) { - f = *f_iter; + f = NULL; + while ((f = format_iterate(f)) != NULL) { printf("%s%s", sep, f->name); sep = " "; } @@ -101,20 +100,20 @@ print_formats(int usage) static void print_schemes(int usage) { - struct mkimg_scheme *s, **s_iter; + struct mkimg_scheme *s; const char *sep; if (usage) { fprintf(stderr, " schemes:\n"); - SET_FOREACH(s_iter, schemes) { - s = *s_iter; + s = NULL; + while ((s = scheme_iterate(s)) != NULL) { fprintf(stderr, "\t%s\t- %s\n", s->name, s->description); } } else { sep = ""; - SET_FOREACH(s_iter, schemes) { - s = *s_iter; + s = NULL; + while ((s = scheme_iterate(s)) != NULL) { printf("%s%s", sep, s->name); sep = " "; } Modified: head/usr.bin/mkimg/scheme.c ============================================================================== --- head/usr.bin/mkimg/scheme.c Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/scheme.c Sun Sep 25 22:57:59 2016 (r306325) @@ -28,8 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include #include #include @@ -65,6 +63,7 @@ static struct { { NULL, ALIAS_NONE } /* Keep last! */ }; +static struct mkimg_scheme *first; static struct mkimg_scheme *scheme; static void *bootcode; @@ -82,13 +81,27 @@ scheme_parse_alias(const char *name) return (ALIAS_NONE); } +struct mkimg_scheme * +scheme_iterate(struct mkimg_scheme *s) +{ + + return ((s == NULL) ? first : s->next); +} + +void +scheme_register(struct mkimg_scheme *s) +{ + s->next = first; + first = s; +} + int scheme_select(const char *spec) { - struct mkimg_scheme *s, **iter; + struct mkimg_scheme *s; - SET_FOREACH(iter, schemes) { - s = *iter; + s = NULL; + while ((s = scheme_iterate(s)) != NULL) { if (strcasecmp(spec, s->name) == 0) { scheme = s; return (0); Modified: head/usr.bin/mkimg/scheme.h ============================================================================== --- head/usr.bin/mkimg/scheme.h Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/scheme.h Sun Sep 25 22:57:59 2016 (r306325) @@ -29,8 +29,6 @@ #ifndef _MKIMG_SCHEME_H_ #define _MKIMG_SCHEME_H_ -#include - enum alias { ALIAS_NONE, /* Keep first! */ /* start */ @@ -62,6 +60,7 @@ struct mkimg_alias { }; struct mkimg_scheme { + struct mkimg_scheme *next; const char *name; const char *description; struct mkimg_alias *aliases; @@ -77,9 +76,12 @@ struct mkimg_scheme { u_int maxsecsz; }; -SET_DECLARE(schemes, struct mkimg_scheme); -#define SCHEME_DEFINE(nm) DATA_SET(schemes, nm) +#define SCHEME_DEFINE(nm) \ +static void scheme_register_##nm(void) __attribute__((constructor)); \ +static void scheme_register_##nm(void) { scheme_register(&nm); } +struct mkimg_scheme *scheme_iterate(struct mkimg_scheme *); +void scheme_register(struct mkimg_scheme *); int scheme_select(const char *); struct mkimg_scheme *scheme_selected(void); From owner-svn-src-all@freebsd.org Sun Sep 25 23:05:46 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 4A7C0BE91B0; Sun, 25 Sep 2016 23:05:46 +0000 (UTC) (envelope-from ache@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 006DE8F5; Sun, 25 Sep 2016 23:05:45 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PN5jMN051164; Sun, 25 Sep 2016 23:05:45 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PN5j6i051163; Sun, 25 Sep 2016 23:05:45 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609252305.u8PN5j6i051163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sun, 25 Sep 2016 23:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306326 - stable/9/lib/libc/stdtime 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.23 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, 25 Sep 2016 23:05:46 -0000 Author: ache Date: Sun Sep 25 23:05:44 2016 New Revision: 306326 URL: https://svnweb.freebsd.org/changeset/base/306326 Log: MFC r272562,r272678,r272679 1) Fix the case we have less arguments for format string than we expected. 2) Return error on unsupported format specs. (both according to POSIX) 3) For %Z format, understand "UTC" name too. PR: 93197 (only r272679) Modified: stable/9/lib/libc/stdtime/strptime.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strptime.c ============================================================================== --- stable/9/lib/libc/stdtime/strptime.c Sun Sep 25 22:57:59 2016 (r306325) +++ stable/9/lib/libc/stdtime/strptime.c Sun Sep 25 23:05:44 2016 (r306326) @@ -103,9 +103,6 @@ _strptime(const char *buf, const char *f ptr = fmt; while (*ptr != 0) { - if (*buf == 0) - break; - c = *ptr++; if (c != '%') { @@ -123,7 +120,6 @@ _strptime(const char *buf, const char *f label: c = *ptr++; switch (c) { - case 0: case '%': if (*buf++ != '%') return (NULL); @@ -552,7 +548,8 @@ label: strncpy(zonestr, buf, cp - buf); zonestr[cp - buf] = '\0'; tzset(); - if (0 == strcmp(zonestr, "GMT")) { + if (0 == strcmp(zonestr, "GMT") || + 0 == strcmp(zonestr, "UTC")) { *GMTp = 1; } else if (0 == strcmp(zonestr, tzname[0])) { tm->tm_isdst = 0; @@ -599,6 +596,9 @@ label: while (isspace_l((unsigned char)*buf, locale)) buf++; break; + + default: + return (NULL); } } @@ -674,6 +674,7 @@ strptime_l(const char * __restrict buf, ret = _strptime(buf, fmt, tm, &gmt, loc); if (ret && gmt) { time_t t = timegm(tm); + localtime_r(&t, tm); } From owner-svn-src-all@freebsd.org Sun Sep 25 23:45: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 C8B11BE9A48; Sun, 25 Sep 2016 23:45:50 +0000 (UTC) (envelope-from gonzo@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 9625C9B1; Sun, 25 Sep 2016 23:45:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PNjnY3065799; Sun, 25 Sep 2016 23:45:49 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PNjnkE065798; Sun, 25 Sep 2016 23:45:49 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609252345.u8PNjnkE065798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 25 Sep 2016 23:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306327 - head/sys/arm/nvidia 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.23 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, 25 Sep 2016 23:45:50 -0000 Author: gonzo Date: Sun Sep 25 23:45:49 2016 New Revision: 306327 URL: https://svnweb.freebsd.org/changeset/base/306327 Log: Update AHCI driver to match new dts tree phy name parameter was changed from "sata-phy" to "sata-0" in new dts tree introduced in r306197 Modified: head/sys/arm/nvidia/tegra_ahci.c Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Sun Sep 25 23:05:44 2016 (r306326) +++ head/sys/arm/nvidia/tegra_ahci.c Sun Sep 25 23:45:49 2016 (r306327) @@ -255,7 +255,7 @@ get_fdt_resources(struct tegra_ahci_sc * return (ENXIO); } - rv = phy_get_by_ofw_name(sc->dev, 0, "sata-phy", &sc->phy); + rv = phy_get_by_ofw_name(sc->dev, 0, "sata-0", &sc->phy); if (rv != 0) { device_printf(sc->dev, "Cannot get 'sata' phy\n"); return (ENXIO); From owner-svn-src-all@freebsd.org Sun Sep 25 23:48: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 0FE20BE9B32; Sun, 25 Sep 2016 23:48:17 +0000 (UTC) (envelope-from gonzo@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 BC055B51; Sun, 25 Sep 2016 23:48:16 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PNmFwm065919; Sun, 25 Sep 2016 23:48:15 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PNmFxH065918; Sun, 25 Sep 2016 23:48:15 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609252348.u8PNmFxH065918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 25 Sep 2016 23:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306328 - head/sys/arm/nvidia 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.23 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, 25 Sep 2016 23:48:17 -0000 Author: gonzo Date: Sun Sep 25 23:48:15 2016 New Revision: 306328 URL: https://svnweb.freebsd.org/changeset/base/306328 Log: Update PCI driver to match new dts tree In new dts tree phy is a property of port, not the controller node, also the name was changed from "pcie" to "pcie-0" Modified: head/sys/arm/nvidia/tegra_pcie.c Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Sun Sep 25 23:45:49 2016 (r306327) +++ head/sys/arm/nvidia/tegra_pcie.c Sun Sep 25 23:48:15 2016 (r306328) @@ -266,6 +266,7 @@ struct tegra_pcib_port { int port_idx; /* chip port index */ int num_lanes; /* number of lanes */ bus_size_t afi_pex_ctrl; /* offset of afi_pex_ctrl */ + phy_t phy; /* port phy */ /* Config space properties. */ bus_addr_t rp_base_addr; /* PA of config window */ @@ -291,7 +292,6 @@ struct tegra_pcib_softc { struct ofw_pci_range pref_mem_range; struct ofw_pci_range io_range; - phy_t phy; clk_t clk_pex; clk_t clk_afi; clk_t clk_pll_e; @@ -963,6 +963,15 @@ tegra_pcib_parse_port(struct tegra_pcib_ port->afi_pex_ctrl = tegra_pcib_pex_ctrl(sc, port->port_idx); sc->lanes_cfg |= port->num_lanes << (4 * port->port_idx); + /* Phy. */ + rv = phy_get_by_ofw_name(sc->dev, node, "pcie-0", &port->phy); + if (rv != 0) { + device_printf(sc->dev, + "Cannot get 'pcie-0' phy for port %d\n", + port->port_idx); + goto fail; + } + return (port); fail: free(port, M_DEVBUF); @@ -1067,13 +1076,6 @@ tegra_pcib_parse_fdt_resources(struct te return (ENXIO); } - /* Phy. */ - rv = phy_get_by_ofw_name(sc->dev, 0, "pcie", &sc->phy); - if (rv != 0) { - device_printf(sc->dev, "Cannot get 'pcie' phy\n"); - return (ENXIO); - } - /* Ports */ sc->num_ports = 0; for (child = OF_child(node); child != 0; child = OF_peer(child)) { @@ -1306,13 +1308,19 @@ tegra_pcib_enable(struct tegra_pcib_soft reg &= ~AFI_FUSE_PCIE_T0_GEN2_DIS; AFI_WR4(sc, AFI_FUSE, reg); - /* Enable PCIe phy. */ - rv = phy_enable(sc->dev, sc->phy); - if (rv != 0) { - device_printf(sc->dev, "Cannot enable phy\n"); - return (rv); + for (i = 0; i < TEGRA_PCIB_MAX_PORTS; i++) { + if (sc->ports[i] != NULL) { + rv = phy_enable(sc->dev, sc->ports[i]->phy); + if (rv != 0) { + device_printf(sc->dev, + "Cannot enable phy for port %d\n", + sc->ports[i]->port_idx); + return (rv); + } + } } + rv = hwreset_deassert(sc->hwreset_pcie_x); if (rv != 0) { device_printf(sc->dev, "Cannot unreset 'pci_x' reset\n"); From owner-svn-src-all@freebsd.org Sun Sep 25 23:52: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 3AAB9BE9DF1; Sun, 25 Sep 2016 23:52:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (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 079F4EC1; Sun, 25 Sep 2016 23:52:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f169.google.com with SMTP id e66so77238503iod.1; Sun, 25 Sep 2016 16:52:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=1oq/bwl4EJgfZH3GyjuM38JJV0NvYjSJsyp/um9pwgE=; b=kkVg+psrfnRY4EQhxMXSvahe740z1zRHhBB52d2BB3J8Vs3GUZmIRuGrLp4vZWRDFU zzq0ga+3aos6vnjK/tFOQE+M1hxZdDeZw3xahshq6Fa93SdN4kO320MgM7WCjh9UUxlq lt6ZSglvR3D2UdGT9sgBdzsmeitgERuDe1kOU92BXWjg/QsBZIF0wuBqfzad8n5vxJr3 r9wZMJiKpWHGf7qh0+p3zsBQNKIEiFbmC3Py5bv8c0/OZxstqXrjmr8vwvFpHAeVi8xn Nq3vwM2WntMNJLOYm6MIvrPQIN/U8Xdo8vHUEDhxSGH5OOcKPJXubgcWUh7zesD7Wa6v 0MSw== X-Gm-Message-State: AA6/9Rku/a0815E8QNlMAA+tvm0Sr9fWCdiuZFF6kh2/x+gSWmalVc6kXBGzXLpaBnbCfA== X-Received: by 10.107.163.72 with SMTP id m69mr21138793ioe.106.1474847529074; Sun, 25 Sep 2016 16:52:09 -0700 (PDT) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com. [209.85.223.179]) by smtp.gmail.com with ESMTPSA id z130sm7257210iod.17.2016.09.25.16.52.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 16:52:08 -0700 (PDT) Received: by mail-io0-f179.google.com with SMTP id r145so167132587ior.0; Sun, 25 Sep 2016 16:52:08 -0700 (PDT) X-Received: by 10.107.58.87 with SMTP id h84mr20509619ioa.122.1474847528601; Sun, 25 Sep 2016 16:52:08 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Sun, 25 Sep 2016 16:52:08 -0700 (PDT) In-Reply-To: <201609252257.u8PMvxUx047428@repo.freebsd.org> References: <201609252257.u8PMvxUx047428@repo.freebsd.org> From: Conrad Meyer Date: Sun, 25 Sep 2016 16:52:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306325 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: src-committers , 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.23 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, 25 Sep 2016 23:52:17 -0000 What's the motivation for this? This seems worse. Best, Conrad On Sun, Sep 25, 2016 at 3:57 PM, Marcel Moolenaar wrote: > Author: marcel > Date: Sun Sep 25 22:57:59 2016 > New Revision: 306325 > URL: https://svnweb.freebsd.org/changeset/base/306325 > > Log: > Replace the use of linker sets with constructors for both the > formats and schemes. Formats and schemes are registered at > runtime now, rather than collected at link time. > > Modified: > head/usr.bin/mkimg/format.c > head/usr.bin/mkimg/format.h > head/usr.bin/mkimg/mkimg.c > head/usr.bin/mkimg/scheme.c > head/usr.bin/mkimg/scheme.h > > Modified: head/usr.bin/mkimg/format.c > ============================================================================== > --- head/usr.bin/mkimg/format.c Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/format.c Sun Sep 25 22:57:59 2016 (r306325) > @@ -28,8 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > -#include > #include > #include > #include > @@ -42,8 +40,24 @@ __FBSDID("$FreeBSD$"); > #include "format.h" > #include "mkimg.h" > > +static struct mkimg_format *first; > static struct mkimg_format *format; > > +struct mkimg_format * > +format_iterate(struct mkimg_format *f) > +{ > + > + return ((f == NULL) ? first : f->next); > +} > + > +void > +format_register(struct mkimg_format *f) > +{ > + > + f->next = first; > + first = f; > +} > + > int > format_resize(lba_t end) > { > @@ -56,10 +70,10 @@ format_resize(lba_t end) > int > format_select(const char *spec) > { > - struct mkimg_format *f, **iter; > + struct mkimg_format *f; > > - SET_FOREACH(iter, formats) { > - f = *iter; > + f = NULL; > + while ((f = format_iterate(f)) != NULL) { > if (strcasecmp(spec, f->name) == 0) { > format = f; > return (0); > > Modified: head/usr.bin/mkimg/format.h > ============================================================================== > --- head/usr.bin/mkimg/format.h Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/format.h Sun Sep 25 22:57:59 2016 (r306325) > @@ -29,21 +29,24 @@ > #ifndef _MKIMG_FORMAT_H_ > #define _MKIMG_FORMAT_H_ > > -#include > - > struct mkimg_format { > + struct mkimg_format *next; > const char *name; > const char *description; > int (*resize)(lba_t); > int (*write)(int); > }; > > -SET_DECLARE(formats, struct mkimg_format); > -#define FORMAT_DEFINE(nm) DATA_SET(formats, nm) > +#define FORMAT_DEFINE(nm) \ > +static void format_register_##nm(void) __attribute__((constructor)); \ > +static void format_register_##nm(void) { format_register(&nm); } > > -int format_resize(lba_t); > +struct mkimg_format *format_iterate(struct mkimg_format *); > +void format_register(struct mkimg_format *); > int format_select(const char *); > struct mkimg_format *format_selected(void); > + > +int format_resize(lba_t); > int format_write(int); > > #endif /* _MKIMG_FORMAT_H_ */ > > Modified: head/usr.bin/mkimg/mkimg.c > ============================================================================== > --- head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:57:59 2016 (r306325) > @@ -27,7 +27,6 @@ > #include > __FBSDID("$FreeBSD$"); > > -#include > #include > #include > #include > @@ -77,20 +76,20 @@ u_int blksz = 0; > static void > print_formats(int usage) > { > - struct mkimg_format *f, **f_iter; > + struct mkimg_format *f; > const char *sep; > > if (usage) { > fprintf(stderr, " formats:\n"); > - SET_FOREACH(f_iter, formats) { > - f = *f_iter; > + f = NULL; > + while ((f = format_iterate(f)) != NULL) { > fprintf(stderr, "\t%s\t- %s\n", f->name, > f->description); > } > } else { > sep = ""; > - SET_FOREACH(f_iter, formats) { > - f = *f_iter; > + f = NULL; > + while ((f = format_iterate(f)) != NULL) { > printf("%s%s", sep, f->name); > sep = " "; > } > @@ -101,20 +100,20 @@ print_formats(int usage) > static void > print_schemes(int usage) > { > - struct mkimg_scheme *s, **s_iter; > + struct mkimg_scheme *s; > const char *sep; > > if (usage) { > fprintf(stderr, " schemes:\n"); > - SET_FOREACH(s_iter, schemes) { > - s = *s_iter; > + s = NULL; > + while ((s = scheme_iterate(s)) != NULL) { > fprintf(stderr, "\t%s\t- %s\n", s->name, > s->description); > } > } else { > sep = ""; > - SET_FOREACH(s_iter, schemes) { > - s = *s_iter; > + s = NULL; > + while ((s = scheme_iterate(s)) != NULL) { > printf("%s%s", sep, s->name); > sep = " "; > } > > Modified: head/usr.bin/mkimg/scheme.c > ============================================================================== > --- head/usr.bin/mkimg/scheme.c Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/scheme.c Sun Sep 25 22:57:59 2016 (r306325) > @@ -28,8 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > -#include > #include > #include > #include > @@ -65,6 +63,7 @@ static struct { > { NULL, ALIAS_NONE } /* Keep last! */ > }; > > +static struct mkimg_scheme *first; > static struct mkimg_scheme *scheme; > static void *bootcode; > > @@ -82,13 +81,27 @@ scheme_parse_alias(const char *name) > return (ALIAS_NONE); > } > > +struct mkimg_scheme * > +scheme_iterate(struct mkimg_scheme *s) > +{ > + > + return ((s == NULL) ? first : s->next); > +} > + > +void > +scheme_register(struct mkimg_scheme *s) > +{ > + s->next = first; > + first = s; > +} > + > int > scheme_select(const char *spec) > { > - struct mkimg_scheme *s, **iter; > + struct mkimg_scheme *s; > > - SET_FOREACH(iter, schemes) { > - s = *iter; > + s = NULL; > + while ((s = scheme_iterate(s)) != NULL) { > if (strcasecmp(spec, s->name) == 0) { > scheme = s; > return (0); > > Modified: head/usr.bin/mkimg/scheme.h > ============================================================================== > --- head/usr.bin/mkimg/scheme.h Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/scheme.h Sun Sep 25 22:57:59 2016 (r306325) > @@ -29,8 +29,6 @@ > #ifndef _MKIMG_SCHEME_H_ > #define _MKIMG_SCHEME_H_ > > -#include > - > enum alias { > ALIAS_NONE, /* Keep first! */ > /* start */ > @@ -62,6 +60,7 @@ struct mkimg_alias { > }; > > struct mkimg_scheme { > + struct mkimg_scheme *next; > const char *name; > const char *description; > struct mkimg_alias *aliases; > @@ -77,9 +76,12 @@ struct mkimg_scheme { > u_int maxsecsz; > }; > > -SET_DECLARE(schemes, struct mkimg_scheme); > -#define SCHEME_DEFINE(nm) DATA_SET(schemes, nm) > +#define SCHEME_DEFINE(nm) \ > +static void scheme_register_##nm(void) __attribute__((constructor)); \ > +static void scheme_register_##nm(void) { scheme_register(&nm); } > > +struct mkimg_scheme *scheme_iterate(struct mkimg_scheme *); > +void scheme_register(struct mkimg_scheme *); > int scheme_select(const char *); > struct mkimg_scheme *scheme_selected(void); > > From owner-svn-src-all@freebsd.org Mon Sep 26 00:09:28 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 4AD75BEA405; Mon, 26 Sep 2016 00:09:28 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (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 2CBC2153F; Mon, 26 Sep 2016 00:09:27 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8Q09LEd008443 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Sep 2016 17:09:21 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Sun, 25 Sep 2016 17:09:20 -0700 From: Marcel Moolenaar To: Marcel Moolenaar , cem@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers Message-ID: In-Reply-To: References: <201609252257.u8PMvxUx047428@repo.freebsd.org> Subject: Re: svn commit: r306325 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="27779CF1-FBA2-4D54-B6E0-BD1DB12EC109"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Sun, 25 Sep 2016 17:09:21 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 00:09:28 -0000 --27779CF1-FBA2-4D54-B6E0-BD1DB12EC109 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On September 25, 2016 at 4:52:17 PM, Conrad Meyer (cem=40freebsd.org) wro= te: What's the motivation for this=3F This seems worse.=C2=A0 Portability. =C2=A0We need mkimg to compile on other OSes besides =46reeB= SD. =C2=A0In particular, macOS and Linux. =C2=A0It=E2=80=99s ok that cons= tructors are not 100% portable=E2=80=A6 --27779CF1-FBA2-4D54-B6E0-BD1DB12EC109 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 AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX6GcxAAoJEIda8t8f0tjjis4P/1SYDtoVZY08nvE/gitAF/TF L+Y0o86BMTB6MZ+gArDKqIZLrAI1bNS1zda8jdSXnBbnR4iMmsR62rRJX5+sj4/K t9d5T+fAIF+PfE2orj2vr+u08QeSlRh+Uj07eJtgJPHz9k6aPNmFp/XqZizqAYZC NaVgcgSsSmftL3Y8Ff8de07aOVNbVnhAls8WoK3ir3KoUlVB2N28WVcBCH3SYQOv hzahjHTlsvgKsz4Kj3sC0O+ckI10VyvTebbzDpC4Z/R3ZgjuaOJ7Xz0+uPFLJRdV 8oURYhkHlV62WGayaqMifxxYFRmgTF2ZhMSxDEebRC8KGwReKvM8/vb3uY7IcfIz jtZ1jL338Cg2/uRNlbhnnlT6rJCXIk1E0XSQYFhQIhnVWCt5W4wtNBDDaEOTeZxW DGfEx3QbosSeWfm5t9jwWulWAMyRQGh8U55VAApqECTQQViF0R7n/ejqvgQ5RUhP Zdk0Oa6B1M2St1O2uz9HSUmL9xN0hzjMLwQTZR8FIA55AOoeDI5kBLv29hub5G30 gFhpDbvQzsur/0AGTfxvy5kbvyGTtV4uF3yGlQasLBCKnLmk5kC+hx5rEcAB6mRo GFjUJ9FbM2q5fUncunbbgJ300iIXLHaOIKonHr/tKse3jl9QUr+6R01d3DRyBi0w ntYYsLWw0cQ1m13Bv0kv -----END PGP SIGNATURE----- --27779CF1-FBA2-4D54-B6E0-BD1DB12EC109-- From owner-svn-src-all@freebsd.org Mon Sep 26 00:17:13 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 21FECBEA63C; Mon, 26 Sep 2016 00:17:13 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (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 EBC8A1999; Mon, 26 Sep 2016 00:17:12 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8Q0HBXH008520 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Sep 2016 17:17:12 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Sun, 25 Sep 2016 17:17:11 -0700 From: Marcel Moolenaar To: "Andrey V. Elsukov" , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, Marcel Moolenaar Message-ID: In-Reply-To: <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> References: <201609251639.u8PGdIfT005260@repo.freebsd.org> <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> Subject: Re: svn commit: r306312 - head X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="694B0D52-874A-4B45-B919-28AF1FB02A66"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Sun, 25 Sep 2016 17:17:12 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 00:17:13 -0000 --694B0D52-874A-4B45-B919-28AF1FB02A66 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On September 25, 2016 at 10:41:32 AM, Andrey V. Elsukov (bu7cher=40yandex= .ru) wrote: On 25.09.16 19:39, Marcel Moolenaar wrote:=C2=A0 > +20160924:=C2=A0 > + Relocatable object files with the extension of .So have been renamed=C2= =A0 > + to use an extension of .pico instead. The purpose of this change is=C2= =A0 > + to avoid a name clash with shared libraries on case-insensitive file=C2= =A0 > + systems. On those file systems, foo.So is the same file as foo.so.=C2= =A0 Hi,=C2=A0 probably old *.So files now should be removed using =60make delete-old=60= or=C2=A0 something like this. make =E2=80=9Cdelete-old=E2=80=9D is not for pruning files or directories= in the object tree (unless that changed while I wasn=E2=80=99t paying at= tention. Has that changed=3F --694B0D52-874A-4B45-B919-28AF1FB02A66 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 AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX6GkHAAoJEIda8t8f0tjj0s0P/0aYsX36AmnfALHj8Jc5+/OD Mf0Rt94y9NiwS04wkIpnVskUsOp/836XJ+KLcvsXY/BubngPx+71Ln/KYGwlOa+N byiqf/CEEz+ITMkgUxFTdc1+638lTK4HdNzKXJ3FTy7Zwze7b+YUXDfTsuMW0aDq 4BPTsnuUIvXbjVRA24keO7ZQEGvr4SfRZmwBREf/qPDhPP2Xw+BY1Oe6Etg1hMDk N1cE1LCOeJkSW3/z8s1DTZpzdDYc/RHeFNreFpjhmITCQ/dez4r2+CIYniOeRuRS iG+7waSqDcMmdiIGh0L8jKhNd14Mq85mWlfHLwD7KFObjPpyFbadsO06pEh7DQJ3 zt93JANfNsKRtTibXWA/IMKSZNmJNYZ67KxbOtXG5QFn0z97ApmabQg5SUSQtzZH VFyp2qpNJylUNPHhzaZ+dIGPUPmXeZh33oNivGusZwuJBES1ovRL6l6D6rLTASai qNt/1PcVXAhKsGJ3sr1784jISrwN4TlYwKGFnawuAjQf+LP+d/NaHafRZIdmRQdS Ooxx/rbDGrqBl/SXILZTmzFTlMVleVITZC7noyexknApkHhqDE/+hjR5SW5eGwvY wiOaahvBss6yLcjeHtYVLSDHv6enJyWj8bIOcyy6hZ6brF/+TILaPkmK+GzDjzDI arMVRxtKBF5Ra3TuvZeW -----END PGP SIGNATURE----- --694B0D52-874A-4B45-B919-28AF1FB02A66-- From owner-svn-src-all@freebsd.org Mon Sep 26 00:20: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 9A1F1BEA6BE; Mon, 26 Sep 2016 00:20:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (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 6C3B51B20; Mon, 26 Sep 2016 00:20:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f41.google.com with SMTP id n143so61514134ita.1; Sun, 25 Sep 2016 17:20:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=rUJXHxonjRWZqFae3DM5I3vpwo7P7nG9PY3cSvxu6mU=; b=NdqhRqZF6y2DwH48QRdc23ehaYnxh63QeNic4VoSWkWlUrFkOHSZCiuz824pkhCM+C BhYTPYpge/2Rq92ZU4APzffMcaC3RDJV+K4RitC9MHR21nAWPO7U+dOtomQR+hRiRVyP aMIm4y0LSdBfN9y/mPKHQMRKqudbMPe6T5NQa/diweYc0bh/paWN6CrezVAjOk3XFxCG xynGMaUVBNcwhaK0NylGfJH+utz6ZdpYy5cIjsPBQ/Dok5z2rlpFXwG0Ec1w5jzSKj/Y T3cWKFgigWpYErX1+tFDLAeWW2/zpY5LnMoemFKEF8mgFljqdmYMWIT38HxKsHUJePGL A0bw== X-Gm-Message-State: AA6/9RkEJ3fnpoe9YL0FIE97t+dOrOLeJWHadw4FwEDEE5Ds5OLamYxaaqJ0xZK8KTRDaQ== X-Received: by 10.36.184.65 with SMTP id m62mr15162503ite.55.1474849229105; Sun, 25 Sep 2016 17:20:29 -0700 (PDT) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com. [209.85.223.170]) by smtp.gmail.com with ESMTPSA id k128sm7299227ioe.20.2016.09.25.17.20.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 17:20:28 -0700 (PDT) Received: by mail-io0-f170.google.com with SMTP id m79so167532012ioo.3; Sun, 25 Sep 2016 17:20:28 -0700 (PDT) X-Received: by 10.107.58.87 with SMTP id h84mr20585767ioa.122.1474849228680; Sun, 25 Sep 2016 17:20:28 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Sun, 25 Sep 2016 17:20:28 -0700 (PDT) In-Reply-To: References: <201609252257.u8PMvxUx047428@repo.freebsd.org> From: Conrad Meyer Date: Sun, 25 Sep 2016 17:20:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306325 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 00:20:36 -0000 On Sun, Sep 25, 2016 at 5:09 PM, Marcel Moolenaar wrote= : > On September 25, 2016 at 4:52:17 PM, Conrad Meyer (cem@freebsd.org) wrote= : > > > What's the motivation for this? This seems worse. > > Portability. We need mkimg to compile on other OSes besides FreeBSD. In > particular, macOS and Linux. It=E2=80=99s ok that constructors are not 1= 00% > portable=E2=80=A6 That makes sense, thanks. It would be good to include that motivation in the commit message, then I don't ask stupid questions like this. :-) Best, Conrad From owner-svn-src-all@freebsd.org Mon Sep 26 00:41: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 A452DBEAA17; Mon, 26 Sep 2016 00:41:09 +0000 (UTC) (envelope-from marcel@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 585DF277; Mon, 26 Sep 2016 00:41:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q0f83B086710; Mon, 26 Sep 2016 00:41:08 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q0f8h3086708; Mon, 26 Sep 2016 00:41:08 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609260041.u8Q0f8h3086708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 26 Sep 2016 00:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306329 - head/usr.bin/mkimg 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.23 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, 26 Sep 2016 00:41:09 -0000 Author: marcel Date: Mon Sep 26 00:41:08 2016 New Revision: 306329 URL: https://svnweb.freebsd.org/changeset/base/306329 Log: Eliminate the use of EDOOFUS. The error code was used to signal programming errors, but is really a poor substitute for assert. And less portable as well. Modified: head/usr.bin/mkimg/image.c head/usr.bin/mkimg/qcow.c Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Sun Sep 25 23:48:15 2016 (r306328) +++ head/usr.bin/mkimg/image.c Mon Sep 26 00:41:08 2016 (r306329) @@ -456,8 +456,7 @@ image_copyin_mapped(lba_t blk, int fd, u * I don't know what this means or whether it * can happen at all... */ - error = EDOOFUS; - break; + assert(0); } } if (error) @@ -602,7 +601,7 @@ image_copyout_region(int fd, lba_t blk, error = image_copyout_memory(fd, sz, ch->ch_u.mem.ptr); break; default: - return (EDOOFUS); + assert(0); } size -= sz; blk += sz / secsz; Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Sun Sep 25 23:48:15 2016 (r306328) +++ head/usr.bin/mkimg/qcow.c Mon Sep 26 00:41:08 2016 (r306329) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -102,7 +103,7 @@ qcow_resize(lba_t imgsz, u_int version) clstr_log2sz = QCOW2_CLSTR_LOG2SZ; break; default: - return (EDOOFUS); + assert(0); } imagesz = round_clstr(imgsz * secsz); @@ -143,8 +144,7 @@ qcow_write(int fd, u_int version) u_int clstrsz, l1idx, l2idx; int error; - if (clstr_log2sz == 0) - return (EDOOFUS); + assert(clstr_log2sz != 0); clstrsz = 1U << clstr_log2sz; blk_clstrsz = clstrsz / secsz; @@ -203,7 +203,7 @@ qcow_write(int fd, u_int version) be32enc(&hdr->u.v2.refcnt_clstrs, refcnt_clstrs); break; default: - return (EDOOFUS); + assert(0); } if (sparse_write(fd, hdr, clstrsz) < 0) { From owner-svn-src-all@freebsd.org Mon Sep 26 01:06:34 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 CFDDBBEAE88; Mon, 26 Sep 2016 01:06:34 +0000 (UTC) (envelope-from marcel@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 9DBC0F2F; Mon, 26 Sep 2016 01:06:34 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q16XCX095466; Mon, 26 Sep 2016 01:06:33 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q16Wuv095454; Mon, 26 Sep 2016 01:06:32 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609260106.u8Q16Wuv095454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 26 Sep 2016 01:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306330 - head/usr.bin/mkimg 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.23 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, 26 Sep 2016 01:06:34 -0000 Author: marcel Date: Mon Sep 26 01:06:32 2016 New Revision: 306330 URL: https://svnweb.freebsd.org/changeset/base/306330 Log: Avoid depending on the header for le*enc and be*enc. Not only is the header unportable, the encoding/decoding functions are as well. Instead, duplicate the handful of small inlines we need into a private header called endian.h. Aside: an alternative approach is to move the encoding/decoding functions to a separate system header. While the header is still nonportable, such an approach would make it possible to re-use the definitions by playing games with include paths. This may be the preferred approach if more (build) utilities need this. This change does not preclude that. In fact, it makes it easier. Added: head/usr.bin/mkimg/endian.h (contents, props changed) Modified: head/usr.bin/mkimg/apm.c head/usr.bin/mkimg/bsd.c head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/gpt.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/pc98.c head/usr.bin/mkimg/qcow.c head/usr.bin/mkimg/raw.c head/usr.bin/mkimg/vhd.c head/usr.bin/mkimg/vmdk.c head/usr.bin/mkimg/vtoc8.c Modified: head/usr.bin/mkimg/apm.c ============================================================================== --- head/usr.bin/mkimg/apm.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/apm.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/bsd.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/ebr.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Added: head/usr.bin/mkimg/endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/mkimg/endian.h Mon Sep 26 01:06:32 2016 (r306330) @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 2002 Thomas Moestl + * 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. + * + * $FreeBSD$ + */ + +#ifndef _MKIMG_ENDIAN_H_ +#define _MKIMG_ENDIAN_H_ + +static __inline uint16_t +be16dec(const void *pp) +{ + uint8_t const *p = (uint8_t const *)pp; + + return ((p[0] << 8) | p[1]); +} + +static __inline void +be16enc(void *pp, uint16_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = (u >> 8) & 0xff; + p[1] = u & 0xff; +} + +static __inline void +be32enc(void *pp, uint32_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = (u >> 24) & 0xff; + p[1] = (u >> 16) & 0xff; + p[2] = (u >> 8) & 0xff; + p[3] = u & 0xff; +} + +static __inline void +be64enc(void *pp, uint64_t u) +{ + uint8_t *p = (uint8_t *)pp; + + be32enc(p, (uint32_t)(u >> 32)); + be32enc(p + 4, (uint32_t)(u & 0xffffffffU)); +} + +static __inline uint16_t +le16dec(const void *pp) +{ + uint8_t const *p = (uint8_t const *)pp; + + return ((p[1] << 8) | p[0]); +} + +static __inline void +le16enc(void *pp, uint16_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = u & 0xff; + p[1] = (u >> 8) & 0xff; +} + +static __inline void +le32enc(void *pp, uint32_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = u & 0xff; + p[1] = (u >> 8) & 0xff; + p[2] = (u >> 16) & 0xff; + p[3] = (u >> 24) & 0xff; +} + +static __inline void +le64enc(void *pp, uint64_t u) +{ + uint8_t *p = (uint8_t *)pp; + + le32enc(p, (uint32_t)(u & 0xffffffffU)); + le32enc(p + 4, (uint32_t)(u >> 32)); +} + +#endif /* _MKIMG_ENDIAN_H_ */ Modified: head/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/gpt.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -39,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/mbr.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/pc98.c ============================================================================== --- head/usr.bin/mkimg/pc98.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/pc98.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/qcow.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "format.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/raw.c ============================================================================== --- head/usr.bin/mkimg/raw.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/raw.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/vhd.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "format.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/vmdk.c ============================================================================== --- head/usr.bin/mkimg/vmdk.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/vmdk.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "format.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/vtoc8.c ============================================================================== --- head/usr.bin/mkimg/vtoc8.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/vtoc8.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" From owner-svn-src-all@freebsd.org Mon Sep 26 02:05: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 9A275BEA959; Mon, 26 Sep 2016 02:05:03 +0000 (UTC) (envelope-from adrian@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 573E12A2; Mon, 26 Sep 2016 02:05:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q252Ih018152; Mon, 26 Sep 2016 02:05:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q252qP018151; Mon, 26 Sep 2016 02:05:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609260205.u8Q252qP018151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 26 Sep 2016 02:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306331 - head/sys/dev/ath/ath_hal 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.23 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, 26 Sep 2016 02:05:03 -0000 Author: adrian Date: Mon Sep 26 02:05:02 2016 New Revision: 306331 URL: https://svnweb.freebsd.org/changeset/base/306331 Log: [ath_hal] add a new regdomain flag - I think this means "yes, you can use this NIC in channel 144 if you're in FCC6." I have to go figure out more details about this before I enable it.. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Sep 26 01:06:32 2016 (r306330) +++ head/sys/dev/ath/ath_hal/ah.h Mon Sep 26 02:05:02 2016 (r306331) @@ -635,7 +635,8 @@ typedef enum { REG_EXT_JAPAN_MIDBAND = 1, REG_EXT_FCC_DFS_HT40 = 2, REG_EXT_JAPAN_NONDFS_HT40 = 3, - REG_EXT_JAPAN_DFS_HT40 = 4 + REG_EXT_JAPAN_DFS_HT40 = 4, + REG_EXT_FCC_CH_144 = 5, } REG_EXT_BITMAP; enum { From owner-svn-src-all@freebsd.org Mon Sep 26 02:13:20 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 625A9BEAAE4; Mon, 26 Sep 2016 02:13:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 2836A912; Mon, 26 Sep 2016 02:13:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id m186so168609373ioa.2; Sun, 25 Sep 2016 19:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nitCJjsNz5uZccFbf2PNEI4Alhpr1wWaAKunc+ItGJo=; b=uevYg1cmLY3Jngvmneb/uec2JojTH/4dEAYFj2Iax1ey5+i/TzbVhhmDuhosW7ANtt X0zekxVT/NwOYoyJ/MVWV4aDkn1uueBpimsqNCwkgr/YD974L3v4M+wpE8fNlO1qddYq /RIYEtiWJdlUKxhgWvnLRbznyn8FnYv4RtYweflTaIPP70HYq99Hh3o3H5SaO5i4PdVm KWFXrYNIJYzghP19sPnq0gGhdmQEJnH6QZCFuKlOadVjL7P8YO1Nssa+ONpLdgsm5X+7 LS91S5oMZGxMZU2irQrEWdXpxK6uf5AX5gjudTc+kqGjfg+G3vy/MyrTMdhsR3kw8SrJ DhEw== 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:from:date :message-id:subject:to:cc; bh=nitCJjsNz5uZccFbf2PNEI4Alhpr1wWaAKunc+ItGJo=; b=SKxKVGvYJULXGvMB++5lTVc2vkaZy1C4C69gQXUKCtcecXe6yG90c3dVYFqI6Qj4RY LcO5SZP/LNyUuQgFOxxxkbLsRXHWvsuurQ5xOStiayR34T73k8I2E47o5z/PVFOjL5F4 7L8Xz0J7+084c6qEZW4MAN6rN+MjoIQyZmhcGovhvfpsqxZXtXKMgh1jfeklAbURotlx zfJQvr6TOdguWP9JhTwf47YfqN5MPYr2AzZKUhc43APFw1pzk6dS6d581poMPPzVE54x T4+4Pfoj8BV0ZItgBLNyrYlvolyE3nJPgUsE/uHiRI9E9XoKx0Xm9uCLmMSjEk1QJ3v0 xAFA== X-Gm-Message-State: AE9vXwOufBR5u8BYYc7RAdCKRePOkWesXU0jKfl+XgYlKYCxjxm5jkrT/KwkmbZZ+96a0UqxnEIjKMeRAPNVEw== X-Received: by 10.107.183.77 with SMTP id h74mr19509424iof.134.1474855998865; Sun, 25 Sep 2016 19:13:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Sun, 25 Sep 2016 19:13:18 -0700 (PDT) In-Reply-To: <201609260106.u8Q16Wuv095454@repo.freebsd.org> References: <201609260106.u8Q16Wuv095454@repo.freebsd.org> From: Adrian Chadd Date: Sun, 25 Sep 2016 19:13:18 -0700 Message-ID: Subject: Re: svn commit: r306330 - head/usr.bin/mkimg To: Marcel Moolenaar 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.23 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, 26 Sep 2016 02:13:20 -0000 Hi, Yeah, for portable-y stuff, I'd recommend: #include "endian.h" -> #ifdef __FreeBSD__ #include #elif __Apple__ etc, etc. That way we don't duplicate contents. Same with sys/queue.h, etc. -adrian On 25 September 2016 at 18:06, Marcel Moolenaar wrote: > Author: marcel > Date: Mon Sep 26 01:06:32 2016 > New Revision: 306330 > URL: https://svnweb.freebsd.org/changeset/base/306330 > > Log: > Avoid depending on the header for le*enc and be*enc. > Not only is the header unportable, the encoding/decoding functions > are as well. Instead, duplicate the handful of small inlines we > need into a private header called endian.h. > > Aside: an alternative approach is to move the encoding/decoding > functions to a separate system header. While the header is still > nonportable, such an approach would make it possible to re-use the > definitions by playing games with include paths. This may be the > preferred approach if more (build) utilities need this. This > change does not preclude that. In fact, it makes it easier. > > Added: > head/usr.bin/mkimg/endian.h (contents, props changed) > Modified: > head/usr.bin/mkimg/apm.c > head/usr.bin/mkimg/bsd.c > head/usr.bin/mkimg/ebr.c > head/usr.bin/mkimg/gpt.c > head/usr.bin/mkimg/mbr.c > head/usr.bin/mkimg/pc98.c > head/usr.bin/mkimg/qcow.c > head/usr.bin/mkimg/raw.c > head/usr.bin/mkimg/vhd.c > head/usr.bin/mkimg/vmdk.c > head/usr.bin/mkimg/vtoc8.c > > Modified: head/usr.bin/mkimg/apm.c > ============================================================================== > --- head/usr.bin/mkimg/apm.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/apm.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/bsd.c > ============================================================================== > --- head/usr.bin/mkimg/bsd.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/bsd.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/ebr.c > ============================================================================== > --- head/usr.bin/mkimg/ebr.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/ebr.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Added: head/usr.bin/mkimg/endian.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/mkimg/endian.h Mon Sep 26 01:06:32 2016 (r306330) > @@ -0,0 +1,106 @@ > +/*- > + * Copyright (c) 2002 Thomas Moestl > + * 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. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _MKIMG_ENDIAN_H_ > +#define _MKIMG_ENDIAN_H_ > + > +static __inline uint16_t > +be16dec(const void *pp) > +{ > + uint8_t const *p = (uint8_t const *)pp; > + > + return ((p[0] << 8) | p[1]); > +} > + > +static __inline void > +be16enc(void *pp, uint16_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = (u >> 8) & 0xff; > + p[1] = u & 0xff; > +} > + > +static __inline void > +be32enc(void *pp, uint32_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = (u >> 24) & 0xff; > + p[1] = (u >> 16) & 0xff; > + p[2] = (u >> 8) & 0xff; > + p[3] = u & 0xff; > +} > + > +static __inline void > +be64enc(void *pp, uint64_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + be32enc(p, (uint32_t)(u >> 32)); > + be32enc(p + 4, (uint32_t)(u & 0xffffffffU)); > +} > + > +static __inline uint16_t > +le16dec(const void *pp) > +{ > + uint8_t const *p = (uint8_t const *)pp; > + > + return ((p[1] << 8) | p[0]); > +} > + > +static __inline void > +le16enc(void *pp, uint16_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = u & 0xff; > + p[1] = (u >> 8) & 0xff; > +} > + > +static __inline void > +le32enc(void *pp, uint32_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = u & 0xff; > + p[1] = (u >> 8) & 0xff; > + p[2] = (u >> 16) & 0xff; > + p[3] = (u >> 24) & 0xff; > +} > + > +static __inline void > +le64enc(void *pp, uint64_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + le32enc(p, (uint32_t)(u & 0xffffffffU)); > + le32enc(p + 4, (uint32_t)(u >> 32)); > +} > + > +#endif /* _MKIMG_ENDIAN_H_ */ > > Modified: head/usr.bin/mkimg/gpt.c > ============================================================================== > --- head/usr.bin/mkimg/gpt.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/gpt.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > @@ -39,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/mbr.c > ============================================================================== > --- head/usr.bin/mkimg/mbr.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/mbr.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/pc98.c > ============================================================================== > --- head/usr.bin/mkimg/pc98.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/pc98.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/qcow.c > ============================================================================== > --- head/usr.bin/mkimg/qcow.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/qcow.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "format.h" > #include "mkimg.h" > > Modified: head/usr.bin/mkimg/raw.c > ============================================================================== > --- head/usr.bin/mkimg/raw.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/raw.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > > Modified: head/usr.bin/mkimg/vhd.c > ============================================================================== > --- head/usr.bin/mkimg/vhd.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/vhd.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "format.h" > #include "mkimg.h" > > Modified: head/usr.bin/mkimg/vmdk.c > ============================================================================== > --- head/usr.bin/mkimg/vmdk.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/vmdk.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "format.h" > #include "mkimg.h" > > Modified: head/usr.bin/mkimg/vtoc8.c > ============================================================================== > --- head/usr.bin/mkimg/vtoc8.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/vtoc8.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > From owner-svn-src-all@freebsd.org Mon Sep 26 02:29: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 D7A7ABEAE45; Mon, 26 Sep 2016 02:29:29 +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 A7F0FDDF; Mon, 26 Sep 2016 02:29:29 +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 u8Q2TStM025605; Mon, 26 Sep 2016 02:29:28 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q2TS6b025604; Mon, 26 Sep 2016 02:29:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609260229.u8Q2TS6b025604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 26 Sep 2016 02:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306332 - head/lib/libc/db/btree 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.23 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, 26 Sep 2016 02:29:29 -0000 Author: pfg Date: Mon Sep 26 02:29:28 2016 New Revision: 306332 URL: https://svnweb.freebsd.org/changeset/base/306332 Log: btree(3): don't shortcut closing if the metadata is dirty. Obtained from: NetBSD (from krb5 tree) MFC after: 3 weeks Modified: head/lib/libc/db/btree/bt_close.c Modified: head/lib/libc/db/btree/bt_close.c ============================================================================== --- head/lib/libc/db/btree/bt_close.c Mon Sep 26 02:05:02 2016 (r306331) +++ head/lib/libc/db/btree/bt_close.c Mon Sep 26 02:29:28 2016 (r306332) @@ -134,7 +134,8 @@ __bt_sync(const DB *dbp, u_int flags) return (RET_ERROR); } - if (F_ISSET(t, B_INMEM | B_RDONLY) || !F_ISSET(t, B_MODIFIED)) + if (F_ISSET(t, B_INMEM | B_RDONLY) || + !F_ISSET(t, B_MODIFIED | B_METADIRTY)) return (RET_SUCCESS); if (F_ISSET(t, B_METADIRTY) && bt_meta(t) == RET_ERROR) From owner-svn-src-all@freebsd.org Mon Sep 26 02:34: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 6CEE2BEAF9B; Mon, 26 Sep 2016 02:34:25 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (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 4DADD20A; Mon, 26 Sep 2016 02:34:24 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8Q2YN3O009501 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Sep 2016 19:34:23 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Sun, 25 Sep 2016 19:34:22 -0700 From: Marcel Moolenaar To: Marcel Moolenaar , Adrian Chadd Cc: "=?utf-8?Q?svn-src-all=40freebsd.org?=" , "=?utf-8?Q?svn-src-head=40freebsd.org?=" , "=?utf-8?Q?src-committers=40freebsd.org?=" Message-ID: In-Reply-To: References: <201609260106.u8Q16Wuv095454@repo.freebsd.org> Subject: Re: svn commit: r306330 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="835F936A-5EE0-4F98-814B-A7FAF9235B47"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Sun, 25 Sep 2016 19:34:23 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 02:34:25 -0000 --835F936A-5EE0-4F98-814B-A7FAF9235B47 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On September 25, 2016 at 7:13:21 PM, Adrian Chadd (adrian.chadd=40gmail.c= om) wrote: Hi,=C2=A0 Yeah, for portable-y stuff, I'd recommend:=C2=A0 =23include =22endian.h=22 -> =23ifdef =5F=5F=46reeBSD=5F=5F =23include =C2=A0 =23elif =5F=5FApple=5F=5F etc, etc.=C2=A0 That way we don't duplicate contents.=C2=A0 Same with sys/queue.h, etc.=C2=A0 We may even want to do , , etc. The comp= at directory can be shared by all build utilities that need portability. = =C2=A0That way we only have to solve portability problems once. =C2=A0The= name compat is but a suggestion. --835F936A-5EE0-4F98-814B-A7FAF9235B47 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 AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX6IkvAAoJEIda8t8f0tjjoC0QAKdvosOpq+U0njQtCFvaj/I2 KHn6gCJqOS1Dx9UNcDpCEFsfNKseInLQyrm5BwB8TgXbTA16zQumCCGuWoP73k6G rltqvFdzmkvHTa3FZFt6Jh20QbcvYJm+HZmgk+kRGJJj/JCY245UEr0wBV+KvQTU MAiLTYTkyJrb8JXOhRb47u338y4v28LC7UkFrVJW/IXj7hLiHWP39ue7CSyTbZiw Z3g976fayTopw1DCBOJJr3OE6wulUIirzG14EZyAEGymJ4cyeGIYWr6z7akX7gR9 Ve8YKub9OxhH4rA89qjbI7dcp3BBp/x1zvwd9eR6A6r6H2syLFOs2GZLQF/i1Gbu U7yiGF/geo325XTvPyIsZcpafMZob+zU+iLrbzfvDOEUeqoQokGUqQK+JQW/Ilp4 pD8ZBapwnqkVEfhzPPFQkR5jYL4BFnCaAXRlTpu+OXaxvhS97pKL6vH0Ar0vsJOa S7tccvJb8RzrVYKpOdf8UfWQctMmPiE137oPb8QfZtGpg4vY4pKHCm5mvcdeeFXy KDIUfU+uLX9LwK+4KXtZNQpTBwIxcwViNu+SSoZ0ZKv51ZOEZsiYMMp/f23ffBIq 7lrZJw54WdRP5A85zgkQA1xbpASDo5mPQXkUvA8jtOZvLMvoxoH2OTM4cch22hIH 8JiSSD0BqhTydScs7+gM -----END PGP SIGNATURE----- --835F936A-5EE0-4F98-814B-A7FAF9235B47-- From owner-svn-src-all@freebsd.org Mon Sep 26 04:14: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 8E50DBE8806; Mon, 26 Sep 2016 04:14:01 +0000 (UTC) (envelope-from marcel@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 5E8E47BD; Mon, 26 Sep 2016 04:14:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q4E00S067704; Mon, 26 Sep 2016 04:14:00 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q4E0aV067703; Mon, 26 Sep 2016 04:14:00 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609260414.u8Q4E0aV067703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 26 Sep 2016 04:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306333 - head/usr.bin/mkimg 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.23 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, 26 Sep 2016 04:14:01 -0000 Author: marcel Date: Mon Sep 26 04:14:00 2016 New Revision: 306333 URL: https://svnweb.freebsd.org/changeset/base/306333 Log: Portability changes: 1. macOS nor Linux have MAP_NOCORE nor MAP_NOSYNC. Define as 0. 2. macOS doesn't have SEEK_DATA nor SEEK_HOLE. Define as -1 so that lseek will return -1 (with errno set to EINVAL). 3. gcc correctly warns that error is assigned but not used in image_copyout_region(). Fix by returning on the first error. Modified: head/usr.bin/mkimg/image.c Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Mon Sep 26 02:29:28 2016 (r306332) +++ head/usr.bin/mkimg/image.c Mon Sep 26 04:14:00 2016 (r306333) @@ -45,6 +45,20 @@ __FBSDID("$FreeBSD$"); #include "image.h" #include "mkimg.h" +#ifndef MAP_NOCORE +#define MAP_NOCORE 0 +#endif +#ifndef MAP_NOSYNC +#define MAP_NOSYNC 0 +#endif + +#ifndef SEEK_DATA +#define SEEK_DATA -1 +#endif +#ifndef SEEK_HOLE +#define SEEK_HOLE -1 +#endif + struct chunk { STAILQ_ENTRY(chunk) ch_list; size_t ch_size; /* Size of chunk in bytes. */ @@ -582,10 +596,13 @@ image_copyout_region(int fd, lba_t blk, size *= secsz; - while (size > 0) { + error = 0; + while (!error && size > 0) { ch = image_chunk_find(blk); - if (ch == NULL) - return (EINVAL); + if (ch == NULL) { + error = EINVAL; + break; + } ofs = (blk - ch->ch_block) * secsz; sz = ch->ch_size - ofs; sz = ((lba_t)sz < size) ? sz : (size_t)size; @@ -606,7 +623,7 @@ image_copyout_region(int fd, lba_t blk, size -= sz; blk += sz / secsz; } - return (0); + return (error); } int From owner-svn-src-all@freebsd.org Mon Sep 26 06:53: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 D6A83BEAF66; Mon, 26 Sep 2016 06:53:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 9C528950; Mon, 26 Sep 2016 06:53:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 1F0AD782716; Mon, 26 Sep 2016 16:53:28 +1000 (AEST) Date: Mon, 26 Sep 2016 16:53:26 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r306319 - head/sys/i386/i386 In-Reply-To: <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> Message-ID: <20160926164406.T806@besplex.bde.org> References: <201609251839.u8PIdO7t050380@repo.freebsd.org> <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=u3Us7hdzS6JT2-gXGnsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 06:53:32 -0000 On Sun, 25 Sep 2016, Colin Percival wrote: > On 09/25/16 11:39, Bruce Evans wrote: >> Author: bde >> Date: Sun Sep 25 18:39:24 2016 >> New Revision: 306319 >> URL: https://svnweb.freebsd.org/changeset/base/306319 >> >> Log: >> Minor fixes for 160-bit disassembly: > > I thought the x86 architecture was limited to 120-bit instructions? Oops. Is 120 the exact limit on instruction length is is that just for prefixes? I think the instruction fetch pipeline was 16 bytes, but it is now often 32 or 64. Bruce From owner-svn-src-all@freebsd.org Mon Sep 26 07:09: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 A9D73BE96CE for ; Mon, 26 Sep 2016 07:09:23 +0000 (UTC) (envelope-from 0100015765538948-1f7dba54-27b0-4580-9c22-ca89be811a29-000000@amazonses.com) Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com [54.240.8.176]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F4F4F10 for ; Mon, 26 Sep 2016 07:09:23 +0000 (UTC) (envelope-from 0100015765538948-1f7dba54-27b0-4580-9c22-ca89be811a29-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1474873756; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=rYLkMkGAKSchJr1lvoRg8oHEHw8BUYq4Irwre1zqmc4=; b=Mu//qWyuAd8jdFeNHZN2pPnQGnG1UHQYMHJ4iVQHPs06k+WoIR6Xs2ceGTrZnNu8 kiCbgJ4EUK4hfzPiBOB/ni+69bIqxXhq5xledaNI5SmcH1+UHHJ+DLe6c6+kx4UH6dc wpWPXoYrDZU07pMGIVAhNN/k04q2/KHyK9APUkSI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1474873756; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=rYLkMkGAKSchJr1lvoRg8oHEHw8BUYq4Irwre1zqmc4=; b=ec97ypwZcBp+spHC6/w8II/b8/i7B5yZ7abLD450xX5iYmzLp27mD7Bp3uUXp4ll TUd5oi02I04ggCBgy6mb2UnSLp/SGlSitIz7jv4PVlZzyOpu/6aO1i7WMNc0jiPp5jU sJ9roLRfsQOmC4dLHMl2fEMbEyUVcxpbSwG0ov6s= Subject: Re: svn commit: r306319 - head/sys/i386/i386 To: Bruce Evans References: <201609251839.u8PIdO7t050380@repo.freebsd.org> <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> <20160926164406.T806@besplex.bde.org> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Colin Percival Message-ID: <0100015765538948-1f7dba54-27b0-4580-9c22-ca89be811a29-000000@email.amazonses.com> Date: Mon, 26 Sep 2016 07:09:16 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160926164406.T806@besplex.bde.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.09.26-54.240.8.176 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 07:09:23 -0000 On 09/25/16 23:53, Bruce Evans wrote: > On Sun, 25 Sep 2016, Colin Percival wrote: >> On 09/25/16 11:39, Bruce Evans wrote: >>> Author: bde >>> Date: Sun Sep 25 18:39:24 2016 >>> New Revision: 306319 >>> URL: https://svnweb.freebsd.org/changeset/base/306319 >>> >>> Log: >>> Minor fixes for 160-bit disassembly: >> >> I thought the x86 architecture was limited to 120-bit instructions? > > Oops. > > Is 120 the exact limit on instruction length is is that just for prefixes? > I think the instruction fetch pipeline was 16 bytes, but it is now often > 32 or 64. Traditionally x86 CPUs would generate an invalid-opcode fault if redundant instruction prefixes resulted in an instruction exceeding 15 bytes. This behaviour might have changed in the past two decades, but I doubt it. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Mon Sep 26 07:51: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 0F407BEA61C; Mon, 26 Sep 2016 07:51:36 +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 9B1C02A9; Mon, 26 Sep 2016 07:51:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8Q7pUhS016647 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 26 Sep 2016 10:51:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8Q7pUhS016647 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8Q7pTDm016645; Mon, 26 Sep 2016 10:51:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 26 Sep 2016 10:51:29 +0300 From: Konstantin Belousov To: Colin Percival Cc: Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r306319 - head/sys/i386/i386 Message-ID: <20160926075129.GD38409@kib.kiev.ua> References: <201609251839.u8PIdO7t050380@repo.freebsd.org> <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> <20160926164406.T806@besplex.bde.org> <0100015765538d1e-07598541-d22e-4eac-8382-b9bad08db716-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100015765538d1e-07598541-d22e-4eac-8382-b9bad08db716-000000@email.amazonses.com> User-Agent: Mutt/1.6.1 (2016-04-27) 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.23 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, 26 Sep 2016 07:51:36 -0000 On Mon, Sep 26, 2016 at 07:09:17AM +0000, Colin Percival wrote: > Traditionally x86 CPUs would generate an invalid-opcode fault if redundant > instruction prefixes resulted in an instruction exceeding 15 bytes. This > behaviour might have changed in the past two decades, but I doubt it. It did not, 15 bytes is the current limit. In fact, the longest AVX VEX-encoded instructions are 11 bytes without prefixes, AFAIR. From owner-svn-src-all@freebsd.org Mon Sep 26 08:18: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 14905BEAF62; Mon, 26 Sep 2016 08:18:36 +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 CCAB5199; Mon, 26 Sep 2016 08:18:35 +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 u8Q8IZ6f058050; Mon, 26 Sep 2016 08:18:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q8IYcx058046; Mon, 26 Sep 2016 08:18:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609260818.u8Q8IYcx058046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Sep 2016 08:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306334 - head/lib/libc/sys 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.23 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, 26 Sep 2016 08:18:36 -0000 Author: kib Date: Mon Sep 26 08:18:34 2016 New Revision: 306334 URL: https://svnweb.freebsd.org/changeset/base/306334 Log: Document thr_suspend(2) and thr_wake(2). Reviewed by: bjk, jilles Discussed with: emaste, wblock Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8016 Added: head/lib/libc/sys/thr_suspend.2 (contents, props changed) head/lib/libc/sys/thr_wake.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Mon Sep 26 04:14:00 2016 (r306333) +++ head/lib/libc/sys/Makefile.inc Mon Sep 26 08:18:34 2016 (r306334) @@ -322,6 +322,8 @@ MAN+= sctp_generic_recvmsg.2 \ thr_new.2 \ thr_self.2 \ thr_set_name.2 \ + thr_suspend.2 \ + thr_wake.2 \ timer_create.2 \ timer_delete.2 \ timer_settime.2 \ Added: head/lib/libc/sys/thr_suspend.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/thr_suspend.2 Mon Sep 26 08:18:34 2016 (r306334) @@ -0,0 +1,130 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" 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 AUTHORS 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 AUTHORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 23, 2016 +.Dt THR_SUSPEND 2 +.Os +.Sh NAME +.Nm thr_suspend +.Nd suspend the calling thread +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/thr.h +.Ft int +.Fn thr_suspend "struct timespec *timeout" +.Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should use +.Xr pthread_cond_timedwait 3 +together with +.Xr pthread_cond_broadcast 3 +for typical safe suspension with cooperation of the thread +being suspended, or +.Xr pthread_suspend_np 3 +and +.Xr pthread_resume_np 3 +in some specific situations, instead. +.Ef +.Pp +The +.Fn thr_suspend +system call puts the calling thread in a suspended state, where it is +not eligible for CPU time. +This state is exited by another thread calling +.Xr thr_wake 2 , +by expiration of the timeout specified in the +.Fa timeout +argument, +or by the delivery of a signal to the suspended thread. +.Pp +If the +.Fa timeout +argument is +.Dv NULL , +the suspended state can be only terminated by explicit +.Fn thr_wake +or signal. +.Pp +If a wake from +.Xr thr_wake 2 +was delivered before the +.Nm +call, the thread is not put into a suspended state. +Instead, the call +returns immediately without an error. +.Pp +If a thread previously called +.Xr thr_wake 2 +with its own thread identifier, which resulted in setting the internal kernel +flag to immediately abort interruptible sleeps with an +.Er EINTR +error +.Po +see +.Xr thr_wake 2 +.Pc , +the flag is cleared. +As with +.Xr thr_wake 2 +called from another thread, the next +.Nm +call does not result in suspension. +.Pp +.Sh RETURN VALUES +.Rv -std thr_suspend +.Sh ERRORS +The +.Fn thr_suspend +operation returns the following errors: +.Bl -tag -width Er +.It Bq Er EFAULT +The memory pointed to by the +.Fa timeout +argument is not valid. +.It Bq Er ETIMEDOUT +The specified timeout expired. +.It Bq Er ETIMEDOUT +The +.Fa timeout +argument specified a zero time interval. +.It Bq Er EINTR +The sleep was interrupted by a signal. +.El +.Sh SEE ALSO +.Xr ps 1 , +.Xr thr_wake 2 , +.Xr pthread_resume_np 3 , +.Xr pthread_suspend_np 3 +.Sh STANDARDS +The +.Fn thr_suspend +system call is non-standard. Added: head/lib/libc/sys/thr_wake.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/thr_wake.2 Mon Sep 26 08:18:34 2016 (r306334) @@ -0,0 +1,112 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" 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 AUTHORS 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 AUTHORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 23, 2016 +.Dt THR_WAKE 2 +.Os +.Sh NAME +.Nm thr_wake +.Nd wake up the suspended thread +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/thr.h +.Ft int +.Fn thr_wake "long id" +.Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should use +.Xr pthread_cond_timedwait 3 +together with +.Xr pthread_cond_broadcast 3 +for typical safe suspension with cooperation of the thread +being suspended, or +.Xr pthread_suspend_np 3 +and +.Xr pthread_resume_np 3 +in some specific situations, instead. +.Ef +.Pp +Passing the thread identifier of the calling thread +.Po +see +.Xr thr_self 2 +.Pc +to +.Fn thr_wake +sets a thread's flag to cause the next signal-interruptible sleep +of that thread in the kernel to fail immediately with the +.Er EINTR +error. +The flag is cleared by an interruptible sleep attempt or by a call to +.Xr thr_suspend 2. +This is used by the system threading library to implement cancellation. +.Pp +If +.Fa id +is not equal to the current thread identifier, the specified thread is +woken up if suspended by the +.Xr thr_suspend +system call. +If the thread is not suspended at the time of the +.Nm +call, the wake is remembered and the next attempt of the thread to +suspend itself with the +.Xr thr_suspend 2 +results in immediate return with success. +Only one wake is remembered. +.Sh RETURN VALUES +.Rv -std thr_wake +.Sh ERRORS +The +.Fn thr_wake +operation returns these errors: +.Bl -tag -width Er +.It Bq Er ESRCH +The specified thread was not found or does not belong to the process +of the calling thread. +.El +.Sh SEE ALSO +.Xr ps 1 , +.Xr thr_self 2 +.Xr thr_suspend 2 , +.Xr pthread_cancel 3 , +.Xr pthread_resume_np 3 , +.Xr pthread_suspend_np 3 +.Sh STANDARDS +The +.Fn thr_suspend +system call is non-standard and is used by +.Lb libthr +to implement +.St -p1003.1-2001 +.Xr pthread 3 +functionality. From owner-svn-src-all@freebsd.org Mon Sep 26 08:19: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 1D2F1BE8089; Mon, 26 Sep 2016 08:19:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1BBD38E; Mon, 26 Sep 2016 08:19:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q8JY15058124; Mon, 26 Sep 2016 08:19:34 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q8JYla058123; Mon, 26 Sep 2016 08:19:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609260819.u8Q8JYla058123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 26 Sep 2016 08:19:34 +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: r306335 - stable/9/crypto/openssl/crypto/bn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 08:19:35 -0000 Author: delphij Date: Mon Sep 26 08:19:33 2016 New Revision: 306335 URL: https://svnweb.freebsd.org/changeset/base/306335 Log: Apply upstream revision 3612ff6fcec0e3d1f2a598135fe12177c0419582: Fix overflow check in BN_bn2dec() Fix an off by one error in the overflow check added by 07bed46 ("Check for errors in BN_bn2dec()"). This fixes a regression introduced in SA-16:26.openssl. Submitted by: jkim PR: 212921 Modified: stable/9/crypto/openssl/crypto/bn/bn_print.c Modified: stable/9/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:18:34 2016 (r306334) +++ stable/9/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:19:33 2016 (r306335) @@ -141,14 +141,13 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); if (*lp == (BN_ULONG)-1) goto err; lp++; - if (lp - bn_data >= bn_data_num) - goto err; } lp--; /* From owner-svn-src-all@freebsd.org Mon Sep 26 08:21:31 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 72339BE8259; Mon, 26 Sep 2016 08:21:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33CAC909; Mon, 26 Sep 2016 08:21:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q8LUp8060875; Mon, 26 Sep 2016 08:21:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q8LTSG060862; Mon, 26 Sep 2016 08:21:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609260821.u8Q8LTSG060862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 26 Sep 2016 08:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306336 - in releng: 10.1 10.1/crypto/openssl/crypto/bn 10.1/sys/conf 10.2 10.2/crypto/openssl/crypto/bn 10.2/sys/conf 10.3 10.3/crypto/openssl/crypto/bn 10.3/sys/conf 9.3 9.3/crypto/op... 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.23 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, 26 Sep 2016 08:21:31 -0000 Author: delphij Date: Mon Sep 26 08:21:29 2016 New Revision: 306336 URL: https://svnweb.freebsd.org/changeset/base/306336 Log: Apply upstream revision 3612ff6fcec0e3d1f2a598135fe12177c0419582: Fix overflow check in BN_bn2dec() Fix an off by one error in the overflow check added by 07bed46 ("Check for errors in BN_bn2dec()"). This fixes a regression introduced in SA-16:26.openssl. Submitted by: jkim PR: 212921 Approved by: so Modified: releng/10.1/UPDATING releng/10.1/crypto/openssl/crypto/bn/bn_print.c releng/10.1/sys/conf/newvers.sh releng/10.2/UPDATING releng/10.2/crypto/openssl/crypto/bn/bn_print.c releng/10.2/sys/conf/newvers.sh releng/10.3/UPDATING releng/10.3/crypto/openssl/crypto/bn/bn_print.c releng/10.3/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/crypto/openssl/crypto/bn/bn_print.c releng/9.3/sys/conf/newvers.sh Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.1/UPDATING Mon Sep 26 08:21:29 2016 (r306336) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160926 p29 FreeBSD-SA-16:26.openssl [revised] + + Fix OpenSSL regression introduced in SA-16:26. + 20160923 p38 FreeBSD-SA-16:26.openssl Fix multiple OpenSSL vulnerabilitites. Modified: releng/10.1/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.1/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:21:29 2016 (r306336) @@ -141,14 +141,13 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); if (*lp == (BN_ULONG)-1) goto err; lp++; - if (lp - bn_data >= bn_data_num) - goto err; } lp--; /* Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.1/sys/conf/newvers.sh Mon Sep 26 08:21:29 2016 (r306336) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p38" +BRANCH="RELEASE-p39" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.2/UPDATING ============================================================================== --- releng/10.2/UPDATING Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.2/UPDATING Mon Sep 26 08:21:29 2016 (r306336) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160926 p22 FreeBSD-SA-16:26.openssl [revised] + + Fix OpenSSL regression introduced in SA-16:26. + 20160923 p21 FreeBSD-SA-16:26.openssl Fix multiple OpenSSL vulnerabilitites. Modified: releng/10.2/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.2/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:21:29 2016 (r306336) @@ -141,14 +141,13 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); if (*lp == (BN_ULONG)-1) goto err; lp++; - if (lp - bn_data >= bn_data_num) - goto err; } lp--; /* Modified: releng/10.2/sys/conf/newvers.sh ============================================================================== --- releng/10.2/sys/conf/newvers.sh Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.2/sys/conf/newvers.sh Mon Sep 26 08:21:29 2016 (r306336) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.2" -BRANCH="RELEASE-p21" +BRANCH="RELEASE-p22" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.3/UPDATING ============================================================================== --- releng/10.3/UPDATING Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.3/UPDATING Mon Sep 26 08:21:29 2016 (r306336) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160926 p9 FreeBSD-SA-16:26.openssl [revised] + + Fix OpenSSL regression introduced in SA-16:26. + 20160923 p8 FreeBSD-SA-16:26.openssl Fix multiple OpenSSL vulnerabilitites. Modified: releng/10.3/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- releng/10.3/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.3/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:21:29 2016 (r306336) @@ -141,14 +141,13 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); if (*lp == (BN_ULONG)-1) goto err; lp++; - if (lp - bn_data >= bn_data_num) - goto err; } lp--; /* Modified: releng/10.3/sys/conf/newvers.sh ============================================================================== --- releng/10.3/sys/conf/newvers.sh Mon Sep 26 08:19:33 2016 (r306335) +++ releng/10.3/sys/conf/newvers.sh Mon Sep 26 08:21:29 2016 (r306336) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Mon Sep 26 08:19:33 2016 (r306335) +++ releng/9.3/UPDATING Mon Sep 26 08:21:29 2016 (r306336) @@ -11,6 +11,10 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20160926 p47 FreeBSD-SA-16:26.openssl [revised] + + Fix OpenSSL regression introduced in SA-16:26. + 20160923 p46 FreeBSD-SA-16:26.openssl Fix multiple OpenSSL vulnerabilitites. Modified: releng/9.3/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- releng/9.3/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:19:33 2016 (r306335) +++ releng/9.3/crypto/openssl/crypto/bn/bn_print.c Mon Sep 26 08:21:29 2016 (r306336) @@ -141,14 +141,13 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); if (*lp == (BN_ULONG)-1) goto err; lp++; - if (lp - bn_data >= bn_data_num) - goto err; } lp--; /* Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Mon Sep 26 08:19:33 2016 (r306335) +++ releng/9.3/sys/conf/newvers.sh Mon Sep 26 08:21:29 2016 (r306336) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p46" +BRANCH="RELEASE-p47" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Mon Sep 26 10:13:59 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 3A2B7BEA455; Mon, 26 Sep 2016 10:13:59 +0000 (UTC) (envelope-from hiren@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 0D0F3948; Mon, 26 Sep 2016 10:13:58 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QADwUD002893; Mon, 26 Sep 2016 10:13:58 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QADwrV002892; Mon, 26 Sep 2016 10:13:58 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609261013.u8QADwrV002892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 26 Sep 2016 10:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306337 - 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.23 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, 26 Sep 2016 10:13:59 -0000 Author: hiren Date: Mon Sep 26 10:13:58 2016 New Revision: 306337 URL: https://svnweb.freebsd.org/changeset/base/306337 Log: In sendit(), if mp->msg_control is present, then in sockargs() we are allocating mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), will check validity of file pointer passed, if this fails EBADF is returned but mbuf allocated in sockargs() is not freed. Fix this possible leak. Submitted by: Lohith Bellad Reviewed by: adrian MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D7910 Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Sep 26 08:21:29 2016 (r306336) +++ head/sys/kern/uipc_syscalls.c Mon Sep 26 10:13:58 2016 (r306337) @@ -685,7 +685,7 @@ sys_socketpair(struct thread *td, struct static int sendit(struct thread *td, int s, struct msghdr *mp, int flags) { - struct mbuf *control; + struct mbuf *control = NULL; struct sockaddr *to; int error; @@ -737,6 +737,8 @@ sendit(struct thread *td, int s, struct bad: free(to, M_SONAME); + if (control) + m_freem(control); return (error); } From owner-svn-src-all@freebsd.org Mon Sep 26 11:56: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 C0DBFBEBB28; Mon, 26 Sep 2016 11:56:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 416473DD; Mon, 26 Sep 2016 11:56:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 0F6A1104541E; Mon, 26 Sep 2016 21:55:52 +1000 (AEST) Date: Mon, 26 Sep 2016 21:55:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hiren Panchasara cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern In-Reply-To: <201609261013.u8QADwrV002892@repo.freebsd.org> Message-ID: <20160926203343.S1542@besplex.bde.org> References: <201609261013.u8QADwrV002892@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=HHGDD-5mAAAA:8 a=m-UwTWmGBv1XtxhJIZQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=B8TCfWyN7RlcJ1j5uPC-:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 11:56:02 -0000 On Mon, 26 Sep 2016, Hiren Panchasara wrote: > Author: hiren > Date: Mon Sep 26 10:13:58 2016 > New Revision: 306337 > URL: https://svnweb.freebsd.org/changeset/base/306337 > > Log: > In sendit(), if mp->msg_control is present, then in sockargs() we are allocating > mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), > will check validity of file pointer passed, if this fails EBADF is returned but > mbuf allocated in sockargs() is not freed. Fix this possible leak. > > Submitted by: Lohith Bellad > Reviewed by: adrian > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D7910 > > Modified: > head/sys/kern/uipc_syscalls.c I don't like this. It has some style bugs and seems to be very broken. > Modified: head/sys/kern/uipc_syscalls.c > ============================================================================== > --- head/sys/kern/uipc_syscalls.c Mon Sep 26 08:21:29 2016 (r306336) > +++ head/sys/kern/uipc_syscalls.c Mon Sep 26 10:13:58 2016 (r306337) > @@ -685,7 +685,7 @@ sys_socketpair(struct thread *td, struct > static int > sendit(struct thread *td, int s, struct msghdr *mp, int flags) > { > - struct mbuf *control; > + struct mbuf *control = NULL; > struct sockaddr *to; > int error; Style bug: initialization in declaration. Many collateral style bugs and obfuscations. > > @@ -737,6 +737,8 @@ sendit(struct thread *td, int s, struct > > bad: > free(to, M_SONAME); > + if (control) > + m_freem(control); > return (error); > } The "bad" label is an old style bug. This is the general return path, not an error handling path. This gives many collateral obfuscations and pessimizations. Now it seems to give a large bug with the help of the obfuscations: when mp->msg_control != NULL, in the usual subcase where there is no error, kern_sendit() must have already done m_freem(control) else the usual subcase would have leaked. The code falls through to "bad" and does m_freem(control) again. I still use my optimization for sendit() which avoids using malloc() for 'to'. It has to be more careful not to free things. The design for freeing 'control' is worse than for freeing 'to', as shown by this bug and its extension. X Index: uipc_syscalls.c X =================================================================== X --- uipc_syscalls.c (revision 306310) X +++ uipc_syscalls.c (working copy) X @@ -114,6 +114,26 @@ X return (0); X } X X +static __inline int X +lgetsockaddr(struct sockaddr *sa, caddr_t uaddr, size_t len) X +{ X + int error; X + X + if (len > SOCK_MAXADDRLEN) X + return (ENAMETOOLONG); X + if (len < offsetof(struct sockaddr, sa_data[0])) X + return (EINVAL); X + error = copyin(uaddr, sa, len); X + if (error == 0) { X +#if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN X + if (sa->sa_family == 0 && sa->sa_len < AF_MAX) X + sa->sa_family = sa->sa_len; X +#endif X + sa->sa_len = len; X + } X + return (error); X +} X + X /* X * System call interface to the socket abstraction. X */ X @@ -687,6 +707,7 @@ X { X struct mbuf *control; X struct sockaddr *to; X + char sa[SOCK_MAXADDRLEN] __aligned(16); X int error; X X #ifdef CAPABILITY_MODE X @@ -695,7 +716,8 @@ X #endif X X if (mp->msg_name != NULL) { X - error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); X + to = (struct sockaddr *)&sa[0]; X + error = lgetsockaddr(to, mp->msg_name, mp->msg_namelen); X if (error != 0) { X to = NULL; X goto bad; The error handing should be cleaned up by removing all the gotos and the bad label, but this patch is written to minimize diffs. X @@ -736,7 +758,6 @@ X error = kern_sendit(td, s, mp, flags, control, UIO_USERSPACE); X X bad: X - free(to, M_SONAME); X return (error); X } X After merging this fix, cleaning up the gotos is more needed. Untested merge: Y Index: uipc_syscalls.c Y =================================================================== Y --- uipc_syscalls.c (revision 306337) Y +++ uipc_syscalls.c (working copy) Y @@ -114,6 +114,26 @@ Y return (0); Y } Y Y +static __inline int Y +lgetsockaddr(struct sockaddr *sa, caddr_t uaddr, size_t len) Y +{ Y + int error; Y + Y + if (len > SOCK_MAXADDRLEN) Y + return (ENAMETOOLONG); Y + if (len < offsetof(struct sockaddr, sa_data[0])) Y + return (EINVAL); Y + error = copyin(uaddr, sa, len); Y + if (error == 0) { Y +#if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN Y + if (sa->sa_family == 0 && sa->sa_len < AF_MAX) Y + sa->sa_family = sa->sa_len; Y +#endif Y + sa->sa_len = len; Y + } Y + return (error); Y +} Y + Y /* Y * System call interface to the socket abstraction. Y */ Y @@ -687,6 +707,7 @@ Y { Y struct mbuf *control = NULL; Y struct sockaddr *to; Y + char sa[SOCK_MAXADDRLEN] __aligned(16); Y int error; Y Y #ifdef CAPABILITY_MODE Y @@ -695,14 +716,11 @@ Y #endif Y Y if (mp->msg_name != NULL) { Y - error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); Y - if (error != 0) { Y - to = NULL; Y - goto bad; Y - } Y + to = (struct sockaddr *)&sa[0]; Y + error = lgetsockaddr(to, mp->msg_name, mp->msg_namelen); Y + if (error != 0) Y + return error); Y mp->msg_name = to; Y - } else { Y - to = NULL; Y } Y Y if (mp->msg_control) { Y @@ -710,14 +728,12 @@ Y #ifdef COMPAT_OLDSOCK Y && mp->msg_flags != MSG_COMPAT Y #endif Y - ) { Y - error = EINVAL; Y - goto bad; Y - } Y + ) Y + return (EINVAL); Y error = sockargs(&control, mp->msg_control, Y mp->msg_controllen, MT_CONTROL); Y if (error != 0) Y - goto bad; Y + return (error); Here it must be checked that 'control' is not allocated if an error is returned (only a bad API would leave it allocated). Y #ifdef COMPAT_OLDSOCK Y if (mp->msg_flags == MSG_COMPAT) { Y struct cmsghdr *cm; Y @@ -729,17 +745,9 @@ Y cm->cmsg_type = SCM_RIGHTS; Y } Y #endif Y - } else { Y - control = NULL; Y } Y Y - error = kern_sendit(td, s, mp, flags, control, UIO_USERSPACE); Y - Y -bad: Y - free(to, M_SONAME); Y - if (control) Y - m_freem(control); Y - return (error); Y + return (kern_sendit(td, s, mp, flags, control, UIO_USERSPACE)); Y } Y Y int Bruce From owner-svn-src-all@freebsd.org Mon Sep 26 12:18: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 5AAA6BEACA1; Mon, 26 Sep 2016 12:18:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 22CABB22; Mon, 26 Sep 2016 12:18:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id E39653C8C1D; Mon, 26 Sep 2016 22:18:31 +1000 (AEST) Date: Mon, 26 Sep 2016 22:18:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern In-Reply-To: <20160926203343.S1542@besplex.bde.org> Message-ID: <20160926215837.K1725@besplex.bde.org> References: <201609261013.u8QADwrV002892@repo.freebsd.org> <20160926203343.S1542@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=VIkg5I7X c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=rWBMA1eanbLRUJGvs5oA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 12:18:40 -0000 On Mon, 26 Sep 2016, Bruce Evans wrote: > On Mon, 26 Sep 2016, Hiren Panchasara wrote: > >> Author: hiren >> Date: Mon Sep 26 10:13:58 2016 >> New Revision: 306337 >> URL: https://svnweb.freebsd.org/changeset/base/306337 >> >> Log: >> In sendit(), if mp->msg_control is present, then in sockargs() we are >> allocating I didn't actually write mangling of the quotes like that. >> mbuf to store mp->msg_control. Later in kern_sendit(), call to >> getsock_cap(), >> will check validity of file pointer passed, if this fails EBADF is >> returned but >> mbuf allocated in sockargs() is not freed. Fix this possible leak. Hmm. In my reply I thought it was a cleanup after a simpler function that was missing. The bad API makes it kern_sendit()'s responsibility to clean up in all cases. I don't like the layering, but the mere existence of kern_sendit() means that you can't fix it by changing one of its callers. It exists so that it can have multiple callers. it has 4 other callers, and 2 of these (linux and freebsd32 compat) pass it a non-null 'control' >> @@ -737,6 +737,8 @@ sendit(struct thread *td, int s, struct >> >> bad: >> free(to, M_SONAME); >> + if (control) >> + m_freem(control); >> return (error); >> } > > The "bad" label is an old style bug. This is the general return path, > not an error handling path. This gives many collateral obfuscations > and pessimizations. > > Now it seems to give a large bug with the help of the obfuscations: > when mp->msg_control != NULL, in the usual subcase where there is no > error, kern_sendit() must have already done m_freem(control) else the > usual subcase would have leaked. The code falls through to "bad" > and does m_freem(control) again. It is possible that a double m_freem() does nothing the second time because it sees a null chain, but it doesn't seem to support that. > [... my cleanups don't fix the problem] Bruce From owner-svn-src-all@freebsd.org Mon Sep 26 13:29: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 872C2BE83AE; Mon, 26 Sep 2016 13:29:01 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (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 3E7F7DCC; Mon, 26 Sep 2016 13:29:01 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x22f.google.com with SMTP id 38so80729683qte.1; Mon, 26 Sep 2016 06:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=hsRbx2KZ4td26st1b4//LHVBXfYv5n2Zvohl7+CmFPk=; b=h4E1zmWLr0ErOHUTkAV4No+ftbLWN25ujQeFfLNv5g1O8cIr0nhPko+wOUez6q2Ic8 nr+kh/uNRDapQUFaTrWBrKxhtPVR31dP+kG1EjA80tmRLnhebTBZQPXHqDxNgiZDdigo NW/GiJHxKZG+ReuRLIKBJQRJyFKOtZ5w9d7A8m3B9MQiMbPvNbRf442CBeAi8uuHpJfD T4/M3XbIkeb9pnR5vdQZ07Nq51JEHVQVG0LvHEMzYMo4rahrj+xaISQOGYRdOMCYUHZc 4bIe01JEKi1iaBjef1mUYxMG8YkijBjfywmGmuGNhsEFjHq7RNngwX3hXTOVGO5HosCh /CUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=hsRbx2KZ4td26st1b4//LHVBXfYv5n2Zvohl7+CmFPk=; b=fK0bW3IPsv59dRjmwNv/1KzDW0gHC8FWFI5fqrgJpOPag9io4BB2iOHPH9dHxSOO6e GUEun7xrIDXxi9hXMLLCtH0/ZLoAppKG/6gQenSimoREI6mkXdqp8TGdZkqRQQDXZvYx Nm8G+z92Gl33k4/lJW+mYvb7Gj7wcT87jBqGy9H2BePlwyVZSReu5XgR6lK2jp7v/jJN kpKC9e39uDwYl6t2g/BNn3/PxjVFvOWeSOeLYmroUeHhKGjVau2mm5RDEGtChJAqVKST m8ckb5mYoVHGbxNjpVyJDB1YfVcyGm9L1fvT5WAzMf0QmAmzwNOr+EfjDop7GRUP8N5x nLPg== X-Gm-Message-State: AA6/9RmyyyoqPyaiXkbg0J4+d4UlqkbSQMEfbLCDWEgnjmRr+7+FMGL5m4zNOir8ECJsNA== X-Received: by 10.200.51.54 with SMTP id t51mr20638458qta.110.1474896540002; Mon, 26 Sep 2016 06:29:00 -0700 (PDT) Received: from mbp-eth.home (179-125-152-136.desktop.com.br. [179.125.152.136]) by smtp.gmail.com with ESMTPSA id r187sm11544461qkc.49.2016.09.26.06.28.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 06:28:59 -0700 (PDT) Sender: Renato Botelho From: Renato Botelho Message-Id: <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r306289 - head/sys/net Date: Mon, 26 Sep 2016 10:28:54 -0300 In-Reply-To: <201609240709.u8O79hue048932@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Kristof Provost References: <201609240709.u8O79hue048932@repo.freebsd.org> X-Mailer: Apple Mail (2.3226) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 13:29:01 -0000 > On 24 Sep 2016, at 04:09, Kristof Provost wrote: >=20 > Author: kp > Date: Sat Sep 24 07:09:43 2016 > New Revision: 306289 > URL: https://svnweb.freebsd.org/changeset/base/306289 >=20 > Log: > bridge: Fix fragment handling and memory leak >=20 > Fragmented UDP and ICMP packets were corrupted if a firewall with = reassembling > feature (like pf'scrub) is enabled on the bridge. This patch fixes = corrupted > packet problem and the panic (triggered easly with low RAM) as = explain in PR > 185633. >=20 > bridge_pfil and bridge_fragment relationship: >=20 > bridge_pfil() receive (IN direction) packets and sent it to the = firewall The > firewall can be configured for reassembling fragmented packet (like = pf'scrubing) > in one mbuf chain when bridge_pfil() need to send this reassembled = packet to the > outgoing interface, it needs to re-fragment it by using = bridge_fragment() > bridge_fragment() had to split this mbuf (using ip_fragment) first = then > had to M_PREPEND each packet in the mbuf chain for adding Ethernet > header. >=20 > But M_PREPEND can sometime create a new mbuf on the begining of the = mbuf chain, > then the "main" pointer of this mbuf chain should be updated and this = case is > tottaly forgotten. The original bridge_fragment code (Revision = 158140, > 2006 April 29) came from OpenBSD, and the call to bridge_enqueue was > embedded. But on FreeBSD, bridge_enqueue() is done after = bridge_fragment(), > then the original OpenBSD code can't work as-it of FreeBSD. >=20 > PR: 185633 > Submitted by: Olivier Cochard-Labb=C3=A9 > Differential Revision: https://reviews.freebsd.org/D7780 Kristof, Do you hace plans to MFC it to stable/11 and stable/10? -- Renato Botelho From owner-svn-src-all@freebsd.org Mon Sep 26 13:32: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 2ADCABE85DC; Mon, 26 Sep 2016 13:32:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB0A21200; Mon, 26 Sep 2016 13:32:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.53.204.43] (unknown [88.128.80.163]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id CDE5E36E75; Mon, 26 Sep 2016 15:32:01 +0200 (CEST) From: "Kristof Provost" To: "Renato Botelho" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306289 - head/sys/net Date: Mon, 26 Sep 2016 15:32:01 +0200 Message-ID: In-Reply-To: <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> References: <201609240709.u8O79hue048932@repo.freebsd.org> <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6056) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 13:32:05 -0000 On 26 Sep 2016, at 15:28, Renato Botelho wrote: > > On 24 Sep 2016, at 04:09, Kristof Provost wrote: >> Author: kp >> Date: Sat Sep 24 07:09:43 2016 >> New Revision: 306289 >> URL: https://svnweb.freebsd.org/changeset/base/306289 >> >> Log: >> bridge: Fix fragment handling and memory leak >> … >> PR: 185633 >> Submitted by: Olivier Cochard-Labbé >> Differential Revision: https://reviews.freebsd.org/D7780 > Do you hace plans to MFC it to stable/11 and stable/10? > I hadn’t thought about it at the time, but now that you mention it, yes that would be a good idea. I’ve added it to my todo list for next weekend. Regards, Kristof From owner-svn-src-all@freebsd.org Mon Sep 26 13:59: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 A5F9FBE8EA7; Mon, 26 Sep 2016 13:59:19 +0000 (UTC) (envelope-from br@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 77128273; Mon, 26 Sep 2016 13:59:19 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QDxIp1085369; Mon, 26 Sep 2016 13:59:18 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QDxI4l085368; Mon, 26 Sep 2016 13:59:18 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609261359.u8QDxI4l085368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 13:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306338 - head/usr.bin/calendar/tests 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.23 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, 26 Sep 2016 13:59:19 -0000 Author: br Date: Mon Sep 26 13:59:18 2016 New Revision: 306338 URL: https://svnweb.freebsd.org/changeset/base/306338 Log: Increase timeout for legacy_test from 300 (default) to 600 seconds. It takes about 7 minutes to pass the test on MIPS64EB in QEMU. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/usr.bin/calendar/tests/Makefile Modified: head/usr.bin/calendar/tests/Makefile ============================================================================== --- head/usr.bin/calendar/tests/Makefile Mon Sep 26 10:13:58 2016 (r306337) +++ head/usr.bin/calendar/tests/Makefile Mon Sep 26 13:59:18 2016 (r306338) @@ -4,6 +4,8 @@ PACKAGE= tests TAP_TESTS_SH= legacy_test +TEST_METADATA.legacy_test+= timeout="600" + ${PACKAGE}FILES+= calendar.calibrate ${PACKAGE}FILES+= regress.a1.out ${PACKAGE}FILES+= regress.a2.out From owner-svn-src-all@freebsd.org Mon Sep 26 14:01: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 B6307BE8FE5; Mon, 26 Sep 2016 14:01:42 +0000 (UTC) (envelope-from br@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 84198856; Mon, 26 Sep 2016 14:01:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QE1faW086791; Mon, 26 Sep 2016 14:01:41 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QE1fQ4086790; Mon, 26 Sep 2016 14:01:41 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609261401.u8QE1fQ4086790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 14:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306339 - head/sbin/growfs/tests 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.23 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, 26 Sep 2016 14:01:42 -0000 Author: br Date: Mon Sep 26 14:01:41 2016 New Revision: 306339 URL: https://svnweb.freebsd.org/changeset/base/306339 Log: Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on MIPS. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sbin/growfs/tests/legacy_test.pl Modified: head/sbin/growfs/tests/legacy_test.pl ============================================================================== --- head/sbin/growfs/tests/legacy_test.pl Mon Sep 26 13:59:18 2016 (r306338) +++ head/sbin/growfs/tests/legacy_test.pl Mon Sep 26 14:01:41 2016 (r306339) @@ -14,7 +14,7 @@ END { system "mdconfig -du$unit" if defi sub setsize { my ($partszMB, $unitszMB) = @_; - open my $fd, "|-", "disklabel -R md$unit /dev/stdin" or die; + open my $fd, "|-", "bsdlabel -R md$unit /dev/stdin" or die; print $fd "a: ", ($partszMB * BLKS_PER_MB), " 0 4.2BSD 1024 8192\n"; print $fd "c: ", ($unitszMB * BLKS_PER_MB), " 0 unused 0 0\n"; close $fd; From owner-svn-src-all@freebsd.org Mon Sep 26 14:13:13 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 B868BBE9331; Mon, 26 Sep 2016 14:13:13 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94908E3B; Mon, 26 Sep 2016 14:13:13 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QEDCZm092740; Mon, 26 Sep 2016 14:13:12 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QEDBK7092731; Mon, 26 Sep 2016 14:13:11 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609261413.u8QEDBK7092731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Sep 2016 14:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306340 - in vendor-crypto/openssl/dist: . crypto crypto/engine crypto/x509 ssl X-SVN-Group: vendor-crypto 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.23 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, 26 Sep 2016 14:13:13 -0000 Author: jkim Date: Mon Sep 26 14:13:11 2016 New Revision: 306340 URL: https://svnweb.freebsd.org/changeset/base/306340 Log: Import OpenSSL 1.0.2j. Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/ssl/t1_ext.c Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/CHANGES Mon Sep 26 14:13:11 2016 (r306340) @@ -2,6 +2,18 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] + + *) Missing CRL sanity check + + A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0 + but was omitted from OpenSSL 1.0.2i. As a result any attempt to use + CRLs in OpenSSL 1.0.2i will crash with a null pointer exception. + + This issue only affects the OpenSSL 1.0.2i + (CVE-2016-7052) + [Matt Caswell] + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] *) OCSP Status Request extension unbounded memory growth Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Mon Sep 26 14:13:11 2016 (r306340) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://repo.freebsd.org/base" -setenv OSSLVER 1.0.2i -# OSSLTAG format: v1_0_2i +setenv OSSLVER 1.0.2j +# OSSLTAG format: v1_0_2j ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/Makefile ============================================================================== --- vendor-crypto/openssl/dist/Makefile Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/Makefile Mon Sep 26 14:13:11 2016 (r306340) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2i +VERSION=1.0.2j MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/NEWS Mon Sep 26 14:13:11 2016 (r306340) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] + + o Fix Use After Free for large message sizes (CVE-2016-6309) + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/README Mon Sep 26 14:13:11 2016 (r306340) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2i 22 Sep 2016 + OpenSSL 1.0.2j 26 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c Mon Sep 26 14:13:11 2016 (r306340) @@ -939,7 +939,7 @@ static int cryptodev_digest_copy(EVP_MD_ if (fstate->mac_len != 0) { if (fstate->mac_data != NULL) { dstate->mac_data = OPENSSL_malloc(fstate->mac_len); - if (dstate->ac_data == NULL) { + if (dstate->mac_data == NULL) { printf("cryptodev_digest_init: malloc failed\n"); return 0; } Modified: vendor-crypto/openssl/dist/crypto/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslv.h Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/crypto/opensslv.h Mon Sep 26 14:13:11 2016 (r306340) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000209fL +# define OPENSSL_VERSION_NUMBER 0x100020afL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-fips 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j 26 Sep 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c Mon Sep 26 14:13:11 2016 (r306340) @@ -1124,10 +1124,10 @@ static int get_crl_sk(X509_STORE_CTX *ct crl = sk_X509_CRL_value(crls, i); reasons = *preasons; crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x); - if (crl_score < best_score) + if (crl_score < best_score || crl_score == 0) continue; /* If current CRL is equivalent use it if it is newer */ - if (crl_score == best_score) { + if (crl_score == best_score && best_crl != NULL) { int day, sec; if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl), X509_CRL_get_lastUpdate(crl)) == 0) Modified: vendor-crypto/openssl/dist/ssl/t1_ext.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/t1_ext.c Mon Sep 26 14:01:41 2016 (r306339) +++ vendor-crypto/openssl/dist/ssl/t1_ext.c Mon Sep 26 14:13:11 2016 (r306340) @@ -275,7 +275,9 @@ int SSL_extension_supported(unsigned int case TLSEXT_TYPE_ec_point_formats: case TLSEXT_TYPE_elliptic_curves: case TLSEXT_TYPE_heartbeat: +# ifndef OPENSSL_NO_NEXTPROTONEG case TLSEXT_TYPE_next_proto_neg: +# endif case TLSEXT_TYPE_padding: case TLSEXT_TYPE_renegotiate: case TLSEXT_TYPE_server_name: From owner-svn-src-all@freebsd.org Mon Sep 26 14:13:45 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 478D1BE93A2; Mon, 26 Sep 2016 14:13:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF622FB5; Mon, 26 Sep 2016 14:13:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QEDiQ5092810; Mon, 26 Sep 2016 14:13:44 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QEDikX092809; Mon, 26 Sep 2016 14:13:44 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609261413.u8QEDikX092809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Sep 2016 14:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306341 - vendor-crypto/openssl/1.0.2j X-SVN-Group: vendor-crypto 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.23 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, 26 Sep 2016 14:13:45 -0000 Author: jkim Date: Mon Sep 26 14:13:43 2016 New Revision: 306341 URL: https://svnweb.freebsd.org/changeset/base/306341 Log: Tag OpenSSL 1.0.2j. Added: vendor-crypto/openssl/1.0.2j/ - copied from r306340, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Mon Sep 26 14:22:28 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 7CD05BE9587; Mon, 26 Sep 2016 14:22:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D982175D; Mon, 26 Sep 2016 14:22:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QEMRqq096558; Mon, 26 Sep 2016 14:22:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QEMHXG096465; Mon, 26 Sep 2016 14:22:17 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609261422.u8QEMHXG096465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Sep 2016 14:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306342 - in head: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/engine crypto/openssl/crypto/x509 crypto/openssl/ssl secure/lib/libcrypto secure/lib/libcrypto/man secure/l... 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.23 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, 26 Sep 2016 14:22:28 -0000 Author: jkim Date: Mon Sep 26 14:22:17 2016 New Revision: 306342 URL: https://svnweb.freebsd.org/changeset/base/306342 Log: Merge OpenSSL 1.0.2j. Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/ssl/t1_ext.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPKParameters.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ec.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CONF_CTX_new.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libssl/man/SSL_CONF_cmd.3 head/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 head/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get0_param.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set1_curves.3 head/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_check_chain.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/CHANGES Mon Sep 26 14:22:17 2016 (r306342) @@ -2,6 +2,18 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] + + *) Missing CRL sanity check + + A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0 + but was omitted from OpenSSL 1.0.2i. As a result any attempt to use + CRLs in OpenSSL 1.0.2i will crash with a null pointer exception. + + This issue only affects the OpenSSL 1.0.2i + (CVE-2016-7052) + [Matt Caswell] + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] *) OCSP Status Request extension unbounded memory growth Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/Makefile Mon Sep 26 14:22:17 2016 (r306342) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2i +VERSION=1.0.2j MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/NEWS Mon Sep 26 14:22:17 2016 (r306342) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] + + o Fix Use After Free for large message sizes (CVE-2016-6309) + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/README Mon Sep 26 14:22:17 2016 (r306342) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2i 22 Sep 2016 + OpenSSL 1.0.2j 26 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/crypto/engine/eng_cryptodev.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:22:17 2016 (r306342) @@ -939,7 +939,7 @@ static int cryptodev_digest_copy(EVP_MD_ if (fstate->mac_len != 0) { if (fstate->mac_data != NULL) { dstate->mac_data = OPENSSL_malloc(fstate->mac_len); - if (dstate->ac_data == NULL) { + if (dstate->mac_data == NULL) { printf("cryptodev_digest_init: malloc failed\n"); return 0; } Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:22:17 2016 (r306342) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000209fL +# define OPENSSL_VERSION_NUMBER 0x100020afL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-fips 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-freebsd 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-freebsd 26 Sep 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/x509/x509_vfy.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:22:17 2016 (r306342) @@ -1124,10 +1124,10 @@ static int get_crl_sk(X509_STORE_CTX *ct crl = sk_X509_CRL_value(crls, i); reasons = *preasons; crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x); - if (crl_score < best_score) + if (crl_score < best_score || crl_score == 0) continue; /* If current CRL is equivalent use it if it is newer */ - if (crl_score == best_score) { + if (crl_score == best_score && best_crl != NULL) { int day, sec; if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl), X509_CRL_get_lastUpdate(crl)) == 0) Modified: head/crypto/openssl/ssl/t1_ext.c ============================================================================== --- head/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:22:17 2016 (r306342) @@ -275,7 +275,9 @@ int SSL_extension_supported(unsigned int case TLSEXT_TYPE_ec_point_formats: case TLSEXT_TYPE_elliptic_curves: case TLSEXT_TYPE_heartbeat: +# ifndef OPENSSL_NO_NEXTPROTONEG case TLSEXT_TYPE_next_proto_neg: +# endif case TLSEXT_TYPE_padding: case TLSEXT_TYPE_renegotiate: case TLSEXT_TYPE_server_name: Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:22:17 2016 (r306342) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.2i -OPENSSL_DATE= 2016-09-22 +OPENSSL_VER= 1.0.2j +OPENSSL_DATE= 2016-09-26 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_length 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_TIME_set.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_set 3" -.TH ASN1_TIME_set 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_TIME_set 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_generate_nconf 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_ctrl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_base64 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_buffer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_cipher 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_md 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_ssl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_find_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new_CMS 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_push 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_read 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_accept 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_bio 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_connect 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_fd 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_mem 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_socket 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_set_callback 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_should_retry 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_BLINDING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_start 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add_word 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_bn2bin 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_cmp 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_copy 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_generate_prime 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_inverse 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_num_bytes 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_rand 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_set_bit 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_swap 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_zero 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add0_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_signer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_compress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_decrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_encrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_final 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_uncompress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_free 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_load_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_size 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_SIG_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_do_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_dup_DH 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Sep 26 14:30:30 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 6DF3FBE967A; Mon, 26 Sep 2016 14:30:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E095FAAC; Mon, 26 Sep 2016 14:30:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QEUTAY097147; Mon, 26 Sep 2016 14:30:29 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QEUJMS097054; Mon, 26 Sep 2016 14:30:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609261430.u8QEUJMS097054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Sep 2016 14:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306343 - in stable/11: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/engine crypto/openssl/crypto/x509 crypto/openssl/ssl secure/lib/libcrypto secure/lib/libcrypto/man sec... X-SVN-Group: stable-11 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.23 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, 26 Sep 2016 14:30:30 -0000 Author: jkim Date: Mon Sep 26 14:30:19 2016 New Revision: 306343 URL: https://svnweb.freebsd.org/changeset/base/306343 Log: MFC: r306342 Merge OpenSSL 1.0.2j. Modified: stable/11/crypto/openssl/CHANGES stable/11/crypto/openssl/Makefile stable/11/crypto/openssl/NEWS stable/11/crypto/openssl/README stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c stable/11/crypto/openssl/crypto/opensslv.h stable/11/crypto/openssl/crypto/x509/x509_vfy.c stable/11/crypto/openssl/ssl/t1_ext.c stable/11/secure/lib/libcrypto/Makefile.inc stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/11/secure/lib/libcrypto/man/BIO_f_md.3 stable/11/secure/lib/libcrypto/man/BIO_f_null.3 stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/11/secure/lib/libcrypto/man/BIO_find_type.3 stable/11/secure/lib/libcrypto/man/BIO_new.3 stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/11/secure/lib/libcrypto/man/BIO_push.3 stable/11/secure/lib/libcrypto/man/BIO_read.3 stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 stable/11/secure/lib/libcrypto/man/BIO_s_file.3 stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 stable/11/secure/lib/libcrypto/man/BIO_s_null.3 stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 stable/11/secure/lib/libcrypto/man/BN_add.3 stable/11/secure/lib/libcrypto/man/BN_add_word.3 stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 stable/11/secure/lib/libcrypto/man/BN_cmp.3 stable/11/secure/lib/libcrypto/man/BN_copy.3 stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/11/secure/lib/libcrypto/man/BN_new.3 stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 stable/11/secure/lib/libcrypto/man/BN_rand.3 stable/11/secure/lib/libcrypto/man/BN_set_bit.3 stable/11/secure/lib/libcrypto/man/BN_swap.3 stable/11/secure/lib/libcrypto/man/BN_zero.3 stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/11/secure/lib/libcrypto/man/CMS_compress.3 stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 stable/11/secure/lib/libcrypto/man/CMS_final.3 stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/11/secure/lib/libcrypto/man/CMS_sign.3 stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 stable/11/secure/lib/libcrypto/man/CMS_verify.3 stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/11/secure/lib/libcrypto/man/DH_generate_key.3 stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DH_new.3 stable/11/secure/lib/libcrypto/man/DH_set_method.3 stable/11/secure/lib/libcrypto/man/DH_size.3 stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DSA_new.3 stable/11/secure/lib/libcrypto/man/DSA_set_method.3 stable/11/secure/lib/libcrypto/man/DSA_sign.3 stable/11/secure/lib/libcrypto/man/DSA_size.3 stable/11/secure/lib/libcrypto/man/EC_GFp_simple_method.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_copy.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_new.3 stable/11/secure/lib/libcrypto/man/EC_KEY_new.3 stable/11/secure/lib/libcrypto/man/EC_POINT_add.3 stable/11/secure/lib/libcrypto/man/EC_POINT_new.3 stable/11/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/11/secure/lib/libcrypto/man/ERR_clear_error.3 stable/11/secure/lib/libcrypto/man/ERR_error_string.3 stable/11/secure/lib/libcrypto/man/ERR_get_error.3 stable/11/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/11/secure/lib/libcrypto/man/ERR_load_strings.3 stable/11/secure/lib/libcrypto/man/ERR_print_errors.3 stable/11/secure/lib/libcrypto/man/ERR_put_error.3 stable/11/secure/lib/libcrypto/man/ERR_remove_state.3 stable/11/secure/lib/libcrypto/man/ERR_set_mark.3 stable/11/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/11/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncodeInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/11/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/11/secure/lib/libcrypto/man/EVP_SealInit.3 stable/11/secure/lib/libcrypto/man/EVP_SignInit.3 stable/11/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/11/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/11/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/11/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/11/secure/lib/libcrypto/man/OPENSSL_config.3 stable/11/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/11/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 stable/11/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/11/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/11/secure/lib/libcrypto/man/PKCS12_create.3 stable/11/secure/lib/libcrypto/man/PKCS12_parse.3 stable/11/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/11/secure/lib/libcrypto/man/PKCS7_verify.3 stable/11/secure/lib/libcrypto/man/RAND_add.3 stable/11/secure/lib/libcrypto/man/RAND_bytes.3 stable/11/secure/lib/libcrypto/man/RAND_cleanup.3 stable/11/secure/lib/libcrypto/man/RAND_egd.3 stable/11/secure/lib/libcrypto/man/RAND_load_file.3 stable/11/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/11/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/11/secure/lib/libcrypto/man/RSA_check_key.3 stable/11/secure/lib/libcrypto/man/RSA_generate_key.3 stable/11/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/RSA_new.3 stable/11/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/11/secure/lib/libcrypto/man/RSA_print.3 stable/11/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_set_method.3 stable/11/secure/lib/libcrypto/man/RSA_sign.3 stable/11/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/11/secure/lib/libcrypto/man/RSA_size.3 stable/11/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/11/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/11/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/11/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/11/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/11/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/11/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/11/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/11/secure/lib/libcrypto/man/X509_check_host.3 stable/11/secure/lib/libcrypto/man/X509_new.3 stable/11/secure/lib/libcrypto/man/X509_verify_cert.3 stable/11/secure/lib/libcrypto/man/bio.3 stable/11/secure/lib/libcrypto/man/blowfish.3 stable/11/secure/lib/libcrypto/man/bn.3 stable/11/secure/lib/libcrypto/man/bn_internal.3 stable/11/secure/lib/libcrypto/man/buffer.3 stable/11/secure/lib/libcrypto/man/crypto.3 stable/11/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/11/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/11/secure/lib/libcrypto/man/d2i_DHparams.3 stable/11/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_ECPKParameters.3 stable/11/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_X509.3 stable/11/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/11/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/11/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/11/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/11/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/11/secure/lib/libcrypto/man/des.3 stable/11/secure/lib/libcrypto/man/dh.3 stable/11/secure/lib/libcrypto/man/dsa.3 stable/11/secure/lib/libcrypto/man/ec.3 stable/11/secure/lib/libcrypto/man/ecdsa.3 stable/11/secure/lib/libcrypto/man/engine.3 stable/11/secure/lib/libcrypto/man/err.3 stable/11/secure/lib/libcrypto/man/evp.3 stable/11/secure/lib/libcrypto/man/hmac.3 stable/11/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/11/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/11/secure/lib/libcrypto/man/lh_stats.3 stable/11/secure/lib/libcrypto/man/lhash.3 stable/11/secure/lib/libcrypto/man/md5.3 stable/11/secure/lib/libcrypto/man/mdc2.3 stable/11/secure/lib/libcrypto/man/pem.3 stable/11/secure/lib/libcrypto/man/rand.3 stable/11/secure/lib/libcrypto/man/rc4.3 stable/11/secure/lib/libcrypto/man/ripemd.3 stable/11/secure/lib/libcrypto/man/rsa.3 stable/11/secure/lib/libcrypto/man/sha.3 stable/11/secure/lib/libcrypto/man/threads.3 stable/11/secure/lib/libcrypto/man/ui.3 stable/11/secure/lib/libcrypto/man/ui_compat.3 stable/11/secure/lib/libcrypto/man/x509.3 stable/11/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/11/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 stable/11/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/11/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/11/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_free.3 stable/11/secure/lib/libssl/man/SSL_CTX_get0_param.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/11/secure/lib/libssl/man/SSL_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_curves.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 stable/11/secure/lib/libssl/man/SSL_SESSION_free.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/11/secure/lib/libssl/man/SSL_accept.3 stable/11/secure/lib/libssl/man/SSL_alert_type_string.3 stable/11/secure/lib/libssl/man/SSL_check_chain.3 stable/11/secure/lib/libssl/man/SSL_clear.3 stable/11/secure/lib/libssl/man/SSL_connect.3 stable/11/secure/lib/libssl/man/SSL_do_handshake.3 stable/11/secure/lib/libssl/man/SSL_free.3 stable/11/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/11/secure/lib/libssl/man/SSL_get_ciphers.3 stable/11/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/11/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/11/secure/lib/libssl/man/SSL_get_error.3 stable/11/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/11/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_get_fd.3 stable/11/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/11/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/11/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/11/secure/lib/libssl/man/SSL_get_rbio.3 stable/11/secure/lib/libssl/man/SSL_get_session.3 stable/11/secure/lib/libssl/man/SSL_get_verify_result.3 stable/11/secure/lib/libssl/man/SSL_get_version.3 stable/11/secure/lib/libssl/man/SSL_library_init.3 stable/11/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/11/secure/lib/libssl/man/SSL_new.3 stable/11/secure/lib/libssl/man/SSL_pending.3 stable/11/secure/lib/libssl/man/SSL_read.3 stable/11/secure/lib/libssl/man/SSL_rstate_string.3 stable/11/secure/lib/libssl/man/SSL_session_reused.3 stable/11/secure/lib/libssl/man/SSL_set_bio.3 stable/11/secure/lib/libssl/man/SSL_set_connect_state.3 stable/11/secure/lib/libssl/man/SSL_set_fd.3 stable/11/secure/lib/libssl/man/SSL_set_session.3 stable/11/secure/lib/libssl/man/SSL_set_shutdown.3 stable/11/secure/lib/libssl/man/SSL_set_verify_result.3 stable/11/secure/lib/libssl/man/SSL_shutdown.3 stable/11/secure/lib/libssl/man/SSL_state_string.3 stable/11/secure/lib/libssl/man/SSL_want.3 stable/11/secure/lib/libssl/man/SSL_write.3 stable/11/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/11/secure/lib/libssl/man/ssl.3 stable/11/secure/usr.bin/openssl/man/CA.pl.1 stable/11/secure/usr.bin/openssl/man/asn1parse.1 stable/11/secure/usr.bin/openssl/man/c_rehash.1 stable/11/secure/usr.bin/openssl/man/ca.1 stable/11/secure/usr.bin/openssl/man/ciphers.1 stable/11/secure/usr.bin/openssl/man/cms.1 stable/11/secure/usr.bin/openssl/man/crl.1 stable/11/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/11/secure/usr.bin/openssl/man/dgst.1 stable/11/secure/usr.bin/openssl/man/dhparam.1 stable/11/secure/usr.bin/openssl/man/dsa.1 stable/11/secure/usr.bin/openssl/man/dsaparam.1 stable/11/secure/usr.bin/openssl/man/ec.1 stable/11/secure/usr.bin/openssl/man/ecparam.1 stable/11/secure/usr.bin/openssl/man/enc.1 stable/11/secure/usr.bin/openssl/man/errstr.1 stable/11/secure/usr.bin/openssl/man/gendsa.1 stable/11/secure/usr.bin/openssl/man/genpkey.1 stable/11/secure/usr.bin/openssl/man/genrsa.1 stable/11/secure/usr.bin/openssl/man/nseq.1 stable/11/secure/usr.bin/openssl/man/ocsp.1 stable/11/secure/usr.bin/openssl/man/openssl.1 stable/11/secure/usr.bin/openssl/man/passwd.1 stable/11/secure/usr.bin/openssl/man/pkcs12.1 stable/11/secure/usr.bin/openssl/man/pkcs7.1 stable/11/secure/usr.bin/openssl/man/pkcs8.1 stable/11/secure/usr.bin/openssl/man/pkey.1 stable/11/secure/usr.bin/openssl/man/pkeyparam.1 stable/11/secure/usr.bin/openssl/man/pkeyutl.1 stable/11/secure/usr.bin/openssl/man/rand.1 stable/11/secure/usr.bin/openssl/man/req.1 stable/11/secure/usr.bin/openssl/man/rsa.1 stable/11/secure/usr.bin/openssl/man/rsautl.1 stable/11/secure/usr.bin/openssl/man/s_client.1 stable/11/secure/usr.bin/openssl/man/s_server.1 stable/11/secure/usr.bin/openssl/man/s_time.1 stable/11/secure/usr.bin/openssl/man/sess_id.1 stable/11/secure/usr.bin/openssl/man/smime.1 stable/11/secure/usr.bin/openssl/man/speed.1 stable/11/secure/usr.bin/openssl/man/spkac.1 stable/11/secure/usr.bin/openssl/man/ts.1 stable/11/secure/usr.bin/openssl/man/tsget.1 stable/11/secure/usr.bin/openssl/man/verify.1 stable/11/secure/usr.bin/openssl/man/version.1 stable/11/secure/usr.bin/openssl/man/x509.1 stable/11/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssl/CHANGES ============================================================================== --- stable/11/crypto/openssl/CHANGES Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/CHANGES Mon Sep 26 14:30:19 2016 (r306343) @@ -2,6 +2,18 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] + + *) Missing CRL sanity check + + A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0 + but was omitted from OpenSSL 1.0.2i. As a result any attempt to use + CRLs in OpenSSL 1.0.2i will crash with a null pointer exception. + + This issue only affects the OpenSSL 1.0.2i + (CVE-2016-7052) + [Matt Caswell] + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] *) OCSP Status Request extension unbounded memory growth Modified: stable/11/crypto/openssl/Makefile ============================================================================== --- stable/11/crypto/openssl/Makefile Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/Makefile Mon Sep 26 14:30:19 2016 (r306343) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2i +VERSION=1.0.2j MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: stable/11/crypto/openssl/NEWS ============================================================================== --- stable/11/crypto/openssl/NEWS Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/NEWS Mon Sep 26 14:30:19 2016 (r306343) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] + + o Fix Use After Free for large message sizes (CVE-2016-6309) + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) Modified: stable/11/crypto/openssl/README ============================================================================== --- stable/11/crypto/openssl/README Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/README Mon Sep 26 14:30:19 2016 (r306343) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2i 22 Sep 2016 + OpenSSL 1.0.2j 26 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c ============================================================================== --- stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:30:19 2016 (r306343) @@ -939,7 +939,7 @@ static int cryptodev_digest_copy(EVP_MD_ if (fstate->mac_len != 0) { if (fstate->mac_data != NULL) { dstate->mac_data = OPENSSL_malloc(fstate->mac_len); - if (dstate->ac_data == NULL) { + if (dstate->mac_data == NULL) { printf("cryptodev_digest_init: malloc failed\n"); return 0; } Modified: stable/11/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/11/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:30:19 2016 (r306343) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000209fL +# define OPENSSL_VERSION_NUMBER 0x100020afL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-fips 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-freebsd 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-freebsd 26 Sep 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/11/crypto/openssl/crypto/x509/x509_vfy.c ============================================================================== --- stable/11/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:30:19 2016 (r306343) @@ -1124,10 +1124,10 @@ static int get_crl_sk(X509_STORE_CTX *ct crl = sk_X509_CRL_value(crls, i); reasons = *preasons; crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x); - if (crl_score < best_score) + if (crl_score < best_score || crl_score == 0) continue; /* If current CRL is equivalent use it if it is newer */ - if (crl_score == best_score) { + if (crl_score == best_score && best_crl != NULL) { int day, sec; if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl), X509_CRL_get_lastUpdate(crl)) == 0) Modified: stable/11/crypto/openssl/ssl/t1_ext.c ============================================================================== --- stable/11/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:30:19 2016 (r306343) @@ -275,7 +275,9 @@ int SSL_extension_supported(unsigned int case TLSEXT_TYPE_ec_point_formats: case TLSEXT_TYPE_elliptic_curves: case TLSEXT_TYPE_heartbeat: +# ifndef OPENSSL_NO_NEXTPROTONEG case TLSEXT_TYPE_next_proto_neg: +# endif case TLSEXT_TYPE_padding: case TLSEXT_TYPE_renegotiate: case TLSEXT_TYPE_server_name: Modified: stable/11/secure/lib/libcrypto/Makefile.inc ============================================================================== --- stable/11/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:30:19 2016 (r306343) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.2i -OPENSSL_DATE= 2016-09-22 +OPENSSL_VER= 1.0.2j +OPENSSL_DATE= 2016-09-26 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_length 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_set 3" -.TH ASN1_TIME_set 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_TIME_set 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_generate_nconf 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_ctrl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_base64 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_buffer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_cipher 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_md 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_ssl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_find_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new_CMS 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_push 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_read 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_accept 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_bio 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_connect 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_fd 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_mem 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_socket 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_set_callback 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_should_retry 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_BLINDING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_start 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add_word 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_bn2bin 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_cmp 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_copy 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_generate_prime 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_inverse 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_num_bytes 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_rand 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_set_bit 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_swap 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_zero 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add0_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_signer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_compress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_decrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_encrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_final 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_uncompress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_free 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_load_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_size 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_SIG_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_do_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_dup_DH 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/11/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:22:17 2016 (r306342) +++ stable/11/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:30:19 2016 (r306343) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Sep 26 14:48: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 9D546BE9F6B; Mon, 26 Sep 2016 14:48:49 +0000 (UTC) (envelope-from asomers@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 6A57A74E; Mon, 26 Sep 2016 14:48:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QEmm15004763; Mon, 26 Sep 2016 14:48:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QEmmlc004762; Mon, 26 Sep 2016 14:48:48 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201609261448.u8QEmmlc004762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 26 Sep 2016 14:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306344 - stable/11/usr.bin/mkimg X-SVN-Group: stable-11 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.23 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, 26 Sep 2016 14:48:49 -0000 Author: asomers Date: Mon Sep 26 14:48:48 2016 New Revision: 306344 URL: https://svnweb.freebsd.org/changeset/base/306344 Log: MFC r306131 Update mkimg(1) author's contact info Modified: stable/11/usr.bin/mkimg/mkimg.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkimg/mkimg.1 ============================================================================== --- stable/11/usr.bin/mkimg/mkimg.1 Mon Sep 26 14:30:19 2016 (r306343) +++ stable/11/usr.bin/mkimg/mkimg.1 Mon Sep 26 14:48:48 2016 (r306344) @@ -328,4 +328,4 @@ utility first appeared in The .Nm utility and manpage were written by -.An Marcel Moolenaar Aq Mt marcelm@juniper.net . +.An Marcel Moolenaar Aq Mt marcel@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon Sep 26 15:03: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 DB476BE3475; Mon, 26 Sep 2016 15:03:32 +0000 (UTC) (envelope-from asomers@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 AB28CF90; Mon, 26 Sep 2016 15:03:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QF3Vt6012407; Mon, 26 Sep 2016 15:03:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QF3VVM012406; Mon, 26 Sep 2016 15:03:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201609261503.u8QF3VVM012406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 26 Sep 2016 15:03:31 +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: r306345 - stable/10/usr.bin/mkimg 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.23 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, 26 Sep 2016 15:03:33 -0000 Author: asomers Date: Mon Sep 26 15:03:31 2016 New Revision: 306345 URL: https://svnweb.freebsd.org/changeset/base/306345 Log: MFC r306131 Update mkimg(1) author's contact info Modified: stable/10/usr.bin/mkimg/mkimg.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/mkimg.1 ============================================================================== --- stable/10/usr.bin/mkimg/mkimg.1 Mon Sep 26 14:48:48 2016 (r306344) +++ stable/10/usr.bin/mkimg/mkimg.1 Mon Sep 26 15:03:31 2016 (r306345) @@ -328,4 +328,4 @@ utility first appeared in The .Nm utility and manpage were written by -.An Marcel Moolenaar Aq Mt marcelm@juniper.net . +.An Marcel Moolenaar Aq Mt marcel@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon Sep 26 15:30:31 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 38216BE3BC4; Mon, 26 Sep 2016 15:30:31 +0000 (UTC) (envelope-from vangyzen@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 04F99FFA; Mon, 26 Sep 2016 15:30:30 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QFUUTj020175; Mon, 26 Sep 2016 15:30:30 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QFUUZd020174; Mon, 26 Sep 2016 15:30:30 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201609261530.u8QFUUZd020174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 26 Sep 2016 15:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306346 - 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.23 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, 26 Sep 2016 15:30:31 -0000 Author: vangyzen Date: Mon Sep 26 15:30:30 2016 New Revision: 306346 URL: https://svnweb.freebsd.org/changeset/base/306346 Log: Make no assertions about mutex state when the scheduler is stopped. This changes the assert path to match the lock and unlock paths. MFC after: 1 week Sponsored by: Dell EMC Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c { const struct mtx *m; - if (panicstr != NULL || dumping) + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) return; m = mtxlock2mtx(c); From owner-svn-src-all@freebsd.org Mon Sep 26 15:38: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 8F05BBE3ECA; Mon, 26 Sep 2016 15:38:03 +0000 (UTC) (envelope-from br@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 6074E96D; Mon, 26 Sep 2016 15:38:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QFc257023866; Mon, 26 Sep 2016 15:38:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QFc2Av023865; Mon, 26 Sep 2016 15:38:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609261538.u8QFc2Av023865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 15:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306347 - head/lib/libc/tests 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.23 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, 26 Sep 2016 15:38:03 -0000 Author: br Date: Mon Sep 26 15:38:02 2016 New Revision: 306347 URL: https://svnweb.freebsd.org/changeset/base/306347 Log: Don't build SSP tests on MIPS as we dont have stack-protector supported on this platform. Discussed with: brooks Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/lib/libc/tests/Makefile Modified: head/lib/libc/tests/Makefile ============================================================================== --- head/lib/libc/tests/Makefile Mon Sep 26 15:30:30 2016 (r306346) +++ head/lib/libc/tests/Makefile Mon Sep 26 15:38:02 2016 (r306347) @@ -30,7 +30,8 @@ SUBDIR_DEPEND_tls= tls_dso TESTS_SUBDIRS+= locale .endif -.if ${MK_SSP} != "no" +.if ${MK_SSP} != "no" && \ + ${MACHINE_CPUARCH} != "mips" TESTS_SUBDIRS+= ssp .endif From owner-svn-src-all@freebsd.org Mon Sep 26 15:45:31 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 73C7EBE414D; Mon, 26 Sep 2016 15:45:31 +0000 (UTC) (envelope-from hiren@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 3DC90EEA; Mon, 26 Sep 2016 15:45:31 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QFjU8O027752; Mon, 26 Sep 2016 15:45:30 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QFjUpj027751; Mon, 26 Sep 2016 15:45:30 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609261545.u8QFjUpj027751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 26 Sep 2016 15:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306348 - 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.23 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, 26 Sep 2016 15:45:31 -0000 Author: hiren Date: Mon Sep 26 15:45:30 2016 New Revision: 306348 URL: https://svnweb.freebsd.org/changeset/base/306348 Log: Revert r306337. dhw@ reproted a panic which seems related to this and bde@ has raised some issues. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Sep 26 15:38:02 2016 (r306347) +++ head/sys/kern/uipc_syscalls.c Mon Sep 26 15:45:30 2016 (r306348) @@ -685,7 +685,7 @@ sys_socketpair(struct thread *td, struct static int sendit(struct thread *td, int s, struct msghdr *mp, int flags) { - struct mbuf *control = NULL; + struct mbuf *control; struct sockaddr *to; int error; @@ -737,8 +737,6 @@ sendit(struct thread *td, int s, struct bad: free(to, M_SONAME); - if (control) - m_freem(control); return (error); } From owner-svn-src-all@freebsd.org Mon Sep 26 15:52:13 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 204E8BE4523; Mon, 26 Sep 2016 15:52:13 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 12AFD15AD; Mon, 26 Sep 2016 15:52:12 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 3167C17FB4; Mon, 26 Sep 2016 08:52:12 -0700 (PDT) Date: Mon, 26 Sep 2016 08:52:12 -0700 From: Hiren Panchasara To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern Message-ID: <20160926155212.GI96580@strugglingcoder.info> References: <201609261013.u8QADwrV002892@repo.freebsd.org> <20160926203343.S1542@besplex.bde.org> <20160926215837.K1725@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G3juXO9GfR42w+sw" Content-Disposition: inline In-Reply-To: <20160926215837.K1725@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 15:52:13 -0000 --G3juXO9GfR42w+sw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 09/26/16 at 10:18P, Bruce Evans wrote: > On Mon, 26 Sep 2016, Bruce Evans wrote: > Thanks Bruce for your inputs. I've reverted this change with r306348 for now as there was a panic reported with this. I do not have time to deal with it for at least a few days. I'll try to get back to it. If you (or anyone else) want to fix it the right way, please go ahead. Sorry for the trouble. Cheers, Hiren --G3juXO9GfR42w+sw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJX6UQsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lyy4H/2c3F8Xmg8x+Rjr8kRqb4ghe 7Ao87l8LQ03Wue86AesisOVu8Ms7e5vEUBtknlv043mg7fVVZY6bgqR8kLFClKGc zUB5cvCfcuvZRB+Z18jKqN5RGYcl1WtYdNLctihR4I8bGCsAyava6tMgXnYA365N hWyxO81nHsIq+zVWVwarTM7msQd8BvKuyhBMCmQ+goIB/lPvqD1YXltsHoIHcuOe nz/bbl9WKJoZt5dNI1c0PfAQu6UfvHgevGXwfArNFvEJHWVFMZl+gpL56E9G4yD1 ObEtYbetMUqJb96KVfQVZzZ7p5Fut0nrJ/rnrDRnnvHaqu6rpAeP9gUcowyJ49I= =oLZf -----END PGP SIGNATURE----- --G3juXO9GfR42w+sw-- From owner-svn-src-all@freebsd.org Mon Sep 26 16:06: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 421A9BE4B10; Mon, 26 Sep 2016 16:06:51 +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 124821D12; Mon, 26 Sep 2016 16:06:51 +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 u8QG6oiu035105; Mon, 26 Sep 2016 16:06:50 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QG6ogU035104; Mon, 26 Sep 2016 16:06:50 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609261606.u8QG6ogU035104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 26 Sep 2016 16:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306349 - head/lib/libc/db/hash 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.23 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, 26 Sep 2016 16:06:51 -0000 Author: pfg Date: Mon Sep 26 16:06:50 2016 New Revision: 306349 URL: https://svnweb.freebsd.org/changeset/base/306349 Log: hash(3): protect in-memory page when using cross-endianness. When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. Obtained from: NetBSD (CVS rev. 1.29) Modified: head/lib/libc/db/hash/hash_page.c Modified: head/lib/libc/db/hash/hash_page.c ============================================================================== --- head/lib/libc/db/hash/hash_page.c Mon Sep 26 15:45:30 2016 (r306348) +++ head/lib/libc/db/hash/hash_page.c Mon Sep 26 16:06:50 2016 (r306349) @@ -572,7 +572,9 @@ __get_page(HTAB *hashp, char *p, u_int32 int __put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap) { - int fd, page, size, wsize; + int fd, page, size; + ssize_t wsize; + char pbuf[MAX_BSIZE]; size = hashp->BSIZE; if ((hashp->fp == -1) && open_temp(hashp)) @@ -582,15 +584,18 @@ __put_page(HTAB *hashp, char *p, u_int32 if (hashp->LORDER != BYTE_ORDER) { int i, max; + memcpy(pbuf, p, size); if (is_bitmap) { max = hashp->BSIZE >> 2; /* divide by 4 */ for (i = 0; i < max; i++) - M_32_SWAP(((int *)p)[i]); + M_32_SWAP(((int *)pbuf)[i]); } else { - max = ((u_int16_t *)p)[0] + 2; + uint16_t *bp = (uint16_t *)(void *)pbuf; + max = bp[0] + 2; for (i = 0; i <= max; i++) - M_16_SWAP(((u_int16_t *)p)[i]); + M_16_SWAP(bp[i]); } + p = pbuf; } if (is_bucket) page = BUCKET_TO_PAGE(bucket); From owner-svn-src-all@freebsd.org Mon Sep 26 16:52:38 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 42BACBE9605; Mon, 26 Sep 2016 16:52:38 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (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 016346C3; Mon, 26 Sep 2016 16:52:38 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-io0-x22f.google.com with SMTP id r145so188642656ior.0; Mon, 26 Sep 2016 09:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2HWagId5z9FDK162WfRrgC4S2sFaRl3dBAq3MTtw5x4=; b=mAviw9rNyeQdk/ozW5gUtaDxS5QV3sFKm0rR/tERC7OVxxk/Kt+69mOfJDGocEwvqO XzaNto+eX+CD1rHnADwXwuBrcvbLNmtmmyKJj9nNJBNi13C0VdOUYdRNcovDYiRZqSi1 24uXRE3SVMch9e4BjEcwfjxdOrGyicBEtpiqy205W7OMr6vgO4Rwphuo82pOzXg2Z5Om 1FvGAbZCZYgg41b4a4Lnl9MjDavFFXOUtrXzgfe+Cm69lwQy6QQWPamcZt+wK+8/LBEt BWXw5hssDICJ+gPQNN0HRuRBks0oTVhomXkWsqE7zGwwWihUY/l/k6ZyfcTzGqMgdahA pLmA== 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:from:date :message-id:subject:to:cc; bh=2HWagId5z9FDK162WfRrgC4S2sFaRl3dBAq3MTtw5x4=; b=W8rBZMszT1LMVfD5wx96OpNH6erSPfOHsXOhYeMPZ7cAIZYajsUqtnZnq39B4pBXX4 YdGdyrbUep+4AGt738hIv3i5g2PFzfEc7mGqhmxGJH0lXwSK4UKVWuZ+QzJycWHAC/aV qyeijDHvOTYKO1bY65urTQgXgCV/0rKyHg8uOm7ptdFBJMdzr2QSqH7XHfjOI6VQjz9E MzyFyATsClZ+W5gxl/8cSFENSJg96ZiW/s8i77EuLDrMUVvxHDL3VZ6fI5l9svdeDGL6 yIQCFyk/oO0AiynWbwzMk5Hr0Q+RNFNghYOtiIBhd5S+UU6EHVHXdc+N08+ihDy7u4FN I+uQ== X-Gm-Message-State: AE9vXwP1GH7xx2ghIPJOUrDkxwvfrVwxgoO+tlrD3BdRWFktCbsr7Ae/PmPFg2p5YkMG6A5OHRUZRnSmapntGA== X-Received: by 10.107.18.214 with SMTP id 83mr24238820ios.37.1474908756512; Mon, 26 Sep 2016 09:52:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.129.199 with HTTP; Mon, 26 Sep 2016 09:52:35 -0700 (PDT) In-Reply-To: <201609261430.u8QEUJMS097054@repo.freebsd.org> References: <201609261430.u8QEUJMS097054@repo.freebsd.org> From: Xin LI Date: Mon, 26 Sep 2016 09:52:35 -0700 Message-ID: Subject: Re: svn commit: r306343 - in stable/11: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/engine crypto/openssl/crypto/x509 crypto/openssl/ssl secure/lib/libcrypto secure/lib/libcrypto/man sec... To: Jung-uk Kim Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 16:52:38 -0000 Thanks! On Mon, Sep 26, 2016 at 7:30 AM, Jung-uk Kim wrote: > Author: jkim > Date: Mon Sep 26 14:30:19 2016 > New Revision: 306343 > URL: https://svnweb.freebsd.org/changeset/base/306343 > > Log: > MFC: r306342 > > Merge OpenSSL 1.0.2j. > > Modified: > stable/11/crypto/openssl/CHANGES > stable/11/crypto/openssl/Makefile > stable/11/crypto/openssl/NEWS > stable/11/crypto/openssl/README > stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c > stable/11/crypto/openssl/crypto/opensslv.h > stable/11/crypto/openssl/crypto/x509/x509_vfy.c > stable/11/crypto/openssl/ssl/t1_ext.c > stable/11/secure/lib/libcrypto/Makefile.inc > stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 > stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 > stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 > stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 > stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 > stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 > stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 > stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 > stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 > stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 > stable/11/secure/lib/libcrypto/man/BIO_f_md.3 > stable/11/secure/lib/libcrypto/man/BIO_f_null.3 > stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 > stable/11/secure/lib/libcrypto/man/BIO_find_type.3 > stable/11/secure/lib/libcrypto/man/BIO_new.3 > stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 > stable/11/secure/lib/libcrypto/man/BIO_push.3 > stable/11/secure/lib/libcrypto/man/BIO_read.3 > stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 > stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 > stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 > stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 > stable/11/secure/lib/libcrypto/man/BIO_s_file.3 > stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 > stable/11/secure/lib/libcrypto/man/BIO_s_null.3 > stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 > stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 > stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 > stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 > stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 > stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 > stable/11/secure/lib/libcrypto/man/BN_add.3 > stable/11/secure/lib/libcrypto/man/BN_add_word.3 > stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 > stable/11/secure/lib/libcrypto/man/BN_cmp.3 > stable/11/secure/lib/libcrypto/man/BN_copy.3 > stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 > stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 > stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 > stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 > stable/11/secure/lib/libcrypto/man/BN_new.3 > stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 > stable/11/secure/lib/libcrypto/man/BN_rand.3 > stable/11/secure/lib/libcrypto/man/BN_set_bit.3 > stable/11/secure/lib/libcrypto/man/BN_swap.3 > stable/11/secure/lib/libcrypto/man/BN_zero.3 > stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 > stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 > stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 > stable/11/secure/lib/libcrypto/man/CMS_compress.3 > stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 > stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 > stable/11/secure/lib/libcrypto/man/CMS_final.3 > stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 > stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 > stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 > stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 > stable/11/secure/lib/libcrypto/man/CMS_sign.3 > stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 > stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 > stable/11/secure/lib/libcrypto/man/CMS_verify.3 > stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 > stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 > stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 > stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 > stable/11/secure/lib/libcrypto/man/DH_generate_key.3 > stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 > stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 > stable/11/secure/lib/libcrypto/man/DH_new.3 > stable/11/secure/lib/libcrypto/man/DH_set_method.3 > stable/11/secure/lib/libcrypto/man/DH_size.3 > stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 > stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 > stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 > stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 > stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 > stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 > stable/11/secure/lib/libcrypto/man/DSA_new.3 > stable/11/secure/lib/libcrypto/man/DSA_set_method.3 > stable/11/secure/lib/libcrypto/man/DSA_sign.3 > stable/11/secure/lib/libcrypto/man/DSA_size.3 > stable/11/secure/lib/libcrypto/man/EC_GFp_simple_method.3 > stable/11/secure/lib/libcrypto/man/EC_GROUP_copy.3 > stable/11/secure/lib/libcrypto/man/EC_GROUP_new.3 > stable/11/secure/lib/libcrypto/man/EC_KEY_new.3 > stable/11/secure/lib/libcrypto/man/EC_POINT_add.3 > stable/11/secure/lib/libcrypto/man/EC_POINT_new.3 > stable/11/secure/lib/libcrypto/man/ERR_GET_LIB.3 > stable/11/secure/lib/libcrypto/man/ERR_clear_error.3 > stable/11/secure/lib/libcrypto/man/ERR_error_string.3 > stable/11/secure/lib/libcrypto/man/ERR_get_error.3 > stable/11/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 > stable/11/secure/lib/libcrypto/man/ERR_load_strings.3 > stable/11/secure/lib/libcrypto/man/ERR_print_errors.3 > stable/11/secure/lib/libcrypto/man/ERR_put_error.3 > stable/11/secure/lib/libcrypto/man/ERR_remove_state.3 > stable/11/secure/lib/libcrypto/man/ERR_set_mark.3 > stable/11/secure/lib/libcrypto/man/EVP_BytesToKey.3 > stable/11/secure/lib/libcrypto/man/EVP_DigestInit.3 > stable/11/secure/lib/libcrypto/man/EVP_DigestSignInit.3 > stable/11/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 > stable/11/secure/lib/libcrypto/man/EVP_EncodeInit.3 > stable/11/secure/lib/libcrypto/man/EVP_EncryptInit.3 > stable/11/secure/lib/libcrypto/man/EVP_OpenInit.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_derive.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_new.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_sign.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify.3 > stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 > stable/11/secure/lib/libcrypto/man/EVP_SealInit.3 > stable/11/secure/lib/libcrypto/man/EVP_SignInit.3 > stable/11/secure/lib/libcrypto/man/EVP_VerifyInit.3 > stable/11/secure/lib/libcrypto/man/OBJ_nid2obj.3 > stable/11/secure/lib/libcrypto/man/OPENSSL_Applink.3 > stable/11/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 > stable/11/secure/lib/libcrypto/man/OPENSSL_config.3 > stable/11/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 > stable/11/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 > stable/11/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 > stable/11/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 > stable/11/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 > stable/11/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 > stable/11/secure/lib/libcrypto/man/PKCS12_create.3 > stable/11/secure/lib/libcrypto/man/PKCS12_parse.3 > stable/11/secure/lib/libcrypto/man/PKCS7_decrypt.3 > stable/11/secure/lib/libcrypto/man/PKCS7_encrypt.3 > stable/11/secure/lib/libcrypto/man/PKCS7_sign.3 > stable/11/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 > stable/11/secure/lib/libcrypto/man/PKCS7_verify.3 > stable/11/secure/lib/libcrypto/man/RAND_add.3 > stable/11/secure/lib/libcrypto/man/RAND_bytes.3 > stable/11/secure/lib/libcrypto/man/RAND_cleanup.3 > stable/11/secure/lib/libcrypto/man/RAND_egd.3 > stable/11/secure/lib/libcrypto/man/RAND_load_file.3 > stable/11/secure/lib/libcrypto/man/RAND_set_rand_method.3 > stable/11/secure/lib/libcrypto/man/RSA_blinding_on.3 > stable/11/secure/lib/libcrypto/man/RSA_check_key.3 > stable/11/secure/lib/libcrypto/man/RSA_generate_key.3 > stable/11/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 > stable/11/secure/lib/libcrypto/man/RSA_new.3 > stable/11/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 > stable/11/secure/lib/libcrypto/man/RSA_print.3 > stable/11/secure/lib/libcrypto/man/RSA_private_encrypt.3 > stable/11/secure/lib/libcrypto/man/RSA_public_encrypt.3 > stable/11/secure/lib/libcrypto/man/RSA_set_method.3 > stable/11/secure/lib/libcrypto/man/RSA_sign.3 > stable/11/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 > stable/11/secure/lib/libcrypto/man/RSA_size.3 > stable/11/secure/lib/libcrypto/man/SMIME_read_CMS.3 > stable/11/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 > stable/11/secure/lib/libcrypto/man/SMIME_write_CMS.3 > stable/11/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 > stable/11/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 > stable/11/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 > stable/11/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 > stable/11/secure/lib/libcrypto/man/X509_NAME_print_ex.3 > stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 > stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 > stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 > stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 > stable/11/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 > stable/11/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 > stable/11/secure/lib/libcrypto/man/X509_check_host.3 > stable/11/secure/lib/libcrypto/man/X509_new.3 > stable/11/secure/lib/libcrypto/man/X509_verify_cert.3 > stable/11/secure/lib/libcrypto/man/bio.3 > stable/11/secure/lib/libcrypto/man/blowfish.3 > stable/11/secure/lib/libcrypto/man/bn.3 > stable/11/secure/lib/libcrypto/man/bn_internal.3 > stable/11/secure/lib/libcrypto/man/buffer.3 > stable/11/secure/lib/libcrypto/man/crypto.3 > stable/11/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 > stable/11/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 > stable/11/secure/lib/libcrypto/man/d2i_DHparams.3 > stable/11/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 > stable/11/secure/lib/libcrypto/man/d2i_ECPKParameters.3 > stable/11/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 > stable/11/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 > stable/11/secure/lib/libcrypto/man/d2i_PrivateKey.3 > stable/11/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 > stable/11/secure/lib/libcrypto/man/d2i_X509.3 > stable/11/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 > stable/11/secure/lib/libcrypto/man/d2i_X509_CRL.3 > stable/11/secure/lib/libcrypto/man/d2i_X509_NAME.3 > stable/11/secure/lib/libcrypto/man/d2i_X509_REQ.3 > stable/11/secure/lib/libcrypto/man/d2i_X509_SIG.3 > stable/11/secure/lib/libcrypto/man/des.3 > stable/11/secure/lib/libcrypto/man/dh.3 > stable/11/secure/lib/libcrypto/man/dsa.3 > stable/11/secure/lib/libcrypto/man/ec.3 > stable/11/secure/lib/libcrypto/man/ecdsa.3 > stable/11/secure/lib/libcrypto/man/engine.3 > stable/11/secure/lib/libcrypto/man/err.3 > stable/11/secure/lib/libcrypto/man/evp.3 > stable/11/secure/lib/libcrypto/man/hmac.3 > stable/11/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 > stable/11/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 > stable/11/secure/lib/libcrypto/man/lh_stats.3 > stable/11/secure/lib/libcrypto/man/lhash.3 > stable/11/secure/lib/libcrypto/man/md5.3 > stable/11/secure/lib/libcrypto/man/mdc2.3 > stable/11/secure/lib/libcrypto/man/pem.3 > stable/11/secure/lib/libcrypto/man/rand.3 > stable/11/secure/lib/libcrypto/man/rc4.3 > stable/11/secure/lib/libcrypto/man/ripemd.3 > stable/11/secure/lib/libcrypto/man/rsa.3 > stable/11/secure/lib/libcrypto/man/sha.3 > stable/11/secure/lib/libcrypto/man/threads.3 > stable/11/secure/lib/libcrypto/man/ui.3 > stable/11/secure/lib/libcrypto/man/ui_compat.3 > stable/11/secure/lib/libcrypto/man/x509.3 > stable/11/secure/lib/libssl/man/SSL_CIPHER_get_name.3 > stable/11/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 > stable/11/secure/lib/libssl/man/SSL_CONF_CTX_new.3 > stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 > stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 > stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 > stable/11/secure/lib/libssl/man/SSL_CONF_cmd.3 > stable/11/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 > stable/11/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 > stable/11/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 > stable/11/secure/lib/libssl/man/SSL_CTX_add_session.3 > stable/11/secure/lib/libssl/man/SSL_CTX_ctrl.3 > stable/11/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 > stable/11/secure/lib/libssl/man/SSL_CTX_free.3 > stable/11/secure/lib/libssl/man/SSL_CTX_get0_param.3 > stable/11/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 > stable/11/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 > stable/11/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 > stable/11/secure/lib/libssl/man/SSL_CTX_new.3 > stable/11/secure/lib/libssl/man/SSL_CTX_sess_number.3 > stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 > stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_sessions.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set1_curves.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_mode.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_options.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_timeout.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 > stable/11/secure/lib/libssl/man/SSL_CTX_set_verify.3 > stable/11/secure/lib/libssl/man/SSL_CTX_use_certificate.3 > stable/11/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 > stable/11/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 > stable/11/secure/lib/libssl/man/SSL_SESSION_free.3 > stable/11/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 > stable/11/secure/lib/libssl/man/SSL_SESSION_get_time.3 > stable/11/secure/lib/libssl/man/SSL_accept.3 > stable/11/secure/lib/libssl/man/SSL_alert_type_string.3 > stable/11/secure/lib/libssl/man/SSL_check_chain.3 > stable/11/secure/lib/libssl/man/SSL_clear.3 > stable/11/secure/lib/libssl/man/SSL_connect.3 > stable/11/secure/lib/libssl/man/SSL_do_handshake.3 > stable/11/secure/lib/libssl/man/SSL_free.3 > stable/11/secure/lib/libssl/man/SSL_get_SSL_CTX.3 > stable/11/secure/lib/libssl/man/SSL_get_ciphers.3 > stable/11/secure/lib/libssl/man/SSL_get_client_CA_list.3 > stable/11/secure/lib/libssl/man/SSL_get_current_cipher.3 > stable/11/secure/lib/libssl/man/SSL_get_default_timeout.3 > stable/11/secure/lib/libssl/man/SSL_get_error.3 > stable/11/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 > stable/11/secure/lib/libssl/man/SSL_get_ex_new_index.3 > stable/11/secure/lib/libssl/man/SSL_get_fd.3 > stable/11/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 > stable/11/secure/lib/libssl/man/SSL_get_peer_certificate.3 > stable/11/secure/lib/libssl/man/SSL_get_psk_identity.3 > stable/11/secure/lib/libssl/man/SSL_get_rbio.3 > stable/11/secure/lib/libssl/man/SSL_get_session.3 > stable/11/secure/lib/libssl/man/SSL_get_verify_result.3 > stable/11/secure/lib/libssl/man/SSL_get_version.3 > stable/11/secure/lib/libssl/man/SSL_library_init.3 > stable/11/secure/lib/libssl/man/SSL_load_client_CA_file.3 > stable/11/secure/lib/libssl/man/SSL_new.3 > stable/11/secure/lib/libssl/man/SSL_pending.3 > stable/11/secure/lib/libssl/man/SSL_read.3 > stable/11/secure/lib/libssl/man/SSL_rstate_string.3 > stable/11/secure/lib/libssl/man/SSL_session_reused.3 > stable/11/secure/lib/libssl/man/SSL_set_bio.3 > stable/11/secure/lib/libssl/man/SSL_set_connect_state.3 > stable/11/secure/lib/libssl/man/SSL_set_fd.3 > stable/11/secure/lib/libssl/man/SSL_set_session.3 > stable/11/secure/lib/libssl/man/SSL_set_shutdown.3 > stable/11/secure/lib/libssl/man/SSL_set_verify_result.3 > stable/11/secure/lib/libssl/man/SSL_shutdown.3 > stable/11/secure/lib/libssl/man/SSL_state_string.3 > stable/11/secure/lib/libssl/man/SSL_want.3 > stable/11/secure/lib/libssl/man/SSL_write.3 > stable/11/secure/lib/libssl/man/d2i_SSL_SESSION.3 > stable/11/secure/lib/libssl/man/ssl.3 > stable/11/secure/usr.bin/openssl/man/CA.pl.1 > stable/11/secure/usr.bin/openssl/man/asn1parse.1 > stable/11/secure/usr.bin/openssl/man/c_rehash.1 > stable/11/secure/usr.bin/openssl/man/ca.1 > stable/11/secure/usr.bin/openssl/man/ciphers.1 > stable/11/secure/usr.bin/openssl/man/cms.1 > stable/11/secure/usr.bin/openssl/man/crl.1 > stable/11/secure/usr.bin/openssl/man/crl2pkcs7.1 > stable/11/secure/usr.bin/openssl/man/dgst.1 > stable/11/secure/usr.bin/openssl/man/dhparam.1 > stable/11/secure/usr.bin/openssl/man/dsa.1 > stable/11/secure/usr.bin/openssl/man/dsaparam.1 > stable/11/secure/usr.bin/openssl/man/ec.1 > stable/11/secure/usr.bin/openssl/man/ecparam.1 > stable/11/secure/usr.bin/openssl/man/enc.1 > stable/11/secure/usr.bin/openssl/man/errstr.1 > stable/11/secure/usr.bin/openssl/man/gendsa.1 > stable/11/secure/usr.bin/openssl/man/genpkey.1 > stable/11/secure/usr.bin/openssl/man/genrsa.1 > stable/11/secure/usr.bin/openssl/man/nseq.1 > stable/11/secure/usr.bin/openssl/man/ocsp.1 > stable/11/secure/usr.bin/openssl/man/openssl.1 > stable/11/secure/usr.bin/openssl/man/passwd.1 > stable/11/secure/usr.bin/openssl/man/pkcs12.1 > stable/11/secure/usr.bin/openssl/man/pkcs7.1 > stable/11/secure/usr.bin/openssl/man/pkcs8.1 > stable/11/secure/usr.bin/openssl/man/pkey.1 > stable/11/secure/usr.bin/openssl/man/pkeyparam.1 > stable/11/secure/usr.bin/openssl/man/pkeyutl.1 > stable/11/secure/usr.bin/openssl/man/rand.1 > stable/11/secure/usr.bin/openssl/man/req.1 > stable/11/secure/usr.bin/openssl/man/rsa.1 > stable/11/secure/usr.bin/openssl/man/rsautl.1 > stable/11/secure/usr.bin/openssl/man/s_client.1 > stable/11/secure/usr.bin/openssl/man/s_server.1 > stable/11/secure/usr.bin/openssl/man/s_time.1 > stable/11/secure/usr.bin/openssl/man/sess_id.1 > stable/11/secure/usr.bin/openssl/man/smime.1 > stable/11/secure/usr.bin/openssl/man/speed.1 > stable/11/secure/usr.bin/openssl/man/spkac.1 > stable/11/secure/usr.bin/openssl/man/ts.1 > stable/11/secure/usr.bin/openssl/man/tsget.1 > stable/11/secure/usr.bin/openssl/man/verify.1 > stable/11/secure/usr.bin/openssl/man/version.1 > stable/11/secure/usr.bin/openssl/man/x509.1 > stable/11/secure/usr.bin/openssl/man/x509v3_config.1 > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/crypto/openssl/CHANGES > ============================================================================== > --- stable/11/crypto/openssl/CHANGES Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/CHANGES Mon Sep 26 14:30:19 2016 (r306343) > @@ -2,6 +2,18 @@ > OpenSSL CHANGES > _______________ > > + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] > + > + *) Missing CRL sanity check > + > + A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0 > + but was omitted from OpenSSL 1.0.2i. As a result any attempt to use > + CRLs in OpenSSL 1.0.2i will crash with a null pointer exception. > + > + This issue only affects the OpenSSL 1.0.2i > + (CVE-2016-7052) > + [Matt Caswell] > + > Changes between 1.0.2h and 1.0.2i [22 Sep 2016] > > *) OCSP Status Request extension unbounded memory growth > > Modified: stable/11/crypto/openssl/Makefile > ============================================================================== > --- stable/11/crypto/openssl/Makefile Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/Makefile Mon Sep 26 14:30:19 2016 (r306343) > @@ -4,7 +4,7 @@ > ## Makefile for OpenSSL > ## > > -VERSION=1.0.2i > +VERSION=1.0.2j > MAJOR=1 > MINOR=0.2 > SHLIB_VERSION_NUMBER=1.0.0 > > Modified: stable/11/crypto/openssl/NEWS > ============================================================================== > --- stable/11/crypto/openssl/NEWS Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/NEWS Mon Sep 26 14:30:19 2016 (r306343) > @@ -5,6 +5,10 @@ > This file gives a brief overview of the major changes between each OpenSSL > release. For more details please read the CHANGES file. > > + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] > + > + o Fix Use After Free for large message sizes (CVE-2016-6309) > + > Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] > > o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) > > Modified: stable/11/crypto/openssl/README > ============================================================================== > --- stable/11/crypto/openssl/README Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/README Mon Sep 26 14:30:19 2016 (r306343) > @@ -1,5 +1,5 @@ > > - OpenSSL 1.0.2i 22 Sep 2016 > + OpenSSL 1.0.2j 26 Sep 2016 > > Copyright (c) 1998-2015 The OpenSSL Project > Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson > > Modified: stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c > ============================================================================== > --- stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:30:19 2016 (r306343) > @@ -939,7 +939,7 @@ static int cryptodev_digest_copy(EVP_MD_ > if (fstate->mac_len != 0) { > if (fstate->mac_data != NULL) { > dstate->mac_data = OPENSSL_malloc(fstate->mac_len); > - if (dstate->ac_data == NULL) { > + if (dstate->mac_data == NULL) { > printf("cryptodev_digest_init: malloc failed\n"); > return 0; > } > > Modified: stable/11/crypto/openssl/crypto/opensslv.h > ============================================================================== > --- stable/11/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:30:19 2016 (r306343) > @@ -30,11 +30,11 @@ extern "C" { > * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for > * major minor fix final patch/beta) > */ > -# define OPENSSL_VERSION_NUMBER 0x1000209fL > +# define OPENSSL_VERSION_NUMBER 0x100020afL > # ifdef OPENSSL_FIPS > -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-fips 22 Sep 2016" > +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" > # else > -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-freebsd 22 Sep 2016" > +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-freebsd 26 Sep 2016" > # endif > # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT > > > Modified: stable/11/crypto/openssl/crypto/x509/x509_vfy.c > ============================================================================== > --- stable/11/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:30:19 2016 (r306343) > @@ -1124,10 +1124,10 @@ static int get_crl_sk(X509_STORE_CTX *ct > crl = sk_X509_CRL_value(crls, i); > reasons = *preasons; > crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x); > - if (crl_score < best_score) > + if (crl_score < best_score || crl_score == 0) > continue; > /* If current CRL is equivalent use it if it is newer */ > - if (crl_score == best_score) { > + if (crl_score == best_score && best_crl != NULL) { > int day, sec; > if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl), > X509_CRL_get_lastUpdate(crl)) == 0) > > Modified: stable/11/crypto/openssl/ssl/t1_ext.c > ============================================================================== > --- stable/11/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:30:19 2016 (r306343) > @@ -275,7 +275,9 @@ int SSL_extension_supported(unsigned int > case TLSEXT_TYPE_ec_point_formats: > case TLSEXT_TYPE_elliptic_curves: > case TLSEXT_TYPE_heartbeat: > +# ifndef OPENSSL_NO_NEXTPROTONEG > case TLSEXT_TYPE_next_proto_neg: > +# endif > case TLSEXT_TYPE_padding: > case TLSEXT_TYPE_renegotiate: > case TLSEXT_TYPE_server_name: > > Modified: stable/11/secure/lib/libcrypto/Makefile.inc > ============================================================================== > --- stable/11/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:30:19 2016 (r306343) > @@ -3,8 +3,8 @@ > .include > > # OpenSSL version used for manual page generation > -OPENSSL_VER= 1.0.2i > -OPENSSL_DATE= 2016-09-22 > +OPENSSL_VER= 1.0.2j > +OPENSSL_DATE= 2016-09-26 > > LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl > LCRYPTO_DOC= ${LCRYPTO_SRC}/doc > > Modified: stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "ASN1_OBJECT_new 3" > -.TH ASN1_OBJECT_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH ASN1_OBJECT_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "ASN1_STRING_length 3" > -.TH ASN1_STRING_length 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH ASN1_STRING_length 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "ASN1_STRING_new 3" > -.TH ASN1_STRING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH ASN1_STRING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "ASN1_STRING_print_ex 3" > -.TH ASN1_STRING_print_ex 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH ASN1_STRING_print_ex 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "ASN1_TIME_set 3" > -.TH ASN1_TIME_set 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH ASN1_TIME_set 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "ASN1_generate_nconf 3" > -.TH ASN1_generate_nconf 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH ASN1_generate_nconf 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_ctrl 3" > -.TH BIO_ctrl 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_ctrl 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_f_base64 3" > -.TH BIO_f_base64 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_f_base64 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_f_buffer 3" > -.TH BIO_f_buffer 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_f_buffer 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_f_cipher 3" > -.TH BIO_f_cipher 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_f_cipher 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_f_md.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_f_md 3" > -.TH BIO_f_md 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_f_md 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_f_null.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_f_null 3" > -.TH BIO_f_null 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_f_null 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_f_ssl 3" > -.TH BIO_f_ssl 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_f_ssl 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_find_type.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_find_type 3" > -.TH BIO_find_type 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_find_type 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_new 3" > -.TH BIO_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_new_CMS 3" > -.TH BIO_new_CMS 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_new_CMS 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_push.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_push 3" > -.TH BIO_push 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_push 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_read.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_read 3" > -.TH BIO_read 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_read 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_accept 3" > -.TH BIO_s_accept 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_accept 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_bio 3" > -.TH BIO_s_bio 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_bio 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_connect 3" > -.TH BIO_s_connect 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_connect 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_fd 3" > -.TH BIO_s_fd 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_fd 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_file.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_file 3" > -.TH BIO_s_file 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_file 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_mem 3" > -.TH BIO_s_mem 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_mem 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_null.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_null 3" > -.TH BIO_s_null 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_null 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_s_socket 3" > -.TH BIO_s_socket 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_s_socket 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_set_callback 3" > -.TH BIO_set_callback 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_set_callback 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BIO_should_retry 3" > -.TH BIO_should_retry 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BIO_should_retry 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_BLINDING_new 3" > -.TH BN_BLINDING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_BLINDING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_CTX_new 3" > -.TH BN_CTX_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_CTX_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_CTX_start 3" > -.TH BN_CTX_start 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_CTX_start 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_add.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_add 3" > -.TH BN_add 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_add 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_add_word.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_add_word 3" > -.TH BN_add_word 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_add_word 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_bn2bin 3" > -.TH BN_bn2bin 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_bn2bin 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_cmp.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_cmp 3" > -.TH BN_cmp 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_cmp 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_copy.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_copy 3" > -.TH BN_copy 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_copy 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_generate_prime 3" > -.TH BN_generate_prime 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_generate_prime 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_mod_inverse 3" > -.TH BN_mod_inverse 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_mod_inverse 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_mod_mul_montgomery 3" > -.TH BN_mod_mul_montgomery 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_mod_mul_montgomery 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_mod_mul_reciprocal 3" > -.TH BN_mod_mul_reciprocal 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_mod_mul_reciprocal 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_new 3" > -.TH BN_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_num_bytes 3" > -.TH BN_num_bytes 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_num_bytes 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_rand.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_rand 3" > -.TH BN_rand 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_rand 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_set_bit.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_set_bit 3" > -.TH BN_set_bit 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_set_bit 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_swap.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_swap 3" > -.TH BN_swap 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_swap 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/BN_zero.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "BN_zero 3" > -.TH BN_zero 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH BN_zero 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_add0_cert 3" > -.TH CMS_add0_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_add0_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_add1_recipient_cert 3" > -.TH CMS_add1_recipient_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_add1_recipient_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_add1_signer 3" > -.TH CMS_add1_signer 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_add1_signer 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_compress.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_compress 3" > -.TH CMS_compress 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_compress 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_decrypt 3" > -.TH CMS_decrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_decrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_encrypt 3" > -.TH CMS_encrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_encrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_final.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_final 3" > -.TH CMS_final 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_final 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_get0_RecipientInfos 3" > -.TH CMS_get0_RecipientInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_get0_RecipientInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_get0_SignerInfos 3" > -.TH CMS_get0_SignerInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_get0_SignerInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_get0_type 3" > -.TH CMS_get0_type 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_get0_type 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_get1_ReceiptRequest 3" > -.TH CMS_get1_ReceiptRequest 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_get1_ReceiptRequest 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_sign.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_sign 3" > -.TH CMS_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_sign_receipt 3" > -.TH CMS_sign_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_sign_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_uncompress 3" > -.TH CMS_uncompress 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_uncompress 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_verify.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_verify 3" > -.TH CMS_verify 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_verify 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CMS_verify_receipt 3" > -.TH CMS_verify_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CMS_verify_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CONF_modules_free 3" > -.TH CONF_modules_free 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CONF_modules_free 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CONF_modules_load_file 3" > -.TH CONF_modules_load_file 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CONF_modules_load_file 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "CRYPTO_set_ex_data 3" > -.TH CRYPTO_set_ex_data 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH CRYPTO_set_ex_data 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DH_generate_key.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DH_generate_key 3" > -.TH DH_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DH_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DH_generate_parameters 3" > -.TH DH_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DH_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DH_get_ex_new_index 3" > -.TH DH_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DH_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DH_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DH_new 3" > -.TH DH_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DH_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DH_set_method.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DH_set_method 3" > -.TH DH_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DH_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DH_size.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DH_size 3" > -.TH DH_size 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DH_size 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_SIG_new 3" > -.TH DSA_SIG_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_SIG_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_do_sign 3" > -.TH DSA_do_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_do_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_dup_DH 3" > -.TH DSA_dup_DH 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_dup_DH 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_generate_key 3" > -.TH DSA_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_generate_parameters 3" > -.TH DSA_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_get_ex_new_index 3" > -.TH DSA_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_new.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_new 3" > -.TH DSA_new 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_new 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_set_method.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_set_method 3" > -.TH DSA_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > .\" way too many mistakes in technical documents. > .if n .ad l > > Modified: stable/11/secure/lib/libcrypto/man/DSA_sign.3 > ============================================================================== > --- stable/11/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:22:17 2016 (r306342) > +++ stable/11/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:30:19 2016 (r306343) > @@ -133,7 +133,7 @@ > .\" ======================================================================== > .\" > .IX Title "DSA_sign 3" > -.TH DSA_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" > +.TH DSA_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" > .\" For nroff, turn off justification. Always turn off hyphenation; it makes > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@freebsd.org Mon Sep 26 17:22:45 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 B2E7CBEA476; Mon, 26 Sep 2016 17:22:45 +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 6A0A3F80; Mon, 26 Sep 2016 17:22:45 +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 u8QHMiju065275; Mon, 26 Sep 2016 17:22:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QHMi7g065274; Mon, 26 Sep 2016 17:22:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609261722.u8QHMi7g065274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Sep 2016 17:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306350 - head/sys/amd64/amd64 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.23 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, 26 Sep 2016 17:22:45 -0000 Author: kib Date: Mon Sep 26 17:22:44 2016 New Revision: 306350 URL: https://svnweb.freebsd.org/changeset/base/306350 Log: For machines which support PCID but not have INVPCID instruction, i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() and invltlb_pcid_handler(). Reported by and tested by: Slawa Olhovchenkov MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 26 16:06:50 2016 (r306349) +++ head/sys/amd64/amd64/pmap.c Mon Sep 26 17:22:44 2016 (r306350) @@ -6842,6 +6842,7 @@ pmap_activate_sw(struct thread *td) { pmap_t oldpmap, pmap; uint64_t cached, cr3; + register_t rflags; u_int cpuid; oldpmap = PCPU_GET(curpmap); @@ -6865,16 +6866,43 @@ pmap_activate_sw(struct thread *td) pmap == kernel_pmap, ("non-kernel pmap thread %p pmap %p cpu %d pcid %#x", td, pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + + /* + * If the INVPCID instruction is not available, + * invltlb_pcid_handler() is used for handle + * invalidate_all IPI, which checks for curpmap == + * smp_tlb_pmap. Below operations sequence has a + * window where %CR3 is loaded with the new pmap's + * PML4 address, but curpmap value is not yet updated. + * This causes invltlb IPI handler, called between the + * updates, to execute as NOP, which leaves stale TLB + * entries. + * + * Note that the most typical use of + * pmap_activate_sw(), from the context switch, is + * immune to this race, because interrupts are + * disabled (while the thread lock is owned), and IPI + * happends after curpmap is updated. Protect other + * callers in a similar way, by disabling interrupts + * around the %cr3 register reload and curpmap + * assignment. + */ + if (!invpcid_works) + rflags = intr_disable(); + if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) { load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | cached); if (cached) PCPU_INC(pm_save_cnt); } + PCPU_SET(curpmap, pmap); + if (!invpcid_works) + intr_restore(rflags); } else if (cr3 != pmap->pm_cr3) { load_cr3(pmap->pm_cr3); + PCPU_SET(curpmap, pmap); } - PCPU_SET(curpmap, pmap); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); #else From owner-svn-src-all@freebsd.org Mon Sep 26 17:25:26 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 DDFCCBEA544; Mon, 26 Sep 2016 17:25:26 +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 AD77A1D5; Mon, 26 Sep 2016 17:25:26 +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 u8QHPPe4065411; Mon, 26 Sep 2016 17:25:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QHPPlJ065410; Mon, 26 Sep 2016 17:25:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609261725.u8QHPPlJ065410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Sep 2016 17:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306351 - head/sys/amd64/amd64 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.23 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, 26 Sep 2016 17:25:27 -0000 Author: kib Date: Mon Sep 26 17:25:25 2016 New Revision: 306351 URL: https://svnweb.freebsd.org/changeset/base/306351 Log: Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridge and IvyBridge machines, which support PCID but do not have INVPCID instruction. MFC after: 1 week Modified: head/sys/amd64/amd64/efirt.c Modified: head/sys/amd64/amd64/efirt.c ============================================================================== --- head/sys/amd64/amd64/efirt.c Mon Sep 26 17:22:44 2016 (r306350) +++ head/sys/amd64/amd64/efirt.c Mon Sep 26 17:25:25 2016 (r306351) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -301,6 +302,17 @@ efi_enter(void) PMAP_UNLOCK(curpmap); return (error); } + + /* + * IPI TLB shootdown handler invltlb_pcid_handler() reloads + * %cr3 from the curpmap->pm_cr3, which would disable runtime + * segments mappings. Block the handler's action by setting + * curpmap to impossible value. See also comment in + * pmap.c:pmap_activate_sw(). + */ + if (pmap_pcid_enabled && !invpcid_works) + PCPU_SET(curpmap, NULL); + load_cr3(VM_PAGE_TO_PHYS(efi_pml4_page) | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); /* @@ -317,7 +329,9 @@ efi_leave(void) { pmap_t curpmap; - curpmap = PCPU_GET(curpmap); + curpmap = &curproc->p_vmspace->vm_pmap; + if (pmap_pcid_enabled && !invpcid_works) + PCPU_SET(curpmap, curpmap); load_cr3(curpmap->pm_cr3 | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); if (!pmap_pcid_enabled) From owner-svn-src-all@freebsd.org Mon Sep 26 17:26: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 673B7BEA5BA; Mon, 26 Sep 2016 17:26:09 +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 294263B3; Mon, 26 Sep 2016 17:26:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::604c:a6f1:2871:83a7] (unknown [IPv6:2001:7b8:3a7:0:604c:a6f1:2871:83a7]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D36523CB82; Mon, 26 Sep 2016 19:25:59 +0200 (CEST) Subject: Re: svn commit: r306335 - stable/9/crypto/openssl/crypto/bn Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E56E9B4C-BA62-4965-8078-B1C6019CD381"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6.1 From: Dimitry Andric In-Reply-To: <201609260819.u8Q8JYla058123@repo.freebsd.org> Date: Mon, 26 Sep 2016 19:25:49 +0200 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Message-Id: <69AE35C2-6D9E-4C75-9A14-A9CA283FE2FD@FreeBSD.org> References: <201609260819.u8Q8JYla058123@repo.freebsd.org> To: Xin LI X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 17:26:09 -0000 --Apple-Mail=_E56E9B4C-BA62-4965-8078-B1C6019CD381 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 26 Sep 2016, at 10:19, Xin LI wrote: > > Author: delphij > Date: Mon Sep 26 08:19:33 2016 > New Revision: 306335 > URL: https://svnweb.freebsd.org/changeset/base/306335 > > Log: > Apply upstream revision 3612ff6fcec0e3d1f2a598135fe12177c0419582: > > Fix overflow check in BN_bn2dec() > Fix an off by one error in the overflow check added by 07bed46 > ("Check for errors in BN_bn2dec()"). > > This fixes a regression introduced in SA-16:26.openssl. > > Submitted by: jkim > PR: 212921 Doesn't this also apply to stable/10? -Dimitry --Apple-Mail=_E56E9B4C-BA62-4965-8078-B1C6019CD381 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.30 iEYEARECAAYFAlfpWicACgkQsF6jCi4glqN3WQCfa9zpOglgArBiZFncUTXsNgOJ Ya4AmwXsUIliYqagPVl/MAYdUPY5dpc9 =ImGz -----END PGP SIGNATURE----- --Apple-Mail=_E56E9B4C-BA62-4965-8078-B1C6019CD381-- From owner-svn-src-all@freebsd.org Mon Sep 26 18:05: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 C6A98BEAF93; Mon, 26 Sep 2016 18:05:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 A102FC22; Mon, 26 Sep 2016 18:05:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 7165410AF7F; Mon, 26 Sep 2016 14:04:58 -0400 (EDT) From: John Baldwin To: Warner Losh Cc: Allan Jude , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... Date: Mon, 26 Sep 2016 10:00:32 -0700 Message-ID: <1577832.dOPa6L4zTd@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 26 Sep 2016 14:04:58 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 18:05:04 -0000 On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: > On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: > > On 09/03/16 11:26 AM, Warner Losh wrote: > >> Author: imp > >> Date: Sat Sep 3 15:26:28 2016 > >> New Revision: 305353 > >> URL: https://svnweb.freebsd.org/changeset/base/305353 > >> > >> Log: > >> Don't use -N to set the OMAGIC with data and text writeable and data > >> not page aligned. To do this, use the ld script gnu ld installs on my > >> system. > >> > >> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different > >> things. The loader script could be better named and take into account > >> other architectures. And having two different mechanisms to do > >> basically the same thing needs study. However, it's blocking forward > >> progress on lld, so I'll work in parallel to sort these out. > >> > >> Differential Revision: https://reviews.freebsd.org/D7409 > >> Reviewed by: emaste > >> > > > > This breaks booting on my Lenovo laptop. The BTX client crashes and > > dumps the registers. > > > > Reverting this commit solved it. > > > > Is there something I can do to help investigate this? > > I assume you bisected all boot loader changes and it fails across this > commit? If not, that's the first step. > > If so, perhaps the place to start is with the dump? The dump is a good place to start, but it would also be useful to know 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning it it is probably btxldr.S dying trying to parse a.out header from /boot/loader vs are you dying before that point meaning it is in boot1.S or gptldr.S)? 2) Once we know which stage, it would be good to compare the a.out headers and possibly the contents of the relevant binaries. The aforementioned .S files all parse the a.out header in assembly as well as the BTX header (they assume that BTX itself is present in the bits loaded from disk immediately followed by the binary header). That code isn't very flexible and it doesn't seem far fetched for this change to break it. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Sep 26 19:47:13 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 6B633BEB995; Mon, 26 Sep 2016 19:47:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D783C36; Mon, 26 Sep 2016 19:47:12 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id obrjbfic5MSApobrkbr5u1; Mon, 26 Sep 2016 13:47:05 -0600 X-Authority-Analysis: v=2.2 cv=A9QuBOeG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=GW1xBdLrtEIA:10 a=WLlH_E4RAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=2LcHFN95hOT3Sw3x7MsA:9 a=CjuIK1q_8ugA:10 a=MvyZFegcHMTCMQET4-L5:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id C7E9247C; Mon, 26 Sep 2016 12:47:02 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u8QJki29093115; Mon, 26 Sep 2016 12:46:44 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201609261946.u8QJki29093115@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Hiren Panchasara cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern In-Reply-To: Message from Hiren Panchasara of "Mon, 26 Sep 2016 08:52:12 -0700." <20160926155212.GI96580@strugglingcoder.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 26 Sep 2016 12:46:44 -0700 X-CMAE-Envelope: MS4wfBfUqmc6qdBrk9IlJiR5bHXnlci4KtPyxtqwP+GB8MozxMBzJWH2t1sRHgUEfBaM8+kjcNmb/BQpVk6//IcW750kTvqFHADbGL2b+8Ujh9dCRXXL5QOe LSlQJ50TnYW3ItyWWitJvF/6umkyQaWNhLRX7RqZWwS3/mAN0fRidnEMXYRL1oEh3WFLo4BO7YQcvFUPZBSge2wG6D+8Le3XLLhMBQUQ5zNwxO/LUZCLZh5O GIXNNdjtgvpppvzWIaown7XiiBWeYsgkeJFY1JKewXo1WarG+JcLXp/IqOY8wQA3SIo25sJjuI69edFTJ3RtFg== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 19:47:13 -0000 In message <20160926155212.GI96580@strugglingcoder.info>, Hiren Panchasara writ es: > > --G3juXO9GfR42w+sw > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > On 09/26/16 at 10:18P, Bruce Evans wrote: > > On Mon, 26 Sep 2016, Bruce Evans wrote: > > > > Thanks Bruce for your inputs. I've reverted this change with r306348 for > now as there was a panic reported with this. I do not have time to deal > with it for at least a few days. I'll try to get back to it. If you (or > anyone else) want to fix it the right way, please go ahead. > > Sorry for the trouble. Just as a side note, my firewall panicked repeatedly due to a page fault (useless dumps with corrupted stack captured). My main server had a soft hang which could be interrupted at the console (also had corrupted stack trace) while my testbed machine booted but was dead to the world with no interfaces available. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Sep 26 20:13:34 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 9923FBEA19F; Mon, 26 Sep 2016 20:13:34 +0000 (UTC) (envelope-from br@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 68A13ED8; Mon, 26 Sep 2016 20:13:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QKDXCM029823; Mon, 26 Sep 2016 20:13:33 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QKDXFT029822; Mon, 26 Sep 2016 20:13:33 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609262013.u8QKDXFT029822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 20:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306353 - head/lib/libarchive/tests 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.23 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, 26 Sep 2016 20:13:34 -0000 Author: br Date: Mon Sep 26 20:13:33 2016 New Revision: 306353 URL: https://svnweb.freebsd.org/changeset/base/306353 Log: Increase timeout from 300 (default) to 600 seconds. It takes 6-7 minutes to proceed the test on MIPS64EB. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/lib/libarchive/tests/Makefile Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Mon Sep 26 19:35:41 2016 (r306352) +++ head/lib/libarchive/tests/Makefile Mon Sep 26 20:13:33 2016 (r306353) @@ -6,6 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarc ATF_TESTS_SH+= functional_test +TEST_METADATA.functional_test+= timeout="600" + BINDIR= ${TESTSDIR} PROGS+= libarchive_test From owner-svn-src-all@freebsd.org Mon Sep 26 20:26: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 F1D4EBEA56B; Mon, 26 Sep 2016 20:26:29 +0000 (UTC) (envelope-from glebius@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 7790B8B9; Mon, 26 Sep 2016 20:26:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QKQSlq033907; Mon, 26 Sep 2016 20:26:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QKQJAZ033814; Mon, 26 Sep 2016 20:26:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201609262026.u8QKQJAZ033814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 26 Sep 2016 20:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306354 - in releng/11.0: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/engine crypto/openssl/crypto/x509 crypto/openssl/ssl secure/lib/libcrypto secure/lib/libcrypto/man s... 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.23 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, 26 Sep 2016 20:26:30 -0000 Author: glebius Date: Mon Sep 26 20:26:19 2016 New Revision: 306354 URL: https://svnweb.freebsd.org/changeset/base/306354 Log: Merge r306343 by jkim: Merge OpenSSL 1.0.2j. Approved by: so Approved by: re (implicit) Modified: releng/11.0/crypto/openssl/CHANGES releng/11.0/crypto/openssl/Makefile releng/11.0/crypto/openssl/NEWS releng/11.0/crypto/openssl/README releng/11.0/crypto/openssl/crypto/engine/eng_cryptodev.c releng/11.0/crypto/openssl/crypto/opensslv.h releng/11.0/crypto/openssl/crypto/x509/x509_vfy.c releng/11.0/crypto/openssl/ssl/t1_ext.c releng/11.0/secure/lib/libcrypto/Makefile.inc releng/11.0/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_length.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_new.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 releng/11.0/secure/lib/libcrypto/man/ASN1_TIME_set.3 releng/11.0/secure/lib/libcrypto/man/ASN1_generate_nconf.3 releng/11.0/secure/lib/libcrypto/man/BIO_ctrl.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_base64.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_buffer.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_cipher.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_md.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_null.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_ssl.3 releng/11.0/secure/lib/libcrypto/man/BIO_find_type.3 releng/11.0/secure/lib/libcrypto/man/BIO_new.3 releng/11.0/secure/lib/libcrypto/man/BIO_new_CMS.3 releng/11.0/secure/lib/libcrypto/man/BIO_push.3 releng/11.0/secure/lib/libcrypto/man/BIO_read.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_accept.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_bio.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_connect.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_fd.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_file.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_mem.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_null.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_socket.3 releng/11.0/secure/lib/libcrypto/man/BIO_set_callback.3 releng/11.0/secure/lib/libcrypto/man/BIO_should_retry.3 releng/11.0/secure/lib/libcrypto/man/BN_BLINDING_new.3 releng/11.0/secure/lib/libcrypto/man/BN_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/BN_CTX_start.3 releng/11.0/secure/lib/libcrypto/man/BN_add.3 releng/11.0/secure/lib/libcrypto/man/BN_add_word.3 releng/11.0/secure/lib/libcrypto/man/BN_bn2bin.3 releng/11.0/secure/lib/libcrypto/man/BN_cmp.3 releng/11.0/secure/lib/libcrypto/man/BN_copy.3 releng/11.0/secure/lib/libcrypto/man/BN_generate_prime.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_inverse.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 releng/11.0/secure/lib/libcrypto/man/BN_new.3 releng/11.0/secure/lib/libcrypto/man/BN_num_bytes.3 releng/11.0/secure/lib/libcrypto/man/BN_rand.3 releng/11.0/secure/lib/libcrypto/man/BN_set_bit.3 releng/11.0/secure/lib/libcrypto/man/BN_swap.3 releng/11.0/secure/lib/libcrypto/man/BN_zero.3 releng/11.0/secure/lib/libcrypto/man/CMS_add0_cert.3 releng/11.0/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 releng/11.0/secure/lib/libcrypto/man/CMS_add1_signer.3 releng/11.0/secure/lib/libcrypto/man/CMS_compress.3 releng/11.0/secure/lib/libcrypto/man/CMS_decrypt.3 releng/11.0/secure/lib/libcrypto/man/CMS_encrypt.3 releng/11.0/secure/lib/libcrypto/man/CMS_final.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_type.3 releng/11.0/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 releng/11.0/secure/lib/libcrypto/man/CMS_sign.3 releng/11.0/secure/lib/libcrypto/man/CMS_sign_receipt.3 releng/11.0/secure/lib/libcrypto/man/CMS_uncompress.3 releng/11.0/secure/lib/libcrypto/man/CMS_verify.3 releng/11.0/secure/lib/libcrypto/man/CMS_verify_receipt.3 releng/11.0/secure/lib/libcrypto/man/CONF_modules_free.3 releng/11.0/secure/lib/libcrypto/man/CONF_modules_load_file.3 releng/11.0/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 releng/11.0/secure/lib/libcrypto/man/DH_generate_key.3 releng/11.0/secure/lib/libcrypto/man/DH_generate_parameters.3 releng/11.0/secure/lib/libcrypto/man/DH_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/DH_new.3 releng/11.0/secure/lib/libcrypto/man/DH_set_method.3 releng/11.0/secure/lib/libcrypto/man/DH_size.3 releng/11.0/secure/lib/libcrypto/man/DSA_SIG_new.3 releng/11.0/secure/lib/libcrypto/man/DSA_do_sign.3 releng/11.0/secure/lib/libcrypto/man/DSA_dup_DH.3 releng/11.0/secure/lib/libcrypto/man/DSA_generate_key.3 releng/11.0/secure/lib/libcrypto/man/DSA_generate_parameters.3 releng/11.0/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/DSA_new.3 releng/11.0/secure/lib/libcrypto/man/DSA_set_method.3 releng/11.0/secure/lib/libcrypto/man/DSA_sign.3 releng/11.0/secure/lib/libcrypto/man/DSA_size.3 releng/11.0/secure/lib/libcrypto/man/EC_GFp_simple_method.3 releng/11.0/secure/lib/libcrypto/man/EC_GROUP_copy.3 releng/11.0/secure/lib/libcrypto/man/EC_GROUP_new.3 releng/11.0/secure/lib/libcrypto/man/EC_KEY_new.3 releng/11.0/secure/lib/libcrypto/man/EC_POINT_add.3 releng/11.0/secure/lib/libcrypto/man/EC_POINT_new.3 releng/11.0/secure/lib/libcrypto/man/ERR_GET_LIB.3 releng/11.0/secure/lib/libcrypto/man/ERR_clear_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_error_string.3 releng/11.0/secure/lib/libcrypto/man/ERR_get_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 releng/11.0/secure/lib/libcrypto/man/ERR_load_strings.3 releng/11.0/secure/lib/libcrypto/man/ERR_print_errors.3 releng/11.0/secure/lib/libcrypto/man/ERR_put_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_remove_state.3 releng/11.0/secure/lib/libcrypto/man/ERR_set_mark.3 releng/11.0/secure/lib/libcrypto/man/EVP_BytesToKey.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestSignInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_EncodeInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_EncryptInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_OpenInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_derive.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_new.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_sign.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_verify.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 releng/11.0/secure/lib/libcrypto/man/EVP_SealInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_SignInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_VerifyInit.3 releng/11.0/secure/lib/libcrypto/man/OBJ_nid2obj.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_Applink.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_config.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 releng/11.0/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 releng/11.0/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 releng/11.0/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 releng/11.0/secure/lib/libcrypto/man/PKCS12_create.3 releng/11.0/secure/lib/libcrypto/man/PKCS12_parse.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_decrypt.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_encrypt.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_sign.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_verify.3 releng/11.0/secure/lib/libcrypto/man/RAND_add.3 releng/11.0/secure/lib/libcrypto/man/RAND_bytes.3 releng/11.0/secure/lib/libcrypto/man/RAND_cleanup.3 releng/11.0/secure/lib/libcrypto/man/RAND_egd.3 releng/11.0/secure/lib/libcrypto/man/RAND_load_file.3 releng/11.0/secure/lib/libcrypto/man/RAND_set_rand_method.3 releng/11.0/secure/lib/libcrypto/man/RSA_blinding_on.3 releng/11.0/secure/lib/libcrypto/man/RSA_check_key.3 releng/11.0/secure/lib/libcrypto/man/RSA_generate_key.3 releng/11.0/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/RSA_new.3 releng/11.0/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 releng/11.0/secure/lib/libcrypto/man/RSA_print.3 releng/11.0/secure/lib/libcrypto/man/RSA_private_encrypt.3 releng/11.0/secure/lib/libcrypto/man/RSA_public_encrypt.3 releng/11.0/secure/lib/libcrypto/man/RSA_set_method.3 releng/11.0/secure/lib/libcrypto/man/RSA_sign.3 releng/11.0/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 releng/11.0/secure/lib/libcrypto/man/RSA_size.3 releng/11.0/secure/lib/libcrypto/man/SMIME_read_CMS.3 releng/11.0/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 releng/11.0/secure/lib/libcrypto/man/SMIME_write_CMS.3 releng/11.0/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_print_ex.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 releng/11.0/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 releng/11.0/secure/lib/libcrypto/man/X509_check_host.3 releng/11.0/secure/lib/libcrypto/man/X509_new.3 releng/11.0/secure/lib/libcrypto/man/X509_verify_cert.3 releng/11.0/secure/lib/libcrypto/man/bio.3 releng/11.0/secure/lib/libcrypto/man/blowfish.3 releng/11.0/secure/lib/libcrypto/man/bn.3 releng/11.0/secure/lib/libcrypto/man/bn_internal.3 releng/11.0/secure/lib/libcrypto/man/buffer.3 releng/11.0/secure/lib/libcrypto/man/crypto.3 releng/11.0/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 releng/11.0/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 releng/11.0/secure/lib/libcrypto/man/d2i_DHparams.3 releng/11.0/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_ECPKParameters.3 releng/11.0/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_PrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_CRL.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_NAME.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_REQ.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_SIG.3 releng/11.0/secure/lib/libcrypto/man/des.3 releng/11.0/secure/lib/libcrypto/man/dh.3 releng/11.0/secure/lib/libcrypto/man/dsa.3 releng/11.0/secure/lib/libcrypto/man/ec.3 releng/11.0/secure/lib/libcrypto/man/ecdsa.3 releng/11.0/secure/lib/libcrypto/man/engine.3 releng/11.0/secure/lib/libcrypto/man/err.3 releng/11.0/secure/lib/libcrypto/man/evp.3 releng/11.0/secure/lib/libcrypto/man/hmac.3 releng/11.0/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 releng/11.0/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 releng/11.0/secure/lib/libcrypto/man/lh_stats.3 releng/11.0/secure/lib/libcrypto/man/lhash.3 releng/11.0/secure/lib/libcrypto/man/md5.3 releng/11.0/secure/lib/libcrypto/man/mdc2.3 releng/11.0/secure/lib/libcrypto/man/pem.3 releng/11.0/secure/lib/libcrypto/man/rand.3 releng/11.0/secure/lib/libcrypto/man/rc4.3 releng/11.0/secure/lib/libcrypto/man/ripemd.3 releng/11.0/secure/lib/libcrypto/man/rsa.3 releng/11.0/secure/lib/libcrypto/man/sha.3 releng/11.0/secure/lib/libcrypto/man/threads.3 releng/11.0/secure/lib/libcrypto/man/ui.3 releng/11.0/secure/lib/libcrypto/man/ui_compat.3 releng/11.0/secure/lib/libcrypto/man/x509.3 releng/11.0/secure/lib/libssl/man/SSL_CIPHER_get_name.3 releng/11.0/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_new.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_cmd.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add_session.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_ctrl.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_free.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get0_param.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_new.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_number.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sessions.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set1_curves.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_options.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_timeout.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_verify.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_certificate.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_free.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_get_time.3 releng/11.0/secure/lib/libssl/man/SSL_accept.3 releng/11.0/secure/lib/libssl/man/SSL_alert_type_string.3 releng/11.0/secure/lib/libssl/man/SSL_check_chain.3 releng/11.0/secure/lib/libssl/man/SSL_clear.3 releng/11.0/secure/lib/libssl/man/SSL_connect.3 releng/11.0/secure/lib/libssl/man/SSL_do_handshake.3 releng/11.0/secure/lib/libssl/man/SSL_free.3 releng/11.0/secure/lib/libssl/man/SSL_get_SSL_CTX.3 releng/11.0/secure/lib/libssl/man/SSL_get_ciphers.3 releng/11.0/secure/lib/libssl/man/SSL_get_client_CA_list.3 releng/11.0/secure/lib/libssl/man/SSL_get_current_cipher.3 releng/11.0/secure/lib/libssl/man/SSL_get_default_timeout.3 releng/11.0/secure/lib/libssl/man/SSL_get_error.3 releng/11.0/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 releng/11.0/secure/lib/libssl/man/SSL_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_get_fd.3 releng/11.0/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 releng/11.0/secure/lib/libssl/man/SSL_get_peer_certificate.3 releng/11.0/secure/lib/libssl/man/SSL_get_psk_identity.3 releng/11.0/secure/lib/libssl/man/SSL_get_rbio.3 releng/11.0/secure/lib/libssl/man/SSL_get_session.3 releng/11.0/secure/lib/libssl/man/SSL_get_verify_result.3 releng/11.0/secure/lib/libssl/man/SSL_get_version.3 releng/11.0/secure/lib/libssl/man/SSL_library_init.3 releng/11.0/secure/lib/libssl/man/SSL_load_client_CA_file.3 releng/11.0/secure/lib/libssl/man/SSL_new.3 releng/11.0/secure/lib/libssl/man/SSL_pending.3 releng/11.0/secure/lib/libssl/man/SSL_read.3 releng/11.0/secure/lib/libssl/man/SSL_rstate_string.3 releng/11.0/secure/lib/libssl/man/SSL_session_reused.3 releng/11.0/secure/lib/libssl/man/SSL_set_bio.3 releng/11.0/secure/lib/libssl/man/SSL_set_connect_state.3 releng/11.0/secure/lib/libssl/man/SSL_set_fd.3 releng/11.0/secure/lib/libssl/man/SSL_set_session.3 releng/11.0/secure/lib/libssl/man/SSL_set_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_set_verify_result.3 releng/11.0/secure/lib/libssl/man/SSL_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_state_string.3 releng/11.0/secure/lib/libssl/man/SSL_want.3 releng/11.0/secure/lib/libssl/man/SSL_write.3 releng/11.0/secure/lib/libssl/man/d2i_SSL_SESSION.3 releng/11.0/secure/lib/libssl/man/ssl.3 releng/11.0/secure/usr.bin/openssl/man/CA.pl.1 releng/11.0/secure/usr.bin/openssl/man/asn1parse.1 releng/11.0/secure/usr.bin/openssl/man/c_rehash.1 releng/11.0/secure/usr.bin/openssl/man/ca.1 releng/11.0/secure/usr.bin/openssl/man/ciphers.1 releng/11.0/secure/usr.bin/openssl/man/cms.1 releng/11.0/secure/usr.bin/openssl/man/crl.1 releng/11.0/secure/usr.bin/openssl/man/crl2pkcs7.1 releng/11.0/secure/usr.bin/openssl/man/dgst.1 releng/11.0/secure/usr.bin/openssl/man/dhparam.1 releng/11.0/secure/usr.bin/openssl/man/dsa.1 releng/11.0/secure/usr.bin/openssl/man/dsaparam.1 releng/11.0/secure/usr.bin/openssl/man/ec.1 releng/11.0/secure/usr.bin/openssl/man/ecparam.1 releng/11.0/secure/usr.bin/openssl/man/enc.1 releng/11.0/secure/usr.bin/openssl/man/errstr.1 releng/11.0/secure/usr.bin/openssl/man/gendsa.1 releng/11.0/secure/usr.bin/openssl/man/genpkey.1 releng/11.0/secure/usr.bin/openssl/man/genrsa.1 releng/11.0/secure/usr.bin/openssl/man/nseq.1 releng/11.0/secure/usr.bin/openssl/man/ocsp.1 releng/11.0/secure/usr.bin/openssl/man/openssl.1 releng/11.0/secure/usr.bin/openssl/man/passwd.1 releng/11.0/secure/usr.bin/openssl/man/pkcs12.1 releng/11.0/secure/usr.bin/openssl/man/pkcs7.1 releng/11.0/secure/usr.bin/openssl/man/pkcs8.1 releng/11.0/secure/usr.bin/openssl/man/pkey.1 releng/11.0/secure/usr.bin/openssl/man/pkeyparam.1 releng/11.0/secure/usr.bin/openssl/man/pkeyutl.1 releng/11.0/secure/usr.bin/openssl/man/rand.1 releng/11.0/secure/usr.bin/openssl/man/req.1 releng/11.0/secure/usr.bin/openssl/man/rsa.1 releng/11.0/secure/usr.bin/openssl/man/rsautl.1 releng/11.0/secure/usr.bin/openssl/man/s_client.1 releng/11.0/secure/usr.bin/openssl/man/s_server.1 releng/11.0/secure/usr.bin/openssl/man/s_time.1 releng/11.0/secure/usr.bin/openssl/man/sess_id.1 releng/11.0/secure/usr.bin/openssl/man/smime.1 releng/11.0/secure/usr.bin/openssl/man/speed.1 releng/11.0/secure/usr.bin/openssl/man/spkac.1 releng/11.0/secure/usr.bin/openssl/man/ts.1 releng/11.0/secure/usr.bin/openssl/man/tsget.1 releng/11.0/secure/usr.bin/openssl/man/verify.1 releng/11.0/secure/usr.bin/openssl/man/version.1 releng/11.0/secure/usr.bin/openssl/man/x509.1 releng/11.0/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/crypto/openssl/CHANGES ============================================================================== --- releng/11.0/crypto/openssl/CHANGES Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/CHANGES Mon Sep 26 20:26:19 2016 (r306354) @@ -2,6 +2,18 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] + + *) Missing CRL sanity check + + A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0 + but was omitted from OpenSSL 1.0.2i. As a result any attempt to use + CRLs in OpenSSL 1.0.2i will crash with a null pointer exception. + + This issue only affects the OpenSSL 1.0.2i + (CVE-2016-7052) + [Matt Caswell] + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] *) OCSP Status Request extension unbounded memory growth Modified: releng/11.0/crypto/openssl/Makefile ============================================================================== --- releng/11.0/crypto/openssl/Makefile Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/Makefile Mon Sep 26 20:26:19 2016 (r306354) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2i +VERSION=1.0.2j MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: releng/11.0/crypto/openssl/NEWS ============================================================================== --- releng/11.0/crypto/openssl/NEWS Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/NEWS Mon Sep 26 20:26:19 2016 (r306354) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] + + o Fix Use After Free for large message sizes (CVE-2016-6309) + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) Modified: releng/11.0/crypto/openssl/README ============================================================================== --- releng/11.0/crypto/openssl/README Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/README Mon Sep 26 20:26:19 2016 (r306354) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2i 22 Sep 2016 + OpenSSL 1.0.2j 26 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: releng/11.0/crypto/openssl/crypto/engine/eng_cryptodev.c ============================================================================== --- releng/11.0/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 20:26:19 2016 (r306354) @@ -939,7 +939,7 @@ static int cryptodev_digest_copy(EVP_MD_ if (fstate->mac_len != 0) { if (fstate->mac_data != NULL) { dstate->mac_data = OPENSSL_malloc(fstate->mac_len); - if (dstate->ac_data == NULL) { + if (dstate->mac_data == NULL) { printf("cryptodev_digest_init: malloc failed\n"); return 0; } Modified: releng/11.0/crypto/openssl/crypto/opensslv.h ============================================================================== --- releng/11.0/crypto/openssl/crypto/opensslv.h Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/crypto/opensslv.h Mon Sep 26 20:26:19 2016 (r306354) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000209fL +# define OPENSSL_VERSION_NUMBER 0x100020afL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-fips 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-freebsd 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-freebsd 26 Sep 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: releng/11.0/crypto/openssl/crypto/x509/x509_vfy.c ============================================================================== --- releng/11.0/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 20:26:19 2016 (r306354) @@ -1124,10 +1124,10 @@ static int get_crl_sk(X509_STORE_CTX *ct crl = sk_X509_CRL_value(crls, i); reasons = *preasons; crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x); - if (crl_score < best_score) + if (crl_score < best_score || crl_score == 0) continue; /* If current CRL is equivalent use it if it is newer */ - if (crl_score == best_score) { + if (crl_score == best_score && best_crl != NULL) { int day, sec; if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl), X509_CRL_get_lastUpdate(crl)) == 0) Modified: releng/11.0/crypto/openssl/ssl/t1_ext.c ============================================================================== --- releng/11.0/crypto/openssl/ssl/t1_ext.c Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/crypto/openssl/ssl/t1_ext.c Mon Sep 26 20:26:19 2016 (r306354) @@ -275,7 +275,9 @@ int SSL_extension_supported(unsigned int case TLSEXT_TYPE_ec_point_formats: case TLSEXT_TYPE_elliptic_curves: case TLSEXT_TYPE_heartbeat: +# ifndef OPENSSL_NO_NEXTPROTONEG case TLSEXT_TYPE_next_proto_neg: +# endif case TLSEXT_TYPE_padding: case TLSEXT_TYPE_renegotiate: case TLSEXT_TYPE_server_name: Modified: releng/11.0/secure/lib/libcrypto/Makefile.inc ============================================================================== --- releng/11.0/secure/lib/libcrypto/Makefile.inc Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/Makefile.inc Mon Sep 26 20:26:19 2016 (r306354) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.2i -OPENSSL_DATE= 2016-09-22 +OPENSSL_VER= 1.0.2j +OPENSSL_DATE= 2016-09-26 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: releng/11.0/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_length 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/ASN1_TIME_set.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_set 3" -.TH ASN1_TIME_set 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_TIME_set 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_generate_nconf 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_ctrl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_base64 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_buffer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_cipher 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_md 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_ssl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_find_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new_CMS 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_push 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_read 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_accept 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_bio 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_connect 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_fd 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_mem 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_socket 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_set_callback 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_should_retry 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_BLINDING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_start 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add_word 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_bn2bin 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_cmp 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_copy 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_generate_prime 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_inverse 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_num_bytes 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_rand 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_set_bit 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_swap 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_zero 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add0_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_signer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_compress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_decrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_encrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_final 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_uncompress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_free 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_load_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_size 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_SIG_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_do_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_dup_DH 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: releng/11.0/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- releng/11.0/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 20:13:33 2016 (r306353) +++ releng/11.0/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 20:26:19 2016 (r306354) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Sep 26 21:25:47 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 856B8BEBB00 for ; Mon, 26 Sep 2016 21:25:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (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 57F0EED0 for ; Mon, 26 Sep 2016 21:25:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id r192so87192343ita.0 for ; Mon, 26 Sep 2016 14:25:47 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=g7qlcZIsvJcSWGm4eHOnkQm2DiWGwnkXDSyBqrFIX8k=; b=zvZqZeFdoCasrwHLotqYuATJPg1vNe/KMMBa8vjzIXTJazDbPXAsMv4qjAkHYoCOFU b3or56X6r5kd8DHp4kjtcjQM5AV833xYtVhikHL+xSZKrp35RTRenhaD3/m/zVGhilA/ RE41Rw+jh9IXwaEVph5YHyYxB/aStPeWXsK2rzU/ztOTGoebR+cAuqg1bnJv7C8gyrYx XCjaW7+DgfFgifcyAtYaTBJ5Y/IBft6/sxqeloB1ZDWMJg75NC6I0aEh82L/grPiFieE SQfqbVt5Pu5nps+TZ8hAN6Z1BGQ90xLcrtNESJig7zIs/xPJrL09ZAL2kiPz4+6BMK6y enPw== 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:from :date:message-id:subject:to:cc; bh=g7qlcZIsvJcSWGm4eHOnkQm2DiWGwnkXDSyBqrFIX8k=; b=e/xwRzgDok1iD5D6AvzHzEz5+tBAOTPOcdkfSSA9DIk0G1dZtW5eeWS1msBDurb40A yezomcnWsPEcVAkZZMM55H4WA0UFEUxku2tqij+oQy915g6SZWgQtfaQzT/oD0abvkcl uK6tVpuiVpqAkUnI4BFMjfiUKKYVy69qC/iW/iGearN+S7BVPJ9jRhTHml6hVZ0x2x1F j+CAD+KJZK2N0zNZRHis4dLP64/Kf+Ec1s5kWEbbigoboZHAYPJwHk3PGA9mPqrdirjt IWPC7a7IFJZVwNz3giF7dBHp0NXsPLwz7QtSoJ7kZmYvl+ciycYYkvq28KvgBhuwra0w Uv0w== X-Gm-Message-State: AA6/9RnxrliRrnY5khpOkGY0QHRFKiYpbF0Qf1ujc5byCJIDY+n7KpqUSQ+mxOPcgMFySdGsNiRFOSiQc5ipPw== X-Received: by 10.36.152.5 with SMTP id n5mr86311itd.79.1474925146465; Mon, 26 Sep 2016 14:25:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 26 Sep 2016 14:25:46 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <201609261538.u8QFc2Av023865@repo.freebsd.org> References: <201609261538.u8QFc2Av023865@repo.freebsd.org> From: Warner Losh Date: Mon, 26 Sep 2016 15:25:46 -0600 X-Google-Sender-Auth: rGzWGtGQpxHknTauzkZDBzQmG_U Message-ID: Subject: Re: svn commit: r306347 - head/lib/libc/tests To: Ruslan Bukin Cc: src-committers , "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.23 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, 26 Sep 2016 21:25:47 -0000 Shouldn't we have MK_SSP == no on mips instead? That's how it's supposed to work. If it isn't, perhaps we should set it like that. Warner On Mon, Sep 26, 2016 at 9:38 AM, Ruslan Bukin wrote: > Author: br > Date: Mon Sep 26 15:38:02 2016 > New Revision: 306347 > URL: https://svnweb.freebsd.org/changeset/base/306347 > > Log: > Don't build SSP tests on MIPS as we dont have stack-protector > supported on this platform. > > Discussed with: brooks > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 > > Modified: > head/lib/libc/tests/Makefile > > Modified: head/lib/libc/tests/Makefile > ============================================================================== > --- head/lib/libc/tests/Makefile Mon Sep 26 15:30:30 2016 (r306346) > +++ head/lib/libc/tests/Makefile Mon Sep 26 15:38:02 2016 (r306347) > @@ -30,7 +30,8 @@ SUBDIR_DEPEND_tls= tls_dso > TESTS_SUBDIRS+= locale > .endif > > -.if ${MK_SSP} != "no" > +.if ${MK_SSP} != "no" && \ > + ${MACHINE_CPUARCH} != "mips" > TESTS_SUBDIRS+= ssp > .endif > > From owner-svn-src-all@freebsd.org Mon Sep 26 21:28:31 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 7AD75BEBB9F; Mon, 26 Sep 2016 21:28:31 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 3F0C110AD; Mon, 26 Sep 2016 21:28:31 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bodRs-000LpS-BM; Tue, 27 Sep 2016 00:28:28 +0300 Date: Tue, 27 Sep 2016 00:28:28 +0300 From: Slawa Olhovchenkov To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306350 - head/sys/amd64/amd64 Message-ID: <20160926212828.GC6177@zxy.spb.ru> References: <201609261722.u8QHMi7g065274@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609261722.u8QHMi7g065274@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Sep 2016 21:28:31 -0000 On Mon, Sep 26, 2016 at 05:22:44PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Sep 26 17:22:44 2016 > New Revision: 306350 > URL: https://svnweb.freebsd.org/changeset/base/306350 > > Log: > For machines which support PCID but not have INVPCID instruction, > i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() > and invltlb_pcid_handler(). > > Reported by and tested by: Slawa Olhovchenkov > MFC after: 1 week Thanks! Planed commit to releng? Or SA? From owner-svn-src-all@freebsd.org Mon Sep 26 22:06:20 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 97F25BEB6C7; Mon, 26 Sep 2016 22:06:20 +0000 (UTC) (envelope-from gonzo@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 6020076C; Mon, 26 Sep 2016 22:06:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QM6J51070988; Mon, 26 Sep 2016 22:06:19 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QM6J5q070986; Mon, 26 Sep 2016 22:06:19 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609262206.u8QM6J5q070986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Sep 2016 22:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306355 - in head/sys: dev/atkbdc sys 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.23 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, 26 Sep 2016 22:06:20 -0000 Author: gonzo Date: Mon Sep 26 22:06:19 2016 New Revision: 306355 URL: https://svnweb.freebsd.org/changeset/base/306355 Log: Add Elantech trackpad support Elantech trackpads are found in some laptops like the Asus UX31E. They are "synaptics compatible" but use a slightly different protocol. Elantech hardware support is not enabled by default and just like Synaptic or TrackPoint devices it should be enabled by setting tunable, in this case hw.psm.elantech_support, to non-zero value PR: 205690 Submitted by: Vladimir Kondratyev MFC after: 1 week Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 (r306354) +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 (r306355) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -161,40 +162,6 @@ typedef struct packetbuf { #define PSM_PACKETQUEUE 128 #endif -enum { - SYNAPTICS_SYSCTL_MIN_PRESSURE, - SYNAPTICS_SYSCTL_MAX_PRESSURE, - SYNAPTICS_SYSCTL_MAX_WIDTH, - SYNAPTICS_SYSCTL_MARGIN_TOP, - SYNAPTICS_SYSCTL_MARGIN_RIGHT, - SYNAPTICS_SYSCTL_MARGIN_BOTTOM, - SYNAPTICS_SYSCTL_MARGIN_LEFT, - SYNAPTICS_SYSCTL_NA_TOP, - SYNAPTICS_SYSCTL_NA_RIGHT, - SYNAPTICS_SYSCTL_NA_BOTTOM, - SYNAPTICS_SYSCTL_NA_LEFT, - SYNAPTICS_SYSCTL_WINDOW_MIN, - SYNAPTICS_SYSCTL_WINDOW_MAX, - SYNAPTICS_SYSCTL_MULTIPLICATOR, - SYNAPTICS_SYSCTL_WEIGHT_CURRENT, - SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS, - SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS_NA, - SYNAPTICS_SYSCTL_WEIGHT_LEN_SQUARED, - SYNAPTICS_SYSCTL_DIV_MIN, - SYNAPTICS_SYSCTL_DIV_MAX, - SYNAPTICS_SYSCTL_DIV_MAX_NA, - SYNAPTICS_SYSCTL_DIV_LEN, - SYNAPTICS_SYSCTL_TAP_MAX_DELTA, - SYNAPTICS_SYSCTL_TAP_MIN_QUEUE, - SYNAPTICS_SYSCTL_TAPHOLD_TIMEOUT, - SYNAPTICS_SYSCTL_VSCROLL_HOR_AREA, - SYNAPTICS_SYSCTL_VSCROLL_VER_AREA, - SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA, - SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN, - SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX, - SYNAPTICS_SYSCTL_TOUCHPAD_OFF -}; - typedef struct synapticsinfo { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -231,6 +198,11 @@ typedef struct synapticsinfo { int vscroll_div_min; int vscroll_div_max; int touchpad_off; + int softbuttons_y; + int softbutton2_x; + int softbutton3_x; + int max_x; + int max_y; } synapticsinfo_t; typedef struct synapticspacket { @@ -246,22 +218,29 @@ typedef struct synapticspacket { ((synhw).infoMajor > (major) || \ ((synhw).infoMajor == (major) && (synhw).infoMinor >= (minor))) -typedef struct synapticsaction { +typedef struct smoother { synapticspacket_t queue[SYNAPTICS_PACKETQUEUE]; int queue_len; int queue_cursor; - int window_min; int start_x; int start_y; int avg_dx; int avg_dy; int squelch_x; int squelch_y; + int is_fuzzy; + int active; +} smoother_t; + +typedef struct gesture { + int window_min; int fingers_nb; int tap_button; int in_taphold; int in_vscroll; -} synapticsaction_t; + int zmax; /* maximum pressure value */ + struct timeval taptimeout; /* tap timeout for touchpads */ +} gesture_t; enum { TRACKPOINT_SYSCTL_SENSITIVITY, @@ -295,6 +274,100 @@ typedef struct trackpointinfo { int skipback; } trackpointinfo_t; +typedef struct finger { + int x; + int y; + int p; + int w; + int flags; +} finger_t; +#define PSM_FINGERS 2 /* # of processed fingers */ +#define PSM_FINGER_IS_PEN (1<<0) +#define PSM_FINGER_FUZZY (1<<1) +#define PSM_FINGER_DEFAULT_P tap_threshold +#define PSM_FINGER_DEFAULT_W 1 +#define PSM_FINGER_IS_SET(f) ((f).x != -1 && (f).y != -1 && (f).p != 0) +#define PSM_FINGER_RESET(f) do { \ + (f) = (finger_t) { .x = -1, .y = -1, .p = 0, .w = 0, .flags = 0 }; \ +} while (0) + +typedef struct elantechhw { + int hwversion; + int fwversion; + int sizex; + int sizey; + int dpmmx; + int dpmmy; + int ntracesx; + int ntracesy; + int issemimt; + int isclickpad; + int hascrc; + int hastrackpoint; + int haspressure; +} elantechhw_t; + +/* minimum versions supported by this driver */ +#define ELANTECH_HW_IS_V1(fwver) ((fwver) < 0x020030 || (fwver) == 0x020600) + +#define ELANTECH_MAGIC(magic) \ + ((magic)[0] == 0x3c && (magic)[1] == 0x03 && \ + ((magic)[2] == 0xc8 || (magic)[2] == 0x00)) + +#define ELANTECH_FW_ID 0x00 +#define ELANTECH_FW_VERSION 0x01 +#define ELANTECH_CAPABILITIES 0x02 +#define ELANTECH_SAMPLE 0x03 +#define ELANTECH_RESOLUTION 0x04 +#define ELANTECH_REG_READ 0x10 +#define ELANTECH_REG_WRITE 0x11 +#define ELANTECH_REG_RDWR 0x00 +#define ELANTECH_CUSTOM_CMD 0xf8 + +#define ELANTECH_MAX_FINGERS PSM_FINGERS + +#define ELANTECH_FINGER_SET_XYP(pb) (finger_t) { \ + .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \ + .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \ + .p = ((pb)->ipacket[1] & 0xf0) | (((pb)->ipacket[4] >> 4) & 0x0f), \ + .w = PSM_FINGER_DEFAULT_W, \ + .flags = 0 \ +} + +enum { + ELANTECH_PKT_NOP, + ELANTECH_PKT_TRACKPOINT, + ELANTECH_PKT_V2_COMMON, + ELANTECH_PKT_V2_2FINGER, + ELANTECH_PKT_V3, + ELANTECH_PKT_V4_STATUS, + ELANTECH_PKT_V4_HEAD, + ELANTECH_PKT_V4_MOTION +}; + +#define ELANTECH_PKT_IS_TRACKPOINT(pb) (((pb)->ipacket[3] & 0x0f) == 0x06) +#define ELANTECH_PKT_IS_DEBOUNCE(pb, hwversion) ((hwversion) == 4 ? 0 : \ + (pb)->ipacket[0] == ((hwversion) == 2 ? 0x84 : 0xc4) && \ + (pb)->ipacket[1] == 0xff && (pb)->ipacket[2] == 0xff && \ + (pb)->ipacket[3] == 0x02 && (pb)->ipacket[4] == 0xff && \ + (pb)->ipacket[5] == 0xff) +#define ELANTECH_PKT_IS_V2(pb) \ + (((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x0f) == 0x02) +#define ELANTECH_PKT_IS_V3_HEAD(pb, hascrc) ((hascrc) ? \ + ((pb)->ipacket[3] & 0x09) == 0x08 : \ + ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0xcf) == 0x02) +#define ELANTECH_PKT_IS_V3_TAIL(pb, hascrc) ((hascrc) ? \ + ((pb)->ipacket[3] & 0x09) == 0x09 : \ + ((pb)->ipacket[0] & 0x0c) == 0x0c && ((pb)->ipacket[3] & 0xce) == 0x0c) +#define ELANTECH_PKT_IS_V4(pb, hascrc) ((hascrc) ? \ + ((pb)->ipacket[3] & 0x08) == 0x00 : \ + ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x1c) == 0x10) + +typedef struct elantechaction { + finger_t fingers[ELANTECH_MAX_FINGERS]; + int mask; +} elantechaction_t; + /* driver control block */ struct psm_softc { /* Driver status information */ int unit; @@ -308,7 +381,10 @@ struct psm_softc { /* Driver status inf mousehw_t hw; /* hardware information */ synapticshw_t synhw; /* Synaptics hardware information */ synapticsinfo_t syninfo; /* Synaptics configuration */ - synapticsaction_t synaction; /* Synaptics action context */ + smoother_t smoother[PSM_FINGERS]; /* Motion smoothing */ + gesture_t gesture; /* Gesture context */ + elantechhw_t elanhw; /* Elantech hardware information */ + elantechaction_t elanaction; /* Elantech action context */ int tphw; /* TrackPoint hardware information */ trackpointinfo_t tpinfo; /* TrackPoint configuration */ mousemode_t mode; /* operation mode */ @@ -324,13 +400,13 @@ struct psm_softc { /* Driver status inf int xaverage; /* average X position */ int yaverage; /* average Y position */ int squelch; /* level to filter movement at low speed */ - int zmax; /* maximum pressure value for touchpads */ int syncerrors; /* # of bytes discarded to synchronize */ int pkterrors; /* # of packets failed during quaranteen. */ struct timeval inputtimeout; struct timeval lastsoftintr; /* time of last soft interrupt */ struct timeval lastinputerr; /* time last sync error happened */ - struct timeval taptimeout; /* tap timeout for touchpads */ + struct timeval idletimeout; + packetbuf_t idlepacket; /* packet to send after idle timeout */ int watchdog; /* watchdog timer flag */ struct callout callout; /* watchdog timer call out */ struct callout softcallout; /* buffer timer call out */ @@ -389,6 +465,9 @@ TUNABLE_INT("hw.psm.synaptics_support", static int trackpoint_support = 0; TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); +static int elantech_support = 0; +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); + static int verbose = PSM_DEBUG; TUNABLE_INT("debug.psm.loglevel", &verbose); @@ -411,6 +490,44 @@ typedef struct old_mousemode { int accelfactor; } old_mousemode_t; +#define SYN_OFFSET(field) offsetof(struct psm_softc, syninfo.field) +enum { + SYNAPTICS_SYSCTL_MIN_PRESSURE = SYN_OFFSET(min_pressure), + SYNAPTICS_SYSCTL_MAX_PRESSURE = SYN_OFFSET(max_pressure), + SYNAPTICS_SYSCTL_MAX_WIDTH = SYN_OFFSET(max_width), + SYNAPTICS_SYSCTL_MARGIN_TOP = SYN_OFFSET(margin_top), + SYNAPTICS_SYSCTL_MARGIN_RIGHT = SYN_OFFSET(margin_right), + SYNAPTICS_SYSCTL_MARGIN_BOTTOM = SYN_OFFSET(margin_bottom), + SYNAPTICS_SYSCTL_MARGIN_LEFT = SYN_OFFSET(margin_left), + SYNAPTICS_SYSCTL_NA_TOP = SYN_OFFSET(na_top), + SYNAPTICS_SYSCTL_NA_RIGHT = SYN_OFFSET(na_right), + SYNAPTICS_SYSCTL_NA_BOTTOM = SYN_OFFSET(na_bottom), + SYNAPTICS_SYSCTL_NA_LEFT = SYN_OFFSET(na_left), + SYNAPTICS_SYSCTL_WINDOW_MIN = SYN_OFFSET(window_min), + SYNAPTICS_SYSCTL_WINDOW_MAX = SYN_OFFSET(window_max), + SYNAPTICS_SYSCTL_MULTIPLICATOR = SYN_OFFSET(multiplicator), + SYNAPTICS_SYSCTL_WEIGHT_CURRENT = SYN_OFFSET(weight_current), + SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS = SYN_OFFSET(weight_previous), + SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS_NA = SYN_OFFSET(weight_previous_na), + SYNAPTICS_SYSCTL_WEIGHT_LEN_SQUARED = SYN_OFFSET(weight_len_squared), + SYNAPTICS_SYSCTL_DIV_MIN = SYN_OFFSET(div_min), + SYNAPTICS_SYSCTL_DIV_MAX = SYN_OFFSET(div_max), + SYNAPTICS_SYSCTL_DIV_MAX_NA = SYN_OFFSET(div_max_na), + SYNAPTICS_SYSCTL_DIV_LEN = SYN_OFFSET(div_len), + SYNAPTICS_SYSCTL_TAP_MAX_DELTA = SYN_OFFSET(tap_max_delta), + SYNAPTICS_SYSCTL_TAP_MIN_QUEUE = SYN_OFFSET(tap_min_queue), + SYNAPTICS_SYSCTL_TAPHOLD_TIMEOUT = SYN_OFFSET(taphold_timeout), + SYNAPTICS_SYSCTL_VSCROLL_HOR_AREA = SYN_OFFSET(vscroll_hor_area), + SYNAPTICS_SYSCTL_VSCROLL_VER_AREA = SYN_OFFSET(vscroll_ver_area), + SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA = SYN_OFFSET(vscroll_min_delta), + SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN = SYN_OFFSET(vscroll_div_min), + SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX = SYN_OFFSET(vscroll_div_max), + SYNAPTICS_SYSCTL_TOUCHPAD_OFF = SYN_OFFSET(touchpad_off), + SYNAPTICS_SYSCTL_SOFTBUTTONS_Y = SYN_OFFSET(softbuttons_y), + SYNAPTICS_SYSCTL_SOFTBUTTON2_X = SYN_OFFSET(softbutton2_x), + SYNAPTICS_SYSCTL_SOFTBUTTON3_X = SYN_OFFSET(softbutton3_x), +}; + /* packet formatting function */ typedef int packetfunc_t(struct psm_softc *, u_char *, int *, int, mousestatus_t *); @@ -446,6 +563,7 @@ static int doopen(struct psm_softc *, in static int reinitialize(struct psm_softc *, int); static char *model_name(int); static void psmsoftintr(void *); +static void psmsoftintridle(void *); static void psmintr(void *); static void psmtimeout(void *); static int timeelapsed(const struct timeval *, int, int, @@ -458,6 +576,13 @@ static int proc_synaptics(struct psm_sof mousestatus_t *, int *, int *, int *); static void proc_versapad(struct psm_softc *, packetbuf_t *, mousestatus_t *, int *, int *, int *); +static int proc_elantech(struct psm_softc *, packetbuf_t *, + mousestatus_t *, int *, int *, int *); +static int psmpalmdetect(struct psm_softc *, finger_t *, int); +static void psmgestures(struct psm_softc *, finger_t *, int, + mousestatus_t *); +static void psmsmoother(struct psm_softc *, finger_t *, int, + mousestatus_t *, int *, int *); static int tame_mouse(struct psm_softc *, packetbuf_t *, mousestatus_t *, u_char *); @@ -480,6 +605,7 @@ static probefunc_t enable_mmanplus; static probefunc_t enable_synaptics; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; +static probefunc_t enable_elantech; static void set_trackpoint_parameters(struct psm_softc *sc); static void synaptics_passthrough_on(struct psm_softc *sc); @@ -511,6 +637,8 @@ static struct { 0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus }, { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad */ 0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics }, + { MOUSE_MODEL_ELANTECH, /* Elantech Touchpad */ + 0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech }, { MOUSE_MODEL_INTELLI, /* Microsoft IntelliMouse */ 0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli }, { MOUSE_MODEL_GLIDEPOINT, /* ALPS GlidePoint */ @@ -762,6 +890,7 @@ model_name(int model) { MOUSE_MODEL_4DPLUS, "4D+ Mouse" }, { MOUSE_MODEL_SYNAPTICS, "Synaptics Touchpad" }, { MOUSE_MODEL_TRACKPOINT, "IBM/Lenovo TrackPoint" }, + { MOUSE_MODEL_ELANTECH, "Elantech Touchpad" }, { MOUSE_MODEL_GENERIC, "Generic PS/2 mouse" }, { MOUSE_MODEL_UNKNOWN, "Unknown" }, }; @@ -1504,6 +1633,7 @@ psmattach(device_t dev) case MOUSE_MODEL_SYNAPTICS: case MOUSE_MODEL_GLIDEPOINT: case MOUSE_MODEL_VERSAPAD: + case MOUSE_MODEL_ELANTECH: sc->config |= PSM_CONFIG_INITAFTERSUSPEND; break; default: @@ -1512,6 +1642,11 @@ psmattach(device_t dev) break; } + /* Elantech trackpad`s sync bit differs from touchpad`s one */ + if (sc->hw.model == MOUSE_MODEL_ELANTECH && + (sc->elanhw.hascrc || sc->elanhw.hastrackpoint)) + sc->config |= PSM_CONFIG_NOCHECKSYNC; + if (!verbose) printf("psm%d: model %s, device ID %d\n", unit, model_name(sc->hw.model), sc->hw.hwid & 0x00ff); @@ -2165,20 +2300,6 @@ psmioctl(struct cdev *dev, u_long cmd, c (*(int *)addr > PSM_LEVEL_MAX)) return (EINVAL); sc->mode.level = *(int *)addr; - - if (sc->hw.model == MOUSE_MODEL_SYNAPTICS) { - /* - * If we are entering PSM_LEVEL_NATIVE, we want to - * enable sending of "extended W mode" packets to - * userland. Reset the mode of the touchpad so that the - * change in the level is picked up. - */ - error = block_mouse_data(sc, &command_byte); - if (error) - return (error); - synaptics_set_mode(sc, synaptics_preferred_mode(sc)); - unblock_mouse_data(sc, command_byte); - } break; case MOUSE_GETSTATUS: @@ -2627,7 +2748,8 @@ proc_synaptics(struct psm_softc *sc, pac { static int touchpad_buttons; static int guest_buttons; - int w, x0, y0; + static finger_t f[PSM_FINGERS]; + int w, id, nfingers, ewcode; /* TouchPad PS/2 absolute mode message format with capFourButtons: * @@ -2683,6 +2805,7 @@ proc_synaptics(struct psm_softc *sc, pac return (-1); *x = *y = 0; + ms->button = ms->obutton; /* * Pressure value. @@ -2718,34 +2841,79 @@ proc_synaptics(struct psm_softc *sc, pac w = 4; } - /* - * Handle packets from the guest device. See: - * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 - */ - if (w == 3 && sc->synhw.capPassthrough) { - *x = ((pb->ipacket[1] & 0x10) ? - pb->ipacket[4] - 256 : pb->ipacket[4]); - *y = ((pb->ipacket[1] & 0x20) ? - pb->ipacket[5] - 256 : pb->ipacket[5]); - *z = 0; + switch (w) { + case 3: + /* + * Handle packets from the guest device. See: + * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 + */ + if (sc->synhw.capPassthrough) { + *x = ((pb->ipacket[1] & 0x10) ? + pb->ipacket[4] - 256 : pb->ipacket[4]); + *y = ((pb->ipacket[1] & 0x20) ? + pb->ipacket[5] - 256 : pb->ipacket[5]); + *z = 0; + + guest_buttons = 0; + if (pb->ipacket[1] & 0x01) + guest_buttons |= MOUSE_BUTTON1DOWN; + if (pb->ipacket[1] & 0x04) + guest_buttons |= MOUSE_BUTTON2DOWN; + if (pb->ipacket[1] & 0x02) + guest_buttons |= MOUSE_BUTTON3DOWN; - guest_buttons = 0; - if (pb->ipacket[1] & 0x01) - guest_buttons |= MOUSE_BUTTON1DOWN; - if (pb->ipacket[1] & 0x04) - guest_buttons |= MOUSE_BUTTON2DOWN; - if (pb->ipacket[1] & 0x02) - guest_buttons |= MOUSE_BUTTON3DOWN; + ms->button = touchpad_buttons | guest_buttons; + } + goto SYNAPTICS_END; - ms->button = touchpad_buttons | guest_buttons; + case 2: + /* Handle Extended W mode packets */ + ewcode = (pb->ipacket[5] & 0xf0) >> 4; +#if PSM_FINGERS > 1 + switch (ewcode) { + case 1: + /* Secondary finger */ + if (sc->synhw.capAdvancedGestures) + f[1] = (finger_t) { + .x = (((pb->ipacket[4] & 0x0f) << 8) | + pb->ipacket[1]) << 1, + .y = (((pb->ipacket[4] & 0xf0) << 4) | + pb->ipacket[2]) << 1, + .p = ((pb->ipacket[3] & 0x30) | + (pb->ipacket[5] & 0x0f)) << 1, + .w = PSM_FINGER_DEFAULT_W, + .flags = PSM_FINGER_FUZZY, + }; + else if (sc->synhw.capReportsV) + f[1] = (finger_t) { + .x = (((pb->ipacket[4] & 0x0f) << 8) | + (pb->ipacket[1] & 0xfe)) << 1, + .y = (((pb->ipacket[4] & 0xf0) << 4) | + (pb->ipacket[2] & 0xfe)) << 1, + .p = ((pb->ipacket[3] & 0x30) | + (pb->ipacket[5] & 0x0e)) << 1, + .w = (((pb->ipacket[5] & 0x01) << 2) | + ((pb->ipacket[2] & 0x01) << 1) | + (pb->ipacket[1] & 0x01)) + 8, + .flags = PSM_FINGER_FUZZY, + }; + default: + break; + } +#endif goto SYNAPTICS_END; + + case 1: + case 0: + nfingers = w + 2; + break; + + default: + nfingers = 1; } - if (sc->syninfo.touchpad_off) { - *x = *y = *z = 0; - ms->button = ms->obutton; + if (sc->syninfo.touchpad_off) goto SYNAPTICS_END; - } /* Button presses */ touchpad_buttons = 0; @@ -2764,6 +2932,10 @@ proc_synaptics(struct psm_softc *sc, pac /* Middle Button */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) touchpad_buttons |= MOUSE_BUTTON2DOWN; + } else if (sc->synhw.capExtended && sc->synhw.capClickPad) { + /* ClickPad Button */ + if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) + touchpad_buttons = MOUSE_BUTTON1DOWN; } else if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) { /* Extended Buttons */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) { @@ -2806,7 +2978,7 @@ proc_synaptics(struct psm_softc *sc, pac pb->ipacket[4] &= ~(mask); pb->ipacket[5] &= ~(mask); } else if (!sc->syninfo.directional_scrolls && - !sc->synaction.in_vscroll) { + !sc->gesture.in_vscroll) { /* * Keep reporting MOUSE DOWN until we get a new packet * indicating otherwise. @@ -2814,93 +2986,179 @@ proc_synaptics(struct psm_softc *sc, pac touchpad_buttons |= sc->extended_buttons; } } - /* Handle ClickPad. */ - if (sc->synhw.capClickPad && - ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)) - touchpad_buttons |= MOUSE_BUTTON1DOWN; + + if (sc->synhw.capReportsV && nfingers > 1) + f[0] = (finger_t) { + .x = ((pb->ipacket[3] & 0x10) << 8) | + ((pb->ipacket[1] & 0x0f) << 8) | + (pb->ipacket[4] & 0xfd), + .y = ((pb->ipacket[3] & 0x20) << 7) | + ((pb->ipacket[1] & 0xf0) << 4) | + (pb->ipacket[5] & 0xfd), + .p = *z & 0xfe, + .w = (((pb->ipacket[2] & 0x01) << 2) | + (pb->ipacket[5] & 0x02) | + ((pb->ipacket[4] & 0x02) >> 1)) + 8, + .flags = PSM_FINGER_FUZZY, + }; + else + f[0] = (finger_t) { + .x = ((pb->ipacket[3] & 0x10) << 8) | + ((pb->ipacket[1] & 0x0f) << 8) | + pb->ipacket[4], + .y = ((pb->ipacket[3] & 0x20) << 7) | + ((pb->ipacket[1] & 0xf0) << 4) | + pb->ipacket[5], + .p = *z, + .w = w, + .flags = nfingers > 1 ? PSM_FINGER_FUZZY : 0, + }; + + /* Ignore hovering and unmeasurable touches */ + if (f[0].p < sc->syninfo.min_pressure || f[0].x < 2) + nfingers = 0; + + for (id = 0; id < PSM_FINGERS; id++) + if (id >= nfingers) + PSM_FINGER_RESET(f[id]); ms->button = touchpad_buttons | guest_buttons; + /* Palm detection doesn't terminate the current action. */ + if (!psmpalmdetect(sc, &f[0], nfingers)) { + psmgestures(sc, &f[0], nfingers, ms); + for (id = 0; id < PSM_FINGERS; id++) + psmsmoother(sc, &f[id], id, ms, x, y); + } else { + VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f[0].w)); + } + +SYNAPTICS_END: + /* + * Use the extra buttons as a scrollwheel + * + * XXX X.Org uses the Z axis for vertical wheel only, + * whereas moused(8) understands special values to differ + * vertical and horizontal wheels. + * + * xf86-input-mouse needs therefore a small patch to + * understand these special values. Without it, the + * horizontal wheel acts as a vertical wheel in X.Org. + * + * That's why the horizontal wheel is disabled by + * default for now. + */ + if (ms->button & MOUSE_BUTTON4DOWN) + *z = -1; + else if (ms->button & MOUSE_BUTTON5DOWN) + *z = 1; + else if (ms->button & MOUSE_BUTTON6DOWN) + *z = -2; + else if (ms->button & MOUSE_BUTTON7DOWN) + *z = 2; + else + *z = 0; + ms->button &= ~(MOUSE_BUTTON4DOWN | MOUSE_BUTTON5DOWN | + MOUSE_BUTTON6DOWN | MOUSE_BUTTON7DOWN); + + return (0); +} + +static int +psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers) +{ + if (!( + ((sc->synhw.capMultiFinger || + sc->synhw.capAdvancedGestures) && nfingers > 1) || + (sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) || + (!sc->synhw.capPalmDetect && f->p <= sc->syninfo.max_pressure) || + (sc->synhw.capPen && f->flags & PSM_FINGER_IS_PEN))) { + /* + * We consider the packet irrelevant for the current + * action when: + * - the width isn't comprised in: + * [1; max_width] + * - the pressure isn't comprised in: + * [min_pressure; max_pressure] + * - pen aren't supported but PSM_FINGER_IS_PEN is set + */ + return (1); + } + return (0); +} + +static void +psmgestures(struct psm_softc *sc, finger_t *fingers, int nfingers, + mousestatus_t *ms) +{ + smoother_t *smoother; + gesture_t *gest; + finger_t *f; + int y_ok, center_button, center_x, right_button, right_x, i; + + f = &fingers[0]; + smoother = &sc->smoother[0]; + gest = &sc->gesture; + + /* Find first active finger. */ + if (nfingers > 0) { + for (i = 0; i < PSM_FINGERS; i++) { + if (PSM_FINGER_IS_SET(fingers[i])) { + f = &fingers[i]; + smoother = &sc->smoother[i]; + break; + } + } + } + /* * Check pressure to detect a real wanted action on the * touchpad. */ - if (*z >= sc->syninfo.min_pressure) { - synapticsaction_t *synaction; - int cursor, peer, window; - int dx, dy, dxp, dyp; - int max_width, max_pressure; + if (f->p >= sc->syninfo.min_pressure) { + int x0, y0; + int dxp, dyp; + int start_x, start_y; + int queue_len; int margin_top, margin_right, margin_bottom, margin_left; - int na_top, na_right, na_bottom, na_left; int window_min, window_max; - int multiplicator; - int weight_current, weight_previous, weight_len_squared; - int div_min, div_max, div_len; int vscroll_hor_area, vscroll_ver_area; int two_finger_scroll; - int len, weight_prev_x, weight_prev_y; - int div_max_x, div_max_y, div_x, div_y; - int exiting_scroll; + int max_x, max_y; /* Read sysctl. */ /* XXX Verify values? */ - max_width = sc->syninfo.max_width; - max_pressure = sc->syninfo.max_pressure; margin_top = sc->syninfo.margin_top; margin_right = sc->syninfo.margin_right; margin_bottom = sc->syninfo.margin_bottom; margin_left = sc->syninfo.margin_left; - na_top = sc->syninfo.na_top; - na_right = sc->syninfo.na_right; - na_bottom = sc->syninfo.na_bottom; - na_left = sc->syninfo.na_left; window_min = sc->syninfo.window_min; window_max = sc->syninfo.window_max; - multiplicator = sc->syninfo.multiplicator; - weight_current = sc->syninfo.weight_current; - weight_previous = sc->syninfo.weight_previous; - weight_len_squared = sc->syninfo.weight_len_squared; - div_min = sc->syninfo.div_min; - div_max = sc->syninfo.div_max; - div_len = sc->syninfo.div_len; vscroll_hor_area = sc->syninfo.vscroll_hor_area; vscroll_ver_area = sc->syninfo.vscroll_ver_area; two_finger_scroll = sc->syninfo.two_finger_scroll; - - exiting_scroll = 0; - - /* Palm detection. */ - if (!( - ((sc->synhw.capMultiFinger || - sc->synhw.capAdvancedGestures) && (w == 0 || w == 1)) || - (sc->synhw.capPalmDetect && w >= 4 && w <= max_width) || - (!sc->synhw.capPalmDetect && *z <= max_pressure) || - (sc->synhw.capPen && w == 2))) { - /* - * We consider the packet irrelevant for the current - * action when: - * - the width isn't comprised in: - * [4; max_width] - * - the pressure isn't comprised in: - * [min_pressure; max_pressure] - * - pen aren't supported but w is 2 - * - * Note that this doesn't terminate the current action. - */ - VLOG(2, (LOG_DEBUG, - "synaptics: palm detected! (%d)\n", w)); - goto SYNAPTICS_END; - } + max_x = sc->syninfo.max_x; + max_y = sc->syninfo.max_y; /* Read current absolute position. */ - x0 = ((pb->ipacket[3] & 0x10) << 8) | - ((pb->ipacket[1] & 0x0f) << 8) | - pb->ipacket[4]; - y0 = ((pb->ipacket[3] & 0x20) << 7) | - ((pb->ipacket[1] & 0xf0) << 4) | - pb->ipacket[5]; + x0 = f->x; + y0 = f->y; + + /* + * Limit the coordinates to the specified margins because + * this area isn't very reliable. + */ + if (x0 <= margin_left) + x0 = margin_left; + else if (x0 >= max_x - margin_right) + x0 = max_x - margin_right; + if (y0 <= margin_bottom) + y0 = margin_bottom; + else if (y0 >= max_y - margin_top) + y0 = max_y - margin_top; - synaction = &(sc->synaction); + VLOG(3, (LOG_DEBUG, "synaptics: ipacket: [%d, %d], %d, %d\n", + x0, y0, f->p, f->w)); /* * If the action is just beginning, init the structure and @@ -2909,107 +3167,82 @@ proc_synaptics(struct psm_softc *sc, pac if (!(sc->flags & PSM_FLAGS_FINGERDOWN)) { VLOG(3, (LOG_DEBUG, "synaptics: ----\n")); - /* Store the first point of this action. */ - synaction->start_x = x0; - synaction->start_y = y0; - dx = dy = 0; - /* Initialize queue. */ - synaction->queue_cursor = SYNAPTICS_PACKETQUEUE; - synaction->queue_len = 0; - synaction->window_min = window_min; - - /* Reset average. */ - synaction->avg_dx = 0; - synaction->avg_dy = 0; - - /* Reset squelch. */ - synaction->squelch_x = 0; - synaction->squelch_y = 0; + gest->window_min = window_min; /* Reset pressure peak. */ - sc->zmax = 0; + gest->zmax = 0; /* Reset fingers count. */ - synaction->fingers_nb = 0; + gest->fingers_nb = 0; /* Reset virtual scrolling state. */ - synaction->in_vscroll = 0; + gest->in_vscroll = 0; /* Compute tap timeout. */ - sc->taptimeout.tv_sec = tap_timeout / 1000000; - sc->taptimeout.tv_usec = tap_timeout % 1000000; - timevaladd(&sc->taptimeout, &sc->lastsoftintr); + gest->taptimeout.tv_sec = tap_timeout / 1000000; + gest->taptimeout.tv_usec = tap_timeout % 1000000; + timevaladd(&gest->taptimeout, &sc->lastsoftintr); sc->flags |= PSM_FLAGS_FINGERDOWN; + + /* Smoother has not been reset yet */ + queue_len = 1; + start_x = x0; + start_y = y0; } else { - /* Calculate the current delta. */ - cursor = synaction->queue_cursor; - dx = x0 - synaction->queue[cursor].x; - dy = y0 - synaction->queue[cursor].y; + queue_len = smoother->queue_len + 1; + start_x = smoother->start_x; + start_y = smoother->start_y; } - /* If in tap-hold, add the recorded button. */ - if (synaction->in_taphold) - ms->button |= synaction->tap_button; - - /* - * From now on, we can use the SYNAPTICS_END label to skip - * the current packet. - */ - - /* - * Limit the coordinates to the specified margins because - * this area isn't very reliable. - */ - if (x0 <= margin_left) - x0 = margin_left; - else if (x0 >= 6143 - margin_right) - x0 = 6143 - margin_right; - if (y0 <= margin_bottom) - y0 = margin_bottom; - else if (y0 >= 6143 - margin_top) - y0 = 6143 - margin_top; + /* Process ClickPad softbuttons */ + if (sc->synhw.capClickPad && ms->button & MOUSE_BUTTON1DOWN) { + y_ok = sc->syninfo.softbuttons_y >= 0 ? + start_y < sc->syninfo.softbuttons_y : + start_y > max_y - sc->syninfo.softbuttons_y; + + center_button = MOUSE_BUTTON2DOWN; + center_x = sc->syninfo.softbutton2_x; + right_button = MOUSE_BUTTON3DOWN; + right_x = sc->syninfo.softbutton3_x; + + if (center_x > 0 && right_x > 0 && center_x > right_x) { + center_button = MOUSE_BUTTON3DOWN; + center_x = sc->syninfo.softbutton3_x; + right_button = MOUSE_BUTTON2DOWN; + right_x = sc->syninfo.softbutton2_x; + } - VLOG(3, (LOG_DEBUG, "synaptics: ipacket: [%d, %d], %d, %d\n", - x0, y0, *z, w)); + if (right_x > 0 && start_x > right_x && y_ok) + ms->button = (ms->button & + ~MOUSE_BUTTON1DOWN) | right_button; + else if (center_x > 0 && start_x > center_x && y_ok) + ms->button = (ms->button & + ~MOUSE_BUTTON1DOWN) | center_button; + } - /* Queue this new packet. */ - cursor = SYNAPTICS_QUEUE_CURSOR(synaction->queue_cursor - 1); - synaction->queue[cursor].x = x0; - synaction->queue[cursor].y = y0; - synaction->queue_cursor = cursor; - if (synaction->queue_len < SYNAPTICS_PACKETQUEUE) - synaction->queue_len++; - VLOG(5, (LOG_DEBUG, - "synaptics: cursor[%d]: x=%d, y=%d, dx=%d, dy=%d\n", - cursor, x0, y0, dx, dy)); + /* If in tap-hold, add the recorded button. */ + if (gest->in_taphold) + ms->button |= gest->tap_button; /* * For tap, we keep the maximum number of fingers and the * pressure peak. Also with multiple fingers, we increase * the minimum window. */ - switch (w) { - case 1: /* Three or more fingers. */ - synaction->fingers_nb = imax(3, synaction->fingers_nb); - synaction->window_min = window_max; - break; - case 0: /* Two fingers. */ - synaction->fingers_nb = imax(2, synaction->fingers_nb); - synaction->window_min = window_max; - break; - default: /* One finger or undetectable. */ - synaction->fingers_nb = imax(1, synaction->fingers_nb); - } - sc->zmax = imax(*z, sc->zmax); - - /* Do we have enough packets to consider this a movement? */ - if (synaction->queue_len < synaction->window_min) - goto SYNAPTICS_END; + if (nfingers > 1) + gest->window_min = window_max; + gest->fingers_nb = imax(nfingers, gest->fingers_nb); + gest->zmax = imax(f->p, gest->zmax); + + /* Do we have enough packets to consider this a gesture? */ + if (queue_len < gest->window_min) + return; /* Is a scrolling action occurring? */ - if (!synaction->in_taphold && !synaction->in_vscroll) { + if (!gest->in_taphold && !ms->button && + (!gest->in_vscroll || two_finger_scroll)) { /* * A scrolling action must not conflict with a tap * action. Here are the conditions to consider a @@ -3020,12 +3253,10 @@ proc_synaptics(struct psm_softc *sc, pac * first should be above a configurable minimum * . tap timed out */ - dxp = abs(synaction->queue[synaction->queue_cursor].x - - synaction->start_x); - dyp = abs(synaction->queue[synaction->queue_cursor].y - - synaction->start_y); + dxp = abs(x0 - start_x); + dyp = abs(y0 - start_y); - if (timevalcmp(&sc->lastsoftintr, &sc->taptimeout, >) || + if (timevalcmp(&sc->lastsoftintr, &gest->taptimeout, >) || dxp >= sc->syninfo.vscroll_min_delta || dyp >= sc->syninfo.vscroll_min_delta) { /* @@ -3034,176 +3265,65 @@ proc_synaptics(struct psm_softc *sc, pac * as that keeps the maximum number of fingers. */ if (two_finger_scroll) { - if (w == 0) { - synaction->in_vscroll += + if (nfingers == 2) { + gest->in_vscroll += dyp ? 2 : 0; - synaction->in_vscroll += + gest->in_vscroll += dxp ? 1 : 0; } } else { /* Check for horizontal scrolling. */ if ((vscroll_hor_area > 0 && - synaction->start_y <= - vscroll_hor_area) || + start_y <= vscroll_hor_area) || (vscroll_hor_area < 0 && - synaction->start_y >= - 6143 + vscroll_hor_area)) - synaction->in_vscroll += 2; + start_y >= + max_y + vscroll_hor_area)) + gest->in_vscroll += 2; /* Check for vertical scrolling. */ if ((vscroll_ver_area > 0 && - synaction->start_x <= - vscroll_ver_area) || + start_x <= vscroll_ver_area) || (vscroll_ver_area < 0 && - synaction->start_x >= - 6143 + vscroll_ver_area)) - synaction->in_vscroll += 1; + start_x >= + max_x + vscroll_ver_area)) + gest->in_vscroll += 1; } /* Avoid conflicts if area overlaps. */ - if (synaction->in_vscroll >= 3) - synaction->in_vscroll = + if (gest->in_vscroll >= 3) + gest->in_vscroll = (dxp > dyp) ? 2 : 1; } } /* * Reset two finger scrolling when the number of fingers - * is different from two. + * is different from two or any button is pressed. */ - if (two_finger_scroll && w != 0 && synaction->in_vscroll != 0) { - synaction->in_vscroll = 0; - exiting_scroll = 1; - } + if (two_finger_scroll && gest->in_vscroll != 0 && + (nfingers != 2 || ms->button)) + gest->in_vscroll = 0; VLOG(5, (LOG_DEBUG, "synaptics: virtual scrolling: %s " "(direction=%d, dxp=%d, dyp=%d, fingers=%d)\n", - synaction->in_vscroll ? "YES" : "NO", - synaction->in_vscroll, dxp, dyp, - synaction->fingers_nb)); - - weight_prev_x = weight_prev_y = weight_previous; - div_max_x = div_max_y = div_max; - - if (synaction->in_vscroll) { - /* Dividers are different with virtual scrolling. */ - div_min = sc->syninfo.vscroll_div_min; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Sep 26 22:07:47 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 1797EBEB7C4; Mon, 26 Sep 2016 22:07:47 +0000 (UTC) (envelope-from gonzo@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 DC0AC9B5; Mon, 26 Sep 2016 22:07:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QM7kTU071085; Mon, 26 Sep 2016 22:07:46 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QM7ktw071084; Mon, 26 Sep 2016 22:07:46 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609262207.u8QM7ktw071084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Sep 2016 22:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306356 - head/usr.sbin/moused 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.23 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, 26 Sep 2016 22:07:47 -0000 Author: gonzo Date: Mon Sep 26 22:07:45 2016 New Revision: 306356 URL: https://svnweb.freebsd.org/changeset/base/306356 Log: Add Elantech trackpad to the list of known models PR: 205690 Submitted by: Vladimir Kondratyev MFC after: 1 week Modified: head/usr.sbin/moused/moused.c Modified: head/usr.sbin/moused/moused.c ============================================================================== --- head/usr.sbin/moused/moused.c Mon Sep 26 22:06:19 2016 (r306355) +++ head/usr.sbin/moused/moused.c Mon Sep 26 22:07:45 2016 (r306356) @@ -246,6 +246,7 @@ static symtab_t rmodels[] = { { "4D+ Mouse", MOUSE_MODEL_4DPLUS, 0 }, { "Synaptics Touchpad", MOUSE_MODEL_SYNAPTICS, 0 }, { "TrackPoint", MOUSE_MODEL_TRACKPOINT, 0 }, + { "Elantech Touchpad", MOUSE_MODEL_ELANTECH, 0 }, { "generic", MOUSE_MODEL_GENERIC, 0 }, { NULL, MOUSE_MODEL_UNKNOWN, 0 }, }; From owner-svn-src-all@freebsd.org Mon Sep 26 22:08: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 8321ABEB8F3; Mon, 26 Sep 2016 22:08:36 +0000 (UTC) (envelope-from gonzo@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 510CCBFA; Mon, 26 Sep 2016 22:08:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QM8Zit071169; Mon, 26 Sep 2016 22:08:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QM8ZLN071168; Mon, 26 Sep 2016 22:08:35 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609262208.u8QM8ZLN071168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Sep 2016 22:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306357 - head/share/man/man4 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.23 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, 26 Sep 2016 22:08:36 -0000 Author: gonzo Date: Mon Sep 26 22:08:35 2016 New Revision: 306357 URL: https://svnweb.freebsd.org/changeset/base/306357 Log: Document hw.psm.elantech_support in psm(4) PR: 205690 Submitted by: Vladimir Kondratyev MFC after: 1 week Modified: head/share/man/man4/psm.4 Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Mon Sep 26 22:07:45 2016 (r306356) +++ head/share/man/man4/psm.4 Mon Sep 26 22:08:35 2016 (r306357) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2013 +.Dd September 26, 2016 .Dt PSM 4 .Os .Sh NAME @@ -340,10 +340,12 @@ at boot-time. This will enable .Nm to handle packets from guest devices (sticks) and extra buttons. -Similarly, extended support for IBM/Lenovo TrackPoint can be enabled -by setting +Similarly, extended support for IBM/Lenovo TrackPoint and Elantech touchpads +can be enabled by setting .Va hw.psm.trackpoint_support -to +or +.Va hw.psm.elantech_support, +respectively, to .Em 1 at boot-time. .Pp From owner-svn-src-all@freebsd.org Tue Sep 27 00:53: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 9F7B7BEA3F0; Tue, 27 Sep 2016 00:53:42 +0000 (UTC) (envelope-from jhibbits@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 5DC69325; Tue, 27 Sep 2016 00:53:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R0rf52034906; Tue, 27 Sep 2016 00:53:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R0rf2B034902; Tue, 27 Sep 2016 00:53:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609270053.u8R0rf2B034902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 27 Sep 2016 00:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306358 - in head/sys: conf powerpc/conf powerpc/mpc85xx 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.23 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: Tue, 27 Sep 2016 00:53:42 -0000 Author: jhibbits Date: Tue Sep 27 00:53:41 2016 New Revision: 306358 URL: https://svnweb.freebsd.org/changeset/base/306358 Log: Add NXP/Freescale DIU driver for PowerPC SoCs Summary: This enables some features of the DIU, using a static configuration, specified either via a 'edid' property on the 'display' FDT node, or a 'video-mode' environment variable (bootarg). 'video-mode' was chosen because it matches u-boot's naming, so it can be set with: setenv bootargs video-mode=${video-mode} at the u-boot CLI. Mouse cursor is not supported currently, as a hardware cursor is not supported by framebuffer VT yet. Currently it only supports a 32bpp ARGB (actually BGRA) format, and only a single composite plane, at up to 1280x1024. Differential Revision: https://reviews.freebsd.org/D8022 Added: head/sys/powerpc/mpc85xx/fsl_diu.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/conf/MPC85XX head/sys/powerpc/mpc85xx/mpc85xx.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Sep 26 22:08:35 2016 (r306357) +++ head/sys/conf/files.powerpc Tue Sep 27 00:53:41 2016 (r306358) @@ -135,6 +135,7 @@ powerpc/mikrotik/platform_rb.c optional powerpc/mpc85xx/atpic.c optional mpc85xx isa powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 +powerpc/mpc85xx/fsl_diu.c optional mpc85xx diu powerpc/mpc85xx/fsl_sdhc.c optional mpc85xx sdhc powerpc/mpc85xx/i2c.c optional iicbus fdt powerpc/mpc85xx/isa.c optional mpc85xx isa Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Mon Sep 26 22:08:35 2016 (r306357) +++ head/sys/powerpc/conf/MPC85XX Tue Sep 27 00:53:41 2016 (r306358) @@ -93,3 +93,7 @@ device ehci device umass device usb device vlan + +# P1022 DIU +device diu +device videomode Added: head/sys/powerpc/mpc85xx/fsl_diu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mpc85xx/fsl_diu.c Tue Sep 27 00:53:41 2016 (r306358) @@ -0,0 +1,479 @@ +/*- + * Copyright (c) 2015 Justin Hibbits + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include "gpio_if.h" + +#include +#include + +#include "fb_if.h" + +#define DIU_DESC_1 0x000 /* Plane1 Area Descriptor Pointer Register */ +#define DIU_DESC_2 0x004 /* Plane2 Area Descriptor Pointer Register */ +#define DIU_DESC_3 0x008 /* Plane3 Area Descriptor Pointer Register */ +#define DIU_GAMMA 0x00C /* Gamma Register */ +#define DIU_PALETTE 0x010 /* Palette Register */ +#define DIU_CURSOR 0x014 /* Cursor Register */ +#define DIU_CURS_POS 0x018 /* Cursor Position Register */ +#define CURSOR_Y_SHIFT 16 +#define CURSOR_X_SHIFT 0 +#define DIU_DIU_MODE 0x01C /* DIU4 Mode */ +#define DIU_MODE_M 0x7 +#define DIU_MODE_S 0 +#define DIU_MODE_NORMAL 0x1 +#define DIU_MODE_2 0x2 +#define DIU_MODE_3 0x3 +#define DIU_MODE_COLBAR 0x4 +#define DIU_BGND 0x020 /* Background */ +#define DIU_BGND_WB 0x024 /* Background Color in write back Mode Register */ +#define DIU_DISP_SIZE 0x028 /* Display Size */ +#define DELTA_Y_S 16 +#define DELTA_X_S 0 +#define DIU_WB_SIZE 0x02C /* Write back Plane Size Register */ +#define DELTA_Y_WB_S 16 +#define DELTA_X_WB_S 0 +#define DIU_WB_MEM_ADDR 0x030 /* Address to Store the write back Plane Register */ +#define DIU_HSYN_PARA 0x034 /* Horizontal Sync Parameter */ +#define BP_H_SHIFT 22 +#define PW_H_SHIFT 11 +#define FP_H_SHIFT 0 +#define DIU_VSYN_PARA 0x038 /* Vertical Sync Parameter */ +#define BP_V_SHIFT 22 +#define PW_V_SHIFT 11 +#define FP_V_SHIFT 0 +#define DIU_SYNPOL 0x03C /* Synchronize Polarity */ +#define BP_VS (1 << 4) +#define BP_HS (1 << 3) +#define INV_CS (1 << 2) +#define INV_VS (1 << 1) +#define INV_HS (1 << 0) +#define INV_PDI_VS (1 << 8) /* Polarity of PDI input VSYNC. */ +#define INV_PDI_HS (1 << 9) /* Polarity of PDI input HSYNC. */ +#define INV_PDI_DE (1 << 10) /* Polarity of PDI input DE. */ +#define DIU_THRESHOLD 0x040 /* Threshold */ +#define LS_BF_VS_SHIFT 16 +#define OUT_BUF_LOW_SHIFT 0 +#define DIU_INT_STATUS 0x044 /* Interrupt Status */ +#define DIU_INT_MASK 0x048 /* Interrupt Mask */ +#define DIU_COLBAR_1 0x04C /* COLBAR_1 */ +#define DIU_COLORBARn_R(x) ((x & 0xff) << 16) +#define DIU_COLORBARn_G(x) ((x & 0xff) << 8) +#define DIU_COLORBARn_B(x) ((x & 0xff) << 0) +#define DIU_COLBAR_2 0x050 /* COLBAR_2 */ +#define DIU_COLBAR_3 0x054 /* COLBAR_3 */ +#define DIU_COLBAR_4 0x058 /* COLBAR_4 */ +#define DIU_COLBAR_5 0x05c /* COLBAR_5 */ +#define DIU_COLBAR_6 0x060 /* COLBAR_6 */ +#define DIU_COLBAR_7 0x064 /* COLBAR_7 */ +#define DIU_COLBAR_8 0x068 /* COLBAR_8 */ +#define DIU_FILLING 0x06C /* Filling Register */ +#define DIU_PLUT 0x070 /* Priority Look Up Table Register */ + +/* Control Descriptor */ +#define DIU_CTRLDESCL(n, m) 0x200 + (0x40 * n) + 0x4 * (m - 1) +#define DIU_CTRLDESCLn_1(n) DIU_CTRLDESCL(n, 1) +#define DIU_CTRLDESCLn_2(n) DIU_CTRLDESCL(n, 2) +#define DIU_CTRLDESCLn_3(n) DIU_CTRLDESCL(n, 3) +#define TRANS_SHIFT 20 +#define DIU_CTRLDESCLn_4(n) DIU_CTRLDESCL(n, 4) +#define BPP_MASK 0xf /* Bit per pixel Mask */ +#define BPP_SHIFT 16 /* Bit per pixel Shift */ +#define BPP24 0x5 +#define EN_LAYER (1 << 31) /* Enable the layer */ +#define DIU_CTRLDESCLn_5(n) DIU_CTRLDESCL(n, 5) +#define DIU_CTRLDESCLn_6(n) DIU_CTRLDESCL(n, 6) +#define DIU_CTRLDESCLn_7(n) DIU_CTRLDESCL(n, 7) +#define DIU_CTRLDESCLn_8(n) DIU_CTRLDESCL(n, 8) +#define DIU_CTRLDESCLn_9(n) DIU_CTRLDESCL(n, 9) + +#define NUM_LAYERS 1 + +struct panel_info { + uint32_t panel_width; + uint32_t panel_height; + uint32_t panel_hbp; + uint32_t panel_hpw; + uint32_t panel_hfp; + uint32_t panel_vbp; + uint32_t panel_vpw; + uint32_t panel_vfp; + uint32_t panel_freq; + uint32_t clk_div; +}; + +struct diu_area_descriptor { + uint32_t pixel_format; + uint32_t bitmap_address; + uint32_t source_size; + uint32_t aoi_size; + uint32_t aoi_offset; + uint32_t display_offset; + uint32_t chroma_key_max; + uint32_t chroma_key_min; + uint32_t next_ad_addr; +} __aligned(32); + +struct diu_softc { + struct resource *res[2]; + void *ih; + device_t sc_dev; + device_t sc_fbd; /* fbd child */ + struct fb_info sc_info; + struct panel_info sc_panel; + struct diu_area_descriptor *sc_planes[3]; + uint8_t *sc_gamma; + uint8_t *sc_cursor; +}; + +static struct resource_spec diu_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +diu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,diu")) + return (ENXIO); + + device_set_desc(dev, "Freescale Display Interface Unit"); + return (BUS_PROBE_DEFAULT); +} + +static void +diu_intr(void *arg) +{ + struct diu_softc *sc; + int reg; + + sc = arg; + + /* Ack interrupts */ + reg = bus_read_4(sc->res[0], DIU_INT_STATUS); + bus_write_4(sc->res[0], DIU_INT_STATUS, reg); + + /* TODO interrupt handler */ +} + +static int +diu_set_pxclk(device_t dev, unsigned int freq) +{ + phandle_t node; + unsigned long bus_freq; + uint32_t pxclk_set; + uint32_t clkdvd; + int res; + + node = ofw_bus_get_node(device_get_parent(dev)); + if ((res = OF_getencprop(node, "bus-frequency", + (pcell_t *)&bus_freq, sizeof(bus_freq)) <= 0)) { + device_printf(dev, "Unable to get bus frequency\n"); + return (ENXIO); + } + + /* freq is in kHz */ + freq *= 1000; + /* adding freq/2 to round-to-closest */ + pxclk_set = min(max((bus_freq + freq/2) / freq, 2), 255) << 16; + pxclk_set |= OCP85XX_CLKDVDR_PXCKEN; + clkdvd = ccsr_read4(OCP85XX_CLKDVDR); + clkdvd &= ~(OCP85XX_CLKDVDR_PXCKEN | OCP85XX_CLKDVDR_PXCKINV | + OCP85XX_CLKDVDR_PXCLK_MASK); + ccsr_write4(OCP85XX_CLKDVDR, clkdvd); + ccsr_write4(OCP85XX_CLKDVDR, clkdvd | pxclk_set); + + return (0); +} + +static int +diu_init(struct diu_softc *sc) +{ + struct panel_info *panel; + int reg; + + panel = &sc->sc_panel; + + /* Temporarily disable the DIU while configuring */ + reg = bus_read_4(sc->res[0], DIU_DIU_MODE); + reg &= ~(DIU_MODE_M << DIU_MODE_S); + bus_write_4(sc->res[0], DIU_DIU_MODE, reg); + + if (diu_set_pxclk(sc->sc_dev, panel->panel_freq) < 0) { + return (ENXIO); + } + + /* Configure DIU */ + /* Need to set these somehow later... */ + bus_write_4(sc->res[0], DIU_GAMMA, vtophys(sc->sc_gamma)); + bus_write_4(sc->res[0], DIU_CURSOR, vtophys(sc->sc_cursor)); + bus_write_4(sc->res[0], DIU_CURS_POS, 0); + + reg = ((sc->sc_info.fb_height) << DELTA_Y_S); + reg |= sc->sc_info.fb_width; + bus_write_4(sc->res[0], DIU_DISP_SIZE, reg); + + reg = (panel->panel_hbp << BP_H_SHIFT); + reg |= (panel->panel_hpw << PW_H_SHIFT); + reg |= (panel->panel_hfp << FP_H_SHIFT); + bus_write_4(sc->res[0], DIU_HSYN_PARA, reg); + + reg = (panel->panel_vbp << BP_V_SHIFT); + reg |= (panel->panel_vpw << PW_V_SHIFT); + reg |= (panel->panel_vfp << FP_V_SHIFT); + bus_write_4(sc->res[0], DIU_VSYN_PARA, reg); + + bus_write_4(sc->res[0], DIU_BGND, 0); + + /* Mask all the interrupts */ + bus_write_4(sc->res[0], DIU_INT_MASK, 0x3f); + + /* Reset all layers */ + sc->sc_planes[0] = contigmalloc(sizeof(struct diu_area_descriptor), + M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, 32, 0); + bus_write_4(sc->res[0], DIU_DESC_1, vtophys(sc->sc_planes[0])); + bus_write_4(sc->res[0], DIU_DESC_2, 0); + bus_write_4(sc->res[0], DIU_DESC_3, 0); + + /* Setup first plane */ + /* Area descriptor fields are little endian, so byte swap. */ + /* Word 0: Pixel format */ + /* Set to 8:8:8:8 ARGB, 4 bytes per pixel, no flip. */ +#define MAKE_PXLFMT(as,rs,gs,bs,a,r,g,b,f,s) \ + htole32((as << (4 * a)) | (rs << 4 * r) | \ + (gs << 4 * g) | (bs << 4 * b) | \ + (f << 28) | (s << 16) | \ + (a << 25) | (r << 19) | \ + (g << 21) | (b << 24)) + reg = MAKE_PXLFMT(8, 8, 8, 8, 3, 2, 1, 0, 1, 3); + sc->sc_planes[0]->pixel_format = reg; + /* Word 1: Bitmap address */ + sc->sc_planes[0]->bitmap_address = htole32(sc->sc_info.fb_pbase); + /* Word 2: Source size/global alpha */ + reg = (sc->sc_info.fb_width | (sc->sc_info.fb_height << 12)); + sc->sc_planes[0]->source_size = htole32(reg); + /* Word 3: AOI Size */ + reg = (sc->sc_info.fb_width | (sc->sc_info.fb_height << 16)); + sc->sc_planes[0]->aoi_size = htole32(reg); + /* Word 4: AOI Offset */ + sc->sc_planes[0]->aoi_offset = 0; + /* Word 5: Display offset */ + sc->sc_planes[0]->display_offset = 0; + /* Word 6: Chroma key max */ + sc->sc_planes[0]->chroma_key_max = 0; + /* Word 7: Chroma key min */ + reg = 255 << 16 | 255 << 8 | 255; + sc->sc_planes[0]->chroma_key_min = htole32(reg); + /* Word 8: Next AD */ + sc->sc_planes[0]->next_ad_addr = 0; + + /* TODO: derive this from the panel size */ + bus_write_4(sc->res[0], DIU_PLUT, 0x1f5f666); + + /* Enable DIU in normal mode */ + reg = bus_read_4(sc->res[0], DIU_DIU_MODE); + reg &= ~(DIU_MODE_M << DIU_MODE_S); + reg |= (DIU_MODE_NORMAL << DIU_MODE_S); + bus_write_4(sc->res[0], DIU_DIU_MODE, reg); + + return (0); +} + +static int +diu_attach(device_t dev) +{ + struct edid_info *edid; + struct diu_softc *sc; + const struct videomode *videomode; + void *edid_cells; + const char *vm_name; + phandle_t node; + int h, r, w; + int err, i; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + if (bus_alloc_resources(dev, diu_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + node = ofw_bus_get_node(dev); + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, diu_intr, sc, &sc->ih); + if (err) { + device_printf(dev, "Unable to alloc interrupt resource.\n"); + return (ENXIO); + } + + /* TODO: Eventually, allow EDID to be dynamically provided. */ + if (OF_getprop_alloc(node, "edid", 1, &edid_cells) <= 0) { + /* + * u-boot uses the environment variable name 'video-mode', so + * just use the same name here. Should allow another variable + * that better fits our design model, but this is fine. + */ + if ((vm_name = kern_getenv("video-mode")) == NULL) { + device_printf(dev, + "No EDID data and no video-mode env set\n"); + return (ENXIO); + } + } + if (edid_cells != NULL) { + if (edid_parse(edid_cells, edid) != 0) { + device_printf(dev, "Error parsing EDID\n"); + OF_prop_free(edid_cells); + return (ENXIO); + } + videomode = edid->edid_preferred_mode; + } else { + /* Parse video-mode kenv variable. */ + if ((err = sscanf(vm_name, "fslfb:%dx%d@%d", &w, &h, &r)) != 3) { + device_printf(dev, + "Cannot parse video mode: %s\n", vm_name); + return (ENXIO); + } + videomode = pick_mode_by_ref(w, h, r); + if (videomode == NULL) { + device_printf(dev, + "Cannot find mode for %dx%d@%d", w, h, r); + return (ENXIO); + } + } + + sc->sc_panel.panel_width = videomode->hdisplay; + sc->sc_panel.panel_height = videomode->vdisplay; + sc->sc_panel.panel_hbp = videomode->hsync_start - videomode->hdisplay; + sc->sc_panel.panel_hfp = videomode->htotal - videomode->hsync_end; + sc->sc_panel.panel_hpw = videomode->hsync_end - videomode->hsync_start; + sc->sc_panel.panel_vbp = videomode->vsync_start - videomode->vdisplay; + sc->sc_panel.panel_vfp = videomode->vtotal - videomode->vsync_end; + sc->sc_panel.panel_vpw = videomode->vsync_end - videomode->vsync_start; + sc->sc_panel.panel_freq = videomode->dot_clock; + + sc->sc_info.fb_width = sc->sc_panel.panel_width; + sc->sc_info.fb_height = sc->sc_panel.panel_height; + sc->sc_info.fb_stride = sc->sc_info.fb_width * 4; + sc->sc_info.fb_bpp = sc->sc_info.fb_depth = 32; + sc->sc_info.fb_size = sc->sc_info.fb_height * sc->sc_info.fb_stride; + sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size, + M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0); + sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase); + + /* Gamma table is 3 consecutive segments of 256 bytes. */ + sc->sc_gamma = contigmalloc(3 * 256, M_DEVBUF, 0, 0, + BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0); + /* Initialize gamma to default */ + for (i = 0; i < 3 * 256; i++) + sc->sc_gamma[i] = (i % 256); + + /* Cursor format is 32x32x16bpp */ + sc->sc_cursor = contigmalloc(32 * 32 * 2, M_DEVBUF, M_ZERO, 0, + BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0); + + diu_init(sc); + + sc->sc_info.fb_name = device_get_nameunit(dev); + + /* Ask newbus to attach framebuffer device to me. */ + sc->sc_fbd = device_add_child(dev, "fbd", device_get_unit(dev)); + if (sc->sc_fbd == NULL) + device_printf(dev, "Can't attach fbd device\n"); + + if ((err = device_probe_and_attach(sc->sc_fbd)) != 0) { + device_printf(dev, "Failed to attach fbd device: %d\n", err); + } + + return (0); +} + +static struct fb_info * +diu_fb_getinfo(device_t dev) +{ + struct diu_softc *sc = device_get_softc(dev); + + return (&sc->sc_info); +} + +static device_method_t diu_methods[] = { + DEVMETHOD(device_probe, diu_probe), + DEVMETHOD(device_attach, diu_attach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, diu_fb_getinfo), + { 0, 0 } +}; + +static driver_t diu_driver = { + "fb", + diu_methods, + sizeof(struct diu_softc), +}; + +static devclass_t diu_devclass; + +DRIVER_MODULE(fb, simplebus, diu_driver, diu_devclass, 0, 0); Modified: head/sys/powerpc/mpc85xx/mpc85xx.h ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.h Mon Sep 26 22:08:35 2016 (r306357) +++ head/sys/powerpc/mpc85xx/mpc85xx.h Tue Sep 27 00:53:41 2016 (r306358) @@ -139,6 +139,13 @@ extern vm_offset_t ccsrbar_va; */ #define OCP85XX_RSTCR (CCSRBAR_VA + 0xe00b0) +#define OCP85XX_CLKDVDR (CCSRBAR_VA + 0xe0800) +#define OCP85XX_CLKDVDR_PXCKEN 0x80000000 +#define OCP85XX_CLKDVDR_SSICKEN 0x20000000 +#define OCP85XX_CLKDVDR_PXCKINV 0x10000000 +#define OCP85XX_CLKDVDR_PXCLK_MASK 0x00FF0000 +#define OCP85XX_CLKDVDR_SSICLK_MASK 0x000000FF + /* * Run Control/Power Management Registers. */ From owner-svn-src-all@freebsd.org Tue Sep 27 05:02:26 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 DB471BEB1F1 for ; Tue, 27 Sep 2016 05:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 A05DFD35 for ; Tue, 27 Sep 2016 05:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id r145so5107703ior.0 for ; Mon, 26 Sep 2016 22:02:26 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=NF74+LZJ+8y8vCQFDPSg7Wg7COLkm8pAdv5y+qek/JA=; b=nu6+ahUICQfAlAcoNMPX/SaH7FUg5TdUIPhGTZa9Joj+Qe3gpCVJzpI+4hU+m59my7 wSr8S3EGAdcbZ3ENKA0GlPKZX/+TXTGsC5ol0cFl1D60w85p9WX2SOn0AGZebw0LpajL WkmMcsVgV6zW6hbg9DMKFkiomlS3Z/SSuc26zEP5kzsmmFtwGZojVYKv0+PQpPDy8xhU VMiqC9nk70FM0yDjEfODB4x1OYson2MPsYcRe5jt489Hiw+91wvjA0ywXqgcMZTKty6b /ax2pnFnDhJoD1xtqfImgo2U1UBYp4jcLgDDviS/vkm+qTRutUE1qgXstbdD3pipgseL K2HQ== 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:from :date:message-id:subject:to:cc; bh=NF74+LZJ+8y8vCQFDPSg7Wg7COLkm8pAdv5y+qek/JA=; b=Z0MsoVNkYCOtVHGrFrGjMra34HULO93GipaJ27MIAG9yt6vZNp556C+obKRfH+aZNy Vxbuq5I0EJGakD+Of1DAV2enKmBmDCCrJFsUVXFdw0h4R1wzFGu6R1Ouy1ZQwIeUCYbc wxqys7FCRzufvibXZthqEkH5zPNYt+FdL463zPbwGM/lB7ipmJCDYZFy6qesiXcSF5lh wsINWsOZCbFHmZ0Hlb2aok44+NjcIAZ9iI7WgLqu880Y72TppbGWYF8bLlB80A0hHJXE eyHzyrV6VcwX3Wzz+0AZX3bwRFy9WUbUgL0iBSWhY4QZUIsLF7Kt2ZaNPsDfb+xF3N0e SQ2w== X-Gm-Message-State: AE9vXwOgp8uoTywy+7d7huGe9WDZhZ+jtU89jUn8NZEfowX+EkYHG8TzAooyu4dG9dWj2a18US+p02/kiVbEWw== X-Received: by 10.107.138.200 with SMTP id c69mr26343245ioj.43.1474952546119; Mon, 26 Sep 2016 22:02:26 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 26 Sep 2016 22:02:25 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <1577832.dOPa6L4zTd@ralph.baldwin.cx> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> From: Warner Losh Date: Mon, 26 Sep 2016 23:02:25 -0600 X-Google-Sender-Auth: nfeuGdO0jKR_vtE0G6mip3Y8QJI Message-ID: Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: John Baldwin Cc: Allan Jude , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 27 Sep 2016 05:02:27 -0000 On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: > On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >> > On 09/03/16 11:26 AM, Warner Losh wrote: >> >> Author: imp >> >> Date: Sat Sep 3 15:26:28 2016 >> >> New Revision: 305353 >> >> URL: https://svnweb.freebsd.org/changeset/base/305353 >> >> >> >> Log: >> >> Don't use -N to set the OMAGIC with data and text writeable and data >> >> not page aligned. To do this, use the ld script gnu ld installs on my >> >> system. >> >> >> >> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >> >> things. The loader script could be better named and take into account >> >> other architectures. And having two different mechanisms to do >> >> basically the same thing needs study. However, it's blocking forward >> >> progress on lld, so I'll work in parallel to sort these out. >> >> >> >> Differential Revision: https://reviews.freebsd.org/D7409 >> >> Reviewed by: emaste >> >> >> > >> > This breaks booting on my Lenovo laptop. The BTX client crashes and >> > dumps the registers. >> > >> > Reverting this commit solved it. >> > >> > Is there something I can do to help investigate this? >> >> I assume you bisected all boot loader changes and it fails across this >> commit? If not, that's the first step. >> >> If so, perhaps the place to start is with the dump? > > The dump is a good place to start, but it would also be useful to know > > 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning > it it is probably btxldr.S dying trying to parse a.out header from > /boot/loader vs are you dying before that point meaning it is in boot1.S > or gptldr.S)? Yes. This is absolutely critical. Until we know what dies, what the trace backs are, what options were in effect and how the binaries were broken there's little more that I can do because it works for me everywhere I've tried it. > 2) Once we know which stage, it would be good to compare the a.out headers > and possibly the contents of the relevant binaries. The aforementioned > .S files all parse the a.out header in assembly as well as the BTX > header (they assume that BTX itself is present in the bits loaded from > disk immediately followed by the binary header). That code isn't very > flexible and it doesn't seem far fetched for this change to break it. I just wonder why it works on the amd64 servers and laptops, the i386 laptops and in qemu for me, but fails for the OP. If it broke a.out, I contend it would break for everybody since a.out headers are 'hit dinosaur over the head' level of complexity and subtly. While I don't doubt there's a problem, I suspect it is very specific to a particular set of laptops that were on the edge before and this kicks us over the edge just enough to stomp on some area that was protected before. Warner From owner-svn-src-all@freebsd.org Tue Sep 27 06:00:11 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 79D8FBEBE8C; Tue, 27 Sep 2016 06:00:11 +0000 (UTC) (envelope-from sephe@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 446A48C9; Tue, 27 Sep 2016 06:00:11 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R60AV4048008; Tue, 27 Sep 2016 06:00:10 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R60ACP048007; Tue, 27 Sep 2016 06:00:10 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609270600.u8R60ACP048007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 27 Sep 2016 06:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306359 - head/sys/dev/pci 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.23 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: Tue, 27 Sep 2016 06:00:11 -0000 Author: sephe Date: Tue Sep 27 06:00:10 2016 New Revision: 306359 URL: https://svnweb.freebsd.org/changeset/base/306359 Log: pci: Clear the MEM/PORT_EN bit when updating PCI BAR It's unsafe to update the BAR when the related EN bit is set. Submitted by: Dexuan Cui Reviewed by: jhb MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7914 Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue Sep 27 00:53:41 2016 (r306358) +++ head/sys/dev/pci/pci.c Tue Sep 27 06:00:10 2016 (r306359) @@ -5000,6 +5000,7 @@ pci_reserve_map(device_t dev, device_t c struct resource_list *rl = &dinfo->resources; struct resource *res; struct pci_map *pm; + uint16_t cmd; pci_addr_t map, testval; int mapsize; @@ -5089,8 +5090,17 @@ pci_reserve_map(device_t dev, device_t c device_printf(child, "Lazy allocation of %#jx bytes rid %#x type %d at %#jx\n", count, *rid, type, rman_get_start(res)); + + /* Disable decoding via the CMD register before updating the BAR */ + cmd = pci_read_config(child, PCIR_COMMAND, 2); + pci_write_config(child, PCIR_COMMAND, + cmd & ~(PCI_BAR_MEM(map) ? PCIM_CMD_MEMEN : PCIM_CMD_PORTEN), 2); + map = rman_get_start(res); pci_write_bar(child, pm, map); + + /* Restore the original value of the CMD register */ + pci_write_config(child, PCIR_COMMAND, cmd, 2); out: return (res); } From owner-svn-src-all@freebsd.org Tue Sep 27 06:30:26 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 59CE1BEB412; Tue, 27 Sep 2016 06:30:26 +0000 (UTC) (envelope-from sephe@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 2993F3F0; Tue, 27 Sep 2016 06:30:26 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R6UP8D059182; Tue, 27 Sep 2016 06:30:25 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R6UP98059178; Tue, 27 Sep 2016 06:30:25 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609270630.u8R6UP98059178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 27 Sep 2016 06:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306360 - head/sys/dev/hyperv/vmbus 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.23 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: Tue, 27 Sep 2016 06:30:26 -0000 Author: sephe Date: Tue Sep 27 06:30:24 2016 New Revision: 306360 URL: https://svnweb.freebsd.org/changeset/base/306360 Log: hyperv/vmbus: Add dynamic device add and remove support MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8008 Modified: head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus.c Tue Sep 27 06:30:24 2016 (r306360) @@ -83,9 +83,7 @@ static int vmbus_connect(struct vmbus_ static int vmbus_req_channels(struct vmbus_softc *sc); static void vmbus_disconnect(struct vmbus_softc *); static int vmbus_scan(struct vmbus_softc *); -static void vmbus_scan_wait(struct vmbus_softc *); -static void vmbus_scan_newchan(struct vmbus_softc *); -static void vmbus_scan_newdev(struct vmbus_softc *); +static void vmbus_scan_teardown(struct vmbus_softc *); static void vmbus_scan_done(struct vmbus_softc *, const struct vmbus_message *); static void vmbus_chanmsg_handle(struct vmbus_softc *, @@ -393,50 +391,22 @@ vmbus_req_channels(struct vmbus_softc *s } static void -vmbus_scan_newchan(struct vmbus_softc *sc) +vmbus_scan_done_task(void *xsc, int pending __unused) { - mtx_lock(&sc->vmbus_scan_lock); - if ((sc->vmbus_scan_chcnt & VMBUS_SCAN_CHCNT_DONE) == 0) - sc->vmbus_scan_chcnt++; - mtx_unlock(&sc->vmbus_scan_lock); + struct vmbus_softc *sc = xsc; + + mtx_lock(&Giant); + sc->vmbus_scandone = true; + mtx_unlock(&Giant); + wakeup(&sc->vmbus_scandone); } static void vmbus_scan_done(struct vmbus_softc *sc, const struct vmbus_message *msg __unused) { - mtx_lock(&sc->vmbus_scan_lock); - sc->vmbus_scan_chcnt |= VMBUS_SCAN_CHCNT_DONE; - mtx_unlock(&sc->vmbus_scan_lock); - wakeup(&sc->vmbus_scan_chcnt); -} - -static void -vmbus_scan_newdev(struct vmbus_softc *sc) -{ - mtx_lock(&sc->vmbus_scan_lock); - sc->vmbus_scan_devcnt++; - mtx_unlock(&sc->vmbus_scan_lock); - wakeup(&sc->vmbus_scan_devcnt); -} - -static void -vmbus_scan_wait(struct vmbus_softc *sc) -{ - uint32_t chancnt; - - mtx_lock(&sc->vmbus_scan_lock); - while ((sc->vmbus_scan_chcnt & VMBUS_SCAN_CHCNT_DONE) == 0) { - mtx_sleep(&sc->vmbus_scan_chcnt, &sc->vmbus_scan_lock, 0, - "waitch", 0); - } - chancnt = sc->vmbus_scan_chcnt & ~VMBUS_SCAN_CHCNT_DONE; - while (sc->vmbus_scan_devcnt != chancnt) { - mtx_sleep(&sc->vmbus_scan_devcnt, &sc->vmbus_scan_lock, 0, - "waitdev", 0); - } - mtx_unlock(&sc->vmbus_scan_lock); + taskqueue_enqueue(sc->vmbus_devtq, &sc->vmbus_scandone_task); } static int @@ -445,31 +415,71 @@ vmbus_scan(struct vmbus_softc *sc) int error; /* + * Identify, probe and attach for non-channel devices. + */ + bus_generic_probe(sc->vmbus_dev); + bus_generic_attach(sc->vmbus_dev); + + /* + * This taskqueue serializes vmbus devices' attach and detach + * for channel offer and rescind messages. + */ + sc->vmbus_devtq = taskqueue_create("vmbus dev", M_WAITOK, + taskqueue_thread_enqueue, &sc->vmbus_devtq); + taskqueue_start_threads(&sc->vmbus_devtq, 1, PI_NET, "vmbusdev"); + TASK_INIT(&sc->vmbus_scandone_task, 0, vmbus_scan_done_task, sc); + + /* + * This taskqueue handles sub-channel detach, so that vmbus + * device's detach running in vmbus_devtq can drain its sub- + * channels. + */ + sc->vmbus_subchtq = taskqueue_create("vmbus subch", M_WAITOK, + taskqueue_thread_enqueue, &sc->vmbus_subchtq); + taskqueue_start_threads(&sc->vmbus_subchtq, 1, PI_NET, "vmbussch"); + + /* * Start vmbus scanning. */ error = vmbus_req_channels(sc); if (error) { device_printf(sc->vmbus_dev, "channel request failed: %d\n", error); - return error; + return (error); } /* - * Wait for all devices are added to vmbus. + * Wait for all vmbus devices from the initial channel offers to be + * attached. */ - vmbus_scan_wait(sc); - - /* - * Identify, probe and attach. - */ - bus_generic_probe(sc->vmbus_dev); - bus_generic_attach(sc->vmbus_dev); + GIANT_REQUIRED; + while (!sc->vmbus_scandone) + mtx_sleep(&sc->vmbus_scandone, &Giant, 0, "vmbusdev", 0); if (bootverbose) { device_printf(sc->vmbus_dev, "device scan, probe and attach " "done\n"); } - return 0; + return (0); +} + +static void +vmbus_scan_teardown(struct vmbus_softc *sc) +{ + + GIANT_REQUIRED; + if (sc->vmbus_devtq != NULL) { + mtx_unlock(&Giant); + taskqueue_free(sc->vmbus_devtq); + mtx_lock(&Giant); + sc->vmbus_devtq = NULL; + } + if (sc->vmbus_subchtq != NULL) { + mtx_unlock(&Giant); + taskqueue_free(sc->vmbus_subchtq); + mtx_lock(&Giant); + sc->vmbus_subchtq = NULL; + } } static void @@ -918,45 +928,35 @@ vmbus_add_child(struct vmbus_channel *ch { struct vmbus_softc *sc = chan->ch_vmbus; device_t parent = sc->vmbus_dev; - int error = 0; - /* New channel has been offered */ - vmbus_scan_newchan(sc); + mtx_lock(&Giant); chan->ch_dev = device_add_child(parent, NULL, -1); if (chan->ch_dev == NULL) { + mtx_unlock(&Giant); device_printf(parent, "device_add_child for chan%u failed\n", chan->ch_id); - error = ENXIO; - goto done; + return (ENXIO); } device_set_ivars(chan->ch_dev, chan); + device_probe_and_attach(chan->ch_dev); -done: - /* New device has been/should be added to vmbus. */ - vmbus_scan_newdev(sc); - return error; + mtx_unlock(&Giant); + return (0); } int vmbus_delete_child(struct vmbus_channel *chan) { - int error; - - if (chan->ch_dev == NULL) { - /* Failed to add a device. */ - return 0; - } + int error = 0; - /* - * XXXKYS: Ensure that this is the opposite of - * device_add_child() - */ mtx_lock(&Giant); - error = device_delete_child(chan->ch_vmbus->vmbus_dev, chan->ch_dev); + if (chan->ch_dev != NULL) { + error = device_delete_child(chan->ch_vmbus->vmbus_dev, + chan->ch_dev); + } mtx_unlock(&Giant); - - return error; + return (error); } static int @@ -1028,10 +1028,11 @@ vmbus_doattach(struct vmbus_softc *sc) return (0); sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; - mtx_init(&sc->vmbus_scan_lock, "vmbus scan", NULL, MTX_DEF); sc->vmbus_gpadl = VMBUS_GPADL_START; mtx_init(&sc->vmbus_prichan_lock, "vmbus prichan", NULL, MTX_DEF); TAILQ_INIT(&sc->vmbus_prichans); + mtx_init(&sc->vmbus_chan_lock, "vmbus channel", NULL, MTX_DEF); + TAILQ_INIT(&sc->vmbus_chans); sc->vmbus_chmap = malloc( sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX, M_DEVBUF, M_WAITOK | M_ZERO); @@ -1095,6 +1096,7 @@ vmbus_doattach(struct vmbus_softc *sc) return (ret); cleanup: + vmbus_scan_teardown(sc); vmbus_intr_teardown(sc); vmbus_dma_free(sc); if (sc->vmbus_xc != NULL) { @@ -1102,8 +1104,8 @@ cleanup: sc->vmbus_xc = NULL; } free(sc->vmbus_chmap, M_DEVBUF); - mtx_destroy(&sc->vmbus_scan_lock); mtx_destroy(&sc->vmbus_prichan_lock); + mtx_destroy(&sc->vmbus_chan_lock); return (ret); } @@ -1146,8 +1148,11 @@ vmbus_detach(device_t dev) { struct vmbus_softc *sc = device_get_softc(dev); + bus_generic_detach(dev); vmbus_chan_destroy_all(sc); + vmbus_scan_teardown(sc); + vmbus_disconnect(sc); if (sc->vmbus_flags & VMBUS_FLAG_SYNIC) { @@ -1164,8 +1169,8 @@ vmbus_detach(device_t dev) } free(sc->vmbus_chmap, M_DEVBUF); - mtx_destroy(&sc->vmbus_scan_lock); mtx_destroy(&sc->vmbus_prichan_lock); + mtx_destroy(&sc->vmbus_chan_lock); return (0); } Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Tue Sep 27 06:30:24 2016 (r306360) @@ -59,10 +59,30 @@ static struct vmbus_channel *vmbus_chan_ static void vmbus_chan_free(struct vmbus_channel *); static int vmbus_chan_add(struct vmbus_channel *); static void vmbus_chan_cpu_default(struct vmbus_channel *); +static int vmbus_chan_release(struct vmbus_channel *); +static void vmbus_chan_set_chmap(struct vmbus_channel *); +static void vmbus_chan_clear_chmap(struct vmbus_channel *); + +static void vmbus_chan_ins_prilist(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_rem_prilist(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_ins_list(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_rem_list(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_ins_sublist(struct vmbus_channel *, + struct vmbus_channel *); +static void vmbus_chan_rem_sublist(struct vmbus_channel *, + struct vmbus_channel *); static void vmbus_chan_task(void *, int); static void vmbus_chan_task_nobatch(void *, int); -static void vmbus_chan_detach_task(void *, int); +static void vmbus_chan_clrchmap_task(void *, int); +static void vmbus_prichan_attach_task(void *, int); +static void vmbus_subchan_attach_task(void *, int); +static void vmbus_prichan_detach_task(void *, int); +static void vmbus_subchan_detach_task(void *, int); static void vmbus_chan_msgproc_choffer(struct vmbus_softc *, const struct vmbus_message *); @@ -96,6 +116,83 @@ vmbus_chan_signal_tx(const struct vmbus_ hypercall_signal_event(chan->ch_monprm_dma.hv_paddr); } +static void +vmbus_chan_ins_prilist(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_prichan_lock, MA_OWNED); + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONPRIL_SHIFT)) + panic("channel is already on the prilist"); + TAILQ_INSERT_TAIL(&sc->vmbus_prichans, chan, ch_prilink); +} + +static void +vmbus_chan_rem_prilist(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_prichan_lock, MA_OWNED); + if (atomic_testandclear_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONPRIL_SHIFT) == 0) + panic("channel is not on the prilist"); + TAILQ_REMOVE(&sc->vmbus_prichans, chan, ch_prilink); +} + +static void +vmbus_chan_ins_sublist(struct vmbus_channel *prichan, + struct vmbus_channel *chan) +{ + + mtx_assert(&prichan->ch_subchan_lock, MA_OWNED); + + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONSUBL_SHIFT)) + panic("channel is already on the sublist"); + TAILQ_INSERT_TAIL(&prichan->ch_subchans, chan, ch_sublink); + + /* Bump sub-channel count. */ + prichan->ch_subchan_cnt++; +} + +static void +vmbus_chan_rem_sublist(struct vmbus_channel *prichan, + struct vmbus_channel *chan) +{ + + mtx_assert(&prichan->ch_subchan_lock, MA_OWNED); + + KASSERT(prichan->ch_subchan_cnt > 0, + ("invalid subchan_cnt %d", prichan->ch_subchan_cnt)); + prichan->ch_subchan_cnt--; + + if (atomic_testandclear_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONSUBL_SHIFT) == 0) + panic("channel is not on the sublist"); + TAILQ_REMOVE(&prichan->ch_subchans, chan, ch_sublink); +} + +static void +vmbus_chan_ins_list(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_chan_lock, MA_OWNED); + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONLIST_SHIFT)) + panic("channel is already on the list"); + TAILQ_INSERT_TAIL(&sc->vmbus_chans, chan, ch_link); +} + +static void +vmbus_chan_rem_list(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_chan_lock, MA_OWNED); + if (atomic_testandclear_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONLIST_SHIFT) == 0) + panic("channel is not on the list"); + TAILQ_REMOVE(&sc->vmbus_chans, chan, ch_link); +} + static int vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARGS) { @@ -235,6 +332,7 @@ vmbus_chan_open_br(struct vmbus_channel struct vmbus_msghc *mh; uint32_t status; int error, txbr_size, rxbr_size; + task_fn_t *task_fn; uint8_t *br; if (udlen > VMBUS_CHANMSG_CHOPEN_UDATA_SIZE) { @@ -269,9 +367,10 @@ vmbus_chan_open_br(struct vmbus_channel chan->ch_tq = VMBUS_PCPU_GET(chan->ch_vmbus, event_tq, chan->ch_cpuid); if (chan->ch_flags & VMBUS_CHAN_FLAG_BATCHREAD) - TASK_INIT(&chan->ch_task, 0, vmbus_chan_task, chan); + task_fn = vmbus_chan_task; else - TASK_INIT(&chan->ch_task, 0, vmbus_chan_task_nobatch, chan); + task_fn = vmbus_chan_task_nobatch; + TASK_INIT(&chan->ch_task, 0, task_fn, chan); /* TX bufring comes first */ vmbus_txbr_setup(&chan->ch_txbr, br, txbr_size); @@ -293,6 +392,12 @@ vmbus_chan_open_br(struct vmbus_channel } /* + * Install this channel, before it is opened, but after everything + * else has been setup. + */ + vmbus_chan_set_chmap(chan); + + /* * Open channel w/ the bufring GPADL on the target CPU. */ mh = vmbus_msghc_get(sc, sizeof(*req)); @@ -341,6 +446,7 @@ vmbus_chan_open_br(struct vmbus_channel error = ENXIO; failed: + vmbus_chan_clear_chmap(chan); if (chan->ch_bufring_gpadl) { vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); chan->ch_bufring_gpadl = 0; @@ -517,12 +623,38 @@ vmbus_chan_gpadl_disconnect(struct vmbus } static void +vmbus_chan_clrchmap_task(void *xchan, int pending __unused) +{ + struct vmbus_channel *chan = xchan; + + critical_enter(); + chan->ch_vmbus->vmbus_chmap[chan->ch_id] = NULL; + critical_exit(); +} + +static void +vmbus_chan_clear_chmap(struct vmbus_channel *chan) +{ + struct task chmap_task; + + TASK_INIT(&chmap_task, 0, vmbus_chan_clrchmap_task, chan); + taskqueue_enqueue(chan->ch_tq, &chmap_task); + taskqueue_drain(chan->ch_tq, &chmap_task); +} + +static void +vmbus_chan_set_chmap(struct vmbus_channel *chan) +{ + __compiler_membar(); + chan->ch_vmbus->vmbus_chmap[chan->ch_id] = chan; +} + +static void vmbus_chan_close_internal(struct vmbus_channel *chan) { struct vmbus_softc *sc = chan->ch_vmbus; struct vmbus_msghc *mh; struct vmbus_chanmsg_chclose *req; - struct taskqueue *tq = chan->ch_tq; int error; /* TODO: stringent check */ @@ -535,12 +667,14 @@ vmbus_chan_close_internal(struct vmbus_c sysctl_ctx_free(&chan->ch_sysctl_ctx); /* - * Set ch_tq to NULL to avoid more requests be scheduled. - * XXX pretty broken; need rework. + * NOTE: + * Order is critical. This channel _must_ be uninstalled first, + * else the channel task may be enqueued by the IDT after it has + * been drained. */ + vmbus_chan_clear_chmap(chan); + taskqueue_drain(chan->ch_tq, &chan->ch_task); chan->ch_tq = NULL; - taskqueue_drain(tq, &chan->ch_task); - chan->ch_cb = NULL; /* * Close this channel. @@ -884,10 +1018,11 @@ vmbus_event_flags_proc(struct vmbus_soft flags &= ~(1UL << chid_ofs); chan = sc->vmbus_chmap[chid_base + chid_ofs]; - - /* if channel is closed or closing */ - if (chan == NULL || chan->ch_tq == NULL) + if (__predict_false(chan == NULL)) { + /* Channel is closed. */ continue; + } + __compiler_membar(); if (chan->ch_flags & VMBUS_CHAN_FLAG_BATCHREAD) vmbus_rxbr_intr_mask(&chan->ch_rxbr); @@ -968,7 +1103,6 @@ vmbus_chan_alloc(struct vmbus_softc *sc) chan->ch_vmbus = sc; mtx_init(&chan->ch_subchan_lock, "vmbus subchan", NULL, MTX_DEF); TAILQ_INIT(&chan->ch_subchans); - TASK_INIT(&chan->ch_detach_task, 0, vmbus_chan_detach_task, chan); vmbus_rxbr_init(&chan->ch_rxbr); vmbus_txbr_init(&chan->ch_txbr); @@ -978,9 +1112,14 @@ vmbus_chan_alloc(struct vmbus_softc *sc) static void vmbus_chan_free(struct vmbus_channel *chan) { - /* TODO: assert sub-channel list is empty */ - /* TODO: asset no longer on the primary channel's sub-channel list */ - /* TODO: asset no longer on the vmbus channel list */ + + KASSERT(TAILQ_EMPTY(&chan->ch_subchans) && chan->ch_subchan_cnt == 0, + ("still owns sub-channels")); + KASSERT((chan->ch_stflags & + (VMBUS_CHAN_ST_OPENED | + VMBUS_CHAN_ST_ONPRIL | + VMBUS_CHAN_ST_ONSUBL | + VMBUS_CHAN_ST_ONLIST)) == 0, ("free busy channel")); hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); mtx_destroy(&chan->ch_subchan_lock); vmbus_rxbr_deinit(&chan->ch_rxbr); @@ -1007,7 +1146,6 @@ vmbus_chan_add(struct vmbus_channel *new newchan->ch_id); return EINVAL; } - sc->vmbus_chmap[newchan->ch_id] = newchan; if (bootverbose) { device_printf(sc->vmbus_dev, "chan%u subidx%u offer\n", @@ -1029,10 +1167,9 @@ vmbus_chan_add(struct vmbus_channel *new if (VMBUS_CHAN_ISPRIMARY(newchan)) { if (prichan == NULL) { /* Install the new primary channel */ - TAILQ_INSERT_TAIL(&sc->vmbus_prichans, newchan, - ch_prilink); + vmbus_chan_ins_prilist(sc, newchan); mtx_unlock(&sc->vmbus_prichan_lock); - return 0; + goto done; } else { mtx_unlock(&sc->vmbus_prichan_lock); device_printf(sc->vmbus_dev, "duplicated primary " @@ -1066,16 +1203,20 @@ vmbus_chan_add(struct vmbus_channel *new newchan->ch_dev = prichan->ch_dev; mtx_lock(&prichan->ch_subchan_lock); - TAILQ_INSERT_TAIL(&prichan->ch_subchans, newchan, ch_sublink); + vmbus_chan_ins_sublist(prichan, newchan); + mtx_unlock(&prichan->ch_subchan_lock); /* - * Bump up sub-channel count and notify anyone that is - * interested in this sub-channel, after this sub-channel - * is setup. + * Notify anyone that is interested in this sub-channel, + * after this sub-channel is setup. */ - prichan->ch_subchan_cnt++; - mtx_unlock(&prichan->ch_subchan_lock); wakeup(prichan); - +done: + /* + * Hook this channel up for later rescind. + */ + mtx_lock(&sc->vmbus_chan_lock); + vmbus_chan_ins_list(sc, newchan); + mtx_unlock(&sc->vmbus_chan_lock); return 0; } @@ -1126,6 +1267,7 @@ vmbus_chan_msgproc_choffer(struct vmbus_ { const struct vmbus_chanmsg_choffer *offer; struct vmbus_channel *chan; + task_fn_t *detach_fn, *attach_fn; int error; offer = (const struct vmbus_chanmsg_choffer *)msg->msg_data; @@ -1174,6 +1316,21 @@ vmbus_chan_msgproc_choffer(struct vmbus_ &sc->vmbus_tx_evtflags[chan->ch_id >> VMBUS_EVTFLAG_SHIFT]; chan->ch_evtflag_mask = 1UL << (chan->ch_id & VMBUS_EVTFLAG_MASK); + /* + * Setup attach and detach tasks. + */ + if (VMBUS_CHAN_ISPRIMARY(chan)) { + chan->ch_mgmt_tq = sc->vmbus_devtq; + attach_fn = vmbus_prichan_attach_task; + detach_fn = vmbus_prichan_detach_task; + } else { + chan->ch_mgmt_tq = sc->vmbus_subchtq; + attach_fn = vmbus_subchan_attach_task; + detach_fn = vmbus_subchan_detach_task; + } + TASK_INIT(&chan->ch_attach_task, 0, attach_fn, chan); + TASK_INIT(&chan->ch_detach_task, 0, detach_fn, chan); + /* Select default cpu for this channel. */ vmbus_chan_cpu_default(chan); @@ -1184,22 +1341,9 @@ vmbus_chan_msgproc_choffer(struct vmbus_ vmbus_chan_free(chan); return; } - - if (VMBUS_CHAN_ISPRIMARY(chan)) { - /* - * Add device for this primary channel. - * - * NOTE: - * Error is ignored here; don't have much to do if error - * really happens. - */ - vmbus_add_child(chan); - } + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_attach_task); } -/* - * XXX pretty broken; need rework. - */ static void vmbus_chan_msgproc_chrescind(struct vmbus_softc *sc, const struct vmbus_message *msg) @@ -1219,91 +1363,162 @@ vmbus_chan_msgproc_chrescind(struct vmbu note->chm_chanid); } - chan = sc->vmbus_chmap[note->chm_chanid]; - if (chan == NULL) + /* + * Find and remove the target channel from the channel list. + */ + mtx_lock(&sc->vmbus_chan_lock); + TAILQ_FOREACH(chan, &sc->vmbus_chans, ch_link) { + if (chan->ch_id == note->chm_chanid) + break; + } + if (chan == NULL) { + mtx_unlock(&sc->vmbus_chan_lock); + device_printf(sc->vmbus_dev, "chan%u is not offered\n", + note->chm_chanid); return; - sc->vmbus_chmap[note->chm_chanid] = NULL; + } + vmbus_chan_rem_list(sc, chan); + mtx_unlock(&sc->vmbus_chan_lock); + + if (VMBUS_CHAN_ISPRIMARY(chan)) { + /* + * The target channel is a primary channel; remove the + * target channel from the primary channel list now, + * instead of later, so that it will not be found by + * other sub-channel offers, which are processed in + * this thread. + */ + mtx_lock(&sc->vmbus_prichan_lock); + vmbus_chan_rem_prilist(sc, chan); + mtx_unlock(&sc->vmbus_prichan_lock); + } - taskqueue_enqueue(taskqueue_thread, &chan->ch_detach_task); + /* Detach the target channel. */ + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); } -static void -vmbus_chan_detach_task(void *xchan, int pending __unused) +static int +vmbus_chan_release(struct vmbus_channel *chan) { - struct vmbus_channel *chan = xchan; + struct vmbus_softc *sc = chan->ch_vmbus; + struct vmbus_chanmsg_chfree *req; + struct vmbus_msghc *mh; + int error; - if (VMBUS_CHAN_ISPRIMARY(chan)) { - /* Only primary channel owns the device */ - vmbus_delete_child(chan); - /* NOTE: DO NOT free primary channel for now */ + mh = vmbus_msghc_get(sc, sizeof(*req)); + if (mh == NULL) { + device_printf(sc->vmbus_dev, "can not get msg hypercall for " + "chfree(chan%u)\n", chan->ch_id); + return (ENXIO); + } + + req = vmbus_msghc_dataptr(mh); + req->chm_hdr.chm_type = VMBUS_CHANMSG_TYPE_CHFREE; + req->chm_chanid = chan->ch_id; + + error = vmbus_msghc_exec_noresult(mh); + vmbus_msghc_put(sc, mh); + + if (error) { + device_printf(sc->vmbus_dev, "chfree(chan%u) failed: %d", + chan->ch_id, error); } else { - struct vmbus_softc *sc = chan->ch_vmbus; - struct vmbus_channel *pri_chan = chan->ch_prichan; - struct vmbus_chanmsg_chfree *req; - struct vmbus_msghc *mh; - int error; - - mh = vmbus_msghc_get(sc, sizeof(*req)); - if (mh == NULL) { - device_printf(sc->vmbus_dev, - "can not get msg hypercall for chfree(chan%u)\n", + if (bootverbose) { + device_printf(sc->vmbus_dev, "chan%u freed\n", chan->ch_id); - goto remove; } + } + return (error); +} - req = vmbus_msghc_dataptr(mh); - req->chm_hdr.chm_type = VMBUS_CHANMSG_TYPE_CHFREE; - req->chm_chanid = chan->ch_id; +static void +vmbus_prichan_detach_task(void *xchan, int pending __unused) +{ + struct vmbus_channel *chan = xchan; - error = vmbus_msghc_exec_noresult(mh); - vmbus_msghc_put(sc, mh); + KASSERT(VMBUS_CHAN_ISPRIMARY(chan), + ("chan%u is not primary channel", chan->ch_id)); - if (error) { - device_printf(sc->vmbus_dev, - "chfree(chan%u) failed: %d", - chan->ch_id, error); - /* NOTE: Move on! */ - } else { - if (bootverbose) { - device_printf(sc->vmbus_dev, "chan%u freed\n", - chan->ch_id); - } - } -remove: - mtx_lock(&pri_chan->ch_subchan_lock); - TAILQ_REMOVE(&pri_chan->ch_subchans, chan, ch_sublink); - KASSERT(pri_chan->ch_subchan_cnt > 0, - ("invalid subchan_cnt %d", pri_chan->ch_subchan_cnt)); - pri_chan->ch_subchan_cnt--; - mtx_unlock(&pri_chan->ch_subchan_lock); - wakeup(pri_chan); + /* Delete and detach the device associated with this channel. */ + vmbus_delete_child(chan); - vmbus_chan_free(chan); - } + /* Release this channel (back to vmbus). */ + vmbus_chan_release(chan); + + /* Free this channel's resource. */ + vmbus_chan_free(chan); +} + +static void +vmbus_subchan_detach_task(void *xchan, int pending __unused) +{ + struct vmbus_channel *chan = xchan; + struct vmbus_channel *pri_chan = chan->ch_prichan; + + KASSERT(!VMBUS_CHAN_ISPRIMARY(chan), + ("chan%u is primary channel", chan->ch_id)); + + /* Release this channel (back to vmbus). */ + vmbus_chan_release(chan); + + /* Unlink from its primary channel's sub-channel list. */ + mtx_lock(&pri_chan->ch_subchan_lock); + vmbus_chan_rem_sublist(pri_chan, chan); + mtx_unlock(&pri_chan->ch_subchan_lock); + /* Notify anyone that is waiting for this sub-channel to vanish. */ + wakeup(pri_chan); + + /* Free this channel's resource. */ + vmbus_chan_free(chan); +} + +static void +vmbus_prichan_attach_task(void *xchan, int pending __unused) +{ + + /* + * Add device for this primary channel. + */ + vmbus_add_child(xchan); +} + +static void +vmbus_subchan_attach_task(void *xchan __unused, int pending __unused) +{ + + /* Nothing */ } -/* - * Detach all devices and destroy the corresponding primary channels. - */ void vmbus_chan_destroy_all(struct vmbus_softc *sc) { - struct vmbus_channel *chan; - mtx_lock(&sc->vmbus_prichan_lock); - while ((chan = TAILQ_FIRST(&sc->vmbus_prichans)) != NULL) { - KASSERT(VMBUS_CHAN_ISPRIMARY(chan), ("not primary channel")); - TAILQ_REMOVE(&sc->vmbus_prichans, chan, ch_prilink); - mtx_unlock(&sc->vmbus_prichan_lock); + /* + * Detach all devices and destroy the corresponding primary + * channels. + */ + for (;;) { + struct vmbus_channel *chan; - vmbus_delete_child(chan); - vmbus_chan_free(chan); + mtx_lock(&sc->vmbus_chan_lock); + TAILQ_FOREACH(chan, &sc->vmbus_chans, ch_link) { + if (VMBUS_CHAN_ISPRIMARY(chan)) + break; + } + if (chan == NULL) { + /* No more primary channels; done. */ + mtx_unlock(&sc->vmbus_chan_lock); + break; + } + vmbus_chan_rem_list(sc, chan); + mtx_unlock(&sc->vmbus_chan_lock); mtx_lock(&sc->vmbus_prichan_lock); + vmbus_chan_rem_prilist(sc, chan); + mtx_unlock(&sc->vmbus_prichan_lock); + + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); } - bzero(sc->vmbus_chmap, - sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX); - mtx_unlock(&sc->vmbus_prichan_lock); } /* Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Tue Sep 27 06:30:24 2016 (r306360) @@ -124,8 +124,14 @@ struct vmbus_channel { struct hyperv_dma ch_bufring_dma; uint32_t ch_bufring_gpadl; - struct task ch_detach_task; + struct task ch_attach_task; /* run in ch_mgmt_tq */ + struct task ch_detach_task; /* run in ch_mgmt_tq */ + struct taskqueue *ch_mgmt_tq; + + /* If this is a primary channel */ TAILQ_ENTRY(vmbus_channel) ch_prilink; /* primary chan link */ + + TAILQ_ENTRY(vmbus_channel) ch_link; /* channel link */ uint32_t ch_subidx; /* subchan index */ volatile uint32_t ch_stflags; /* atomic-op */ /* VMBUS_CHAN_ST_ */ @@ -150,7 +156,13 @@ struct vmbus_channel { #define VMBUS_CHAN_TXF_HASMNF 0x0001 #define VMBUS_CHAN_ST_OPENED_SHIFT 0 +#define VMBUS_CHAN_ST_ONPRIL_SHIFT 1 +#define VMBUS_CHAN_ST_ONSUBL_SHIFT 2 +#define VMBUS_CHAN_ST_ONLIST_SHIFT 3 #define VMBUS_CHAN_ST_OPENED (1 << VMBUS_CHAN_ST_OPENED_SHIFT) +#define VMBUS_CHAN_ST_ONPRIL (1 << VMBUS_CHAN_ST_ONPRIL_SHIFT) +#define VMBUS_CHAN_ST_ONSUBL (1 << VMBUS_CHAN_ST_ONSUBL_SHIFT) +#define VMBUS_CHAN_ST_ONLIST (1 << VMBUS_CHAN_ST_ONLIST_SHIFT) struct vmbus_softc; struct vmbus_message; Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Tue Sep 27 06:30:24 2016 (r306360) @@ -107,14 +107,19 @@ struct vmbus_softc { struct hyperv_dma vmbus_mnf1_dma; struct hyperv_dma vmbus_mnf2_dma; - struct mtx vmbus_scan_lock; - uint32_t vmbus_scan_chcnt; -#define VMBUS_SCAN_CHCNT_DONE 0x80000000 - uint32_t vmbus_scan_devcnt; + bool vmbus_scandone; + struct task vmbus_scandone_task; + + struct taskqueue *vmbus_devtq; /* for dev attach/detach */ + struct taskqueue *vmbus_subchtq; /* for sub-chan attach/detach */ /* Primary channels */ struct mtx vmbus_prichan_lock; TAILQ_HEAD(, vmbus_channel) vmbus_prichans; + + /* Complete channel list */ + struct mtx vmbus_chan_lock; + TAILQ_HEAD(, vmbus_channel) vmbus_chans; }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ From owner-svn-src-all@freebsd.org Tue Sep 27 08:11: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 8FD39BEAC78; Tue, 27 Sep 2016 08:11:10 +0000 (UTC) (envelope-from kevlo@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 62C7CDED; Tue, 27 Sep 2016 08:11:10 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R8B9Uv099488; Tue, 27 Sep 2016 08:11:09 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R8B9c1099487; Tue, 27 Sep 2016 08:11:09 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609270811.u8R8B9c1099487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 27 Sep 2016 08:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306362 - head/sys/net 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.23 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: Tue, 27 Sep 2016 08:11:10 -0000 Author: kevlo Date: Tue Sep 27 08:11:09 2016 New Revision: 306362 URL: https://svnweb.freebsd.org/changeset/base/306362 Log: Remove a comment about the size of the ifnet structure. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D8036 Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Sep 27 07:29:15 2016 (r306361) +++ head/sys/net/if_var.h Tue Sep 27 08:11:09 2016 (r306362) @@ -178,9 +178,6 @@ struct if_encap_req { /* * Structure defining a network interface. - * - * Size ILP32: 592 (approx) - * LP64: 1048 (approx) */ struct ifnet { /* General book keeping of interface lists. */ From owner-svn-src-all@freebsd.org Tue Sep 27 08:19:39 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 189B6BEAE50; Tue, 27 Sep 2016 08:19:39 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 DA85B1F8; Tue, 27 Sep 2016 08:19:38 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id BAA1812CF; Tue, 27 Sep 2016 08:14:22 +0000 (UTC) Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: Warner Losh , John Baldwin References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste From: Allan Jude Message-ID: <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> Date: Tue, 27 Sep 2016 04:14:19 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 27 Sep 2016 08:19:39 -0000 On 2016-09-27 01:02, Warner Losh wrote: > On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: >> On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >>> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >>>> On 09/03/16 11:26 AM, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Sat Sep 3 15:26:28 2016 >>>>> New Revision: 305353 >>>>> URL: https://svnweb.freebsd.org/changeset/base/305353 >>>>> >>>>> Log: >>>>> Don't use -N to set the OMAGIC with data and text writeable and data >>>>> not page aligned. To do this, use the ld script gnu ld installs on my >>>>> system. >>>>> >>>>> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >>>>> things. The loader script could be better named and take into account >>>>> other architectures. And having two different mechanisms to do >>>>> basically the same thing needs study. However, it's blocking forward >>>>> progress on lld, so I'll work in parallel to sort these out. >>>>> >>>>> Differential Revision: https://reviews.freebsd.org/D7409 >>>>> Reviewed by: emaste >>>>> >>>> >>>> This breaks booting on my Lenovo laptop. The BTX client crashes and >>>> dumps the registers. >>>> >>>> Reverting this commit solved it. >>>> >>>> Is there something I can do to help investigate this? >>> >>> I assume you bisected all boot loader changes and it fails across this >>> commit? If not, that's the first step. >>> >>> If so, perhaps the place to start is with the dump? >> >> The dump is a good place to start, but it would also be useful to know >> >> 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning >> it it is probably btxldr.S dying trying to parse a.out header from >> /boot/loader vs are you dying before that point meaning it is in boot1.S >> or gptldr.S)? > > Yes. This is absolutely critical. Until we know what dies, what the > trace backs are, what options were in effect and how the binaries were > broken there's little more that I can do because it works for me > everywhere I've tried it. > >> 2) Once we know which stage, it would be good to compare the a.out headers >> and possibly the contents of the relevant binaries. The aforementioned >> .S files all parse the a.out header in assembly as well as the BTX >> header (they assume that BTX itself is present in the bits loaded from >> disk immediately followed by the binary header). That code isn't very >> flexible and it doesn't seem far fetched for this change to break it. > > I just wonder why it works on the amd64 servers and laptops, the i386 > laptops and in qemu for me, but fails for the OP. If it broke a.out, > I contend it would break for everybody since a.out headers are 'hit > dinosaur over the head' level of complexity and subtly. While I don't > doubt there's a problem, I suspect it is very specific to a particular > set of laptops that were on the edge before and this kicks us over the > edge just enough to stomp on some area that was protected before. > > Warner > It works fine for me with a regular boot, but when booting a GELI encrypted disk, is dies. It is in boot2, before it reads the loader. Specifically, it seems to be at the call to: enc_xform_aes_xts.reinit [opencrypto aes_xts_reinit()] Now that I am back home, I'll try to narrow it down further, and look at the difference between gptzfsboot compiled with and without the different LD flags. It works perfectly fine with the makefile changes reverted. -- Allan Jude From owner-svn-src-all@freebsd.org Tue Sep 27 08:47: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 372FFBE98D0; Tue, 27 Sep 2016 08:47:04 +0000 (UTC) (envelope-from kevlo@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 049D014D; Tue, 27 Sep 2016 08:47:03 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R8l3TJ012205; Tue, 27 Sep 2016 08:47:03 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R8l3vd012204; Tue, 27 Sep 2016 08:47:03 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609270847.u8R8l3vd012204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 27 Sep 2016 08:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306363 - head/share/man/man9 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.23 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: Tue, 27 Sep 2016 08:47:04 -0000 Author: kevlo Date: Tue Sep 27 08:47:02 2016 New Revision: 306363 URL: https://svnweb.freebsd.org/changeset/base/306363 Log: - Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the interface address list - Update IFF_RENAMING macro descriptions Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Sep 27 08:11:09 2016 (r306362) +++ head/share/man/man9/ifnet.9 Tue Sep 27 08:47:02 2016 (r306363) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 11, 2016 +.Dd September 27, 2016 .Dt IFNET 9 .Os .Sh NAME @@ -642,7 +642,7 @@ structure of this interface is being rel .Va if_refcount references. .It Dv IFF_RENAMING -.Aq D* +.Aq D Set when this interface is being renamed. .El .Ss "Interface Capabilities Flags" @@ -1014,7 +1014,7 @@ Every interface is associated with a lis (or, rather, a .Li TAILQ ) of addresses, rooted at the interface structure's -.Va if_addrlist +.Va if_addrhead member. The first element in this list is always an .Dv AF_LINK From owner-svn-src-all@freebsd.org Tue Sep 27 09:44:31 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 BE27CBEBCF3; Tue, 27 Sep 2016 09:44:31 +0000 (UTC) (envelope-from br@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 8E9A26A0; Tue, 27 Sep 2016 09:44:31 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R9iUAU035008; Tue, 27 Sep 2016 09:44:30 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R9iUqi035006; Tue, 27 Sep 2016 09:44:30 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609270944.u8R9iUqi035006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 27 Sep 2016 09:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306364 - in head: lib/libc/tests share/mk 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.23 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: Tue, 27 Sep 2016 09:44:31 -0000 Author: br Date: Tue Sep 27 09:44:30 2016 New Revision: 306364 URL: https://svnweb.freebsd.org/changeset/base/306364 Log: Mark SSP broken on MIPS. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/lib/libc/tests/Makefile head/share/mk/src.opts.mk Modified: head/lib/libc/tests/Makefile ============================================================================== --- head/lib/libc/tests/Makefile Tue Sep 27 08:47:02 2016 (r306363) +++ head/lib/libc/tests/Makefile Tue Sep 27 09:44:30 2016 (r306364) @@ -30,8 +30,7 @@ SUBDIR_DEPEND_tls= tls_dso TESTS_SUBDIRS+= locale .endif -.if ${MK_SSP} != "no" && \ - ${MACHINE_CPUARCH} != "mips" +.if ${MK_SSP} != "no" TESTS_SUBDIRS+= ssp .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Sep 27 08:47:02 2016 (r306363) +++ head/share/mk/src.opts.mk Tue Sep 27 09:44:30 2016 (r306364) @@ -260,6 +260,9 @@ BROKEN_OPTIONS+=LLDB .if ${__T} != "armv6" BROKEN_OPTIONS+=LIBSOFT .endif +.if ${__T} == "mips" || ${__T} == "mips64" +BROKEN_OPTIONS+=SSP +.endif .include From owner-svn-src-all@freebsd.org Tue Sep 27 10:26:41 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 37365BEBBBF; Tue, 27 Sep 2016 10:26:41 +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 0D8EBAEA; Tue, 27 Sep 2016 10:26:40 +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 u8RAQeIx049704; Tue, 27 Sep 2016 10:26:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RAQd55049701; Tue, 27 Sep 2016 10:26:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609271026.u8RAQd55049701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Sep 2016 10:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306365 - in stable/11/sys/amd64: amd64 include X-SVN-Group: stable-11 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.23 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: Tue, 27 Sep 2016 10:26:41 -0000 Author: kib Date: Tue Sep 27 10:26:39 2016 New Revision: 306365 URL: https://svnweb.freebsd.org/changeset/base/306365 Log: MFC r306020: Move pmap_p*e_index() inline functions from pmap.c to pmap.h. Modified: stable/11/sys/amd64/amd64/minidump_machdep.c stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/include/pmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/minidump_machdep.c Tue Sep 27 09:44:30 2016 (r306364) +++ stable/11/sys/amd64/amd64/minidump_machdep.c Tue Sep 27 10:26:39 2016 (r306365) @@ -239,10 +239,10 @@ minidumpsys(struct dumperinfo *di) * page written corresponds to 1GB of space */ pmapsize += PAGE_SIZE; - ii = (va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1); + ii = pmap_pml4e_index(va); pml4 = (uint64_t *)PHYS_TO_DMAP(KPML4phys) + ii; pdp = (uint64_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); - i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); + i = pmap_pdpe_index(va); if ((pdp[i] & PG_V) == 0) { va += NBPDP; continue; @@ -264,7 +264,7 @@ minidumpsys(struct dumperinfo *di) pd = (uint64_t *)PHYS_TO_DMAP(pdp[i] & PG_FRAME); for (n = 0; n < NPDEPG; n++, va += NBPDR) { - j = (va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1); + j = pmap_pde_index(va); if ((pd[j] & PG_V) == 0) continue; @@ -368,10 +368,10 @@ minidumpsys(struct dumperinfo *di) bzero(fakepd, sizeof(fakepd)); for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + nkpt * NBPDR, kernel_vm_end); va += NBPDP) { - ii = (va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1); + ii = pmap_pml4e_index(va); pml4 = (uint64_t *)PHYS_TO_DMAP(KPML4phys) + ii; pdp = (uint64_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); - i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); + i = pmap_pdpe_index(va); /* We always write a page, even if it is zero */ if ((pdp[i] & PG_V) == 0) { Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Tue Sep 27 09:44:30 2016 (r306364) +++ stable/11/sys/amd64/amd64/pmap.c Tue Sep 27 10:26:39 2016 (r306365) @@ -673,35 +673,6 @@ pmap_pde_pindex(vm_offset_t va) } -/* Return various clipped indexes for a given VA */ -static __inline vm_pindex_t -pmap_pte_index(vm_offset_t va) -{ - - return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1)); -} - -static __inline vm_pindex_t -pmap_pde_index(vm_offset_t va) -{ - - return ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1)); -} - -static __inline vm_pindex_t -pmap_pdpe_index(vm_offset_t va) -{ - - return ((va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1)); -} - -static __inline vm_pindex_t -pmap_pml4e_index(vm_offset_t va) -{ - - return ((va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1)); -} - /* Return a pointer to the PML4 slot that corresponds to a VA */ static __inline pml4_entry_t * pmap_pml4e(pmap_t pmap, vm_offset_t va) Modified: stable/11/sys/amd64/include/pmap.h ============================================================================== --- stable/11/sys/amd64/include/pmap.h Tue Sep 27 09:44:30 2016 (r306364) +++ stable/11/sys/amd64/include/pmap.h Tue Sep 27 10:26:39 2016 (r306365) @@ -416,6 +416,35 @@ boolean_t pmap_map_io_transient(vm_page_ void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); #endif /* _KERNEL */ +/* Return various clipped indexes for a given VA */ +static __inline vm_pindex_t +pmap_pte_index(vm_offset_t va) +{ + + return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1)); +} + +static __inline vm_pindex_t +pmap_pde_index(vm_offset_t va) +{ + + return ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1)); +} + +static __inline vm_pindex_t +pmap_pdpe_index(vm_offset_t va) +{ + + return ((va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1)); +} + +static __inline vm_pindex_t +pmap_pml4e_index(vm_offset_t va) +{ + + return ((va >> PML4SHIFT) & ((1ul << NPML4EPGSHIFT) - 1)); +} + #endif /* !LOCORE */ #endif /* !_MACHINE_PMAP_H_ */ From owner-svn-src-all@freebsd.org Tue Sep 27 11:31: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 35CBEBEBBC3; Tue, 27 Sep 2016 11:31:55 +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 E492F8F4; Tue, 27 Sep 2016 11:31:54 +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 u8RBVsLQ074762; Tue, 27 Sep 2016 11:31:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RBVsTH074760; Tue, 27 Sep 2016 11:31:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609271131.u8RBVsTH074760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Sep 2016 11:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306366 - head/lib/libc/sys 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.23 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: Tue, 27 Sep 2016 11:31:55 -0000 Author: kib Date: Tue Sep 27 11:31:53 2016 New Revision: 306366 URL: https://svnweb.freebsd.org/changeset/base/306366 Log: Editing fixes for r306257, documentation for trapcap. Suggested by: wblock Discussed with: jilles Reviewed by: cem (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8023 Modified: head/lib/libc/sys/cap_enter.2 head/lib/libc/sys/procctl.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Tue Sep 27 10:26:39 2016 (r306365) +++ head/lib/libc/sys/cap_enter.2 Tue Sep 27 11:31:53 2016 (r306366) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2016 +.Dd September 27, 2016 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -72,15 +72,15 @@ sandbox. .Sh RUN-TIME SETTINGS If the .Dv kern.trap_enocap -sysctl MIB is set to non-zero value, then for any process executing in a +sysctl MIB is set to a non-zero value, then for any process executing in a capability mode sandbox, any syscall which results in either .Er ENOTCAPABLE or .Er ECAPMODE -error, also generates the synchronous +error also generates the synchronous .Dv SIGTRAP signal to the thread on the syscall return. -On the signal delivery, the +On signal delivery, the .Va si_errno member of the .Fa siginfo Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Tue Sep 27 10:26:39 2016 (r306365) +++ head/lib/libc/sys/procctl.2 Tue Sep 27 11:31:53 2016 (r306366) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2016 +.Dd September 27, 2016 .Dt PROCCTL 2 .Os .Sh NAME @@ -328,14 +328,17 @@ If a debugger is attached, .Fa data is set to the pid of the debugger process. .It Dv PROC_TRAPCAP_CTL -Enable or disable, for the specified processes which are executing in a -capability mode sandbox, the synchronous -.Dv SIGTRAP -signal on return from any syscall which gives either +Controls the capability mode sandbox actions for the specified +sandboxed processes, +on a return from any syscall which gives either a .Er ENOTCAPABLE or .Er ECAPMODE error. +If the control is enabled, such errors from the syscalls cause +delivery of the synchronous +.Dv SIGTRAP +signal to the thread immediately before returning from the syscalls. .Pp Possible values for the .Fa data @@ -353,7 +356,8 @@ calls. Disable the signal delivery on capability mode access violations. Note that the global sysctl .Dv kern.trap_enocap -might still cause the signal to be delivered; see +might still cause the signal to be delivered. +See .Xr capsicum 4 . .El .Pp @@ -371,7 +375,7 @@ See .Xr capsicum 4 for more information about the capability mode. .It Dv PROC_TRAPCAP_STATUS -Returns the current status of signalling capability mode access +Return the current status of signalling capability mode access violations for the specified process. The integer value pointed to by the .Fa data From owner-svn-src-all@freebsd.org Tue Sep 27 11:56: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 D1B54BEB4AC; Tue, 27 Sep 2016 11:56:36 +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 6C44169A; Tue, 27 Sep 2016 11:56:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8RBuUUi070737 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 27 Sep 2016 14:56:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8RBuUUi070737 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8RBuTkg070736; Tue, 27 Sep 2016 14:56:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Sep 2016 14:56:29 +0300 From: Konstantin Belousov To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306350 - head/sys/amd64/amd64 Message-ID: <20160927115629.GI38409@kib.kiev.ua> References: <201609261722.u8QHMi7g065274@repo.freebsd.org> <20160926212828.GC6177@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160926212828.GC6177@zxy.spb.ru> User-Agent: Mutt/1.6.1 (2016-04-27) 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.23 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: Tue, 27 Sep 2016 11:56:36 -0000 On Tue, Sep 27, 2016 at 12:28:28AM +0300, Slawa Olhovchenkov wrote: > On Mon, Sep 26, 2016 at 05:22:44PM +0000, Konstantin Belousov wrote: > > > Author: kib > > Date: Mon Sep 26 17:22:44 2016 > > New Revision: 306350 > > URL: https://svnweb.freebsd.org/changeset/base/306350 > > > > Log: > > For machines which support PCID but not have INVPCID instruction, > > i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() > > and invltlb_pcid_handler(). > > > > Reported by and tested by: Slawa Olhovchenkov > > MFC after: 1 week > > Thanks! > Planed commit to releng? Or SA? A notice on the errata page is planned. From owner-svn-src-all@freebsd.org Tue Sep 27 12:03:34 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 0D1FCBEBFAE; Tue, 27 Sep 2016 12:03:34 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 C378EE84; Tue, 27 Sep 2016 12:03:33 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bor6g-000KUU-So; Tue, 27 Sep 2016 15:03:30 +0300 Date: Tue, 27 Sep 2016 15:03:30 +0300 From: Slawa Olhovchenkov To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306350 - head/sys/amd64/amd64 Message-ID: <20160927120330.GB54003@zxy.spb.ru> References: <201609261722.u8QHMi7g065274@repo.freebsd.org> <20160926212828.GC6177@zxy.spb.ru> <20160927115629.GI38409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160927115629.GI38409@kib.kiev.ua> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 27 Sep 2016 12:03:34 -0000 On Tue, Sep 27, 2016 at 02:56:29PM +0300, Konstantin Belousov wrote: > On Tue, Sep 27, 2016 at 12:28:28AM +0300, Slawa Olhovchenkov wrote: > > On Mon, Sep 26, 2016 at 05:22:44PM +0000, Konstantin Belousov wrote: > > > > > Author: kib > > > Date: Mon Sep 26 17:22:44 2016 > > > New Revision: 306350 > > > URL: https://svnweb.freebsd.org/changeset/base/306350 > > > > > > Log: > > > For machines which support PCID but not have INVPCID instruction, > > > i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() > > > and invltlb_pcid_handler(). > > > > > > Reported by and tested by: Slawa Olhovchenkov > > > MFC after: 1 week > > > > Thanks! > > Planed commit to releng? Or SA? > > A notice on the errata page is planned. EN, not SA? I think this is exploitable. From owner-svn-src-all@freebsd.org Tue Sep 27 13:46: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 99D2FBEBCD3; Tue, 27 Sep 2016 13:46:01 +0000 (UTC) (envelope-from br@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 652711C7; Tue, 27 Sep 2016 13:46:01 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RDk0Sp024650; Tue, 27 Sep 2016 13:46:00 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RDk0nQ024649; Tue, 27 Sep 2016 13:46:00 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609271346.u8RDk0nQ024649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 27 Sep 2016 13:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306367 - head/contrib/netbsd-tests/lib/libc/sys 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.23 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: Tue, 27 Sep 2016 13:46:01 -0000 Author: br Date: Tue Sep 27 13:46:00 2016 New Revision: 306367 URL: https://svnweb.freebsd.org/changeset/base/306367 Log: Allow up to 6 arguments only on MIPS. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Tue Sep 27 11:31:53 2016 (r306366) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Tue Sep 27 13:46:00 2016 (r306367) @@ -55,6 +55,8 @@ run(int n, ...) for (i = 0; i < 5; i++) { #elif defined(__FreeBSD__) && defined(__aarch64__) for (i = 0; i < 7; i++) { +#elif defined(__FreeBSD__) && defined(__mips__) + for (i = 0; i < 5; i++) { #else for (i = 0; i < 9; i++) { #endif @@ -122,6 +124,10 @@ ATF_TC_BODY(setcontext_link, tc) /* FreeBSD/arm64 only permits up to 8 arguments. */ makecontext(&uc[i], (void *)run, 8, i, 0, 1, 2, 3, 4, 5, 6); +#elif defined(__FreeBSD__) && defined(__mips__) + /* FreeBSD/mips only permits up to 6 arguments. */ + makecontext(&uc[i], (void *)run, 6, i, + 0, 1, 2, 3, 4); #else makecontext(&uc[i], (void *)run, 10, i, 0, 1, 2, 3, 4, 5, 6, 7, 8); From owner-svn-src-all@freebsd.org Tue Sep 27 16:06: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 5F40EBEC7B1; Tue, 27 Sep 2016 16:06:02 +0000 (UTC) (envelope-from loos@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 2E0C33EC; Tue, 27 Sep 2016 16:06:02 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RG61gj076748; Tue, 27 Sep 2016 16:06:01 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RG61iP076747; Tue, 27 Sep 2016 16:06:01 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609271606.u8RG61iP076747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 27 Sep 2016 16:06:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306368 - stable/11/sys/arm/ti/am335x X-SVN-Group: stable-11 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.23 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: Tue, 27 Sep 2016 16:06:02 -0000 Author: loos Date: Tue Sep 27 16:06:01 2016 New Revision: 306368 URL: https://svnweb.freebsd.org/changeset/base/306368 Log: MFC r306050: If present, honor the USB port mode (host or peripheral) set on DTS, if not, keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host. This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/arm/ti/am335x/am335x_musb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/ti/am335x/am335x_musb.c ============================================================================== --- stable/11/sys/arm/ti/am335x/am335x_musb.c Tue Sep 27 13:46:00 2016 (r306367) +++ stable/11/sys/arm/ti/am335x/am335x_musb.c Tue Sep 27 16:06:01 2016 (r306368) @@ -237,6 +237,7 @@ static int musbotg_attach(device_t dev) { struct musbotg_super_softc *sc = device_get_softc(dev); + char mode[16]; int err; uint32_t reg; @@ -308,10 +309,19 @@ musbotg_attach(device_t dev) } sc->sc_otg.sc_platform_data = sc; - if (sc->sc_otg.sc_id == 0) - sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE; - else - sc->sc_otg.sc_mode = MUSB2_HOST_MODE; + if (OF_getprop(ofw_bus_get_node(dev), "dr_mode", mode, + sizeof(mode)) > 0) { + if (strcasecmp(mode, "host") == 0) + sc->sc_otg.sc_mode = MUSB2_HOST_MODE; + else + sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE; + } else { + /* Beaglebone defaults: USB0 device, USB1 HOST. */ + if (sc->sc_otg.sc_id == 0) + sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE; + else + sc->sc_otg.sc_mode = MUSB2_HOST_MODE; + } /* * software-controlled function From owner-svn-src-all@freebsd.org Tue Sep 27 17:25:07 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 A2B35BEC98E; Tue, 27 Sep 2016 17:25:07 +0000 (UTC) (envelope-from loos@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 6F97CFCA; Tue, 27 Sep 2016 17:25:07 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RHP6PB008256; Tue, 27 Sep 2016 17:25:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RHP67X008254; Tue, 27 Sep 2016 17:25:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609271725.u8RHP67X008254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 27 Sep 2016 17:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306369 - in stable/11/sys/dev/usb: . serial X-SVN-Group: stable-11 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.23 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: Tue, 27 Sep 2016 17:25:07 -0000 Author: loos Date: Tue Sep 27 17:25:06 2016 New Revision: 306369 URL: https://svnweb.freebsd.org/changeset/base/306369 Log: MFC r306205: Add the ID for the Huawei ME909S LTE modem. Submitted by: svenauhagen at github Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/usb/serial/u3g.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/11/sys/dev/usb/serial/u3g.c Tue Sep 27 16:06:01 2016 (r306368) +++ stable/11/sys/dev/usb/serial/u3g.c Tue Sep 27 17:25:06 2016 (r306369) @@ -312,6 +312,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2), + U3G_DEV(HUAWEI, ME909S, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Tue Sep 27 16:06:01 2016 (r306368) +++ stable/11/sys/dev/usb/usbdevs Tue Sep 27 17:25:06 2016 (r306369) @@ -2420,6 +2420,7 @@ product HUAWEI E3272_INIT 0x155b LTE mod product HUAWEI ME909U 0x1573 LTE modem product HUAWEI R215_INIT 0x1582 LTE modem initial product HUAWEI R215 0x1588 LTE modem +product HUAWEI ME909S 0x15c1 LTE modem product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial From owner-svn-src-all@freebsd.org Tue Sep 27 17:27: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 947F8BECA18; Tue, 27 Sep 2016 17:27:08 +0000 (UTC) (envelope-from loos@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 636091CD; Tue, 27 Sep 2016 17:27:08 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RHR7r6008381; Tue, 27 Sep 2016 17:27:07 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RHR74E008379; Tue, 27 Sep 2016 17:27:07 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609271727.u8RHR74E008379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 27 Sep 2016 17:27: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: r306370 - in stable/10/sys/dev/usb: . serial 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.23 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: Tue, 27 Sep 2016 17:27:08 -0000 Author: loos Date: Tue Sep 27 17:27:07 2016 New Revision: 306370 URL: https://svnweb.freebsd.org/changeset/base/306370 Log: MFC r306205: Add the ID for the Huawei ME909S LTE modem. Submitted by: svenauhagen at github Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Tue Sep 27 17:25:06 2016 (r306369) +++ stable/10/sys/dev/usb/serial/u3g.c Tue Sep 27 17:27:07 2016 (r306370) @@ -317,6 +317,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2), + U3G_DEV(HUAWEI, ME909S, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Sep 27 17:25:06 2016 (r306369) +++ stable/10/sys/dev/usb/usbdevs Tue Sep 27 17:27:07 2016 (r306370) @@ -2417,6 +2417,7 @@ product HUAWEI E3272_INIT 0x155b LTE mod product HUAWEI ME909U 0x1573 LTE modem product HUAWEI R215_INIT 0x1582 LTE modem initial product HUAWEI R215 0x1588 LTE modem +product HUAWEI ME909S 0x15c1 LTE modem product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial From owner-svn-src-all@freebsd.org Tue Sep 27 17:36: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 8C96FBECD1D for ; Tue, 27 Sep 2016 17:36:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (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 5051AA8D for ; Tue, 27 Sep 2016 17:36:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id e66so23258976iod.1 for ; Tue, 27 Sep 2016 10:36:37 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=zMrCJenGpAJ9hj3qmslEZ+DAvX9E4lUvTWwl+8k0NRA=; b=YpMy43ZGvfr8/5FCCtumOY3rqH2wxE+XiAebOSzH6f5xmjTAUHfhpBOAhjWpOhRllG bRN7Pc7Vub2DoEerx0iJmkHU+ypPsamzU60WVxG/vRjiJHMGGNB1CRjww0/zsmlCMpby BwAA2R2esqx31TzmSiozqpIPS5s55su6EH+4EW2kb/WvVYdaBpE1ejrmrsymcXNuyJ7P a8YAnYfb10KPZN1u/+Nv/ufGWvygGuSyJTbeoLP0tE3lWEgpHtVFoE1nYaESAbbHYDyX 6hlRPx/0zkMgMYe2A/loIrrTA0jsevW2JrK6u4c4dLsuQzfPbmbYy1FeDwG5sxJ6Pksq MsXg== 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:from :date:message-id:subject:to:cc; bh=zMrCJenGpAJ9hj3qmslEZ+DAvX9E4lUvTWwl+8k0NRA=; b=Yn6BZs+kBh5T5krYPvIdVzdTVxE4mrIE53ofnIcVhU2vRMatTNkPuWikAzJicFgs2W +BqpMvZkN2AWBNVhRRAswe2wZ+gBvHzrD4XydD2LEIxWKvK1TvnztT9zl602iqEuU++W VzIURhZ9mOdCKf2itfS9mCk7rWwEkg3AtQgpzPzRazvEOjG/dTprJKhNqgdvgczXXxbp rXYAe+GcqqaNixpSvFgTFA8Whhq1Lwm26drwkUb0p+VV86kaIDVQsHvaMa967jVDjhe3 qbjXL4e+QnoiFrch1ejdRivdP7XvFY6a/B5vjhvtMRPP0E6KI1TcxukaEI9AdQ3WJcKh h8sg== X-Gm-Message-State: AE9vXwM3cxNGyEMMF7vbWivHePyO886F8b60JEj+DjsdxXr9JRxb2GiBoCuD1xFZ7IV6uUq5FGpKJO6SD7BAXQ== X-Received: by 10.107.161.210 with SMTP id k201mr35211433ioe.65.1474997795478; Tue, 27 Sep 2016 10:36:35 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 27 Sep 2016 10:36:34 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> From: Warner Losh Date: Tue, 27 Sep 2016 11:36:34 -0600 X-Google-Sender-Auth: Py2ewdNq8wk86rkbtdCS_6pT3PY Message-ID: Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: Allan Jude Cc: John Baldwin , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 27 Sep 2016 17:36:37 -0000 On Tue, Sep 27, 2016 at 2:14 AM, Allan Jude wrote: > On 2016-09-27 01:02, Warner Losh wrote: >> On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: >>> On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >>>> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >>>>> On 09/03/16 11:26 AM, Warner Losh wrote: >>>>>> Author: imp >>>>>> Date: Sat Sep 3 15:26:28 2016 >>>>>> New Revision: 305353 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/305353 >>>>>> >>>>>> Log: >>>>>> Don't use -N to set the OMAGIC with data and text writeable and data >>>>>> not page aligned. To do this, use the ld script gnu ld installs on my >>>>>> system. >>>>>> >>>>>> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >>>>>> things. The loader script could be better named and take into account >>>>>> other architectures. And having two different mechanisms to do >>>>>> basically the same thing needs study. However, it's blocking forward >>>>>> progress on lld, so I'll work in parallel to sort these out. >>>>>> >>>>>> Differential Revision: https://reviews.freebsd.org/D7409 >>>>>> Reviewed by: emaste >>>>>> >>>>> >>>>> This breaks booting on my Lenovo laptop. The BTX client crashes and >>>>> dumps the registers. >>>>> >>>>> Reverting this commit solved it. >>>>> >>>>> Is there something I can do to help investigate this? >>>> >>>> I assume you bisected all boot loader changes and it fails across this >>>> commit? If not, that's the first step. >>>> >>>> If so, perhaps the place to start is with the dump? >>> >>> The dump is a good place to start, but it would also be useful to know >>> >>> 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning >>> it it is probably btxldr.S dying trying to parse a.out header from >>> /boot/loader vs are you dying before that point meaning it is in boot1.S >>> or gptldr.S)? >> >> Yes. This is absolutely critical. Until we know what dies, what the >> trace backs are, what options were in effect and how the binaries were >> broken there's little more that I can do because it works for me >> everywhere I've tried it. >> >>> 2) Once we know which stage, it would be good to compare the a.out headers >>> and possibly the contents of the relevant binaries. The aforementioned >>> .S files all parse the a.out header in assembly as well as the BTX >>> header (they assume that BTX itself is present in the bits loaded from >>> disk immediately followed by the binary header). That code isn't very >>> flexible and it doesn't seem far fetched for this change to break it. >> >> I just wonder why it works on the amd64 servers and laptops, the i386 >> laptops and in qemu for me, but fails for the OP. If it broke a.out, >> I contend it would break for everybody since a.out headers are 'hit >> dinosaur over the head' level of complexity and subtly. While I don't >> doubt there's a problem, I suspect it is very specific to a particular >> set of laptops that were on the edge before and this kicks us over the >> edge just enough to stomp on some area that was protected before. >> >> Warner >> > > It works fine for me with a regular boot, but when booting a GELI > encrypted disk, is dies. > > It is in boot2, before it reads the loader. > > Specifically, it seems to be at the call to: enc_xform_aes_xts.reinit > [opencrypto aes_xts_reinit()] > > Now that I am back home, I'll try to narrow it down further, and look at > the difference between gptzfsboot compiled with and without the > different LD flags. > > It works perfectly fine with the makefile changes reverted. OK. Thanks Allan. Since I didn't test gel-booting, I can believe it failed there. Please let me know if you need more help or followup. Warner From owner-svn-src-all@freebsd.org Tue Sep 27 17:37: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 03502BECD84; Tue, 27 Sep 2016 17:37:25 +0000 (UTC) (envelope-from araujo@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 C8A65C1B; Tue, 27 Sep 2016 17:37:24 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RHbOBp012067; Tue, 27 Sep 2016 17:37:24 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RHbOdX012066; Tue, 27 Sep 2016 17:37:24 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201609271737.u8RHbOdX012066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 27 Sep 2016 17:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306371 - head/sbin/ifconfig 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.23 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: Tue, 27 Sep 2016 17:37:25 -0000 Author: araujo Date: Tue Sep 27 17:37:23 2016 New Revision: 306371 URL: https://svnweb.freebsd.org/changeset/base/306371 Log: Indicate that this is a locally administered MAC address. Submitted by: lidl Differential Revision: https://reviews.freebsd.org/D7903 Modified: head/sbin/ifconfig/af_link.c Modified: head/sbin/ifconfig/af_link.c ============================================================================== --- head/sbin/ifconfig/af_link.c Tue Sep 27 17:27:07 2016 (r306370) +++ head/sbin/ifconfig/af_link.c Tue Sep 27 17:37:23 2016 (r306371) @@ -96,8 +96,9 @@ link_getaddr(const char *addr, int which sdl.sdl_nlen = 0; sdl.sdl_family = AF_LINK; arc4random_buf(&sdl.sdl_data, ETHER_ADDR_LEN); - /* Non-multicast and claim it is a hardware address */ + /* Non-multicast and claim it is locally administered. */ sdl.sdl_data[0] &= 0xfc; + sdl.sdl_data[0] |= 0x02; } else { if ((temp = malloc(strlen(addr) + 2)) == NULL) errx(1, "malloc failed"); From owner-svn-src-all@freebsd.org Tue Sep 27 18:05: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 B83F1BEC32D; Tue, 27 Sep 2016 18:05:25 +0000 (UTC) (envelope-from markj@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 79D84CA3; Tue, 27 Sep 2016 18:05:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RI5OnW023833; Tue, 27 Sep 2016 18:05:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RI5OqR023831; Tue, 27 Sep 2016 18:05:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609271805.u8RI5OqR023831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 27 Sep 2016 18:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306372 - stable/11/contrib/elftoolchain/libdwarf X-SVN-Group: stable-11 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.23 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: Tue, 27 Sep 2016 18:05:25 -0000 Author: markj Date: Tue Sep 27 18:05:24 2016 New Revision: 306372 URL: https://svnweb.freebsd.org/changeset/base/306372 Log: MFC r306008: libdwarf: Add definitions for Apple's DWARF extension attributes. Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf.h Tue Sep 27 17:37:23 2016 (r306371) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf.h Tue Sep 27 18:05:24 2016 (r306372) @@ -234,6 +234,21 @@ #define DW_AT_GNU_all_call_sites 0x2117 #define DW_AT_GNU_all_source_call_sites 0x2118 +/* Apple extensions. */ +#define DW_AT_APPLE_optimized 0x3fe1 +#define DW_AT_APPLE_flags 0x3fe2 +#define DW_AT_APPLE_isa 0x3fe3 +#define DW_AT_APPLE_block 0x3fe4 +#define DW_AT_APPLE_major_runtime_vers 0x3fe5 +#define DW_AT_APPLE_runtime_class 0x3fe6 +#define DW_AT_APPLE_omit_frame_ptr 0x3fe7 +#define DW_AT_APPLE_property_name 0x3fe8 +#define DW_AT_APPLE_property_getter 0x3fe9 +#define DW_AT_APPLE_property_setter 0x3fea +#define DW_AT_APPLE_property_attribute 0x3feb +#define DW_AT_APPLE_objc_complete_type 0x3fec +#define DW_AT_APPLE_property 0x3fed + #define DW_FORM_addr 0x01 #define DW_FORM_block2 0x03 #define DW_FORM_block4 0x04 Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Tue Sep 27 17:37:23 2016 (r306371) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Tue Sep 27 18:05:24 2016 (r306372) @@ -298,6 +298,32 @@ dwarf_get_AT_name(unsigned attr, const c *s = "DW_AT_GNU_all_call_sites"; break; case DW_AT_GNU_all_source_call_sites: *s = "DW_AT_GNU_all_source_call_sites"; break; + case DW_AT_APPLE_optimized: + *s = "DW_AT_APPLE_optimized"; break; + case DW_AT_APPLE_flags: + *s = "DW_AT_APPLE_flags"; break; + case DW_AT_APPLE_isa: + *s = "DW_AT_APPLE_isa"; break; + case DW_AT_APPLE_block: + *s = "DW_AT_APPLE_block"; break; + case DW_AT_APPLE_major_runtime_vers: + *s = "DW_AT_APPLE_major_runtime_vers"; break; + case DW_AT_APPLE_runtime_class: + *s = "DW_AT_APPLE_runtime_class"; break; + case DW_AT_APPLE_omit_frame_ptr: + *s = "DW_AT_APPLE_omit_frame_ptr"; break; + case DW_AT_APPLE_property_name: + *s = "DW_AT_APPLE_property_name"; break; + case DW_AT_APPLE_property_getter: + *s = "DW_AT_APPLE_property_getter"; break; + case DW_AT_APPLE_property_setter: + *s = "DW_AT_APPLE_property_setter"; break; + case DW_AT_APPLE_property_attribute: + *s = "DW_AT_APPLE_property_attribute"; break; + case DW_AT_APPLE_objc_complete_type: + *s = "DW_AT_APPLE_objc_complete_type"; break; + case DW_AT_APPLE_property: + *s = "DW_AT_APPLE_property"; break; default: return (DW_DLV_NO_ENTRY); } From owner-svn-src-all@freebsd.org Tue Sep 27 18:06: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 A5EBFBEC3B6; Tue, 27 Sep 2016 18:06:44 +0000 (UTC) (envelope-from markj@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 77FE5E3D; Tue, 27 Sep 2016 18:06:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RI6hiX023938; Tue, 27 Sep 2016 18:06:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RI6hik023937; Tue, 27 Sep 2016 18:06:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609271806.u8RI6hik023937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 27 Sep 2016 18:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306373 - stable/11/sys/geom/mirror X-SVN-Group: stable-11 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.23 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: Tue, 27 Sep 2016 18:06:44 -0000 Author: markj Date: Tue Sep 27 18:06:43 2016 New Revision: 306373 URL: https://svnweb.freebsd.org/changeset/base/306373 Log: MFC r305509: Don't treat an error from g_mirror_clear_metadata() as fatal. Modified: stable/11/sys/geom/mirror/g_mirror.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Tue Sep 27 18:05:24 2016 (r306372) +++ stable/11/sys/geom/mirror/g_mirror.c Tue Sep 27 18:06:43 2016 (r306373) @@ -2663,8 +2663,12 @@ again: int error; error = g_mirror_clear_metadata(disk); - if (error != 0) - return (error); + if (error != 0) { + G_MIRROR_DEBUG(0, + "Device %s: failed to clear metadata on %s: %d.", + sc->sc_name, g_mirror_get_diskname(disk), error); + break; + } DISK_STATE_CHANGED(); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, g_mirror_get_diskname(disk)); From owner-svn-src-all@freebsd.org Tue Sep 27 18:07: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 9DDC5BEC40C; Tue, 27 Sep 2016 18:07:23 +0000 (UTC) (envelope-from markj@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 67ACEF92; Tue, 27 Sep 2016 18:07:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RI7MBE024006; Tue, 27 Sep 2016 18:07:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RI7M2M024005; Tue, 27 Sep 2016 18:07:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609271807.u8RI7M2M024005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 27 Sep 2016 18:07: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: r306374 - stable/10/sys/geom/mirror 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.23 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: Tue, 27 Sep 2016 18:07:23 -0000 Author: markj Date: Tue Sep 27 18:07:22 2016 New Revision: 306374 URL: https://svnweb.freebsd.org/changeset/base/306374 Log: MFC r305509: Don't treat an error from g_mirror_clear_metadata() as fatal. Modified: stable/10/sys/geom/mirror/g_mirror.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Tue Sep 27 18:06:43 2016 (r306373) +++ stable/10/sys/geom/mirror/g_mirror.c Tue Sep 27 18:07:22 2016 (r306374) @@ -2669,8 +2669,12 @@ again: int error; error = g_mirror_clear_metadata(disk); - if (error != 0) - return (error); + if (error != 0) { + G_MIRROR_DEBUG(0, + "Device %s: failed to clear metadata on %s: %d.", + sc->sc_name, g_mirror_get_diskname(disk), error); + break; + } DISK_STATE_CHANGED(); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, g_mirror_get_diskname(disk)); From owner-svn-src-all@freebsd.org Tue Sep 27 18:08: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 08C8EBEC46E; Tue, 27 Sep 2016 18:08:40 +0000 (UTC) (envelope-from emaste@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 DA9D018C; Tue, 27 Sep 2016 18:08:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RI8d4r024100; Tue, 27 Sep 2016 18:08:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RI8cUa024092; Tue, 27 Sep 2016 18:08:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609271808.u8RI8cUa024092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 27 Sep 2016 18:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306375 - in head: . gnu/usr.bin lib share/mk tools/build/mk tools/build/options usr.bin usr.sbin 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.23 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: Tue, 27 Sep 2016 18:08:40 -0000 Author: emaste Date: Tue Sep 27 18:08:38 2016 New Revision: 306375 URL: https://svnweb.freebsd.org/changeset/base/306375 Log: Add a WITHOUT_DIALOG src.conf(5) knob It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). Reviewed by: dteske Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7969 Added: head/tools/build/options/WITHOUT_DIALOG (contents, props changed) Modified: head/Makefile.inc1 head/gnu/usr.bin/Makefile head/lib/Makefile head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile head/usr.sbin/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 27 18:07:22 2016 (r306374) +++ head/Makefile.inc1 Tue Sep 27 18:08:38 2016 (r306375) @@ -2032,8 +2032,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_cddl_lib_libctf} \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ - ${_secure_lib_libssh} ${_secure_lib_libssl} \ - gnu/lib/libdialog + ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ @@ -2041,6 +2040,11 @@ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif +.if ${MK_DIALOG} != "no" +_prebuild_libs+= gnu/lib/libdialog +gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _prebuild_libs+= lib/libc++ .endif @@ -2190,8 +2194,6 @@ lib/libproc__L: gnu/lib/libsupc++__L .endif .endif -gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L - .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/gnu/usr.bin/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - dialog \ diff \ diff3 \ ${_dtc} \ @@ -49,6 +48,8 @@ _gdb= gdb _cc= cc .endif +SUBDIR.${MK_DIALOG}+= dialog + SUBDIR_PARALLEL= .include Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/lib/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -46,7 +46,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ ${_libdevdctl} \ libdevinfo \ libdevstat \ - libdpv \ libdwarf \ libedit \ ${_libelftc} \ @@ -197,6 +196,8 @@ _libelftc= libelftc _libpe= libpe .endif +SUBDIR.${MK_DIALOG}+= libdpv + .if ${MK_FILE} != "no" _libmagic= libmagic .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Sep 27 18:07:22 2016 (r306374) +++ head/share/mk/src.opts.mk Tue Sep 27 18:08:38 2016 (r306375) @@ -76,6 +76,7 @@ __DEFAULT_YES_OPTIONS = \ CTM \ CUSE \ CXX \ + DIALOG \ DICT \ DMAGENT \ DYNAMICROOT \ @@ -328,6 +329,10 @@ MK_GNUCXX:= no MK_TESTS:= no .endif +.if ${MK_DIALOG} == "no" +MK_BSDINSTALL:= no +.endif + .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Sep 27 18:07:22 2016 (r306374) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Sep 27 18:08:38 2016 (r306375) @@ -1340,6 +1340,27 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_DIALOG} == no +OLD_FILES+=usr/bin/dialog +OLD_FILES+=usr/bin/dpv +OLD_FILES+=usr/lib/libdialog.a +OLD_FILES+=usr/lib/libdialog.so +OLD_FILES+=usr/lib/libdialog.so.8 +OLD_FILES+=usr/lib/libdialog_p.a +OLD_FILES+=usr/lib/libdpv.a +OLD_FILES+=usr/lib/libdpv.so +OLD_FILES+=usr/lib/libdpv.so.1 +OLD_FILES+=usr/lib/libdpv_p.a +OLD_FILES+=usr/sbin/bsdconfig +OLD_FILES+=usr/sbin/tzsetup +OLD_FILES+=usr/share/man/man1/dialog.1.gz +OLD_FILES+=usr/share/man/man1/dpv.1.gz +OLD_FILES+=usr/share/man/man3/dialog.3.gz +OLD_FILES+=usr/share/man/man3/dpv.3.gz +OLD_FILES+=usr/share/man/man8/tzsetup.8.gz +OLD_FILES+=usr/share/man/man8/bsdconfig.8.gz +.endif + .if ${MK_FMTREE} == no OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz Added: head/tools/build/options/WITHOUT_DIALOG ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_DIALOG Tue Sep 27 18:08:38 2016 (r306375) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build dialog(1), dialog(1,3), and dpv(1,3). Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/usr.bin/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -36,7 +36,6 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ - dpv \ du \ elf2aout \ elfdump \ @@ -200,6 +199,7 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang +SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee SUBDIR.${MK_FILE}+= file SUBDIR.${MK_FINGER}+= finger Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/usr.sbin/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bsdconfig \ camdd \ cdcontrol \ chkgrp \ @@ -89,7 +88,6 @@ SUBDIR= adduser \ tcpdump \ traceroute \ trpt \ - tzsetup \ uefisign \ ugidfw \ vigr \ @@ -123,6 +121,8 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm +SUBDIR.${MK_DIALOG}+= tzsetup +SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread From owner-svn-src-all@freebsd.org Tue Sep 27 18:19:31 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 7F047BEC632; Tue, 27 Sep 2016 18:19:31 +0000 (UTC) (envelope-from loos@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 3F42595D; Tue, 27 Sep 2016 18:19:31 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RIJUdp027787; Tue, 27 Sep 2016 18:19:30 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RIJUQs027784; Tue, 27 Sep 2016 18:19:30 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609271819.u8RIJUQs027784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 27 Sep 2016 18:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306376 - head/sys/arm/ti/cpsw 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.23 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: Tue, 27 Sep 2016 18:19:31 -0000 Author: loos Date: Tue Sep 27 18:19:29 2016 New Revision: 306376 URL: https://svnweb.freebsd.org/changeset/base/306376 Log: Add a sysctl to control the interrupt pacing on AM335x integrated switch. The hardware can be set to limit the number of interrupts from 2 to 63 interrupts per ms. To keep the compatibility with the TI documentation the sysctl take the interval between the interrupts pulses: 16~500 us. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Tue Sep 27 18:08:38 2016 (r306375) +++ head/sys/arm/ti/cpsw/if_cpsw.c Tue Sep 27 18:19:29 2016 (r306376) @@ -583,6 +583,11 @@ cpsw_init(struct cpsw_softc *sc) struct cpsw_slot *slot; uint32_t reg; + /* Disable the interrupt pacing. */ + reg = cpsw_read_4(sc, CPSW_WR_INT_CONTROL); + reg &= ~(CPSW_WR_INT_PACE_EN | CPSW_WR_INT_PRESCALE_MASK); + cpsw_write_4(sc, CPSW_WR_INT_CONTROL, reg); + /* Clear ALE */ cpsw_write_4(sc, CPSW_ALE_CONTROL, CPSW_ALE_CTL_CLEAR_TBL); @@ -2492,6 +2497,51 @@ cpsw_stat_attached(SYSCTL_HANDLER_ARGS) } static int +cpsw_intr_coalesce(SYSCTL_HANDLER_ARGS) +{ + int error; + struct cpsw_softc *sc; + uint32_t ctrl, intr_per_ms; + + sc = (struct cpsw_softc *)arg1; + error = sysctl_handle_int(oidp, &sc->coal_us, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + ctrl = cpsw_read_4(sc, CPSW_WR_INT_CONTROL); + ctrl &= ~(CPSW_WR_INT_PACE_EN | CPSW_WR_INT_PRESCALE_MASK); + if (sc->coal_us == 0) { + /* Disable the interrupt pace hardware. */ + cpsw_write_4(sc, CPSW_WR_INT_CONTROL, ctrl); + cpsw_write_4(sc, CPSW_WR_C_RX_IMAX(0), 0); + cpsw_write_4(sc, CPSW_WR_C_TX_IMAX(0), 0); + return (0); + } + + if (sc->coal_us > CPSW_WR_C_IMAX_US_MAX) + sc->coal_us = CPSW_WR_C_IMAX_US_MAX; + if (sc->coal_us < CPSW_WR_C_IMAX_US_MIN) + sc->coal_us = CPSW_WR_C_IMAX_US_MIN; + intr_per_ms = 1000 / sc->coal_us; + /* Just to make sure... */ + if (intr_per_ms > CPSW_WR_C_IMAX_MAX) + intr_per_ms = CPSW_WR_C_IMAX_MAX; + if (intr_per_ms < CPSW_WR_C_IMAX_MIN) + intr_per_ms = CPSW_WR_C_IMAX_MIN; + + /* Set the prescale to produce 4us pulses from the 125 Mhz clock. */ + ctrl |= (125 * 4) & CPSW_WR_INT_PRESCALE_MASK; + + /* Enable the interrupt pace hardware. */ + cpsw_write_4(sc, CPSW_WR_C_RX_IMAX(0), intr_per_ms); + cpsw_write_4(sc, CPSW_WR_C_TX_IMAX(0), intr_per_ms); + ctrl |= CPSW_WR_INT_C0_RX_PULSE | CPSW_WR_INT_C0_TX_PULSE; + cpsw_write_4(sc, CPSW_WR_INT_CONTROL, ctrl); + + return (0); +} + +static int cpsw_stat_uptime(SYSCTL_HANDLER_ARGS) { struct cpsw_softc *swsc; @@ -2576,6 +2626,10 @@ cpsw_add_sysctls(struct cpsw_softc *sc) CTLTYPE_UINT | CTLFLAG_RD, sc, 0, cpsw_stat_attached, "IU", "Time since driver attach"); + SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "intr_coalesce_us", + CTLTYPE_UINT | CTLFLAG_RW, sc, 0, cpsw_intr_coalesce, "IU", + "minimum time between interrupts"); + node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "ports", CTLFLAG_RD, NULL, "CPSW Ports Statistics"); ports_parent = SYSCTL_CHILDREN(node); Modified: head/sys/arm/ti/cpsw/if_cpswreg.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswreg.h Tue Sep 27 18:08:38 2016 (r306375) +++ head/sys/arm/ti/cpsw/if_cpswreg.h Tue Sep 27 18:19:29 2016 (r306376) @@ -138,6 +138,17 @@ #define CPSW_WR_SOFT_RESET (CPSW_WR_OFFSET + 0x04) #define CPSW_WR_CONTROL (CPSW_WR_OFFSET + 0x08) #define CPSW_WR_INT_CONTROL (CPSW_WR_OFFSET + 0x0c) +#define CPSW_WR_INT_C0_RX_PULSE (1 << 16) +#define CPSW_WR_INT_C0_TX_PULSE (1 << 17) +#define CPSW_WR_INT_C1_RX_PULSE (1 << 18) +#define CPSW_WR_INT_C1_TX_PULSE (1 << 19) +#define CPSW_WR_INT_C2_RX_PULSE (1 << 20) +#define CPSW_WR_INT_C2_TX_PULSE (1 << 21) +#define CPSW_WR_INT_PACE_EN \ + (CPSW_WR_INT_C0_RX_PULSE | CPSW_WR_INT_C0_TX_PULSE | \ + CPSW_WR_INT_C1_RX_PULSE | CPSW_WR_INT_C1_TX_PULSE | \ + CPSW_WR_INT_C2_RX_PULSE | CPSW_WR_INT_C2_TX_PULSE) +#define CPSW_WR_INT_PRESCALE_MASK 0xfff #define CPSW_WR_C_RX_THRESH_EN(p) (CPSW_WR_OFFSET + (0x10 * (p)) + 0x10) #define CPSW_WR_C_RX_EN(p) (CPSW_WR_OFFSET + (0x10 * (p)) + 0x14) #define CPSW_WR_C_TX_EN(p) (CPSW_WR_OFFSET + (0x10 * (p)) + 0x18) @@ -151,6 +162,13 @@ #define CPSW_WR_C_MISC_HOST_PEND (1 << 2) #define CPSW_WR_C_MISC_MDIOLINK (1 << 1) #define CPSW_WR_C_MISC_MDIOUSER (1 << 0) +#define CPSW_WR_C_RX_IMAX(p) (CPSW_WR_OFFSET + (0x08 * (p)) + 0x70) +#define CPSW_WR_C_TX_IMAX(p) (CPSW_WR_OFFSET + (0x08 * (p)) + 0x74) +#define CPSW_WR_C_IMAX_MASK 0x3f +#define CPSW_WR_C_IMAX_MAX 63 +#define CPSW_WR_C_IMAX_MIN 2 +#define CPSW_WR_C_IMAX_US_MAX 500 +#define CPSW_WR_C_IMAX_US_MIN 16 #define CPSW_CPPI_RAM_OFFSET 0x2000 #define CPSW_CPPI_RAM_SIZE 0x2000 Modified: head/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswvar.h Tue Sep 27 18:08:38 2016 (r306375) +++ head/sys/arm/ti/cpsw/if_cpswvar.h Tue Sep 27 18:19:29 2016 (r306376) @@ -80,6 +80,7 @@ struct cpsw_softc { phandle_t node; struct bintime attach_uptime; /* system uptime when attach happened. */ struct cpsw_port port[2]; + unsigned coal_us; /* RX and TX buffer tracking */ struct cpsw_queue rx, tx; From owner-svn-src-all@freebsd.org Tue Sep 27 18:55:46 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 7C674BECDC6; Tue, 27 Sep 2016 18:55:46 +0000 (UTC) (envelope-from emaste@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 541CACD6; Tue, 27 Sep 2016 18:55:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RItj0U043270; Tue, 27 Sep 2016 18:55:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RItjlC043268; Tue, 27 Sep 2016 18:55:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609271855.u8RItjlC043268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 27 Sep 2016 18:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306377 - head/lib/libcompiler_rt 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.23 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: Tue, 27 Sep 2016 18:55:46 -0000 Author: emaste Date: Tue Sep 27 18:55:45 2016 New Revision: 306377 URL: https://svnweb.freebsd.org/changeset/base/306377 Log: libcompiler_rt: move file list to Makefile.inc for reuse elsewhere Also switch to the style used in the clang390-import branch to reduce future conflicts. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8039 Added: head/lib/libcompiler_rt/Makefile.inc (contents, props changed) Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Tue Sep 27 18:19:29 2016 (r306376) +++ head/lib/libcompiler_rt/Makefile Tue Sep 27 18:55:45 2016 (r306377) @@ -10,223 +10,7 @@ WARNS?= 2 CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN CFLAGS+=-I${SRCTOP}/contrib/libcxxrt -.if ${MACHINE_CPUARCH} == "amd64" -CRTARCH=x86_64 -.else -CRTARCH=${MACHINE_CPUARCH} -.endif - -CRTSRC=${SRCTOP}/contrib/compiler-rt/lib/builtins - -.PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC} - -SRCF= absvdi2 \ - absvsi2 \ - absvti2 \ - addvdi3 \ - addvsi3 \ - addvti3 \ - apple_versioning \ - ashldi3 \ - ashlti3 \ - ashrdi3 \ - ashrti3 \ - clear_cache \ - clzdi2 \ - clzsi2 \ - clzti2 \ - cmpdi2 \ - cmpti2 \ - ctzdi2 \ - ctzsi2 \ - ctzti2 \ - divdc3 \ - divdi3 \ - divmoddi4 \ - divmodsi4 \ - divsc3 \ - divtc3 \ - divti3 \ - divxc3 \ - enable_execute_stack \ - eprintf \ - extendhfsf2 \ - ffsdi2 \ - ffsti2 \ - fixdfdi \ - fixdfti \ - fixsfdi \ - fixsfti \ - fixunsdfdi \ - fixunsdfsi \ - fixunsdfti \ - fixunssfdi \ - fixunssfsi \ - fixunssfti \ - fixunsxfdi \ - fixunsxfsi \ - fixunsxfti \ - fixxfdi \ - fixxfti \ - floatdidf \ - floatdisf \ - floatditf \ - floatdixf \ - floatsitf \ - floattidf \ - floattisf \ - floattixf \ - floatundidf \ - floatundisf \ - floatunditf \ - floatundixf \ - floatunsidf \ - floatunsisf \ - floatuntidf \ - floatuntisf \ - floatuntixf \ - gcc_personality_v0 \ - int_util \ - lshrdi3 \ - lshrti3 \ - moddi3 \ - modti3 \ - muldc3 \ - muldi3 \ - mulodi4 \ - mulosi4 \ - muloti4 \ - mulsc3 \ - multi3 \ - mulvdi3 \ - mulvsi3 \ - mulvti3 \ - multc3 \ - mulxc3 \ - negdf2 \ - negdi2 \ - negsf2 \ - negti2 \ - negvdi2 \ - negvsi2 \ - negvti2 \ - paritydi2 \ - paritysi2 \ - parityti2 \ - popcountdi2 \ - popcountsi2 \ - popcountti2 \ - powidf2 \ - powisf2 \ - powitf2 \ - powixf2 \ - subvdi3 \ - subvsi3 \ - subvti3 \ - trampoline_setup \ - truncdfhf2 \ - truncsfhf2 \ - ucmpdi2 \ - ucmpti2 \ - udivdi3 \ - udivmoddi4 \ - udivmodsi4 \ - udivmodti4 \ - udivti3 \ - umoddi3 \ - umodti3 - -# 128-bit quad precision long double support, only used on arm64 -.if ${MACHINE_CPUARCH} == "aarch64" -SRCF+= addtf3 \ - comparetf2 \ - divtf3 \ - extenddftf2 \ - extendsftf2 \ - fixtfdi \ - fixtfsi \ - fixtfti \ - fixunstfdi \ - fixunstfsi \ - fixunstfti \ - floatunsitf \ - multf3 \ - subtf3 \ - trunctfdf2 \ - trunctfsf2 -.endif - -# These are already shipped by libc.a on arm and mips -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" -SRCF+= adddf3 \ - addsf3 \ - divdf3 \ - divsf3 \ - extendsfdf2 \ - fixdfsi \ - fixsfsi \ - floatsidf \ - floatsisf \ - muldf3 \ - mulsf3 \ - subdf3 \ - subsf3 \ - truncdfsf2 -.endif - -.if ${MACHINE_CPUARCH} != "arm" -SRCF+= comparedf2 \ - comparesf2 -.endif - -.if ${MACHINE_CPUARCH} != "mips" -SRCF+= divsi3 \ - modsi3 \ - udivsi3 \ - umodsi3 -.endif - -# FreeBSD-specific atomic intrinsics. -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6" -.PATH: ${.CURDIR}/../../sys/arm/arm - -SRCF+= stdatomic -CFLAGS+= -DEMIT_SYNC_ATOMICS -.elif ${MACHINE_CPUARCH} == "mips" -.PATH: ${.CURDIR}/../../sys/mips/mips - -SRCF+= stdatomic -.endif - -.for file in ${SRCF} -.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") && \ - exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) -SRCS+= ${file}vfp.S -. elif exists(${CRTSRC}/${CRTARCH}/${file}.S) -SRCS+= ${file}.S -. else -SRCS+= ${file}.c -. endif -.endfor - -.if ${MACHINE_CPUARCH} == "arm" -SRCS+= aeabi_div0.c \ - aeabi_idivmod.S \ - aeabi_ldivmod.S \ - aeabi_memcmp.S \ - aeabi_memcpy.S \ - aeabi_memmove.S \ - aeabi_memset.S \ - aeabi_uidivmod.S \ - aeabi_uldivmod.S \ - bswapdi2.S \ - bswapsi2.S \ - switch16.S \ - switch32.S \ - switch8.S \ - switchu8.S \ - sync_synchronize.S -.endif +.include "Makefile.inc" .if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a Added: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/Makefile.inc Tue Sep 27 18:55:45 2016 (r306377) @@ -0,0 +1,216 @@ +# $FreeBSD$ + +CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/} + +CRTSRC= ${SRCTOP}/contrib/compiler-rt/lib/builtins + +.PATH: ${CRTSRC}/${CRTARCH} +.PATH: ${CRTSRC} + +SRCF+= absvdi2 +SRCF+= absvsi2 +SRCF+= absvti2 +SRCF+= addvdi3 +SRCF+= addvsi3 +SRCF+= addvti3 +SRCF+= apple_versioning +SRCF+= ashldi3 +SRCF+= ashlti3 +SRCF+= ashrdi3 +SRCF+= ashrti3 +SRCF+= clear_cache +SRCF+= clzdi2 +SRCF+= clzsi2 +SRCF+= clzti2 +SRCF+= cmpdi2 +SRCF+= cmpti2 +SRCF+= ctzdi2 +SRCF+= ctzsi2 +SRCF+= ctzti2 +SRCF+= divdc3 +SRCF+= divdi3 +SRCF+= divmoddi4 +SRCF+= divmodsi4 +SRCF+= divsc3 +SRCF+= divtc3 +SRCF+= divti3 +SRCF+= divxc3 +SRCF+= enable_execute_stack +SRCF+= eprintf +SRCF+= extendhfsf2 +SRCF+= ffsdi2 +SRCF+= ffsti2 +SRCF+= fixdfdi +SRCF+= fixdfti +SRCF+= fixsfdi +SRCF+= fixsfti +SRCF+= fixunsdfdi +SRCF+= fixunsdfsi +SRCF+= fixunsdfti +SRCF+= fixunssfdi +SRCF+= fixunssfsi +SRCF+= fixunssfti +SRCF+= fixunsxfdi +SRCF+= fixunsxfsi +SRCF+= fixunsxfti +SRCF+= fixxfdi +SRCF+= fixxfti +SRCF+= floatdidf +SRCF+= floatdisf +SRCF+= floatditf +SRCF+= floatdixf +SRCF+= floatsitf +SRCF+= floattidf +SRCF+= floattisf +SRCF+= floattixf +SRCF+= floatundidf +SRCF+= floatundisf +SRCF+= floatunditf +SRCF+= floatundixf +SRCF+= floatunsidf +SRCF+= floatunsisf +SRCF+= floatuntidf +SRCF+= floatuntisf +SRCF+= floatuntixf +SRCF+= gcc_personality_v0 +SRCF+= int_util +SRCF+= lshrdi3 +SRCF+= lshrti3 +SRCF+= moddi3 +SRCF+= modti3 +SRCF+= muldc3 +SRCF+= muldi3 +SRCF+= mulodi4 +SRCF+= mulosi4 +SRCF+= muloti4 +SRCF+= mulsc3 +SRCF+= multi3 +SRCF+= mulvdi3 +SRCF+= mulvsi3 +SRCF+= mulvti3 +SRCF+= multc3 +SRCF+= mulxc3 +SRCF+= negdf2 +SRCF+= negdi2 +SRCF+= negsf2 +SRCF+= negti2 +SRCF+= negvdi2 +SRCF+= negvsi2 +SRCF+= negvti2 +SRCF+= paritydi2 +SRCF+= paritysi2 +SRCF+= parityti2 +SRCF+= popcountdi2 +SRCF+= popcountsi2 +SRCF+= popcountti2 +SRCF+= powidf2 +SRCF+= powisf2 +SRCF+= powitf2 +SRCF+= powixf2 +SRCF+= subvdi3 +SRCF+= subvsi3 +SRCF+= subvti3 +SRCF+= trampoline_setup +SRCF+= truncdfhf2 +SRCF+= truncsfhf2 +SRCF+= ucmpdi2 +SRCF+= ucmpti2 +SRCF+= udivdi3 +SRCF+= udivmoddi4 +SRCF+= udivmodsi4 +SRCF+= udivmodti4 +SRCF+= udivti3 +SRCF+= umoddi3 +SRCF+= umodti3 + +# 128-bit quad precision long double support, only used on arm64 +.if ${MACHINE_CPUARCH} == "aarch64" +SRCF+= addtf3 +SRCF+= comparetf2 +SRCF+= divtf3 +SRCF+= extenddftf2 +SRCF+= extendsftf2 +SRCF+= fixtfdi +SRCF+= fixtfsi +SRCF+= fixtfti +SRCF+= fixunstfdi +SRCF+= fixunstfsi +SRCF+= fixunstfti +SRCF+= floatunsitf +SRCF+= multf3 +SRCF+= subtf3 +SRCF+= trunctfdf2 +SRCF+= trunctfsf2 +.endif + +# These are already shipped by libc.a on arm and mips +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +SRCF+= adddf3 +SRCF+= addsf3 +SRCF+= divdf3 +SRCF+= divsf3 +SRCF+= extendsfdf2 +SRCF+= fixdfsi +SRCF+= fixsfsi +SRCF+= floatsidf +SRCF+= floatsisf +SRCF+= muldf3 +SRCF+= mulsf3 +SRCF+= subdf3 +SRCF+= subsf3 +SRCF+= truncdfsf2 +.endif + +.if ${MACHINE_CPUARCH} != "arm" +SRCF+= comparedf2 +SRCF+= comparesf2 +.endif + +.if ${MACHINE_CPUARCH} != "mips" +SRCF+= divsi3 +SRCF+= modsi3 +SRCF+= udivsi3 +SRCF+= umodsi3 +.endif + +# FreeBSD-specific atomic intrinsics. +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6" +.PATH: ${SRCTOP}/sys/arm/arm + +SRCF+= stdatomic +CFLAGS+= -DEMIT_SYNC_ATOMICS +.elif ${MACHINE_CPUARCH} == "mips" +.PATH: ${SRCTOP}/sys/mips/mips + +SRCF+= stdatomic +.endif + +.for file in ${SRCF} +.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ + && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) +SRCS+= ${file}vfp.S +. elif exists(${CRTSRC}/${CRTARCH}/${file}.S) +SRCS+= ${file}.S +. else +SRCS+= ${file}.c +. endif +.endfor + +.if ${MACHINE_CPUARCH} == "arm" +SRCS+= aeabi_div0.c +SRCS+= aeabi_idivmod.S +SRCS+= aeabi_ldivmod.S +SRCS+= aeabi_memcmp.S +SRCS+= aeabi_memcpy.S +SRCS+= aeabi_memmove.S +SRCS+= aeabi_memset.S +SRCS+= aeabi_uidivmod.S +SRCS+= aeabi_uldivmod.S +SRCS+= bswapdi2.S +SRCS+= bswapsi2.S +SRCS+= switch16.S +SRCS+= switch32.S +SRCS+= switch8.S +SRCS+= switchu8.S +SRCS+= sync_synchronize.S +.endif From owner-svn-src-all@freebsd.org Tue Sep 27 19:00: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 7C7C1BECE96; Tue, 27 Sep 2016 19:00:25 +0000 (UTC) (envelope-from pluknet@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 3E792F45; Tue, 27 Sep 2016 19:00:25 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RJ0Ob4043527; Tue, 27 Sep 2016 19:00:24 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RJ0NxH043514; Tue, 27 Sep 2016 19:00:23 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201609271900.u8RJ0NxH043514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Tue, 27 Sep 2016 19:00: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: r306378 - in stable/10: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv 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.23 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: Tue, 27 Sep 2016 19:00:25 -0000 Author: pluknet Date: Tue Sep 27 19:00:22 2016 New Revision: 306378 URL: https://svnweb.freebsd.org/changeset/base/306378 Log: MFC r274925: misc mdoc fixes. Modified: stable/10/lib/libc/sys/poll.2 stable/10/lib/libdpv/dpv.3 stable/10/sbin/ipfw/ipfw.8 stable/10/share/man/man4/gre.4 stable/10/share/man/man4/man4.arm/cgem.4 stable/10/share/man/man4/me.4 stable/10/share/man/man4/netmap.4 stable/10/share/man/man9/get_cyclecount.9 stable/10/share/man/man9/malloc.9 stable/10/share/man/man9/sleepqueue.9 stable/10/sys/boot/common/zfsloader.8 stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 stable/10/usr.bin/dpv/dpv.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/poll.2 ============================================================================== --- stable/10/lib/libc/sys/poll.2 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/lib/libc/sys/poll.2 Tue Sep 27 19:00:22 2016 (r306378) @@ -180,7 +180,6 @@ specifies a signal mask which is set whi When .Fn ppoll returns, the original signal mask is restored. -.Pp .Bd -literal struct timespec { time_t tv_sec; /* seconds */ Modified: stable/10/lib/libdpv/dpv.3 ============================================================================== --- stable/10/lib/libdpv/dpv.3 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/lib/libdpv/dpv.3 Tue Sep 27 19:00:22 2016 (r306378) @@ -503,7 +503,7 @@ This does not effect .Xr Xdialog 1 , which renders the color escape sequences as plain text. See -.Do Li +.Do embedded "\\Z" sequences .Dc in Modified: stable/10/sbin/ipfw/ipfw.8 ============================================================================== --- stable/10/sbin/ipfw/ipfw.8 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/sbin/ipfw/ipfw.8 Tue Sep 27 19:00:22 2016 (r306378) @@ -1597,7 +1597,6 @@ be specified as: .Pp Note that the ampersand character has a special meaning in many shells and should generally be escaped. -.Pp .El Note that the order of MAC addresses (destination first, source second) is Modified: stable/10/share/man/man4/gre.4 ============================================================================== --- stable/10/share/man/man4/gre.4 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man4/gre.4 Tue Sep 27 19:00:22 2016 (r306378) @@ -91,7 +91,6 @@ Enables checksum calculation for outgoin Enables use of sequence number field in the GRE header for outgoing packets. .El .Sh EXAMPLES -.Pp .Bd -literal 192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.* \\ / @@ -190,7 +189,6 @@ A description of GRE encapsulation can b .An Andrey V. Elsukov Aq Mt ae@FreeBSD.org .An Heiko W.Rupp Aq Mt hwr@pilhuhn.de .Sh BUGS -.Pp The current implementation uses the key only for outgoing packets. Incoming packets with a different key or without a key will be treated as if they would belong to this interface. Modified: stable/10/share/man/man4/man4.arm/cgem.4 ============================================================================== --- stable/10/share/man/man4/man4.arm/cgem.4 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man4/man4.arm/cgem.4 Tue Sep 27 19:00:22 2016 (r306378) @@ -248,6 +248,23 @@ checksum offloading is enabled. Counter of frames discarded due to an incorrect UDP checksum when checksum offloading is enabled. .El +.Sh SEE ALSO +.Xr miibus 4 , +.Xr ifconfig 8 +.Rs +.%T "Zynq-7000 SoC Technical Reference Manual (Xilinx doc UG585)" +.%U http://www.xilinx.com/support/documentation/user_guides/\:ug585-Zynq-7000-TRM.pdf +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +The +.Nm +driver and this manual page was written by +.An Thomas Skibo Aq Mt thomasskibo@yahoo.com . .Sh BUGS The GEM can perform TCP/UDP/IP checksum offloading. However, when transmit checksum offloading is enabled, the GEM generates and @@ -277,21 +294,3 @@ If the bug does not exist in other versi work-around can be disabled by setting the dev.cgem.%d.rxhangwar .Xr sysctl 8 variable to 0. -.Pp -.Sh SEE ALSO -.Xr miibus 4 , -.Xr ifconfig 8 -.Rs -.%T "Zynq-7000 SoC Technical Reference Manual (Xilinx doc UG585)" -.%U http://www.xilinx.com/support/documentation/user_guides/\:ug585-Zynq-7000-TRM.pdf -.Re -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 10.0 . -.Sh AUTHORS -The -.Nm -driver and this manual page was written by -.An Thomas Skibo Aq Mt thomasskibo@yahoo.com . Modified: stable/10/share/man/man4/me.4 ============================================================================== --- stable/10/share/man/man4/me.4 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man4/me.4 Tue Sep 27 19:00:22 2016 (r306378) @@ -67,7 +67,6 @@ IP header is modified and the modificati so modified header and the original payload. The protocol number 55 is used for outer header. .Sh NOTES -.Pp For correct operation, the .Nm device needs a route to the decapsulating host that does not run over the tunnel, Modified: stable/10/share/man/man4/netmap.4 ============================================================================== --- stable/10/share/man/man4/netmap.4 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man4/netmap.4 Tue Sep 27 19:00:22 2016 (r306378) @@ -614,7 +614,7 @@ In the example below, "netmap:foo" is an (default) all hardware ring pairs .It NR_REG_SW_NIC "netmap:foo^" the ``host rings'', connecting to the host stack. -.It NR_RING_NIC_SW "netmap:foo+ +.It NR_RING_NIC_SW "netmap:foo+" all hardware rings and the host rings .It NR_REG_ONE_NIC "netmap:foo-i" only the i-th hardware ring pair, where the number is in Modified: stable/10/share/man/man9/get_cyclecount.9 ============================================================================== --- stable/10/share/man/man9/get_cyclecount.9 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man9/get_cyclecount.9 Tue Sep 27 19:00:22 2016 (r306378) @@ -77,7 +77,6 @@ and processors use the .Li TSC register. -.Pp The .Tn IA64 processors use the Modified: stable/10/share/man/man9/malloc.9 ============================================================================== --- stable/10/share/man/man9/malloc.9 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man9/malloc.9 Tue Sep 27 19:00:22 2016 (r306378) @@ -208,12 +208,6 @@ one must include .In sys/types.h ) and .In sys/kernel.h . -.Sh IMPLEMENTATION NOTES -The memory allocator allocates memory in chunks that have size a power -of two for requests up to the size of a page of memory. -For larger requests, one or more pages is allocated. -While it should not be relied upon, this information may be useful for -optimizing the efficiency of memory use. .Pp Programmers should be careful not to confuse the malloc flags .Dv M_NOWAIT @@ -255,6 +249,12 @@ when holding a .Xr vnode 9 interlock, will cause a LOR (Lock Order Reversal) due to the intertwining of VM Objects and Vnodes. +.Sh IMPLEMENTATION NOTES +The memory allocator allocates memory in chunks that have size a power +of two for requests up to the size of a page of memory. +For larger requests, one or more pages is allocated. +While it should not be relied upon, this information may be useful for +optimizing the efficiency of memory use. .Sh RETURN VALUES The .Fn malloc , Modified: stable/10/share/man/man9/sleepqueue.9 ============================================================================== --- stable/10/share/man/man9/sleepqueue.9 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/share/man/man9/sleepqueue.9 Tue Sep 27 19:00:22 2016 (r306378) @@ -246,7 +246,6 @@ allows to pass additional .Fn callout_reset_sbt flags. .Pp -.Pp Once the thread is ready to suspend, one of the wait functions is called to put the current thread to sleep until it is awakened and to context switch to another thread. Modified: stable/10/sys/boot/common/zfsloader.8 ============================================================================== --- stable/10/sys/boot/common/zfsloader.8 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/sys/boot/common/zfsloader.8 Tue Sep 27 19:00:22 2016 (r306378) @@ -62,7 +62,6 @@ refers to a ZFS filesystem, then will instruct kernel to use that filesystem as the root filesystem. .Sh ZFS COMMAND EXTENSIONS .Bl -tag -width Ds -compact -.Pp .It Ic lsdev Op Fl v Lists ZFS pools in addition to disks and partitions. Adding @@ -87,11 +86,9 @@ itself. .El .Sh EXAMPLES Set the default device used for loading a kernel from a ZFS filesystem: -.Pp .Bd -literal -offset indent set currdev=zfs:tank/ROOT/knowngood: .Ed -.Pp .Sh SEE ALSO .Xr gptzfsboot 8 , .Xr loader 8 , Modified: stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 ============================================================================== --- stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 Tue Sep 27 19:00:22 2016 (r306378) @@ -176,6 +176,9 @@ gpart bootcode -p /boot/gptzfsboot -i 1 .Sh HISTORY .Nm appeared in FreeBSD 7.3. +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . .Sh BUGS .Nm looks for ZFS meta-data only in MBR partitions @@ -188,6 +191,3 @@ found at the fixed offsets relative to a .Nm will recognize the partition as a part of a ZFS pool, but this is not guaranteed to happen. -.Sh AUTHORS -This manual page was written by -.An Andriy Gapon Aq avg@FreeBSD.org . Modified: stable/10/usr.bin/dpv/dpv.1 ============================================================================== --- stable/10/usr.bin/dpv/dpv.1 Tue Sep 27 18:55:45 2016 (r306377) +++ stable/10/usr.bin/dpv/dpv.1 Tue Sep 27 19:00:22 2016 (r306378) @@ -104,7 +104,7 @@ Do not use the default interface of .Xr dialog 3 , but instead spawn an instance of .Xr dialog 1 . -The path to +The path to .Xr dialog 1 is taken from the .Ev DIALOG @@ -313,7 +313,6 @@ is required. .It Pa $HOME/.dialogrc .El .Sh EXAMPLES -.Pp Simple example to show how fast .Xr yes 1 produces lines @@ -363,7 +362,18 @@ Zeroing a disk: .Bd -literal -offset indent dpv -o /dev/md42 < /dev/zero .Ed -.Pp +.Sh SEE ALSO +.Xr dialog 1 , +.Xr dialog 3 , +.Xr sh 1 , +.Xr Xdialog 1 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 10.2 . +.Sh AUTHORS +.An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS .Xr Xdialog 1 , when given both @@ -415,21 +425,9 @@ This does not effect .Xr Xdialog 1 , which renders the color escape sequences as plain text. See -.Do Li +.Do embedded "\\Z" sequences .Dc in .Xr dialog 1 for additional information. -.Sh SEE ALSO -.Xr dialog 1 , -.Xr dialog 3 , -.Xr sh 1 , -.Xr Xdialog 1 -.Sh HISTORY -A -.Nm -utility first appeared in -.Fx 10.2 . -.Sh AUTHORS -.An Devin Teske Aq dteske@FreeBSD.org From owner-svn-src-all@freebsd.org Tue Sep 27 19:36:14 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 DDE19BEC608; Tue, 27 Sep 2016 19:36:14 +0000 (UTC) (envelope-from emaste@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 7CE89264; Tue, 27 Sep 2016 19:36:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RJaDOa058318; Tue, 27 Sep 2016 19:36:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RJaDng058309; Tue, 27 Sep 2016 19:36:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609271936.u8RJaDng058309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 27 Sep 2016 19:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306379 - in releng/11.0: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive lib/libarchive/tests usr.bin/bsdiff/bspatch usr.sbin/portsna... 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.23 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: Tue, 27 Sep 2016 19:36:15 -0000 Author: emaste Date: Tue Sep 27 19:36:12 2016 New Revision: 306379 URL: https://svnweb.freebsd.org/changeset/base/306379 Log: Merge from stable/11 bspatch, portsnap, and libarchive fixes: === bspatch === MFS r306213: bspatch Capsicumization, sanity checks, and other improvements r304691: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. r304807 (allanjude): Capsicumize bspatch Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. r304821: bspatch: remove output file in the case of error r305486: bspatch: add sanity checks on sizes to avoid integer overflow Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. r305737: bspatch: remove superfluous newlines from errx strings r305822: bspatch: use #define for header size instead of magic number r306026: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic. With this change, bspatch is identical between head, stable/11 and releng/11.0. === portsnap === MFS r305648 (delphij): MFC r305469: Ensure that we always open only files that is named by explicitly using shell redirections instead of having gzip(1) to decide what file to open. Issue reported in the "non-cryptanalytic attacks against freebsd update components" anonymous gist. === libarchive === MFS r305754 (mm): MFC r305422: Sync libarchive with vendor Vendor issues fixed: PR #777: Multiple bugfixes for setup_acls() This includes a bugfix for a bug that caused ACLs not to be read properly for files and directories inside subdirectories and as a result not being stored or being incorrectly stored in tar archives. MFS r306321 (mm): MFC r305819: Sync libarchive with vendor including important security fixes. Issues fixed (FreeBSD): PR #778: ACL error handling Issue #745: Symlink check prefix optimization is too aggressive Issue #746: Hard links with data can evade sandboxing restrictions This update fixes the vulnerability #3 and vulnerability #4 as reported in "non-cryptanalytic attacks against FreeBSD update components". https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f Fix for vulnerability #2 has already been merged. Approved by: re (gjb), so (glebius) Added: releng/11.0/contrib/libarchive/README.md - copied unchanged from r305754, stable/11/contrib/libarchive/README.md Deleted: releng/11.0/contrib/libarchive/README Modified: releng/11.0/contrib/libarchive/libarchive/archive_acl.c releng/11.0/contrib/libarchive/libarchive/archive_platform.h releng/11.0/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c releng/11.0/contrib/libarchive/libarchive/archive_read_disk_posix.c releng/11.0/contrib/libarchive/libarchive/archive_read_support_format_tar.c releng/11.0/contrib/libarchive/libarchive/archive_write_disk_acl.c releng/11.0/contrib/libarchive/libarchive/archive_write_disk_posix.c releng/11.0/contrib/libarchive/libarchive/test/test_acl_freebsd_posix1e.c releng/11.0/contrib/libarchive/libarchive/test/test_write_disk_secure745.c releng/11.0/contrib/libarchive/libarchive/test/test_write_disk_secure746.c releng/11.0/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c releng/11.0/lib/libarchive/config_freebsd.h releng/11.0/lib/libarchive/tests/Makefile releng/11.0/usr.bin/bsdiff/bspatch/bspatch.c releng/11.0/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: releng/11.0/ (props changed) Copied: releng/11.0/contrib/libarchive/README.md (from r305754, stable/11/contrib/libarchive/README.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/11.0/contrib/libarchive/README.md Tue Sep 27 19:36:12 2016 (r306379, copy of r305754, stable/11/contrib/libarchive/README.md) @@ -0,0 +1,222 @@ +# Welcome to libarchive! + +The libarchive project develops a portable, efficient C library that +can read and write streaming archives in a variety of formats. It +also includes implementations of the common `tar`, `cpio`, and `zcat` +command-line tools that use the libarchive library. + +## Questions? Issues? + +* http://www.libarchive.org is the home for ongoing + libarchive development, including documentation, + and links to the libarchive mailing lists. +* To report an issue, use the issue tracker at + https://github.com/libarchive/libarchive/issues +* To submit an enhancement to libarchive, please + submit a pull request via GitHub: https://github.com/libarchive/libarchive/pulls + +## Contents of the Distribution + +This distribution bundle includes the following major components: + +* **libarchive**: a library for reading and writing streaming archives +* **tar**: the 'bsdtar' program is a full-featured 'tar' implementation built on libarchive +* **cpio**: the 'bsdcpio' program is a different interface to essentially the same functionality +* **cat**: the 'bsdcat' program is a simple replacement tool for zcat, bzcat, xzcat, and such +* **examples**: Some small example programs that you may find useful. +* **examples/minitar**: a compact sample demonstrating use of libarchive. +* **contrib**: Various items sent to me by third parties; please contact the authors with any questions. + +The top-level directory contains the following information files: + +* **NEWS** - highlights of recent changes +* **COPYING** - what you can do with this +* **INSTALL** - installation instructions +* **README** - this file +* **CMakeLists.txt** - input for "cmake" build tool, see INSTALL +* **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`). + +The following files in the top-level directory are used by the 'configure' script: +* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers +* `Makefile.in`, `config.h.in` - templates used by configure script + +## Documentation + +In addition to the informational articles and documentation +in the online [libarchive Wiki](https://github.com/libarchive/libarchive/wiki), +the distribution also includes a number of manual pages: + + * bsdtar.1 explains the use of the bsdtar program + * bsdcpio.1 explains the use of the bsdcpio program + * bsdcat.1 explains the use of the bsdcat program + * libarchive.3 gives an overview of the library as a whole + * archive_read.3, archive_write.3, archive_write_disk.3, and + archive_read_disk.3 provide detailed calling sequences for the read + and write APIs + * archive_entry.3 details the "struct archive_entry" utility class + * archive_internals.3 provides some insight into libarchive's + internal structure and operation. + * libarchive-formats.5 documents the file formats supported by the library + * cpio.5, mtree.5, and tar.5 provide detailed information about these + popular archive formats, including hard-to-find details about + modern cpio and tar variants. + +The manual pages above are provided in the 'doc' directory in +a number of different formats. + +You should also read the copious comments in `archive.h` and the +source code for the sample programs for more details. Please let us +know about any errors or omissions you find. + +## Supported Formats + +Currently, the library automatically detects and reads the following fomats: + * Old V7 tar archives + * POSIX ustar + * GNU tar format (including GNU long filenames, long link names, and sparse files) + * Solaris 9 extended tar format (including ACLs) + * POSIX pax interchange format + * POSIX octet-oriented cpio + * SVR4 ASCII cpio + * POSIX octet-oriented cpio + * Binary cpio (big-endian or little-endian) + * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) + * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives) + * GNU and BSD 'ar' archives + * 'mtree' format + * 7-Zip archives + * Microsoft CAB format + * LHA and LZH archives + * RAR archives (with some limitations due to RAR's proprietary status) + * XAR archives + +The library also detects and handles any of the following before evaluating the archive: + * uuencoded files + * files with RPM wrapper + * gzip compression + * bzip2 compression + * compress/LZW compression + * lzma, lzip, and xz compression + * lz4 compression + * lzop compression + +The library can create archives in any of the following formats: + * POSIX ustar + * POSIX pax interchange format + * "restricted" pax format, which will create ustar archives except for + entries that require pax extensions (for long filenames, ACLs, etc). + * Old GNU tar format + * Old V7 tar format + * POSIX octet-oriented cpio + * SVR4 "newc" cpio + * shar archives + * ZIP archives (with uncompressed or "deflate" compressed entries) + * GNU and BSD 'ar' archives + * 'mtree' format + * ISO9660 format + * 7-Zip archives + * XAR archives + +When creating archives, the result can be filtered with any of the following: + * uuencode + * gzip compression + * bzip2 compression + * compress/LZW compression + * lzma, lzip, and xz compression + * lz4 compression + * lzop compression + +## Notes about the Library Design + +The following notes address many of the most common +questions we are asked about libarchive: + +* This is a heavily stream-oriented system. That means that + it is optimized to read or write the archive in a single + pass from beginning to end. For example, this allows + libarchive to process archives too large to store on disk + by processing them on-the-fly as they are read from or + written to a network or tape drive. This also makes + libarchive useful for tools that need to produce + archives on-the-fly (such as webservers that provide + archived contents of a users account). + +* In-place modification and random access to the contents + of an archive are not directly supported. For some formats, + this is not an issue: For example, tar.gz archives are not + designed for random access. In some other cases, libarchive + can re-open an archive and scan it from the beginning quickly + enough to provide the needed abilities even without true + random access. Of course, some applications do require true + random access; those applications should consider alternatives + to libarchive. + +* The library is designed to be extended with new compression and + archive formats. The only requirement is that the format be + readable or writable as a stream and that each archive entry be + independent. There are articles on the libarchive Wiki explaining + how to extend libarchive. + +* On read, compression and format are always detected automatically. + +* The same API is used for all formats; in particular, it's very + easy for software using libarchive to transparently handle + any of libarchive's archiving formats. + +* Libarchive's automatic support for decompression can be used + without archiving by explicitly selecting the "raw" and "empty" + formats. + +* I've attempted to minimize static link pollution. If you don't + explicitly invoke a particular feature (such as support for a + particular compression or format), it won't get pulled in to + statically-linked programs. In particular, if you don't explicitly + enable a particular compression or decompression support, you won't + need to link against the corresponding compression or decompression + libraries. This also reduces the size of statically-linked + binaries in environments where that matters. + +* The library is generally _thread safe_ depending on the platform: + it does not define any global variables of its own. However, some + platforms do not provide fully thread-safe versions of key C library + functions. On those platforms, libarchive will use the non-thread-safe + functions. Patches to improve this are of great interest to us. + +* In particular, libarchive's modules to read or write a directory + tree do use `chdir()` to optimize the directory traversals. This + can cause problems for programs that expect to do disk access from + multiple threads. Of course, those modules are completely + optional and you can use the rest of libarchive without them. + +* The library is _not_ thread aware, however. It does no locking + or thread management of any kind. If you create a libarchive + object and need to access it from multiple threads, you will + need to provide your own locking. + +* On read, the library accepts whatever blocks you hand it. + Your read callback is free to pass the library a byte at a time + or mmap the entire archive and give it to the library at once. + On write, the library always produces correctly-blocked output. + +* The object-style approach allows you to have multiple archive streams + open at once. bsdtar uses this in its "@archive" extension. + +* The archive itself is read/written using callback functions. + You can read an archive directly from an in-memory buffer or + write it to a socket, if you wish. There are some utility + functions to provide easy-to-use "open file," etc, capabilities. + +* The read/write APIs are designed to allow individual entries + to be read or written to any data source: You can create + a block of data in memory and add it to a tar archive without + first writing a temporary file. You can also read an entry from + an archive and write the data directly to a socket. If you want + to read/write entries to disk, there are convenience functions to + make this especially easy. + +* Note: The "pax interchange format" is a POSIX standard extended tar + format that should be used when the older _ustar_ format is not + appropriate. It has many advantages over other tar formats + (including the legacy GNU tar format) and is widely supported by + current tar implementations. + Modified: releng/11.0/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_acl.c Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_acl.c Tue Sep 27 19:36:12 2016 (r306379) @@ -707,10 +707,11 @@ archive_acl_text_l(struct archive_acl *a if (r != 0) return (-1); *p++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) + if (name == NULL || (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID)) { id = ap->id; - else + } else { id = -1; + } append_entry(&p, NULL, ap->tag, name, ap->permset, id); count++; Modified: releng/11.0/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_platform.h Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_platform.h Tue Sep 27 19:36:12 2016 (r306379) @@ -159,6 +159,15 @@ #define CAN_RESTORE_METADATA_FD #endif +/* + * glibc 2.24 deprecates readdir_r + */ +#if defined(HAVE_READDIR_R) && (!defined(__GLIBC__) || !defined(__GLIBC_MINOR__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24)) +#define USE_READDIR_R 1 +#else +#undef USE_READDIR_R +#endif + /* Set up defaults for internal error codes. */ #ifndef ARCHIVE_ERRNO_FILE_FORMAT #if HAVE_EFTYPE Modified: releng/11.0/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Tue Sep 27 19:36:12 2016 (r306379) @@ -411,20 +411,38 @@ setup_acls(struct archive_read_disk *a, { const char *accpath; acl_t acl; -#if HAVE_ACL_IS_TRIVIAL_NP int r; -#endif accpath = archive_entry_sourcepath(entry); if (accpath == NULL) accpath = archive_entry_pathname(entry); + if (*fd < 0 && a->tree != NULL) { + if (a->follow_symlinks || + archive_entry_filetype(entry) != AE_IFLNK) + *fd = a->open_on_current_dir(a->tree, + accpath, O_RDONLY | O_NONBLOCK); + if (*fd < 0) { + if (a->tree_enter_working_dir(a->tree) != 0) { + archive_set_error(&a->archive, errno, + "Couldn't access %s", accpath); + return (ARCHIVE_FAILED); + } + } + } + archive_entry_acl_clear(entry); + acl = NULL; + #ifdef ACL_TYPE_NFS4 /* Try NFS4 ACL first. */ if (*fd >= 0) +#if HAVE_ACL_GET_FD_NP + acl = acl_get_fd_np(*fd, ACL_TYPE_NFS4); +#else acl = acl_get_fd(*fd); +#endif #if HAVE_ACL_GET_LINK_NP else if (!a->follow_symlinks) acl = acl_get_link_np(accpath, ACL_TYPE_NFS4); @@ -437,20 +455,31 @@ setup_acls(struct archive_read_disk *a, #endif else acl = acl_get_file(accpath, ACL_TYPE_NFS4); + #if HAVE_ACL_IS_TRIVIAL_NP - /* Ignore "trivial" ACLs that just mirror the file mode. */ - acl_is_trivial_np(acl, &r); - if (r) { - acl_free(acl); - acl = NULL; + if (acl != NULL && acl_is_trivial_np(acl, &r) == 0) { + /* Ignore "trivial" ACLs that just mirror the file mode. */ + if (r) { + acl_free(acl); + acl = NULL; + /* + * Simultaneous NFSv4 and POSIX.1e ACLs for the same + * entry are not allowed, so we should return here + */ + return (ARCHIVE_OK); + } } #endif if (acl != NULL) { - translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); acl_free(acl); - return (ARCHIVE_OK); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate NFSv4 ACLs: %s", accpath); + } + return (r); } -#endif +#endif /* ACL_TYPE_NFS4 */ /* Retrieve access ACL from file. */ if (*fd >= 0) @@ -467,19 +496,42 @@ setup_acls(struct archive_read_disk *a, #endif else acl = acl_get_file(accpath, ACL_TYPE_ACCESS); + +#if HAVE_ACL_IS_TRIVIAL_NP + /* Ignore "trivial" ACLs that just mirror the file mode. */ + if (acl != NULL && acl_is_trivial_np(acl, &r) == 0) { + if (r) { + acl_free(acl); + acl = NULL; + } + } +#endif + if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); acl_free(acl); + acl = NULL; + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate access ACLs: %s", accpath); + return (r); + } } /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_DEFAULT); acl_free(acl); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate default ACLs: %s", + accpath); + return (r); + } } } return (ARCHIVE_OK); @@ -535,19 +587,23 @@ translate_acl(struct archive_read_disk * #ifdef ACL_TYPE_NFS4 acl_entry_type_t acl_type; acl_flagset_t acl_flagset; - int brand, r; + int brand; #endif acl_entry_t acl_entry; acl_permset_t acl_permset; int i, entry_acl_type; - int s, ae_id, ae_tag, ae_perm; + int r, s, ae_id, ae_tag, ae_perm; const char *ae_name; #ifdef ACL_TYPE_NFS4 // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 // Make sure the "brand" on this ACL is consistent // with the default_entry_acl_type bits provided. - acl_get_brand_np(acl, &brand); + if (acl_get_brand_np(acl, &brand) != 0) { + archive_set_error(&a->archive, errno, + "Failed to read ACL brand"); + return (ARCHIVE_WARN); + } switch (brand) { case ACL_BRAND_POSIX: switch (default_entry_acl_type) { @@ -555,31 +611,43 @@ translate_acl(struct archive_read_disk * case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for POSIX.1e ACL"); + return (ARCHIVE_WARN); } break; case ACL_BRAND_NFS4: if (default_entry_acl_type & ~ARCHIVE_ENTRY_ACL_TYPE_NFS4) { - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for NFSv4 ACL"); + return (ARCHIVE_WARN); } break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Unknown ACL brand"); + return (ARCHIVE_WARN); break; } #endif s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get first ACL entry"); + return (ARCHIVE_WARN); + } while (s == 1) { ae_id = -1; ae_name = NULL; ae_perm = 0; - acl_get_tag_type(acl_entry, &acl_tag); + if (acl_get_tag_type(acl_entry, &acl_tag) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL tag type"); + return (ARCHIVE_WARN); + } switch (acl_tag) { case ACL_USER: ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry); @@ -614,13 +682,18 @@ translate_acl(struct archive_read_disk * continue; } - // XXX acl type maps to allow/deny/audit/YYYY bits - // XXX acl_get_entry_type_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs + // XXX acl_type maps to allow/deny/audit/YYYY bits entry_acl_type = default_entry_acl_type; #ifdef ACL_TYPE_NFS4 - r = acl_get_entry_type_np(acl_entry, &acl_type); - if (r == 0) { + if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_entry_type_np() falis with non-NFSv4 ACLs + */ + if (acl_get_entry_type_np(acl_entry, &acl_type) != 0) { + archive_set_error(&a->archive, errno, "Failed " + "to get ACL type from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } switch (acl_type) { case ACL_ENTRY_TYPE_ALLOW: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; @@ -634,32 +707,53 @@ translate_acl(struct archive_read_disk * case ACL_ENTRY_TYPE_ALARM: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; break; + default: + archive_set_error(&a->archive, errno, + "Invalid NFSv4 ACL entry type"); + return (ARCHIVE_WARN); } - } - /* - * Libarchive stores "flag" (NFSv4 inheritance bits) - * in the ae_perm bitmap. - */ - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { + /* + * Libarchive stores "flag" (NFSv4 inheritance bits) + * in the ae_perm bitmap. + * + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get flagset from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (acl_get_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit)) + r = acl_get_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check flag in a NFSv4 " + "ACL flagset"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_inherit_map[i].archive_inherit; } } #endif - acl_get_permset(acl_entry, &acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL permission set"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { /* * acl_get_perm() is spelled differently on different * platforms; see above. */ - if (ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm)) + r = ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check permission in an ACL permission set"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_perm_map[i].archive_perm; } @@ -668,6 +762,11 @@ translate_acl(struct archive_read_disk * ae_id, ae_name); s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get next ACL entry"); + return (ARCHIVE_WARN); + } } return (ARCHIVE_OK); } Modified: releng/11.0/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_read_disk_posix.c Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_read_disk_posix.c Tue Sep 27 19:36:12 2016 (r306379) @@ -165,7 +165,7 @@ struct filesystem { int synthetic; int remote; int noatime; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t name_max; #endif long incr_xfer_size; @@ -200,7 +200,7 @@ struct tree { DIR *d; #define INVALID_DIR_HANDLE NULL struct dirent *de; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) struct dirent *dirent; size_t dirent_allocated; #endif @@ -1504,10 +1504,19 @@ setup_current_filesystem(struct archive_ struct tree *t = a->tree; struct statfs sfs; #if defined(HAVE_GETVFSBYNAME) && defined(VFCF_SYNTHETIC) -# if defined(HAVE_STRUCT_VFSCONF) - struct vfsconf vfc; -# else +/* TODO: configure should set GETVFSBYNAME_ARG_TYPE to make + * this accurate; some platforms have both and we need the one that's + * used by getvfsbyname() + * + * Then the following would become: + * #if defined(GETVFSBYNAME_ARG_TYPE) + * GETVFSBYNAME_ARG_TYPE vfc; + * #endif + */ +# if defined(HAVE_STRUCT_XVFSCONF) struct xvfsconf vfc; +# else + struct vfsconf vfc; # endif #endif int r, xr = 0; @@ -1583,7 +1592,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ #if defined(HAVE_STRUCT_STATFS_F_NAMEMAX) t->current_filesystem->name_max = sfs.f_namemax; @@ -1606,7 +1615,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; #endif -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -1808,7 +1817,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namelen; #endif @@ -1892,7 +1901,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namemax; #endif @@ -1909,7 +1918,7 @@ static int setup_current_filesystem(struct archive_read_disk *a) { struct tree *t = a->tree; -#if defined(_PC_NAME_MAX) && defined(HAVE_READDIR_R) +#if defined(_PC_NAME_MAX) && defined(USE_READDIR_R) long nm; #endif t->current_filesystem->synthetic = -1;/* Not supported */ @@ -1921,7 +1930,7 @@ setup_current_filesystem(struct archive_ t->current_filesystem->min_xfer_size = -1; t->current_filesystem->incr_xfer_size = -1; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ # if defined(_PC_NAME_MAX) if (tree_current_is_symblic_link_target(t)) { @@ -1949,7 +1958,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; # endif /* _PC_NAME_MAX */ -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -2357,7 +2366,7 @@ tree_dir_next_posix(struct tree *t) size_t namelen; if (t->d == NULL) { -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t dirent_size; #endif @@ -2378,7 +2387,7 @@ tree_dir_next_posix(struct tree *t) t->visit_type = r != 0 ? r : TREE_ERROR_DIR; return (t->visit_type); } -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) dirent_size = offsetof(struct dirent, d_name) + t->filesystem_table[t->current->filesystem_id].name_max + 1; if (t->dirent == NULL || t->dirent_allocated < dirent_size) { @@ -2395,11 +2404,11 @@ tree_dir_next_posix(struct tree *t) } t->dirent_allocated = dirent_size; } -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ } for (;;) { errno = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) r = readdir_r(t->d, t->dirent, &t->de); #ifdef _AIX /* Note: According to the man page, return value 9 indicates @@ -2651,7 +2660,7 @@ tree_free(struct tree *t) if (t == NULL) return; archive_string_free(&t->path); -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) free(t->dirent); #endif free(t->sparse_list); Modified: releng/11.0/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_read_support_format_tar.c Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_read_support_format_tar.c Tue Sep 27 19:36:12 2016 (r306379) @@ -136,6 +136,7 @@ struct tar { int64_t entry_padding; int64_t entry_bytes_unconsumed; int64_t realsize; + int sparse_allowed; struct sparse_block *sparse_list; struct sparse_block *sparse_last; int64_t sparse_offset; @@ -1271,6 +1272,14 @@ header_common(struct archive_read *a, st * sparse information in the extended area. */ /* FALLTHROUGH */ + case '0': + /* + * Enable sparse file "read" support only for regular + * files and explicit GNU sparse files. However, we + * don't allow non-standard file types to be sparse. + */ + tar->sparse_allowed = 1; + /* FALLTHROUGH */ default: /* Regular file and non-standard types */ /* * Per POSIX: non-recognized types should always be @@ -1730,6 +1739,14 @@ pax_attribute(struct archive_read *a, st #endif switch (key[0]) { case 'G': + /* Reject GNU.sparse.* headers on non-regular files. */ + if (strncmp(key, "GNU.sparse", 10) == 0 && + !tar->sparse_allowed) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Non-regular file cannot be sparse"); + return (ARCHIVE_FATAL); + } + /* GNU "0.0" sparse pax format. */ if (strcmp(key, "GNU.sparse.numblocks") == 0) { tar->sparse_offset = -1; Modified: releng/11.0/contrib/libarchive/libarchive/archive_write_disk_acl.c ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_write_disk_acl.c Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_write_disk_acl.c Tue Sep 27 19:36:12 2016 (r306379) @@ -153,9 +153,19 @@ set_acl(struct archive *a, int fd, const if (entries == 0) return (ARCHIVE_OK); acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { - acl_create_entry(&acl, &acl_entry); + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } switch (ae_tag) { case ARCHIVE_ENTRY_ACL_USER: @@ -186,53 +196,96 @@ set_acl(struct archive *a, int fd, const break; #endif default: - /* XXX */ - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; } #ifdef ACL_TYPE_NFS4 + r = 0; switch (ae_type) { case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); break; case ARCHIVE_ENTRY_ACL_TYPE_DENY: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); break; case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); break; case ARCHIVE_ENTRY_ACL_TYPE_ALARM: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); break; case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: // These don't translate directly into the system ACL. break; default: - // XXX error handling here. - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (r != 0) { + archive_set_error(a, errno, + "Failed to set ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; } #endif - acl_get_permset(acl_entry, &acl_permset); - acl_clear_perms(acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { if (ae_permset & acl_perm_map[i].archive_perm) - acl_add_perm(acl_permset, - acl_perm_map[i].platform_perm); + if (acl_add_perm(acl_permset, + acl_perm_map[i].platform_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } } #ifdef ACL_TYPE_NFS4 - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { - acl_clear_flags_np(acl_flagset); + if (acl_type == ACL_TYPE_NFS4) { + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (ae_permset & acl_inherit_map[i].archive_inherit) - acl_add_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit); + if (ae_permset & acl_inherit_map[i].archive_inherit) { + if (acl_add_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit) != 0) { + archive_set_error(a, errno, + "Failed to add flag to NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } } } #endif @@ -262,6 +315,7 @@ set_acl(struct archive *a, int fd, const ret = ARCHIVE_WARN; } #endif +exit_free: acl_free(acl); return (ret); } Modified: releng/11.0/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- releng/11.0/contrib/libarchive/libarchive/archive_write_disk_posix.c Tue Sep 27 19:00:22 2016 (r306378) +++ releng/11.0/contrib/libarchive/libarchive/archive_write_disk_posix.c Tue Sep 27 19:36:12 2016 (r306379) @@ -140,7 +140,17 @@ __FBSDID("$FreeBSD$"); #define O_BINARY 0 #endif #ifndef O_CLOEXEC -#define O_CLOEXEC 0 +#define O_CLOEXEC 0 +#endif + +/* Ignore non-int O_NOFOLLOW constant. */ +/* gnulib's fcntl.h does this on AIX, but it seems practical everywhere */ +#if defined O_NOFOLLOW && !(INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) +#undef O_NOFOLLOW +#endif + +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 #endif struct fixup_entry { @@ -326,12 +336,14 @@ struct archive_write_disk { #define HFS_BLOCKS(s) ((s) >> 12) +static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int check_symlinks(struct archive_write_disk *); static int create_filesystem_object(struct archive_write_disk *); static struct fixup_entry *current_fixup(struct archive_write_disk *, const char *pathname); #if defined(HAVE_FCHDIR) && defined(PATH_MAX) static void edit_deep_directories(struct archive_write_disk *ad); #endif +static int cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int cleanup_pathname(struct archive_write_disk *); static int create_dir(struct archive_write_disk *, char *); static int create_parent_dir(struct archive_write_disk *, char *); @@ -2014,6 +2026,10 @@ create_filesystem_object(struct archive_ const char *linkname; mode_t final_mode, mode; int r; + /* these for check_symlinks_fsobj */ + char *linkname_copy; /* non-const copy of linkname */ + struct archive_string error_string; + int error_number; /* We identify hard/symlinks according to the link names. */ /* Since link(2) and symlink(2) don't handle modes, we're done here. */ @@ -2022,6 +2038,27 @@ create_filesystem_object(struct archive_ #if !HAVE_LINK return (EPERM); #else + archive_string_init(&error_string); + linkname_copy = strdup(linkname); + if (linkname_copy == NULL) { + return (EPERM); + } + /* TODO: consider using the cleaned-up path as the link target? */ + r = cleanup_pathname_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + r = check_symlinks_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + free(linkname_copy); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries @@ -2040,7 +2077,7 @@ create_filesystem_object(struct archive_ a->deferred = 0; } else if (r == 0 && a->filesize > 0) { a->fd = open(a->name, - O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC); + O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC | O_NOFOLLOW); __archive_ensure_cloexec_flag(a->fd); if (a->fd < 0) r = errno; @@ -2351,126 +2388,233 @@ current_fixup(struct archive_write_disk return (a->current_fixup); } -/* TODO: Make this work. */ -/* - * TODO: The deep-directory support bypasses this; disable deep directory - * support if we're doing symlink checks. - */ /* * TODO: Someday, integrate this with the deep dir support; they both * scan the path and both can be optimized by comparing against other * recent paths. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Sep 27 20:40:45 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 D4529BEBD19; Tue, 27 Sep 2016 20:40:45 +0000 (UTC) (envelope-from tsoome@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 A7516E66; Tue, 27 Sep 2016 20:40:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RKei86081976; Tue, 27 Sep 2016 20:40:44 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RKeiTZ081975; Tue, 27 Sep 2016 20:40:44 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201609272040.u8RKeiTZ081975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 27 Sep 2016 20:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306380 - 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.23 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: Tue, 27 Sep 2016 20:40:45 -0000 Author: tsoome Date: Tue Sep 27 20:40:44 2016 New Revision: 306380 URL: https://svnweb.freebsd.org/changeset/base/306380 Log: loader command interpreter should reset command_errmsg The command interpreter does leave command_errmsg as is after printing its content, assuming the next command will reset it in bf_command(). However, in case the forth native word is defined as builtin, the bf_command is not used and forth words will also end up the command_errmsg content printed. Since command_errmsg is pointer to actual error message, which can be static read only string, we can not just set *command_errmsg = '\0', instead we need to reset the pointer itself. Illumos issue: https://www.illumos.org/issues/7405 Reported by: Igor Kozhukhov. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8032 Modified: head/sys/boot/common/interp_forth.c Modified: head/sys/boot/common/interp_forth.c ============================================================================== --- head/sys/boot/common/interp_forth.c Tue Sep 27 19:36:12 2016 (r306379) +++ head/sys/boot/common/interp_forth.c Tue Sep 27 20:40:44 2016 (r306380) @@ -325,13 +325,15 @@ bf_run(char *line) printf("Parse error!\n"); break; default: - /* Hopefully, all other codes filled this buffer */ - printf("%s\n", command_errmsg); + if (command_errmsg != NULL) { + printf("%s\n", command_errmsg); + command_errmsg = NULL; + } } if (result == VM_USEREXIT) panic("interpreter exit"); setenv("interpret", bf_vm->state ? "" : "OK", 1); - return result; + return (result); } From owner-svn-src-all@freebsd.org Tue Sep 27 21:00: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 ED5D6C00AEC; Tue, 27 Sep 2016 21:00:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 CA781304; Tue, 27 Sep 2016 21:00:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id D036010AF8D; Tue, 27 Sep 2016 17:00:28 -0400 (EDT) From: John Baldwin To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306355 - in head/sys: dev/atkbdc sys Date: Tue, 27 Sep 2016 13:55:54 -0700 Message-ID: <3815150.rnkVxtqPiv@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609262206.u8QM6J5q070986@repo.freebsd.org> References: <201609262206.u8QM6J5q070986@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 27 Sep 2016 17:00:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 27 Sep 2016 21:00:36 -0000 On Monday, September 26, 2016 10:06:19 PM Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Mon Sep 26 22:06:19 2016 > New Revision: 306355 > URL: https://svnweb.freebsd.org/changeset/base/306355 > > Log: > Add Elantech trackpad support > > Elantech trackpads are found in some laptops like the Asus UX31E. They > are "synaptics compatible" but use a slightly different protocol. > > Elantech hardware support is not enabled by default and just like > Synaptic or TrackPoint devices it should be enabled by setting > tunable, in this case hw.psm.elantech_support, to non-zero value > > PR: 205690 > Submitted by: Vladimir Kondratyev > MFC after: 1 week > > Modified: head/sys/dev/atkbdc/psm.c > ============================================================================== > --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 (r306354) > +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 (r306355) > @@ -389,6 +465,9 @@ TUNABLE_INT("hw.psm.synaptics_support", > static int trackpoint_support = 0; > TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); > > +static int elantech_support = 0; > +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); > + > static int verbose = PSM_DEBUG; > TUNABLE_INT("debug.psm.loglevel", &verbose); It would be good to expose all these tunables as CTLFLAG_RDTUN sysctls. Exposing them that way with a decent description string makes it easier for users to discover tunables. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Sep 27 21:11: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 CDC72C00EC9; Tue, 27 Sep 2016 21:11:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87033DFB; Tue, 27 Sep 2016 21:11:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RLB8C0092697; Tue, 27 Sep 2016 21:11:08 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RLB7nv092687; Tue, 27 Sep 2016 21:11:07 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609272111.u8RLB7nv092687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 27 Sep 2016 21:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306381 - in vendor/unbound/dist: . compat contrib daemon dns64 doc iterator libunbound services sldns smallapp testcode testdata util util/storage validator winrc X-SVN-Group: vendor 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.23 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: Tue, 27 Sep 2016 21:11:10 -0000 Author: des Date: Tue Sep 27 21:11:07 2016 New Revision: 306381 URL: https://svnweb.freebsd.org/changeset/base/306381 Log: import unbound 1.5.10 Added: vendor/unbound/dist/contrib/libunbound.pc.in (contents, props changed) vendor/unbound/dist/testdata/iter_resolve_minimised_timeout.rpl vendor/unbound/dist/testdata/local_acl_override.rpl vendor/unbound/dist/testdata/local_acl_taglist.rpl vendor/unbound/dist/testdata/local_acl_taglist_action.rpl Modified: vendor/unbound/dist/Makefile.in vendor/unbound/dist/acx_python.m4 vendor/unbound/dist/compat/arc4random.c vendor/unbound/dist/compat/getentropy_linux.c vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/daemon/acl_list.c vendor/unbound/dist/daemon/acl_list.h vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/remote.h vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/dns64/dns64.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/doc/unbound.doxygen vendor/unbound/dist/iterator/iter_hints.c vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/iterator/iterator.h vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/localzone.h vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/sldns/keyraw.c vendor/unbound/dist/sldns/rrdef.h vendor/unbound/dist/sldns/wire2str.h vendor/unbound/dist/smallapp/unbound-anchor.c vendor/unbound/dist/smallapp/unbound-checkconf.c vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/smallapp/unbound-host.c vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testcode/lock_verify.c vendor/unbound/dist/testcode/memstats.c vendor/unbound/dist/testcode/petal.c vendor/unbound/dist/testcode/signit.c vendor/unbound/dist/testcode/streamtcp.c vendor/unbound/dist/testcode/testbound.c vendor/unbound/dist/testcode/testpkts.c vendor/unbound/dist/testcode/unitmain.c vendor/unbound/dist/testdata/iter_resolve_minimised.rpl vendor/unbound/dist/testdata/iter_resolve_minimised_nx.rpl vendor/unbound/dist/testdata/iter_resolve_minimised_refused.rpl vendor/unbound/dist/util/alloc.c vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/net_help.c vendor/unbound/dist/util/netevent.c vendor/unbound/dist/util/netevent.h vendor/unbound/dist/util/storage/dnstree.c vendor/unbound/dist/util/storage/dnstree.h vendor/unbound/dist/util/storage/lookup3.c vendor/unbound/dist/util/ub_event.c vendor/unbound/dist/util/ub_event.h vendor/unbound/dist/util/ub_event_pluggable.c vendor/unbound/dist/util/winsock_event.c vendor/unbound/dist/validator/autotrust.c vendor/unbound/dist/validator/val_secalgo.c vendor/unbound/dist/validator/val_sigcrypt.c vendor/unbound/dist/validator/validator.c vendor/unbound/dist/winrc/setup.nsi vendor/unbound/dist/winrc/w_inst.c vendor/unbound/dist/winrc/win_svc.c Modified: vendor/unbound/dist/Makefile.in ============================================================================== --- vendor/unbound/dist/Makefile.in Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/Makefile.in Tue Sep 27 21:11:07 2016 (r306381) @@ -81,7 +81,7 @@ LINTFLAGS+=@NETBSD_LINTFLAGS@ # compat with OpenBSD LINTFLAGS+="-Dsigset_t=long" # FreeBSD -LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list" +LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list" "-D__uint32_t=uint32_t" INSTALL=$(SHELL) $(srcdir)/install-sh @@ -228,7 +228,7 @@ SVCUNINST_OBJ_LINK=$(SVCUNINST_OBJ) w_in $(COMPAT_OBJ_WITHOUT_CTIMEARC4) ANCHORUPD_SRC=winrc/anchor-update.c ANCHORUPD_OBJ=anchor-update.lo -ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIMEARC4) +ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIMEARC4) wire2str.lo str2wire.lo parseutil.lo sbuffer.lo rrdef.lo keyraw.lo parse.lo RSRC_OBJ=rsrc_svcinst.o rsrc_svcuninst.o rsrc_anchorupd.o rsrc_unbound.o \ rsrc_unbound_host.o rsrc_unbound_anchor.o rsrc_unbound_control.o \ rsrc_unbound_checkconf.o @@ -704,11 +704,12 @@ listen_dnsport.lo listen_dnsport.o: $(sr $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/util/as112.h + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/util/as112.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ @@ -759,7 +760,7 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ @@ -956,7 +957,8 @@ unitldns.lo unitldns.o: $(srcdir)/testco $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h $(srcdir)/daemon/cachedump.h \ $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1063,7 +1065,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/libunbound/libworker.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ @@ -1134,8 +1137,8 @@ context.lo context.o: $(srcdir)/libunbou $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1143,7 +1146,7 @@ libunbound.lo libunbound.o: $(srcdir)/li $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ @@ -1153,11 +1156,12 @@ libworker.lo libworker.o: $(srcdir)/libu $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \ $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h \ - $(srcdir)/util/random.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ @@ -1225,7 +1229,6 @@ snprintf.lo snprintf.o: $(srcdir)/compat strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h -strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c config.h getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c config.h getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c config.h @@ -1237,3 +1240,4 @@ arc4_lock.lo arc4_lock.o: $(srcdir)/comp sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h isblank.lo isblank.o: $(srcdir)/compat/isblank.c config.h +strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h Modified: vendor/unbound/dist/acx_python.m4 ============================================================================== --- vendor/unbound/dist/acx_python.m4 Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/acx_python.m4 Tue Sep 27 21:11:07 2016 (r306381) @@ -54,7 +54,7 @@ $ac_distutils_result]) AC_MSG_CHECKING([for Python library path]) if test -z "$PYTHON_LDFLAGS"; then PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print(get_config_var('BLDLIBRARY'));"` + print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` fi AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) Modified: vendor/unbound/dist/compat/arc4random.c ============================================================================== --- vendor/unbound/dist/compat/arc4random.c Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/compat/arc4random.c Tue Sep 27 21:11:07 2016 (r306381) @@ -48,6 +48,9 @@ #else /* !__GNUC__ */ #define inline #endif /* !__GNUC__ */ +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #define KEYSZ 32 #define IVSZ 8 Modified: vendor/unbound/dist/compat/getentropy_linux.c ============================================================================== --- vendor/unbound/dist/compat/getentropy_linux.c Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/compat/getentropy_linux.c Tue Sep 27 21:11:07 2016 (r306381) @@ -60,6 +60,9 @@ #include #endif #include +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #define REPEAT 5 #define min(a, b) (((a) < (b)) ? (a) : (b)) Modified: vendor/unbound/dist/config.h.in ============================================================================== --- vendor/unbound/dist/config.h.in Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/config.h.in Tue Sep 27 21:11:07 2016 (r306381) @@ -51,6 +51,9 @@ /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT +/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ +#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA + /* Define to 1 if you have the `ctime_r' function. */ #undef HAVE_CTIME_R @@ -110,9 +113,18 @@ /* Define to 1 if you have the `endprotoent' function. */ #undef HAVE_ENDPROTOENT +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + /* Define to 1 if you have the `endservent' function. */ #undef HAVE_ENDSERVENT +/* Define to 1 if you have the `ERR_free_strings' function. */ +#undef HAVE_ERR_FREE_STRINGS + +/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ +#undef HAVE_ERR_LOAD_CRYPTO_STRINGS + /* Define to 1 if you have the `event_base_free' function. */ #undef HAVE_EVENT_BASE_FREE @@ -128,6 +140,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_EVENT_H +/* Define to 1 if you have the `EVP_cleanup' function. */ +#undef HAVE_EVP_CLEANUP + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ #undef HAVE_EVP_MD_CTX_NEW @@ -254,24 +269,48 @@ /* Use libnettle for crypto */ #undef HAVE_NETTLE +/* Define to 1 if you have the header file. */ +#undef HAVE_NETTLE_DSA_COMPAT_H + /* Use libnss for crypto */ #undef HAVE_NSS +/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ +#undef HAVE_OPENSSL_ADD_ALL_DIGESTS + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_BN_H + /* Define to 1 if you have the `OPENSSL_config' function. */ #undef HAVE_OPENSSL_CONFIG /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_CONF_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DH_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DSA_H + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ENGINE_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ERR_H +/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ +#undef HAVE_OPENSSL_INIT_CRYPTO + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +#undef HAVE_OPENSSL_INIT_SSL + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RAND_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_RSA_H + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SSL_H @@ -296,6 +335,9 @@ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM +/* Define to 1 if you have the `RAND_cleanup' function. */ +#undef HAVE_RAND_CLEANUP + /* Define to 1 if you have the `reallocarray' function. */ #undef HAVE_REALLOCARRAY @@ -610,6 +652,12 @@ /* Define if you want to use internal select based events */ #undef USE_MINI_EVENT +/* Define this to enable client TCP Fast Open. */ +#undef USE_MSG_FASTOPEN + +/* Define this to enable client TCP Fast Open. */ +#undef USE_OSX_MSG_FASTOPEN + /* Define this to enable SHA256 and SHA512 support. */ #undef USE_SHA2 @@ -635,6 +683,9 @@ #endif +/* Define this to enable server TCP Fast Open. */ +#undef USE_TCP_FASTOPEN + /* Whether the windows socket API is used */ #undef USE_WINSOCK Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/configure Tue Sep 27 21:11:07 2016 (r306381) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.9. +# Generated by GNU Autoconf 2.69 for unbound 1.5.10. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.9' -PACKAGE_STRING='unbound 1.5.9' +PACKAGE_VERSION='1.5.10' +PACKAGE_STRING='unbound 1.5.10' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -834,6 +834,8 @@ enable_gost enable_ecdsa enable_dsa enable_event_api +enable_tfo_client +enable_tfo_server with_libevent with_libexpat enable_static_exe @@ -1399,7 +1401,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.9 to adapt to many kinds of systems. +\`configure' configures unbound 1.5.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1464,7 +1466,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.9:";; + short | recursive ) echo "Configuration of unbound 1.5.10:";; esac cat <<\_ACEOF @@ -1500,6 +1502,8 @@ Optional Features: --disable-dsa Disable DSA support --enable-event-api Enable (experimental) pluggable event base libunbound API installed to unbound-event.h + --enable-tfo-client Enable TCP Fast Open for client mode + --enable-tfo-server Enable TCP Fast Open for server mode --enable-static-exe enable to compile executables statically against (event) libs, for debug purposes --enable-lock-checks enable to check lock and unlock calls, for debug @@ -1652,7 +1656,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.9 +unbound configure 1.5.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2361,7 +2365,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.9, which was +It was created by unbound $as_me 1.5.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2713,11 +2717,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 -UNBOUND_VERSION_MICRO=9 +UNBOUND_VERSION_MICRO=10 LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2766,6 +2770,7 @@ LIBUNBOUND_AGE=4 # 1.5.7 had 5:10:3 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 +# 1.5.10 had 6:2:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -4054,7 +4059,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes" else - if echo $target | grep mingw32 >/dev/null; then on_mingw="yes" + if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -4064,7 +4069,7 @@ fi if test $on_mingw = "no"; then ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" + ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf" fi # Check whether --with-conf_file was given. @@ -4195,7 +4200,7 @@ else if test $on_mingw = no; then UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" + UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key" fi fi @@ -4217,7 +4222,7 @@ else if test $on_mingw = no; then UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" + UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem" fi fi @@ -16714,7 +16719,7 @@ $as_echo "$PYTHON_CPPFLAGS" >&6; } $as_echo_n "checking for Python library path... " >&6; } if test -z "$PYTHON_LDFLAGS"; then PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print(get_config_var('BLDLIBRARY'));"` + print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 $as_echo "$PYTHON_LDFLAGS" >&6; } @@ -17033,6 +17038,19 @@ if test "${with_nettle+set}" = set; then $as_echo "#define HAVE_NETTLE 1" >>confdefs.h + for ac_header in nettle/dsa-compat.h +do : + ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default +" +if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETTLE_DSA_COMPAT_H 1 +_ACEOF + +fi + +done + if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" @@ -17397,6 +17415,47 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5 +$as_echo_n "checking if libssl needs -lcrypt32... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char HMAC_Update (); +int +main () +{ +return HMAC_Update (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBS="$BAKLIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBS="$BAKLIBS" + LIBS="$LIBS -lcrypt32" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 $as_echo_n "checking for LibreSSL... " >&6; } if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then @@ -17462,44 +17521,49 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -for ac_header in openssl/conf.h +for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h do : - ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if test "x$ac_cv_header_openssl_conf_h" = xyes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_CONF_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -for ac_header in openssl/engine.h +for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup do : - ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_engine_h" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_ENGINE_H 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - done -for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new + +# these check_funcs need -lssl +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +for ac_func in OPENSSL_init_ssl do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl" +if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_OPENSSL_INIT_SSL 1 _ACEOF fi done +LIBS="$BAKLIBS" + ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" " $ac_includes_default #ifdef HAVE_OPENSSL_ERR_H @@ -17900,6 +17964,82 @@ case "$enable_event_api" in ;; esac +# Check whether --enable-tfo-client was given. +if test "${enable_tfo_client+set}" = set; then : + enableval=$enable_tfo_client; +fi + +case "$enable_tfo_client" in + yes) + case `uname` in + Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_MSG_FASTOPEN 1 +_ACEOF + + ;; + Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_OSX_MSG_FASTOPEN 1 +_ACEOF + + ;; + esac + ;; + no|*) + ;; +esac + +# Check whether --enable-tfo-server was given. +if test "${enable_tfo_server+set}" = set; then : + enableval=$enable_tfo_server; +fi + +case "$enable_tfo_server" in + yes) + ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_TCP_FASTOPEN 1 +_ACEOF + + ;; + no|*) + ;; +esac + # check for libevent # Check whether --with-libevent was given. @@ -18314,10 +18454,8 @@ if test x_$enable_static_exe = x_yes; th staticexe="-static" if test "$on_mingw" = yes; then staticexe="-all-static" - # for static crosscompile, include gdi32 and zlib here. - if test "`uname`" = "Linux"; then - LIBS="$LIBS -lgdi32 -lz" - fi + # for static compile, include gdi32 and zlib here. + LIBS="$LIBS -lgdi32 -lz" fi fi @@ -18762,7 +18900,7 @@ if test "$ac_res" != no; then : fi -for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync +for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -19801,12 +19939,12 @@ _ACEOF -version=1.5.9 +version=1.5.10 date=`date +'%b %e, %Y'` -ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h" +ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h contrib/libunbound.pc" ac_config_headers="$ac_config_headers config.h" @@ -20316,7 +20454,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.9, which was +This file was extended by unbound $as_me 1.5.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20382,7 +20520,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.9 +unbound config.status 1.5.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20804,6 +20942,7 @@ do "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;; "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;; "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;; + "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/configure.ac Tue Sep 27 21:11:07 2016 (r306381) @@ -10,14 +10,14 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[9]) +m4_define([VERSION_MICRO],[10]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -66,6 +66,7 @@ LIBUNBOUND_AGE=4 # 1.5.7 had 5:10:3 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 +# 1.5.10 had 6:2:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -107,7 +108,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes" else - if echo $target | grep mingw32 >/dev/null; then on_mingw="yes" + if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -117,7 +118,7 @@ fi if test $on_mingw = "no"; then ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" + ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf" fi AC_ARG_WITH([conf_file], AC_HELP_STRING([--with-conf-file=path], @@ -187,7 +188,7 @@ AC_ARG_WITH(rootkey-file, if test $on_mingw = no; then UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" + UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key" fi ) AC_SUBST(UNBOUND_ROOTKEY_FILE) @@ -201,7 +202,7 @@ AC_ARG_WITH(rootcert-file, if test $on_mingw = no; then UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" + UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem" fi ) AC_SUBST(UNBOUND_ROOTCERT_FILE) @@ -629,6 +630,7 @@ AC_ARG_WITH([nettle], AC_HELP_STRING([-- [ USE_NETTLE="yes" AC_DEFINE(HAVE_NETTLE, 1, [Use libnettle for crypto]) + AC_CHECK_HEADERS([nettle/dsa-compat.h],,, [AC_INCLUDES_DEFAULT]) if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" @@ -646,6 +648,20 @@ if test $USE_NSS = "no" -a $USE_NETTLE = ACX_WITH_SSL ACX_LIB_SSL SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_MSG_CHECKING([if libssl needs -lcrypt32]) +AC_TRY_LINK_FUNC([HMAC_Update], [ + AC_MSG_RESULT([no]) + LIBS="$BAKLIBS" +], [ + AC_MSG_RESULT([yes]) + LIBS="$BAKLIBS" + LIBS="$LIBS -lcrypt32" +]) + AC_MSG_CHECKING([for LibreSSL]) if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then AC_MSG_RESULT([yes]) @@ -656,9 +672,15 @@ if grep VERSION_TEXT $ssldir/include/ope else AC_MSG_RESULT([no]) fi -AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new]) +AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup]) + +# these check_funcs need -lssl +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_CHECK_FUNCS([OPENSSL_init_ssl]) +LIBS="$BAKLIBS" + AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ AC_INCLUDES_DEFAULT #ifdef HAVE_OPENSSL_ERR_H @@ -865,6 +887,42 @@ case "$enable_event_api" in ;; esac +AC_ARG_ENABLE(tfo-client, AC_HELP_STRING([--enable-tfo-client], [Enable TCP Fast Open for client mode])) +case "$enable_tfo_client" in + yes) + case `uname` in + Linux) AC_CHECK_DECL([MSG_FASTOPEN], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO])], + [AC_MSG_ERROR([TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client])], + [AC_INCLUDES_DEFAULT +#include +]) + AC_DEFINE_UNQUOTED([USE_MSG_FASTOPEN], [1], [Define this to enable client TCP Fast Open.]) + ;; + Darwin) AC_CHECK_DECL([CONNECT_RESUME_ON_READ_WRITE], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO])], + [AC_MSG_ERROR([TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client])], + [AC_INCLUDES_DEFAULT +#include +]) + AC_DEFINE_UNQUOTED([USE_OSX_MSG_FASTOPEN], [1], [Define this to enable client TCP Fast Open.]) + ;; + esac + ;; + no|*) + ;; +esac + +AC_ARG_ENABLE(tfo-server, AC_HELP_STRING([--enable-tfo-server], [Enable TCP Fast Open for server mode])) +case "$enable_tfo_server" in + yes) + AC_CHECK_DECL([TCP_FASTOPEN], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO])], [AC_MSG_ERROR([TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server])], [AC_INCLUDES_DEFAULT +#include + ]) + AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable server TCP Fast Open.]) + ;; + no|*) + ;; +esac + # check for libevent AC_ARG_WITH(libevent, AC_HELP_STRING([--with-libevent=pathname], [use libevent (will check /usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr or you can specify an explicit path). Slower, but allows use of large outgoing port ranges.]), @@ -985,10 +1043,8 @@ if test x_$enable_static_exe = x_yes; th staticexe="-static" if test "$on_mingw" = yes; then staticexe="-all-static" - # for static crosscompile, include gdi32 and zlib here. - if test "`uname`" = "Linux"; then - LIBS="$LIBS -lgdi32 -lz" - fi + # for static compile, include gdi32 and zlib here. + LIBS="$LIBS -lgdi32 -lz" fi fi @@ -1082,7 +1138,7 @@ AC_INCLUDES_DEFAULT #endif ]) AC_SEARCH_LIBS([setusercontext], [util]) -AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync]) +AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync]) AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])]) AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])]) @@ -1523,6 +1579,6 @@ dnl if this is a distro tarball, that wa AC_SUBST(version, [VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO]) AC_SUBST(date, [`date +'%b %e, %Y'`]) -AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h]) +AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h contrib/libunbound.pc]) AC_CONFIG_HEADER([config.h]) AC_OUTPUT Added: vendor/unbound/dist/contrib/libunbound.pc.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/contrib/libunbound.pc.in Tue Sep 27 21:11:07 2016 (r306381) @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: unbound +Description: Library with validating, recursive, and caching DNS resolver +URL: http://www.unbound.net +Version: @PACKAGE_VERSION@ +Requires: +Libs: -L${libdir} -lunbound @SSLLIB@ @LIBS@ +Libs.private: @LDFLAGS@ +Cflags: -I${includedir} Modified: vendor/unbound/dist/daemon/acl_list.c ============================================================================== --- vendor/unbound/dist/daemon/acl_list.c Tue Sep 27 20:40:44 2016 (r306380) +++ vendor/unbound/dist/daemon/acl_list.c Tue Sep 27 21:11:07 2016 (r306381) @@ -45,6 +45,8 @@ #include "util/log.h" #include "util/config_file.h" #include "util/net_help.h" +#include "services/localzone.h" +#include "sldns/str2wire.h" struct acl_list* acl_list_create(void) @@ -71,21 +73,21 @@ acl_list_delete(struct acl_list* acl) } /** insert new address into acl_list structure */ -static int +static struct acl_addr* acl_list_insert(struct acl_list* acl, struct sockaddr_storage* addr, socklen_t addrlen, int net, enum acl_access control, int complain_duplicates) { - struct acl_addr* node = regional_alloc(acl->region, + struct acl_addr* node = regional_alloc_zero(acl->region, sizeof(struct acl_addr)); if(!node) - return 0; + return NULL; node->control = control; if(!addr_tree_insert(&acl->tree, &node->node, addr, addrlen, net)) { if(complain_duplicates) verbose(VERB_QUERY, "duplicate acl address ignored."); } - return 1; + return node; } /** apply acl_list string */ @@ -125,6 +127,156 @@ acl_list_str_cfg(struct acl_list* acl, c return 1; } +/** find or create node (NULL on parse or error) */ +static struct acl_addr* +acl_find_or_create(struct acl_list* acl, const char* str) +{ + struct acl_addr* node; + struct sockaddr_storage addr; + int net; + socklen_t addrlen; + if(!netblockstrtoaddr(str, UNBOUND_DNS_PORT, &addr, &addrlen, &net)) { + log_err("cannot parse netblock: %s", str); + return NULL; + } + /* find or create node */ + if(!(node=(struct acl_addr*)addr_tree_find(&acl->tree, &addr, + addrlen, net))) { + /* create node, type 'allow' since otherwise tags are + * pointless, can override with specific access-control: cfg */ + if(!(node=(struct acl_addr*)acl_list_insert(acl, &addr, + addrlen, net, acl_allow, 1))) { + log_err("out of memory"); + return NULL; + } + } + return node; +} + +/** apply acl_tag string */ +static int +acl_list_tags_cfg(struct acl_list* acl, const char* str, uint8_t* bitmap, + size_t bitmaplen) +{ + struct acl_addr* node; + if(!(node=acl_find_or_create(acl, str))) + return 0; + node->taglen = bitmaplen; + node->taglist = regional_alloc_init(acl->region, bitmap, bitmaplen); + if(!node->taglist) { + log_err("out of memory"); + return 0; + } + return 1; +} + +/** apply acl_tag_action string */ +static int +acl_list_tag_action_cfg(struct acl_list* acl, struct config_file* cfg, + const char* str, const char* tag, const char* action) +{ + struct acl_addr* node; + int tagid; + enum localzone_type t; + if(!(node=acl_find_or_create(acl, str))) + return 0; + /* allocate array if not yet */ + if(!node->tag_actions) { + node->tag_actions = (uint8_t*)regional_alloc_zero(acl->region, + sizeof(*node->tag_actions)*cfg->num_tags); + if(!node->tag_actions) { + log_err("out of memory"); + return 0; + } + node->tag_actions_size = (size_t)cfg->num_tags; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Sep 27 21:11:48 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 F0885C00FD8; Tue, 27 Sep 2016 21:11:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8975FB5; Tue, 27 Sep 2016 21:11:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RLBlCL093433; Tue, 27 Sep 2016 21:11:47 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RLBl6a093432; Tue, 27 Sep 2016 21:11:47 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609272111.u8RLBl6a093432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 27 Sep 2016 21:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306382 - vendor/unbound/1.5.10 X-SVN-Group: vendor 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.23 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: Tue, 27 Sep 2016 21:11:49 -0000 Author: des Date: Tue Sep 27 21:11:47 2016 New Revision: 306382 URL: https://svnweb.freebsd.org/changeset/base/306382 Log: tag unbound 1.5.10 Added: vendor/unbound/1.5.10/ - copied from r306381, vendor/unbound/dist/ From owner-svn-src-all@freebsd.org Wed Sep 28 03:45: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 50C73C00EDD; Wed, 28 Sep 2016 03:45:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23AEA130; Wed, 28 Sep 2016 03:45:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S3jGsn043921; Wed, 28 Sep 2016 03:45:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S3jGuX043920; Wed, 28 Sep 2016 03:45:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609280345.u8S3jGuX043920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Sep 2016 03:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r306383 - 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.23 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: Wed, 28 Sep 2016 03:45:17 -0000 Author: delphij Date: Wed Sep 28 03:45:16 2016 New Revision: 306383 URL: https://svnweb.freebsd.org/changeset/base/306383 Log: Raise my limit for an upcoming vendor import. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Tue Sep 27 21:11:47 2016 (r306382) +++ svnadmin/conf/sizelimit.conf Wed Sep 28 03:45:16 2016 (r306383) @@ -18,6 +18,7 @@ achim bapt brooks davidcs +delphij dim imp jb From owner-svn-src-all@freebsd.org Wed Sep 28 03:45:45 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 D6004C00F31; Wed, 28 Sep 2016 03:45:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F6A2A9; Wed, 28 Sep 2016 03:45:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S3jiWg043992; Wed, 28 Sep 2016 03:45:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S3jiie043985; Wed, 28 Sep 2016 03:45:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609280345.u8S3jiie043985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Sep 2016 03:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306384 - in vendor/bind9/dist: . bin/check bin/confgen bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc bin/tools ... X-SVN-Group: vendor 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.23 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: Wed, 28 Sep 2016 03:45:45 -0000 Author: delphij Date: Wed Sep 28 03:45:43 2016 New Revision: 306384 URL: https://svnweb.freebsd.org/changeset/base/306384 Log: Vendor import of BIND 9.9.9-P3. Added: vendor/bind9/dist/doc/arm/Bv9ARM.conf (contents, props changed) vendor/bind9/dist/doc/arm/logging-categories.xml (contents, props changed) vendor/bind9/dist/doc/arm/man.dnssec-importkey.html (contents, props changed) vendor/bind9/dist/doc/arm/man.lwresd.html (contents, props changed) vendor/bind9/dist/doc/arm/man.named.conf.html (contents, props changed) vendor/bind9/dist/doc/arm/notes.conf (contents, props changed) vendor/bind9/dist/doc/arm/noteversion.xml.in (contents, props changed) vendor/bind9/dist/doc/arm/pkgversion.xml.in (contents, props changed) vendor/bind9/dist/doc/arm/releaseinfo.xml.in (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/avc_258.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/avc_258.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/csync_62.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/csync_62.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/ninfo_56.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/ninfo_56.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/rkey_57.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/rkey_57.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/sink_40.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/sink_40.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/smimea_53.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/smimea_53.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/ta_32768.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/ta_32768.h (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/talink_58.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/talink_58.h (contents, props changed) Deleted: vendor/bind9/dist/doc/arm/html-fixup.pl Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/FAQ vendor/bind9/dist/FAQ.xml vendor/bind9/dist/FREEBSD-Xlist vendor/bind9/dist/Makefile.in vendor/bind9/dist/README vendor/bind9/dist/acconfig.h vendor/bind9/dist/bin/check/Makefile.in vendor/bind9/dist/bin/check/named-checkconf.8 vendor/bind9/dist/bin/check/named-checkconf.c vendor/bind9/dist/bin/check/named-checkconf.docbook vendor/bind9/dist/bin/check/named-checkconf.html vendor/bind9/dist/bin/check/named-checkzone.8 vendor/bind9/dist/bin/check/named-checkzone.c vendor/bind9/dist/bin/check/named-checkzone.docbook vendor/bind9/dist/bin/check/named-checkzone.html vendor/bind9/dist/bin/confgen/Makefile.in vendor/bind9/dist/bin/confgen/ddns-confgen.8 vendor/bind9/dist/bin/confgen/ddns-confgen.docbook vendor/bind9/dist/bin/confgen/ddns-confgen.html vendor/bind9/dist/bin/confgen/rndc-confgen.8 vendor/bind9/dist/bin/confgen/rndc-confgen.docbook vendor/bind9/dist/bin/confgen/rndc-confgen.html vendor/bind9/dist/bin/dig/Makefile.in vendor/bind9/dist/bin/dig/dig.1 vendor/bind9/dist/bin/dig/dig.c vendor/bind9/dist/bin/dig/dig.docbook vendor/bind9/dist/bin/dig/dig.html vendor/bind9/dist/bin/dig/dighost.c vendor/bind9/dist/bin/dig/host.1 vendor/bind9/dist/bin/dig/host.docbook vendor/bind9/dist/bin/dig/host.html vendor/bind9/dist/bin/dig/nslookup.1 vendor/bind9/dist/bin/dig/nslookup.docbook vendor/bind9/dist/bin/dig/nslookup.html vendor/bind9/dist/bin/dnssec/Makefile.in vendor/bind9/dist/bin/dnssec/dnssec-dsfromkey.8 vendor/bind9/dist/bin/dnssec/dnssec-dsfromkey.docbook vendor/bind9/dist/bin/dnssec/dnssec-dsfromkey.html vendor/bind9/dist/bin/dnssec/dnssec-importkey.8 vendor/bind9/dist/bin/dnssec/dnssec-importkey.docbook vendor/bind9/dist/bin/dnssec/dnssec-importkey.html vendor/bind9/dist/bin/dnssec/dnssec-keyfromlabel.8 vendor/bind9/dist/bin/dnssec/dnssec-keyfromlabel.docbook vendor/bind9/dist/bin/dnssec/dnssec-keyfromlabel.html vendor/bind9/dist/bin/dnssec/dnssec-keygen.8 vendor/bind9/dist/bin/dnssec/dnssec-keygen.docbook vendor/bind9/dist/bin/dnssec/dnssec-keygen.html vendor/bind9/dist/bin/dnssec/dnssec-revoke.8 vendor/bind9/dist/bin/dnssec/dnssec-revoke.c vendor/bind9/dist/bin/dnssec/dnssec-revoke.docbook vendor/bind9/dist/bin/dnssec/dnssec-revoke.html vendor/bind9/dist/bin/dnssec/dnssec-settime.8 vendor/bind9/dist/bin/dnssec/dnssec-settime.c vendor/bind9/dist/bin/dnssec/dnssec-settime.docbook vendor/bind9/dist/bin/dnssec/dnssec-settime.html vendor/bind9/dist/bin/dnssec/dnssec-signzone.8 vendor/bind9/dist/bin/dnssec/dnssec-signzone.c vendor/bind9/dist/bin/dnssec/dnssec-signzone.docbook vendor/bind9/dist/bin/dnssec/dnssec-signzone.html vendor/bind9/dist/bin/dnssec/dnssec-verify.8 vendor/bind9/dist/bin/dnssec/dnssec-verify.docbook vendor/bind9/dist/bin/dnssec/dnssec-verify.html vendor/bind9/dist/bin/named/Makefile.in vendor/bind9/dist/bin/named/client.c vendor/bind9/dist/bin/named/config.c vendor/bind9/dist/bin/named/control.c vendor/bind9/dist/bin/named/controlconf.c vendor/bind9/dist/bin/named/include/named/log.h vendor/bind9/dist/bin/named/include/named/query.h vendor/bind9/dist/bin/named/include/named/server.h vendor/bind9/dist/bin/named/lwdgrbn.c vendor/bind9/dist/bin/named/lwresd.8 vendor/bind9/dist/bin/named/lwresd.docbook vendor/bind9/dist/bin/named/lwresd.html vendor/bind9/dist/bin/named/main.c vendor/bind9/dist/bin/named/named.8 vendor/bind9/dist/bin/named/named.conf.5 vendor/bind9/dist/bin/named/named.conf.docbook vendor/bind9/dist/bin/named/named.conf.html vendor/bind9/dist/bin/named/named.docbook vendor/bind9/dist/bin/named/named.html vendor/bind9/dist/bin/named/query.c vendor/bind9/dist/bin/named/server.c vendor/bind9/dist/bin/named/statschannel.c vendor/bind9/dist/bin/named/unix/include/named/os.h vendor/bind9/dist/bin/named/unix/os.c vendor/bind9/dist/bin/named/xfrout.c vendor/bind9/dist/bin/nsupdate/Makefile.in vendor/bind9/dist/bin/nsupdate/nsupdate.1 vendor/bind9/dist/bin/nsupdate/nsupdate.c vendor/bind9/dist/bin/nsupdate/nsupdate.docbook vendor/bind9/dist/bin/nsupdate/nsupdate.html vendor/bind9/dist/bin/rndc/Makefile.in vendor/bind9/dist/bin/rndc/rndc.8 vendor/bind9/dist/bin/rndc/rndc.conf.5 vendor/bind9/dist/bin/rndc/rndc.conf.docbook vendor/bind9/dist/bin/rndc/rndc.conf.html vendor/bind9/dist/bin/rndc/rndc.docbook vendor/bind9/dist/bin/rndc/rndc.html vendor/bind9/dist/bin/tools/Makefile.in vendor/bind9/dist/bin/tools/arpaname.1 vendor/bind9/dist/bin/tools/arpaname.docbook vendor/bind9/dist/bin/tools/arpaname.html vendor/bind9/dist/bin/tools/genrandom.8 vendor/bind9/dist/bin/tools/genrandom.docbook vendor/bind9/dist/bin/tools/genrandom.html vendor/bind9/dist/bin/tools/isc-hmac-fixup.8 vendor/bind9/dist/bin/tools/isc-hmac-fixup.docbook vendor/bind9/dist/bin/tools/isc-hmac-fixup.html vendor/bind9/dist/bin/tools/named-journalprint.8 vendor/bind9/dist/bin/tools/named-journalprint.docbook vendor/bind9/dist/bin/tools/named-journalprint.html vendor/bind9/dist/bin/tools/nsec3hash.8 vendor/bind9/dist/bin/tools/nsec3hash.docbook vendor/bind9/dist/bin/tools/nsec3hash.html vendor/bind9/dist/config.h.in vendor/bind9/dist/configure.in vendor/bind9/dist/doc/Makefile.in vendor/bind9/dist/doc/arm/Bv9ARM-book.xml vendor/bind9/dist/doc/arm/Bv9ARM.ch01.html vendor/bind9/dist/doc/arm/Bv9ARM.ch02.html vendor/bind9/dist/doc/arm/Bv9ARM.ch03.html vendor/bind9/dist/doc/arm/Bv9ARM.ch04.html vendor/bind9/dist/doc/arm/Bv9ARM.ch05.html vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist/doc/arm/Bv9ARM.ch10.html vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html vendor/bind9/dist/doc/arm/Bv9ARM.html vendor/bind9/dist/doc/arm/Bv9ARM.pdf vendor/bind9/dist/doc/arm/Makefile.in vendor/bind9/dist/doc/arm/README-SGML vendor/bind9/dist/doc/arm/dnssec.xml vendor/bind9/dist/doc/arm/libdns.xml vendor/bind9/dist/doc/arm/man.arpaname.html vendor/bind9/dist/doc/arm/man.ddns-confgen.html vendor/bind9/dist/doc/arm/man.dig.html vendor/bind9/dist/doc/arm/man.dnssec-checkds.html vendor/bind9/dist/doc/arm/man.dnssec-coverage.html vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html vendor/bind9/dist/doc/arm/man.dnssec-keygen.html vendor/bind9/dist/doc/arm/man.dnssec-revoke.html vendor/bind9/dist/doc/arm/man.dnssec-settime.html vendor/bind9/dist/doc/arm/man.dnssec-signzone.html vendor/bind9/dist/doc/arm/man.dnssec-verify.html vendor/bind9/dist/doc/arm/man.genrandom.html vendor/bind9/dist/doc/arm/man.host.html vendor/bind9/dist/doc/arm/man.isc-hmac-fixup.html vendor/bind9/dist/doc/arm/man.named-checkconf.html vendor/bind9/dist/doc/arm/man.named-checkzone.html vendor/bind9/dist/doc/arm/man.named-journalprint.html vendor/bind9/dist/doc/arm/man.named.html vendor/bind9/dist/doc/arm/man.nsec3hash.html vendor/bind9/dist/doc/arm/man.nsupdate.html vendor/bind9/dist/doc/arm/man.rndc-confgen.html vendor/bind9/dist/doc/arm/man.rndc.conf.html vendor/bind9/dist/doc/arm/man.rndc.html vendor/bind9/dist/doc/arm/managed-keys.xml vendor/bind9/dist/doc/arm/notes-wrapper.xml vendor/bind9/dist/doc/arm/notes.html vendor/bind9/dist/doc/arm/notes.pdf vendor/bind9/dist/doc/arm/notes.xml vendor/bind9/dist/doc/arm/pkcs11.xml vendor/bind9/dist/doc/misc/options vendor/bind9/dist/doc/misc/rfc-compliance vendor/bind9/dist/isc-config.sh.in vendor/bind9/dist/lib/bind9/Makefile.in vendor/bind9/dist/lib/bind9/api vendor/bind9/dist/lib/bind9/check.c vendor/bind9/dist/lib/bind9/include/bind9/Makefile.in vendor/bind9/dist/lib/dns/Makefile.in vendor/bind9/dist/lib/dns/acache.c vendor/bind9/dist/lib/dns/api vendor/bind9/dist/lib/dns/cache.c vendor/bind9/dist/lib/dns/client.c vendor/bind9/dist/lib/dns/dst_api.c vendor/bind9/dist/lib/dns/dst_openssl.h vendor/bind9/dist/lib/dns/forward.c vendor/bind9/dist/lib/dns/gen.c vendor/bind9/dist/lib/dns/include/dns/Makefile.in vendor/bind9/dist/lib/dns/include/dns/dbiterator.h vendor/bind9/dist/lib/dns/include/dns/forward.h vendor/bind9/dist/lib/dns/include/dns/message.h vendor/bind9/dist/lib/dns/include/dns/name.h vendor/bind9/dist/lib/dns/include/dns/rbt.h vendor/bind9/dist/lib/dns/include/dns/view.h vendor/bind9/dist/lib/dns/include/dst/Makefile.in vendor/bind9/dist/lib/dns/journal.c vendor/bind9/dist/lib/dns/master.c vendor/bind9/dist/lib/dns/message.c vendor/bind9/dist/lib/dns/name.c vendor/bind9/dist/lib/dns/nsec3.c vendor/bind9/dist/lib/dns/openssl_link.c vendor/bind9/dist/lib/dns/openssldh_link.c vendor/bind9/dist/lib/dns/openssldsa_link.c vendor/bind9/dist/lib/dns/opensslrsa_link.c vendor/bind9/dist/lib/dns/rbt.c vendor/bind9/dist/lib/dns/rbtdb.c vendor/bind9/dist/lib/dns/rcode.c vendor/bind9/dist/lib/dns/rdata.c vendor/bind9/dist/lib/dns/rdata/any_255/tsig_250.c vendor/bind9/dist/lib/dns/rdata/ch_3/a_1.c vendor/bind9/dist/lib/dns/rdata/generic/afsdb_18.c vendor/bind9/dist/lib/dns/rdata/generic/caa_257.c vendor/bind9/dist/lib/dns/rdata/generic/cdnskey_60.c vendor/bind9/dist/lib/dns/rdata/generic/cdnskey_60.h vendor/bind9/dist/lib/dns/rdata/generic/cds_59.c vendor/bind9/dist/lib/dns/rdata/generic/cds_59.h vendor/bind9/dist/lib/dns/rdata/generic/cname_5.c vendor/bind9/dist/lib/dns/rdata/generic/dlv_32769.c vendor/bind9/dist/lib/dns/rdata/generic/dlv_32769.h vendor/bind9/dist/lib/dns/rdata/generic/dname_39.c vendor/bind9/dist/lib/dns/rdata/generic/dnskey_48.c vendor/bind9/dist/lib/dns/rdata/generic/dnskey_48.h vendor/bind9/dist/lib/dns/rdata/generic/ds_43.c vendor/bind9/dist/lib/dns/rdata/generic/hip_55.c vendor/bind9/dist/lib/dns/rdata/generic/ipseckey_45.c vendor/bind9/dist/lib/dns/rdata/generic/key_25.c vendor/bind9/dist/lib/dns/rdata/generic/key_25.h vendor/bind9/dist/lib/dns/rdata/generic/lp_107.c vendor/bind9/dist/lib/dns/rdata/generic/mb_7.c vendor/bind9/dist/lib/dns/rdata/generic/md_3.c vendor/bind9/dist/lib/dns/rdata/generic/mf_4.c vendor/bind9/dist/lib/dns/rdata/generic/mg_8.c vendor/bind9/dist/lib/dns/rdata/generic/minfo_14.c vendor/bind9/dist/lib/dns/rdata/generic/mr_9.c vendor/bind9/dist/lib/dns/rdata/generic/mx_15.c vendor/bind9/dist/lib/dns/rdata/generic/naptr_35.c vendor/bind9/dist/lib/dns/rdata/generic/ns_2.c vendor/bind9/dist/lib/dns/rdata/generic/nsec3_50.c vendor/bind9/dist/lib/dns/rdata/generic/nsec_47.c vendor/bind9/dist/lib/dns/rdata/generic/nxt_30.c vendor/bind9/dist/lib/dns/rdata/generic/ptr_12.c vendor/bind9/dist/lib/dns/rdata/generic/rp_17.c vendor/bind9/dist/lib/dns/rdata/generic/rrsig_46.c vendor/bind9/dist/lib/dns/rdata/generic/rt_21.c vendor/bind9/dist/lib/dns/rdata/generic/sig_24.c vendor/bind9/dist/lib/dns/rdata/generic/soa_6.c vendor/bind9/dist/lib/dns/rdata/generic/spf_99.c vendor/bind9/dist/lib/dns/rdata/generic/tkey_249.c vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.c vendor/bind9/dist/lib/dns/rdata/generic/txt_16.c vendor/bind9/dist/lib/dns/rdata/in_1/a6_38.c vendor/bind9/dist/lib/dns/rdata/in_1/kx_36.c vendor/bind9/dist/lib/dns/rdata/in_1/nsap-ptr_23.c vendor/bind9/dist/lib/dns/rdata/in_1/px_26.c vendor/bind9/dist/lib/dns/rdata/in_1/srv_33.c vendor/bind9/dist/lib/dns/resolver.c vendor/bind9/dist/lib/dns/rootns.c vendor/bind9/dist/lib/dns/sdlz.c vendor/bind9/dist/lib/dns/tkey.c vendor/bind9/dist/lib/dns/update.c vendor/bind9/dist/lib/dns/view.c vendor/bind9/dist/lib/dns/xfrin.c vendor/bind9/dist/lib/dns/zone.c vendor/bind9/dist/lib/export/dns/Makefile.in vendor/bind9/dist/lib/export/dns/include/dns/Makefile.in vendor/bind9/dist/lib/export/dns/include/dst/Makefile.in vendor/bind9/dist/lib/export/irs/Makefile.in vendor/bind9/dist/lib/export/irs/include/irs/Makefile.in vendor/bind9/dist/lib/export/isc/Makefile.in vendor/bind9/dist/lib/export/isc/include/isc/Makefile.in vendor/bind9/dist/lib/export/isc/nothreads/include/isc/Makefile.in vendor/bind9/dist/lib/export/isc/pthreads/include/isc/Makefile.in vendor/bind9/dist/lib/export/isc/unix/include/isc/Makefile.in vendor/bind9/dist/lib/export/isccfg/Makefile.in vendor/bind9/dist/lib/export/isccfg/include/isccfg/Makefile.in vendor/bind9/dist/lib/export/samples/Makefile.in vendor/bind9/dist/lib/irs/Makefile.in vendor/bind9/dist/lib/irs/resconf.c vendor/bind9/dist/lib/isc/Makefile.in vendor/bind9/dist/lib/isc/alpha/include/isc/Makefile.in vendor/bind9/dist/lib/isc/api vendor/bind9/dist/lib/isc/base32.c vendor/bind9/dist/lib/isc/base64.c vendor/bind9/dist/lib/isc/buffer.c vendor/bind9/dist/lib/isc/commandline.c vendor/bind9/dist/lib/isc/hash.c vendor/bind9/dist/lib/isc/hex.c vendor/bind9/dist/lib/isc/httpd.c vendor/bind9/dist/lib/isc/ia64/include/isc/Makefile.in vendor/bind9/dist/lib/isc/include/isc/Makefile.in vendor/bind9/dist/lib/isc/include/isc/assertions.h vendor/bind9/dist/lib/isc/include/isc/error.h vendor/bind9/dist/lib/isc/include/isc/file.h vendor/bind9/dist/lib/isc/include/isc/hash.h vendor/bind9/dist/lib/isc/include/isc/magic.h vendor/bind9/dist/lib/isc/include/isc/netaddr.h vendor/bind9/dist/lib/isc/include/isc/platform.h.in vendor/bind9/dist/lib/isc/include/isc/result.h vendor/bind9/dist/lib/isc/include/isc/sockaddr.h vendor/bind9/dist/lib/isc/include/isc/socket.h vendor/bind9/dist/lib/isc/include/isc/util.h vendor/bind9/dist/lib/isc/md5.c vendor/bind9/dist/lib/isc/mem.c vendor/bind9/dist/lib/isc/mips/include/isc/Makefile.in vendor/bind9/dist/lib/isc/netaddr.c vendor/bind9/dist/lib/isc/noatomic/include/isc/Makefile.in vendor/bind9/dist/lib/isc/nothreads/include/isc/Makefile.in vendor/bind9/dist/lib/isc/powerpc/include/isc/Makefile.in vendor/bind9/dist/lib/isc/pthreads/include/isc/Makefile.in vendor/bind9/dist/lib/isc/result.c vendor/bind9/dist/lib/isc/sockaddr.c vendor/bind9/dist/lib/isc/sparc64/include/isc/Makefile.in vendor/bind9/dist/lib/isc/stats.c vendor/bind9/dist/lib/isc/string.c vendor/bind9/dist/lib/isc/task.c vendor/bind9/dist/lib/isc/unix/file.c vendor/bind9/dist/lib/isc/unix/include/isc/Makefile.in vendor/bind9/dist/lib/isc/unix/net.c vendor/bind9/dist/lib/isc/unix/socket.c vendor/bind9/dist/lib/isc/x86_32/include/isc/Makefile.in vendor/bind9/dist/lib/isc/x86_32/include/isc/atomic.h vendor/bind9/dist/lib/isc/x86_64/include/isc/Makefile.in vendor/bind9/dist/lib/isc/x86_64/include/isc/atomic.h vendor/bind9/dist/lib/isccc/Makefile.in vendor/bind9/dist/lib/isccc/cc.c vendor/bind9/dist/lib/isccc/include/isccc/Makefile.in vendor/bind9/dist/lib/isccc/sexpr.c vendor/bind9/dist/lib/isccfg/Makefile.in vendor/bind9/dist/lib/isccfg/aclconf.c vendor/bind9/dist/lib/isccfg/api vendor/bind9/dist/lib/isccfg/include/isccfg/Makefile.in vendor/bind9/dist/lib/isccfg/namedconf.c vendor/bind9/dist/lib/isccfg/parser.c vendor/bind9/dist/lib/lwres/Makefile.in vendor/bind9/dist/lib/lwres/man/Makefile.in vendor/bind9/dist/lib/lwres/man/lwres.3 vendor/bind9/dist/lib/lwres/man/lwres.docbook vendor/bind9/dist/lib/lwres/man/lwres.html vendor/bind9/dist/lib/lwres/man/lwres_buffer.3 vendor/bind9/dist/lib/lwres/man/lwres_buffer.docbook vendor/bind9/dist/lib/lwres/man/lwres_buffer.html vendor/bind9/dist/lib/lwres/man/lwres_config.3 vendor/bind9/dist/lib/lwres/man/lwres_config.docbook vendor/bind9/dist/lib/lwres/man/lwres_config.html vendor/bind9/dist/lib/lwres/man/lwres_context.3 vendor/bind9/dist/lib/lwres/man/lwres_context.docbook vendor/bind9/dist/lib/lwres/man/lwres_context.html vendor/bind9/dist/lib/lwres/man/lwres_gabn.3 vendor/bind9/dist/lib/lwres/man/lwres_gabn.docbook vendor/bind9/dist/lib/lwres/man/lwres_gabn.html vendor/bind9/dist/lib/lwres/man/lwres_gai_strerror.3 vendor/bind9/dist/lib/lwres/man/lwres_gai_strerror.docbook vendor/bind9/dist/lib/lwres/man/lwres_gai_strerror.html vendor/bind9/dist/lib/lwres/man/lwres_getaddrinfo.3 vendor/bind9/dist/lib/lwres/man/lwres_getaddrinfo.docbook vendor/bind9/dist/lib/lwres/man/lwres_getaddrinfo.html vendor/bind9/dist/lib/lwres/man/lwres_gethostent.3 vendor/bind9/dist/lib/lwres/man/lwres_gethostent.docbook vendor/bind9/dist/lib/lwres/man/lwres_gethostent.html vendor/bind9/dist/lib/lwres/man/lwres_getipnode.3 vendor/bind9/dist/lib/lwres/man/lwres_getipnode.docbook vendor/bind9/dist/lib/lwres/man/lwres_getipnode.html vendor/bind9/dist/lib/lwres/man/lwres_getnameinfo.3 vendor/bind9/dist/lib/lwres/man/lwres_getnameinfo.docbook vendor/bind9/dist/lib/lwres/man/lwres_getnameinfo.html vendor/bind9/dist/lib/lwres/man/lwres_getrrsetbyname.3 vendor/bind9/dist/lib/lwres/man/lwres_getrrsetbyname.docbook vendor/bind9/dist/lib/lwres/man/lwres_getrrsetbyname.html vendor/bind9/dist/lib/lwres/man/lwres_gnba.3 vendor/bind9/dist/lib/lwres/man/lwres_gnba.docbook vendor/bind9/dist/lib/lwres/man/lwres_gnba.html vendor/bind9/dist/lib/lwres/man/lwres_hstrerror.3 vendor/bind9/dist/lib/lwres/man/lwres_hstrerror.docbook vendor/bind9/dist/lib/lwres/man/lwres_hstrerror.html vendor/bind9/dist/lib/lwres/man/lwres_inetntop.3 vendor/bind9/dist/lib/lwres/man/lwres_inetntop.docbook vendor/bind9/dist/lib/lwres/man/lwres_inetntop.html vendor/bind9/dist/lib/lwres/man/lwres_noop.3 vendor/bind9/dist/lib/lwres/man/lwres_noop.docbook vendor/bind9/dist/lib/lwres/man/lwres_noop.html vendor/bind9/dist/lib/lwres/man/lwres_packet.3 vendor/bind9/dist/lib/lwres/man/lwres_packet.docbook vendor/bind9/dist/lib/lwres/man/lwres_packet.html vendor/bind9/dist/lib/lwres/man/lwres_resutil.3 vendor/bind9/dist/lib/lwres/man/lwres_resutil.docbook vendor/bind9/dist/lib/lwres/man/lwres_resutil.html vendor/bind9/dist/make/rules.in vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Wed Sep 28 03:45:16 2016 (r306383) +++ vendor/bind9/dist/CHANGES Wed Sep 28 03:45:43 2016 (r306384) @@ -1,4 +1,96 @@ - --- 9.9.8-P4 released --- + --- 9.9.9-P3 released --- + +4467. [security] It was possible to trigger a assertion when rendering + a message. (CVE-2016-2776) [RT #43139] + + --- 9.9.9-P2 released --- + +4406. [bug] getrrsetbyname with a non absolute name could + trigger an infinite recursion bug in lwresd + and named with lwres configured if when combined + with a search list entry the resulting name is + too long. (CVE-2016-2775) [RT #42694] + +4405. [bug] Change 4342 introduced a regression where you could + not remove a delegation in a NSEC3 signed zone using + OPTOUT via nsupdate. [RT #42702] + +4387. [bug] Change 4336 was not complete leading to SERVFAIL + being return as NS records expired. [RT #42683] + + --- 9.9.9-P1 released --- + +4366. [bug] Address race condition when updating rbtnode bit + fields. [RT #42379] + +4363. [port] win32: Disable explicit triggering UAC when running + BINDInstall. + + --- 9.9.9 released --- + + --- 9.9.9rc1 released --- + +4347. [port] Corrected a build error on x86_64 Solaris. [RT #42150] + +4346. [bug] Fixed a regression introduced in change #4337 which + caused signed domains with revoked KSKs to fail + validation. [RT #42147] + +4345. [contrib] perftcpdns mishandled the return values from + clock_nanosleep. [RT #42131] + +4344. [port] Address openssl version differences. [RT #42059] + + --- 9.9.9b2 released --- + +4342. [bug] 'rndc flushtree' could fail to clean the tree if there + wasn't a node at the specified name. [RT #41846] + +4338. [bug] Reimplement change 4324 as it wasn't properly doing + all the required book keeping. [RT #41941] + +4337. [bug] The previous change exposed a latent flaw in + key refresh queries for managed-keys when + a cached DNSKEY had TTL 0. [RT #41986] + +4336. [bug] Don't emit records with zero ttl unless the records + were learnt with a zero ttl. [RT #41687] + +4335. [bug] zone->view could be detached too early. [RT #41942] + +4333. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42 and + 2001:500:9f::42. + +4331. [func] When loading managed signed zones detect if the + RRSIG's inception time is in the future and regenerate + the RRSIG immediately. [RT #41808] + +4330. [protocol] Identify the PAD option as "PAD" when printing out + a message. + + --- 9.9.9b1 released --- + +4329. [func] Warn about a common misconfiguration when forwarding + RFC 1918 zones. [RT #41441] + +4328. [performance] Add dns_name_fromwire() benchmark test. [RT #41694] + +4327. [func] Log query and depth counters during fetches when + querytrace (./configure --enable-querytrace) is + enabled (helps in diagnosing). [RT #41787] + +4326. [protocol] Add support for AVC. [RT #41819] + +4324. [bug] When deleting records from a zone database, interior + nodes could be left empty but not deleted, damaging + search performance afterward. [RT #40997] + +4323. [bug] Improve HTTP header processing on statschannel. + [RT #41674] + +4320. [bug] Insufficient memory allocation when handling + "none" ACL could cause an assertion failure in + named when parsing ACL configuration. [RT #41745] 4319. [security] Fix resolver assertion failure due to improper DNAME handling when parsing fetch reply messages. @@ -7,20 +99,122 @@ 4318. [security] Malformed control messages can trigger assertions in named and rndc. (CVE-2016-1285) [RT #41666] - --- 9.9.8-P3 released --- +4317. [bug] Age all unused servers on fetch timeout. [RT #41597] + +4315. [bug] Check that configured view class isn't a meta class. + [RT #41572]. + +4314. [contrib] Added 'dnsperf-2.1.0.0-1', a set of performance + testing tools provided by Nominum, Inc. + +4313. [bug] Handle ns_client_replace failures in test mode. + [RT #41190] + +4312. [bug] dig's unknown DNS and EDNS flags (MBZ value) logging + was not consistent. [RT #41600] + +4311. [bug] Prevent "rndc delzone" from being used on + response-policy zones. [RT #41593] + +4310. [performance] Use __builtin_expect() where available to annotate + conditions with known behavior. [RT #41411] + +4308. [func] Added operating system details to "named -V" + output. [RT #41452] + +4306. [maint] Added a PKCS#11 openssl patch supporting + version 1.0.2f [RT #38312] + +4305. [bug] dnssec-signzone was not removing unnecessary rrsigs + from the zone's apex. [RT #41483] + +4304. [port] xfer system test failed as 'tail -n +value' is not + portable. [RT #41315] + +4302. [port] win32: fixed a build error in VS 2015. [RT #41426] + +4300. [cleanup] Added new querytrace logging. [RT #41155] + +4299. [bug] Check that exactly totallen bytes are read when + reading a RRset from raw files in both single read + and incremental modes. [RT #41402] + +4297. [bug] RPZ zones with errors could cause a crash when a + pointer was cleaned up twice. [RT #41518] + +4295. [bug] An unchecked result in dns_message_pseudosectiontotext() + could allow incorrect text formatting of EDNS EXPIRE + options. [RT #41437] + +4294. [bug] Fixed a regression in which "rndc stop -p" failed + to print the PID. [RT #41513] + +4293. [bug] Address memory leak on priming query creation failure. + [RT #41512] + +4292. [bug] Build lib/export/dns/gen with native compiler. + [RT #41502] + +4291. [cleanup] Added a required include to dns/forward.h. [RT #41474] + +4289. [bug] The server could crash due to memory being used + after it was freed if a zone transfer timed out. + [RT #41297] 4288. [bug] Fixed a regression in resolver.c:possibly_mark() which caused known-bogus servers to be queried anyway. [RT #41321] +4287. [bug] Silence an overly noisy log message when message + parsing fails. [RT #41374] + 4285. [security] Specific APL data could trigger a INSIST. (CVE-2015-8704) [RT #41396] - --- 9.9.8-P2 released --- +4283. [bug] OPENSSL_config is no longer re-callable. [RT #41348] + +4281. [bug] Teach dns_message_totext about BADCOOKIE. [RT #41257] + +4280. [performance] Use optimal message sizes to improve compression + in AXFRs. This reduces network traffic. [RT #40996] + +4277. [performance] Improve performance of the RBT, the central zone + datastructure: The aux hashtable was improved, + hash function was updated to perform more + uniform mapping, uppernode was added to + dns_rbtnode, and other cleanups and performance + improvements were made. [RT #41165] + +4276. [protocol] Add support for SMIMEA. [RT #40513] + +4274. [performance] Speed up typemap processing from text. [RT #41196] + +4272. [bug] dig: the +norrcomments option didn't work with +multi. + [RT #41234] + +4271. [test] Unit tests could deadlock in isc__taskmgr_pause(). + [RT #41235] 4270. [security] Update allowed OpenSSL versions as named is potentially vulnerable to CVE-2015-3193. +4267. [test] Check sdlz error handling. [RT #41142] + +4266. [bug] The sdlz driver failed to pass some errors back to + the caller. [RT #41142] + +4265. [bug] Address unchecked isc_mem_get calls. [RT #41187] + +4264. [bug] Check const of strchr/strrchr assignments match + argument's const status. [RT #41150] + +4262. [bug] Fixed a bug in epoll socket code that caused + sockets to not be registered for ready + notification in some cases, causing named to not + read from or write to them, resulting in what + appear to the user as blocked connections. + [RT #41067] + 4261. [maint] H.ROOT-SERVERS.NET is 198.97.190.53 and 2001:500:1::53. [RT #40556] @@ -29,10 +223,123 @@ triggering a REQUIRE failure when those records were subsequently cached. (CVE-2015-8000) [RT #40987] +4258. [bug] Limit rndc query message sizes to 32 KiB. This should + not break any legitimate rndc commands, but will + prevent a rogue rndc query from allocating too + much memory. [RT #41073] + +4257. [cleanup] Python scripts reported incorrect version. [RT #41080] + +4256. [bug] Allow rndc command arguments to be quoted so as + to allow spaces. [RT #36665] + +4254. [bug] Address missing lock when getting zone's serial. + [RT #41072] + 4253. [security] Address fetch context reference count handling error - on socket error. (CVE-2015-8461) [RT#40945] + on socket error. (CVE-2015-8461) [RT#40945] + +4248. [performance] Add an isc_atomic_storeq() function, use it in + stats counters to improve performance. + [RT #39972] [RT #39979] + +4244. [bug] The parser was not reporting that use-ixfr is obsolete. + [RT #41010] + +4241. [doc] Improved the TSIG, TKEY, and SIG(0) sections in + the ARM. [RT #40955] + +4240. [port] Fix LibreSSL compatibility. [RT #40977] + +4238. [bug] Don't send to servers on net zero (0.0.0.0/8). + [RT #40947] + +4237. [doc] Upgraded documentation toolchain to use DocBook 5 + and dblatex. [RT #40766] + +4236. [performance] On machines with 2 or more processors (CPU), the + default value for the number of UDP listeners + has been changed to the number of detected + processors minus one. [RT #40761] + +4233. [test] Add tests for CDS and CDNSKEY with delegation-only. + [RT #40597] + +4232. [contrib] Address unchecked memory allocation calls in + query-loc and zone2ldap. [RT #40789] + +4229. [bug] A variable could be used uninitialized in + dns_update_signaturesinc. [RT #40784] + +4228. [bug] Address race condition in dns_client_destroyrestrans. + [RT #40605] + +4227. [bug] Silence static analysis warnings. [RT #40828] + +4226. [bug] Address a theoretical shutdown race in + zone.c:notify_send_queue(). [RT #38958] + +4225. [port] freebsd/openbsd: Use '${CC} -shared' for building + shared libraries. [RT #39557] + +4221. [bug] Resource leak on DNS_R_NXDOMAIN in fctx_create. + [RT #40583] + +4220. [doc] Improve documentation for zone-statistics. + [RT #36955] + +4219. [bug] Set event->result to ISC_R_WOULDBLOCK on EWOULDBLOCK, + EGAIN when these soft error are not retried for + isc_socket_send*(). + +4217. [protocol] Add support for CSYNC. [RT #40532] + +4216. [cleanup] Silence static analysis warnings. [RT #40649] + +4215. [bug] nsupdate: skip to next request on GSSTKEY create + failure. [RT #40685] + +4214. [protocol] Add support for TALINK. [RT #40544] + +4213. [bug] Don't reuse a cache across multiple classes. + [RT #40205] + +4210. [cleanup] Silence use after free false positive. [RT #40743] + +4208. [bug] Address null pointer dereferences on out of memory. + [RT #40764] + +4207. [bug] Handle class mismatches with raw zone files. + [RT #40746] + +4205. [bug] 'named-checkconf -p' could include unwanted spaces + when printing tuples with unset optional fields. + [RT #40731] + +4204. [bug] 'dig +trace' failed to lookup the correct type if + the initial root NS query was retried. [RT #40296] + +4202. [bug] isccc_cc_fromwire() could return an incorrect + result. [RT #40614] + +4201. [func] The default preferred-glue is now the address record + type of the transport the query was received + over. [RT #40468] + +4200. [cleanup] win32: update BINDinstall to be BIND release + independent. [RT #38915] + +4199. [protocol] Add support for NINFO, RKEY, SINK, TA. + [RT #40545] [RT #40547] [RT #40561] [RT #40563] + +4198. [doc] Add fetch-quota-params, fetches-per-server, and + fetches-per-zone to doc/misc/options. [RT #40601] + +4196. [doc] Improve how "enum + other" types are documented. + [RT #40608] - --- 9.9.8-P1 (withdrawn) --- +4194. [bug] named-checkconf -p failed to properly print a port + range. [RT #40634] --- 9.9.8 released --- @@ -47,7 +354,7 @@ 4191. [protocol] Accept DNS-SD non LDH PTR records in reverse zones as per RFC 6763. [RT #37889] -4190. [protocol] Accept Active Diretory gc._msdcs. name as +4190. [protocol] Accept Active Directory gc._msdcs. name as valid with check-names. still needs to be LDH. [RT #40399] Modified: vendor/bind9/dist/FAQ ============================================================================== --- vendor/bind9/dist/FAQ Wed Sep 28 03:45:16 2016 (r306383) +++ vendor/bind9/dist/FAQ Wed Sep 28 03:45:43 2016 (r306384) @@ -1,10 +1,6 @@ -Frequently Asked Questions about BIND 9 - -Copyright © 2004-2010, 2013, 2014 Internet Systems Consortium, Inc. +Copyright ? 2000-2010, 2013-2016 Internet Systems Consortium, Inc. ("ISC") -Copyright © 2000-2003 Internet Software Consortium. - ----------------------------------------------------------------------- 1. Compilation and Installation Questions @@ -94,7 +90,7 @@ Q: I'm trying to use TSIG to authenticat rejecting the TSIG. Why? A: This may be a clock skew problem. Check that the the clocks on the - client and server are properly synchronised (e.g., using ntp). + client and server are properly synchronized (e.g., using ntp). Q: I see a log message like the following. Why? Modified: vendor/bind9/dist/FAQ.xml ============================================================================== --- vendor/bind9/dist/FAQ.xml Wed Sep 28 03:45:16 2016 (r306383) +++ vendor/bind9/dist/FAQ.xml Wed Sep 28 03:45:43 2016 (r306384) @@ -1,7 +1,5 @@ - - + +
-
- Frequently Asked Questions about BIND 9 2004 @@ -32,6 +29,8 @@ 2010 2013 2014 + 2015 + 2016 Internet Systems Consortium, Inc. ("ISC") @@ -42,10 +41,10 @@ Internet Software Consortium. - - - Compilation and Installation Questions - + + + Compilation and Installation Questions + @@ -61,7 +60,7 @@ - + @@ -70,7 +69,7 @@ - Short Answer: No. + Short Answer: No. Long Answer: There really isn't a default configuration which fits @@ -93,9 +92,9 @@ - + - + Configuration and Setup Questions @@ -125,7 +124,7 @@ example.com. 86400 IN SOA ns hostmaster - + @@ -223,7 +222,7 @@ view "chaos" chaos { This may be a clock skew problem. Check that the the clocks - on the client and server are properly synchronised (e.g., + on the client and server are properly synchronized (e.g., using ntp). @@ -251,7 +250,7 @@ view "chaos" chaos { - + @@ -266,7 +265,7 @@ view "chaos" chaos { - + @@ -359,7 +358,7 @@ Slave 10.0.1.2: - + @@ -392,7 +391,7 @@ named-checkzone example.com tmp - + @@ -416,7 +415,7 @@ named-checkzone example.com tmp - + @@ -501,7 +500,7 @@ Master 10.0.1.1: You are running chrooted (-t) and have not supplied local timezone information in the chroot area. - + FreeBSD: /etc/localtime Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo OSF: /etc/zoneinfo/localtime @@ -511,7 +510,7 @@ Master 10.0.1.1: - + @@ -551,7 +550,7 @@ Master 10.0.1.1: - + @@ -603,7 +602,7 @@ zone "example.net" { - + @@ -694,9 +693,9 @@ server ::/0 { bogus yes; }; - + - + Operations Questions @@ -768,7 +767,7 @@ server ::/0 { bogus yes; }; General Questions - + @@ -807,14 +806,13 @@ server ::/0 { bogus yes; }; of sending dynamic update requests to DNS servers without being specifically configured to do so. If the update requests are coming from a Windows 2000 machine, see - - <http://support.microsoft.com/support/kb/articles/q246/8/04.asp> + + <http://support.microsoft.com/support/kb/articles/q246/8/04.asp> for information about how to turn them off. - + @@ -849,7 +847,7 @@ server ::/0 { bogus yes; }; - + @@ -867,7 +865,7 @@ server ::/0 { bogus yes; }; - + @@ -883,7 +881,7 @@ server ::/0 { bogus yes; }; - + @@ -910,7 +908,7 @@ serial-query-rate 5; // default 20 - + I don't get RRSIG's returned when I use "dig +dnssec". @@ -922,7 +920,7 @@ serial-query-rate 5; // default 20 - + @@ -959,7 +957,7 @@ serial-query-rate 5; // default 20<http://as112.net/> + Please see <http://as112.net/> for details of the problems you are causing and the counter measures that have had to be deployed. @@ -1006,7 +1004,7 @@ empty: - + @@ -1083,9 +1081,9 @@ empty: - + Operating-System Specific Questions - + HPUX @@ -1113,9 +1111,9 @@ configure: error: need either working un Linux - + - + Why do I get the following errors: general: errno2result.c:109: unexpected error: @@ -1129,7 +1127,7 @@ client: UDP client handler shutting down See: - <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2> + <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2> @@ -1146,9 +1144,9 @@ client: UDP client handler shutting down non-blocking is ignored. It is reported that setting xfrm_larval_drop to 1 helps but this may have negative side effects. See: -<https://bugzilla.redhat.com/show_bug.cgi?id=427629> +<https://bugzilla.redhat.com/show_bug.cgi?id=427629> and -<http://lkml.org/lkml/2007/12/4/260>. +<http://lkml.org/lkml/2007/12/4/260>. xfrm_larval_drop can be set to 1 by the following procedure: @@ -1178,7 +1176,7 @@ echo "1" > proc/sys/net/core/xfrm_lar - + @@ -1197,7 +1195,7 @@ echo "1" > proc/sys/net/core/xfrm_lar - + @@ -1218,7 +1216,7 @@ modprobe capability - + @@ -1244,8 +1242,7 @@ modprobe capability Red Hat have adopted the National Security Agency's - SELinux security policy (see <http://www.nsa.gov/selinux>) + SELinux security policy (see <http://www.nsa.gov/selinux>) and recommendations for BIND security , which are more secure than running named in a chroot and make use of the bind-chroot environment unnecessary . @@ -1279,7 +1276,7 @@ $ROOTDIR/var/tmp able to write or create files except in the directories above, with SELinux in Enforcing mode. - + So, to allow named to update slave or DDNS zone files, it is best to locate them in $ROOTDIR/var/named/slaves, @@ -1290,7 +1287,7 @@ zone "slave.zone." IN { type slave; file "slaves/slave.zone.db"; ... -}; +}; zone "ddns.zone." IN { type master; allow-updates {...}; @@ -1323,13 +1320,13 @@ options { system-config-securitylevel GUI, using the 'setsebool' command, or in /etc/selinux/targeted/booleans. - + You can disable SELinux protection for named entirely by setting the 'named_disable_trans=1' SELinux tunable boolean parameter. - + The SELinux named policy defines these SELinux contexts for named: @@ -1340,7 +1337,7 @@ named_cache_t: for files modifiable by n - + If you want to retain use of the SELinux policy for named, and put named files in different locations, you can do @@ -1358,7 +1355,7 @@ named_cache_t: for files modifiable by n - + To create a custom modifiable named data location, e.g. '/var/log/named' for a log file, do: @@ -1368,7 +1365,7 @@ named_cache_t: for files modifiable by n - + To create a custom zone file location, e.g. /root/zones/, do: @@ -1377,7 +1374,7 @@ named_cache_t: for files modifiable by n - + See these man-pages for more information : selinux(8), named_selinux(8), chcon(1), setsebool(8) @@ -1403,8 +1400,8 @@ named_cache_t: for files modifiable by n - Ubuntu uses AppArmor - <http://en.wikipedia.org/wiki/AppArmor> in + Ubuntu uses AppArmor + <http://en.wikipedia.org/wiki/AppArmor> in addition to normal file system permissions to protect the system. @@ -1438,11 +1435,11 @@ proc /var/named/proc proc defaults 0 0 - + - + Windows - + @@ -1463,7 +1460,7 @@ proc /var/named/proc proc defaults 0 0 - + @@ -1489,11 +1486,11 @@ options { - + - + FreeBSD - + @@ -1513,16 +1510,16 @@ rand_irqs="3 14 15" See also - - <http://people.freebsd.org/~dougb/randomness.html>. + + <http://people.freebsd.org/~dougb/randomness.html>. - + - + Solaris - + @@ -1534,15 +1531,14 @@ rand_irqs="3 14 15" Sun has a blog entry describing how to do this. - + <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris> - + - - + + Apple Mac OS X @@ -1558,7 +1554,7 @@ rand_irqs="3 14 15" -% sudo rndc-confgen > /etc/rndc.conf +% sudo rndc-confgen > /etc/rndc.conf Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.: @@ -1606,8 +1602,8 @@ key "rndc-key" { - - + + Modified: vendor/bind9/dist/FREEBSD-Xlist ============================================================================== --- vendor/bind9/dist/FREEBSD-Xlist Wed Sep 28 03:45:16 2016 (r306383) +++ vendor/bind9/dist/FREEBSD-Xlist Wed Sep 28 03:45:43 2016 (r306384) @@ -2,6 +2,7 @@ # Misc. stuff .cvsignore +.gitattributes bin/named/bindkeys.pl bin/pkcs11 bin/python @@ -33,6 +34,7 @@ doc/arm/latex-fixup.pl doc/draft doc/doxygen doc/rfc +doc/tex doc/xsl # Windows directories Modified: vendor/bind9/dist/Makefile.in ============================================================================== --- vendor/bind9/dist/Makefile.in Wed Sep 28 03:45:16 2016 (r306383) +++ vendor/bind9/dist/Makefile.in Wed Sep 28 03:45:43 2016 (r306384) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2009, 2011-2015 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -19,7 +19,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ -@BIND9_VERSION@ +VERSION=@BIND9_VERSION@ SUBDIRS = make unit lib bin doc @LIBEXPORT@ TARGETS = @@ -32,6 +32,9 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES} @BIND9_MAKE_RULES@ +newrr: + cd lib/dns; ${MAKE} newrr + distclean:: rm -f config.cache config.h config.log config.status TAGS rm -f libtool isc-config.sh configure.lineno Modified: vendor/bind9/dist/README ============================================================================== --- vendor/bind9/dist/README Wed Sep 28 03:45:16 2016 (r306383) +++ vendor/bind9/dist/README Wed Sep 28 03:45:43 2016 (r306384) @@ -51,27 +51,29 @@ BIND 9 For up-to-date release notes and errata, see http://www.isc.org/software/bind9/releasenotes -BIND 9.9.8-P4 +BIND 9.9.9-P3 - BIND 9.9.8-P4 is a security release addressing the flaws - described in CVE-2016-1285 and CVE-2016-1286. + This version contains a fix for CVE-2016-2776. -BIND 9.9.8-P3 +BIND 9.9.9-P2 - BIND 9.9.8-P3 is a security release addressing the flaw described in - CVE-2015-8704. It also fixes a serious regression in authoritative - server selection that was introduced in 9.9.8. + This version contains a fix for CVE-2016-2775 and addresses + two regressions introduced with BIND 9.9.9. -BIND 9.9.8-P2 +BIND 9.9.9-P1 - BIND 9.9.8-P2 is a security release addressing the flaws - described in CVE-2015-3193 (OpenSSL), CVE-2015-8000 and - CVE-2015-8461. + This version contains two urgent fixes to BIND 9.9.9: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Sep 28 03:46: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 B64AAC00FB2; Wed, 28 Sep 2016 03:46:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8557566D; Wed, 28 Sep 2016 03:46:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S3kpUl044082; Wed, 28 Sep 2016 03:46:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S3kpM3044081; Wed, 28 Sep 2016 03:46:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609280346.u8S3kpM3044081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Sep 2016 03:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r306385 - 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.23 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: Wed, 28 Sep 2016 03:46:52 -0000 Author: delphij Date: Wed Sep 28 03:46:51 2016 New Revision: 306385 URL: https://svnweb.freebsd.org/changeset/base/306385 Log: Revert previous change after import. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Sep 28 03:45:43 2016 (r306384) +++ svnadmin/conf/sizelimit.conf Wed Sep 28 03:46:51 2016 (r306385) @@ -18,7 +18,6 @@ achim bapt brooks davidcs -delphij dim imp jb From owner-svn-src-all@freebsd.org Wed Sep 28 04:02: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 55ABCBEA418; Wed, 28 Sep 2016 04:02:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0579FD3C; Wed, 28 Sep 2016 04:02:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S42H36051243; Wed, 28 Sep 2016 04:02:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S42HwB051242; Wed, 28 Sep 2016 04:02:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609280402.u8S42HwB051242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Sep 2016 04:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306386 - vendor/bind9/9.9.9-P3 X-SVN-Group: vendor 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.23 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: Wed, 28 Sep 2016 04:02:18 -0000 Author: delphij Date: Wed Sep 28 04:02:17 2016 New Revision: 306386 URL: https://svnweb.freebsd.org/changeset/base/306386 Log: Tag BIND 9.9.9-P3. Added: vendor/bind9/9.9.9-P3/ - copied from r306385, vendor/bind9/dist/ From owner-svn-src-all@freebsd.org Wed Sep 28 04:08: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 54686BEA528; Wed, 28 Sep 2016 04:08:22 +0000 (UTC) (envelope-from sephe@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 0B994F4A; Wed, 28 Sep 2016 04:08:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S48LR3051495; Wed, 28 Sep 2016 04:08:21 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S48Lcf051492; Wed, 28 Sep 2016 04:08:21 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280408.u8S48Lcf051492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306387 - in head/sys/dev/hyperv: include vmbus 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.23 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: Wed, 28 Sep 2016 04:08:22 -0000 Author: sephe Date: Wed Sep 28 04:08:20 2016 New Revision: 306387 URL: https://svnweb.freebsd.org/changeset/base/306387 Log: hyperv/vmbus: Add functions to test RX/TX bufring emptiness MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8044 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_brvar.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:02:17 2016 (r306386) +++ head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:08:20 2016 (r306387) @@ -173,5 +173,7 @@ const struct hyperv_guid * vmbus_chan_guid_inst(const struct vmbus_channel *chan); int vmbus_chan_prplist_nelem(int br_size, int prpcnt_max, int dlen_max); +bool vmbus_chan_rx_empty(const struct vmbus_channel *chan); +bool vmbus_chan_tx_empty(const struct vmbus_channel *chan); #endif /* !_VMBUS_H_ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Sep 28 04:02:17 2016 (r306386) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Sep 28 04:08:20 2016 (r306387) @@ -83,6 +83,20 @@ vmbus_txbr_maxpktsz(const struct vmbus_t return (tbr->txbr_dsize - sizeof(uint64_t) - 1); } +static __inline bool +vmbus_txbr_empty(const struct vmbus_txbr *tbr) +{ + + return (tbr->txbr_windex == tbr->txbr_rindex ? true : false); +} + +static __inline bool +vmbus_rxbr_empty(const struct vmbus_rxbr *rbr) +{ + + return (rbr->rxbr_windex == rbr->rxbr_rindex ? true : false); +} + static __inline int vmbus_br_nelem(int br_size, int elem_size) { Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:02:17 2016 (r306386) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:08:20 2016 (r306387) @@ -1692,3 +1692,17 @@ vmbus_chan_prplist_nelem(int br_size, in return (vmbus_br_nelem(br_size, elem_size)); } + +bool +vmbus_chan_tx_empty(const struct vmbus_channel *chan) +{ + + return (vmbus_txbr_empty(&chan->ch_txbr)); +} + +bool +vmbus_chan_rx_empty(const struct vmbus_channel *chan) +{ + + return (vmbus_rxbr_empty(&chan->ch_rxbr)); +} From owner-svn-src-all@freebsd.org Wed Sep 28 04:22:07 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 61636BEA868; Wed, 28 Sep 2016 04:22:07 +0000 (UTC) (envelope-from loos@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 329858A6; Wed, 28 Sep 2016 04:22:07 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4M6hr058773; Wed, 28 Sep 2016 04:22:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4M6ps058772; Wed, 28 Sep 2016 04:22:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609280422.u8S4M6ps058772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 28 Sep 2016 04:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306388 - head/sys/arm/ti/cpsw 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.23 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: Wed, 28 Sep 2016 04:22:07 -0000 Author: loos Date: Wed Sep 28 04:22:06 2016 New Revision: 306388 URL: https://svnweb.freebsd.org/changeset/base/306388 Log: Fix a typo. Pointy hat to: loos Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Wed Sep 28 04:08:20 2016 (r306387) +++ head/sys/arm/ti/cpsw/if_cpsw.c Wed Sep 28 04:22:06 2016 (r306388) @@ -1941,7 +1941,7 @@ cpsw_tx_dequeue(struct cpsw_softc *sc) /* TearDown complete is only marked on the SOP for the packet. */ if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) == - (CPDMA_BD_EOP | CPDMA_BD_TDOWNCMPLT)) { + (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) { CPSW_DEBUGF(sc, ("TX teardown in progress")); cpsw_write_cp(sc, &sc->tx, 0xfffffffc); // TODO: Increment a count of dropped TX packets From owner-svn-src-all@freebsd.org Wed Sep 28 04:25:26 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 76BFEBEAAE4; Wed, 28 Sep 2016 04:25:26 +0000 (UTC) (envelope-from sephe@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 497ABBC5; Wed, 28 Sep 2016 04:25:26 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4PPA4058928; Wed, 28 Sep 2016 04:25:25 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4PP6d058926; Wed, 28 Sep 2016 04:25:25 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280425.u8S4PP6d058926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306389 - in head/sys/dev/hyperv: include vmbus 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.23 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: Wed, 28 Sep 2016 04:25:26 -0000 Author: sephe Date: Wed Sep 28 04:25:25 2016 New Revision: 306389 URL: https://svnweb.freebsd.org/changeset/base/306389 Log: hyperv/vmbus: Add function to drain channel interrupt task. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8045 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:22:06 2016 (r306388) +++ head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:25:25 2016 (r306389) @@ -133,6 +133,7 @@ int vmbus_chan_open_br(struct vmbus_cha const struct vmbus_chan_br *cbr, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); void vmbus_chan_close(struct vmbus_channel *chan); +void vmbus_chan_intr_drain(struct vmbus_channel *chan); int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, bus_addr_t paddr, int size, uint32_t *gpadl); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:22:06 2016 (r306388) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:25:25 2016 (r306389) @@ -756,6 +756,13 @@ vmbus_chan_close(struct vmbus_channel *c vmbus_chan_close_internal(chan); } +void +vmbus_chan_intr_drain(struct vmbus_channel *chan) +{ + + taskqueue_drain(chan->ch_tq, &chan->ch_task); +} + int vmbus_chan_send(struct vmbus_channel *chan, uint16_t type, uint16_t flags, void *data, int dlen, uint64_t xactid) From owner-svn-src-all@freebsd.org Wed Sep 28 04: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 5402CBEAD25; Wed, 28 Sep 2016 04:34:23 +0000 (UTC) (envelope-from sephe@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 15E65175; Wed, 28 Sep 2016 04:34:23 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4YMil062898; Wed, 28 Sep 2016 04:34:22 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4YMsf062895; Wed, 28 Sep 2016 04:34:22 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280434.u8S4YMsf062895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306390 - head/sys/dev/hyperv/netvsc 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.23 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: Wed, 28 Sep 2016 04:34:23 -0000 Author: sephe Date: Wed Sep 28 04:34:21 2016 New Revision: 306390 URL: https://svnweb.freebsd.org/changeset/base/306390 Log: hyperv/hn: Suspend and resume the backend properly upon MTU change. Suspend: - Prevent the backend from being touched on TX path. - Clear the RNDIS RX filter, and wait for RX to drain. - Make sure that NVS see the chimney sending buffer and RXBUF disconnection, before unlink these buffers from the channel. Resume: - Reconfigure the RNDIS filter. - Allow TX path to work on the backend. - Kick start the TX eof task, in case the OACTIVE is set. This fixes various panics, when the interface has traffic and MTU is being changed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8046 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:25:25 2016 (r306389) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:34:21 2016 (r306390) @@ -348,6 +348,16 @@ hn_nvs_disconn_rxbuf(struct hn_softc *sc return (error); } sc->hn_flags &= ~HN_FLAG_RXBUF_CONNECTED; + + /* + * Wait for the hypervisor to receive this NVS request. + */ + while (!vmbus_chan_tx_empty(sc->hn_prichan)) + pause("waittx", 1); + /* + * Linger long enough for NVS to disconnect RXBUF. + */ + pause("lingtx", (200 * hz) / 1000); } if (sc->hn_rxbuf_gpadl != 0) { @@ -389,6 +399,17 @@ hn_nvs_disconn_chim(struct hn_softc *sc) return (error); } sc->hn_flags &= ~HN_FLAG_CHIM_CONNECTED; + + /* + * Wait for the hypervisor to receive this NVS request. + */ + while (!vmbus_chan_tx_empty(sc->hn_prichan)) + pause("waittx", 1); + /* + * Linger long enough for NVS to disconnect chimney + * sending buffer. + */ + pause("lingtx", (200 * hz) / 1000); } if (sc->hn_chim_gpadl != 0) { Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:25:25 2016 (r306389) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:34:21 2016 (r306390) @@ -178,6 +178,7 @@ struct hn_tx_ring { bus_dma_tag_t hn_tx_data_dtag; uint64_t hn_csum_assist; + int hn_suspended; int hn_gpa_cnt; struct vmbus_gpa hn_gpa[NETVSC_PACKET_MAXPAGE]; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:25:25 2016 (r306389) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:34:21 2016 (r306390) @@ -348,6 +348,10 @@ static void hn_detach_allchans(struct hn static void hn_chan_callback(struct vmbus_channel *chan, void *xrxr); static void hn_set_ring_inuse(struct hn_softc *, int); static int hn_synth_attach(struct hn_softc *, int); +static bool hn_tx_ring_pending(struct hn_tx_ring *); +static void hn_suspend(struct hn_softc *); +static void hn_resume(struct hn_softc *); +static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_nvs_handle_notify(struct hn_softc *sc, const struct vmbus_chanpkt_hdr *pkt); @@ -905,6 +909,23 @@ hn_txdesc_hold(struct hn_txdesc *txd) atomic_add_int(&txd->refs, 1); } +static bool +hn_tx_ring_pending(struct hn_tx_ring *txr) +{ + bool pending = false; + +#ifndef HN_USE_TXDESC_BUFRING + mtx_lock_spin(&txr->hn_txlist_spin); + if (txr->hn_txdesc_avail != txr->hn_txdesc_cnt) + pending = true; + mtx_unlock_spin(&txr->hn_txlist_spin); +#else + if (!buf_ring_full(txr->hn_txdesc_br)) + pending = true; +#endif + return (pending); +} + static __inline void hn_txeof(struct hn_tx_ring *txr) { @@ -1241,6 +1262,9 @@ hn_start_locked(struct hn_tx_ring *txr, KASSERT(txr == &sc->hn_tx_ring[0], ("not the first TX ring")); mtx_assert(&txr->hn_tx_lock, MA_OWNED); + if (__predict_false(txr->hn_suspended)) + return 0; + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) return 0; @@ -1627,6 +1651,9 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MIN(ifp)); #endif + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_suspend(sc); + /* We must remove and add back the device to cause the new * MTU to take effect. This includes tearing down, but not * deleting the channel, then bringing it back up. @@ -1651,7 +1678,9 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, if (sc->hn_tx_ring[0].hn_chim_size > sc->hn_chim_szmax) hn_set_chim_size(sc, sc->hn_chim_szmax); - hn_init_locked(sc); + /* All done! Resume now. */ + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_resume(sc); HN_UNLOCK(sc); break; @@ -2984,6 +3013,9 @@ hn_xmit(struct hn_tx_ring *txr, int len) KASSERT(hn_use_if_start == 0, ("hn_xmit is called, when if_start is enabled")); + if (__predict_false(txr->hn_suspended)) + return 0; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || txr->hn_oactive) return 0; @@ -3070,20 +3102,24 @@ do_sched: } static void +hn_tx_ring_qflush(struct hn_tx_ring *txr) +{ + struct mbuf *m; + + mtx_lock(&txr->hn_tx_lock); + while ((m = buf_ring_dequeue_sc(txr->hn_mbuf_br)) != NULL) + m_freem(m); + mtx_unlock(&txr->hn_tx_lock); +} + +static void hn_xmit_qflush(struct ifnet *ifp) { struct hn_softc *sc = ifp->if_softc; int i; - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; - struct mbuf *m; - - mtx_lock(&txr->hn_tx_lock); - while ((m = buf_ring_dequeue_sc(txr->hn_mbuf_br)) != NULL) - m_freem(m); - mtx_unlock(&txr->hn_tx_lock); - } + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) + hn_tx_ring_qflush(&sc->hn_tx_ring[i]); if_qflush(ifp); } @@ -3503,6 +3539,111 @@ hn_set_ring_inuse(struct hn_softc *sc, i } static void +hn_rx_drain(struct vmbus_channel *chan) +{ + + while (!vmbus_chan_rx_empty(chan) || !vmbus_chan_tx_empty(chan)) + pause("waitch", 1); + vmbus_chan_intr_drain(chan); +} + +static void +hn_suspend(struct hn_softc *sc) +{ + struct vmbus_channel **subch = NULL; + int i, nsubch; + + HN_LOCK_ASSERT(sc); + + /* + * Suspend TX. + */ + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_suspended = 1; + mtx_unlock(&txr->hn_tx_lock); + /* No one is able send more packets now. */ + + /* Wait for all pending sends to finish. */ + while (hn_tx_ring_pending(txr)) + pause("hnwtx", 1 /* 1 tick */); + } + + /* + * Disable RX. + */ + hv_rf_on_close(sc); + + /* Give RNDIS enough time to flush all pending data packets. */ + pause("waitrx", (200 * hz) / 1000); + + nsubch = sc->hn_rx_ring_inuse - 1; + if (nsubch > 0) + subch = vmbus_subchan_get(sc->hn_prichan, nsubch); + + /* + * Drain RX/TX bufrings and interrupts. + */ + if (subch != NULL) { + for (i = 0; i < nsubch; ++i) + hn_rx_drain(subch[i]); + } + hn_rx_drain(sc->hn_prichan); + + if (subch != NULL) + vmbus_subchan_rel(subch, nsubch); +} + +static void +hn_resume(struct hn_softc *sc) +{ + struct hn_tx_ring *txr; + int i; + + HN_LOCK_ASSERT(sc); + + /* + * Re-enable RX. + */ + hv_rf_on_open(sc); + + /* + * Make sure to clear suspend status on "all" TX rings, + * since hn_tx_ring_inuse can be changed after hn_suspend(). + */ + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { + txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_suspended = 0; + mtx_unlock(&txr->hn_tx_lock); + } + + if (!hn_use_if_start) { + /* + * Flush unused drbrs, since hn_tx_ring_inuse may be + * reduced. + */ + for (i = sc->hn_tx_ring_inuse; i < sc->hn_tx_ring_cnt; ++i) + hn_tx_ring_qflush(&sc->hn_tx_ring[i]); + } + + /* + * Kick start TX. + */ + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + txr = &sc->hn_tx_ring[i]; + /* + * Use txeof task, so that any pending oactive can be + * cleared properly. + */ + taskqueue_enqueue(txr->hn_tx_taskq, &txr->hn_txeof_task); + } +} + +static void hn_nvs_handle_notify(struct hn_softc *sc, const struct vmbus_chanpkt_hdr *pkt) { const struct hn_nvs_hdr *hdr; From owner-svn-src-all@freebsd.org Wed Sep 28 04:45: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 E8A3EC00022; Wed, 28 Sep 2016 04:45:01 +0000 (UTC) (envelope-from sephe@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 A68E5879; Wed, 28 Sep 2016 04:45:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4j07E066702; Wed, 28 Sep 2016 04:45:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4j0CH066696; Wed, 28 Sep 2016 04:45:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280445.u8S4j0CH066696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306391 - head/sys/dev/hyperv/netvsc 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.23 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: Wed, 28 Sep 2016 04:45:02 -0000 Author: sephe Date: Wed Sep 28 04:45:00 2016 New Revision: 306391 URL: https://svnweb.freebsd.org/changeset/base/306391 Log: hyperv/hn: Reorganize the synthetic parts detach. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8047 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.h head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:45:00 2016 (r306391) @@ -618,27 +618,15 @@ hn_nvs_attach(struct hn_softc *sc, int m return (0); } -/* - * Net VSC disconnect from VSP - */ -static void -hv_nv_disconnect_from_vsp(struct hn_softc *sc) +void +hn_nvs_detach(struct hn_softc *sc) { + + /* NOTE: there are no requests to stop the NVS. */ hn_nvs_disconn_rxbuf(sc); hn_nvs_disconn_chim(sc); } -/* - * Net VSC on device remove - */ -int -hv_nv_on_device_remove(struct hn_softc *sc) -{ - - hv_nv_disconnect_from_vsp(sc); - return (0); -} - void hn_nvs_sent_xact(struct hn_send_ctx *sndc, struct hn_softc *sc __unused, struct vmbus_channel *chan __unused, Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:45:00 2016 (r306391) @@ -269,8 +269,6 @@ extern int hv_promisc_mode; struct hn_send_ctx; void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); -int hn_nvs_attach(struct hn_softc *sc, int mtu); -int hv_nv_on_device_remove(struct hn_softc *sc); int hv_nv_on_send(struct vmbus_channel *chan, uint32_t rndis_mtype, struct hn_send_ctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:45:00 2016 (r306391) @@ -348,6 +348,7 @@ static void hn_detach_allchans(struct hn static void hn_chan_callback(struct vmbus_channel *chan, void *xrxr); static void hn_set_ring_inuse(struct hn_softc *, int); static int hn_synth_attach(struct hn_softc *, int); +static void hn_synth_detach(struct hn_softc *); static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_suspend(struct hn_softc *); static void hn_resume(struct hn_softc *); @@ -744,29 +745,19 @@ failed: } /* - * Standard detach entry point + * TODO: Use this for error handling on attach path. */ static int netvsc_detach(device_t dev) { struct hn_softc *sc = device_get_softc(dev); - if (bootverbose) - printf("netvsc_detach\n"); - - /* - * XXXKYS: Need to clean up all our - * driver state; this is the driver - * unloading. - */ + /* TODO: ether_ifdetach */ - /* - * XXXKYS: Need to stop outgoing traffic and unregister - * the netdevice. - */ - - hv_rf_on_device_remove(sc); - hn_detach_allchans(sc); + HN_LOCK(sc); + /* TODO: hn_stop */ + hn_synth_detach(sc); + HN_UNLOCK(sc); hn_stop_tx_tasks(sc); @@ -779,6 +770,8 @@ netvsc_detach(device_t dev) vmbus_xact_ctx_destroy(sc->hn_xact); HN_LOCK_DESTROY(sc); + + /* TODO: if_free */ return (0); } @@ -1654,23 +1647,14 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, if (ifp->if_drv_flags & IFF_DRV_RUNNING) hn_suspend(sc); - /* We must remove and add back the device to cause the new - * MTU to take effect. This includes tearing down, but not - * deleting the channel, then bringing it back up. - */ - error = hv_rf_on_device_remove(sc); - if (error) { - HN_UNLOCK(sc); - break; - } - /* - * Detach all of the channels. + * Detach the synthetics parts, i.e. NVS and RNDIS. */ - hn_detach_allchans(sc); + hn_synth_detach(sc); /* - * Attach the synthetic parts, i.e. NVS and RNDIS. + * Reattach the synthetic parts, i.e. NVS and RNDIS, + * with the new MTU setting. * XXX check error. */ hn_synth_attach(sc, ifr->ifr_mtu); @@ -3520,6 +3504,26 @@ back: return (0); } +/* + * NOTE: + * The interface must have been suspended though hn_suspend(), before + * this function get called. + */ +static void +hn_synth_detach(struct hn_softc *sc) +{ + HN_LOCK_ASSERT(sc); + + /* Detach the RNDIS first. */ + hn_rndis_detach(sc); + + /* Detach NVS. */ + hn_nvs_detach(sc); + + /* Detach all of the channels. */ + hn_detach_allchans(sc); +} + static void hn_set_ring_inuse(struct hn_softc *sc, int ring_cnt) { Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 04:45:00 2016 (r306391) @@ -957,11 +957,8 @@ done: return (error); } -/* - * RNDIS filter halt device - */ static int -hv_rf_halt_device(struct hn_softc *sc) +hn_rndis_halt(struct hn_softc *sc) { struct vmbus_xact *xact; struct rndis_halt_req *halt; @@ -1008,21 +1005,12 @@ hn_rndis_attach(struct hn_softc *sc) return (0); } -/* - * RNDIS filter on device remove - */ -int -hv_rf_on_device_remove(struct hn_softc *sc) +void +hn_rndis_detach(struct hn_softc *sc) { - int ret; - - /* Halt and release the rndis device */ - ret = hv_rf_halt_device(sc); - - /* Pass control to inner driver to remove the device */ - ret |= hv_nv_on_device_remove(sc); - return (ret); + /* Halt the RNDIS. */ + hn_rndis_halt(sc); } /* Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 04:45:00 2016 (r306391) @@ -43,7 +43,6 @@ struct hn_rx_ring; void hv_rf_on_receive(struct hn_softc *sc, struct hn_rx_ring *rxr, const void *data, int dlen); void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr); -int hv_rf_on_device_remove(struct hn_softc *sc); int hv_rf_on_open(struct hn_softc *sc); int hv_rf_on_close(struct hn_softc *sc); Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 04:45:00 2016 (r306391) @@ -118,6 +118,7 @@ uint32_t hn_chim_alloc(struct hn_softc * void hn_chim_free(struct hn_softc *sc, uint32_t chim_idx); int hn_rndis_attach(struct hn_softc *sc); +void hn_rndis_detach(struct hn_softc *sc); int hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags); void *hn_rndis_pktinfo_append(struct rndis_packet_msg *, size_t pktsize, size_t pi_dlen, uint32_t pi_type); @@ -127,6 +128,7 @@ int hn_rndis_get_linkstatus(struct hn_s uint32_t *link_status); int hn_nvs_attach(struct hn_softc *sc, int mtu); +void hn_nvs_detach(struct hn_softc *sc); int hn_nvs_alloc_subchans(struct hn_softc *sc, int *nsubch); void hn_nvs_sent_xact(struct hn_send_ctx *sndc, struct hn_softc *sc, struct vmbus_channel *chan, const void *data, int dlen); From owner-svn-src-all@freebsd.org Wed Sep 28 05:01: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 46017C00226; Wed, 28 Sep 2016 05:01:54 +0000 (UTC) (envelope-from sephe@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 0F24EDCB; Wed, 28 Sep 2016 05:01:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S51r3j073438; Wed, 28 Sep 2016 05:01:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S51rUS073437; Wed, 28 Sep 2016 05:01:53 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280501.u8S51rUS073437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 05:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306392 - head/sys/dev/hyperv/netvsc 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.23 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: Wed, 28 Sep 2016 05:01:54 -0000 Author: sephe Date: Wed Sep 28 05:01:53 2016 New Revision: 306392 URL: https://svnweb.freebsd.org/changeset/base/306392 Log: hyperv/hn: Reorder the comment a little bit. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8048 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:45:00 2016 (r306391) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 05:01:53 2016 (r306392) @@ -3580,16 +3580,18 @@ hn_suspend(struct hn_softc *sc) */ hv_rf_on_close(sc); - /* Give RNDIS enough time to flush all pending data packets. */ + /* + * Give RNDIS enough time to flush all pending data packets. + */ pause("waitrx", (200 * hz) / 1000); + /* + * Drain RX/TX bufrings and interrupts. + */ nsubch = sc->hn_rx_ring_inuse - 1; if (nsubch > 0) subch = vmbus_subchan_get(sc->hn_prichan, nsubch); - /* - * Drain RX/TX bufrings and interrupts. - */ if (subch != NULL) { for (i = 0; i < nsubch; ++i) hn_rx_drain(subch[i]); From owner-svn-src-all@freebsd.org Wed Sep 28 05:12:11 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 0EFAFC004C8; Wed, 28 Sep 2016 05:12:11 +0000 (UTC) (envelope-from sephe@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 C8B863E8; Wed, 28 Sep 2016 05:12:10 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S5CAn9077978; Wed, 28 Sep 2016 05:12:10 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S5C9S5077973; Wed, 28 Sep 2016 05:12:09 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280512.u8S5C9S5077973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 05:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306393 - head/sys/dev/hyperv/netvsc 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.23 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: Wed, 28 Sep 2016 05:12:11 -0000 Author: sephe Date: Wed Sep 28 05:12:09 2016 New Revision: 306393 URL: https://svnweb.freebsd.org/changeset/base/306393 Log: hyperv/hn: Flatten RX filter configuration. This paves way for more fixes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8049 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.h head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 05:12:09 2016 (r306393) @@ -265,7 +265,6 @@ struct hn_softc { /* * Externs */ -extern int hv_promisc_mode; struct hn_send_ctx; void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 05:12:09 2016 (r306393) @@ -205,8 +205,6 @@ struct hn_txdesc { * Globals */ -int hv_promisc_mode = 0; /* normal mode by default */ - SYSCTL_NODE(_hw, OID_AUTO, hn, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V network interface"); @@ -1779,7 +1777,7 @@ static void hn_stop(struct hn_softc *sc) { struct ifnet *ifp; - int ret, i; + int i; HN_LOCK_ASSERT(sc); @@ -1795,7 +1793,8 @@ hn_stop(struct hn_softc *sc) if_link_state_change(ifp, LINK_STATE_DOWN); - ret = hv_rf_on_close(sc); + /* Disable RX by clearing RX filter. */ + hn_rndis_set_rxfilter(sc, 0); } /* @@ -1870,9 +1869,8 @@ hn_init_locked(struct hn_softc *sc) return; } - hv_promisc_mode = 1; - - ret = hv_rf_on_open(sc); + /* TODO: add hn_rx_filter */ + ret = hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); if (ret != 0) return; @@ -3576,9 +3574,9 @@ hn_suspend(struct hn_softc *sc) } /* - * Disable RX. + * Disable RX by clearing RX filter. */ - hv_rf_on_close(sc); + hn_rndis_set_rxfilter(sc, 0); /* * Give RNDIS enough time to flush all pending data packets. @@ -3612,8 +3610,9 @@ hn_resume(struct hn_softc *sc) /* * Re-enable RX. + * TODO: add hn_rx_filter. */ - hv_rf_on_open(sc); + hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); /* * Make sure to clear suspend status on "all" TX rings, Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 05:12:09 2016 (r306393) @@ -887,7 +887,7 @@ hn_rndis_conf_rss(struct hn_softc *sc, u return (error); } -static int +int hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter) { int error; @@ -1013,35 +1013,6 @@ hn_rndis_detach(struct hn_softc *sc) hn_rndis_halt(sc); } -/* - * RNDIS filter on open - */ -int -hv_rf_on_open(struct hn_softc *sc) -{ - uint32_t filter; - - /* XXX */ - if (hv_promisc_mode != 1) { - filter = NDIS_PACKET_TYPE_BROADCAST | - NDIS_PACKET_TYPE_ALL_MULTICAST | - NDIS_PACKET_TYPE_DIRECTED; - } else { - filter = NDIS_PACKET_TYPE_PROMISCUOUS; - } - return (hn_rndis_set_rxfilter(sc, filter)); -} - -/* - * RNDIS filter on close - */ -int -hv_rf_on_close(struct hn_softc *sc) -{ - - return (hn_rndis_set_rxfilter(sc, 0)); -} - void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr) { Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 05:12:09 2016 (r306393) @@ -43,8 +43,6 @@ struct hn_rx_ring; void hv_rf_on_receive(struct hn_softc *sc, struct hn_rx_ring *rxr, const void *data, int dlen); void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr); -int hv_rf_on_open(struct hn_softc *sc); -int hv_rf_on_close(struct hn_softc *sc); #endif /* __HV_RNDIS_FILTER_H__ */ Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 05:12:09 2016 (r306393) @@ -126,6 +126,8 @@ int hn_rndis_get_rsscaps(struct hn_soft int hn_rndis_get_eaddr(struct hn_softc *sc, uint8_t *eaddr); int hn_rndis_get_linkstatus(struct hn_softc *sc, uint32_t *link_status); +/* filter: NDIS_PACKET_TYPE_ or 0. */ +int hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter); int hn_nvs_attach(struct hn_softc *sc, int mtu); void hn_nvs_detach(struct hn_softc *sc); From owner-svn-src-all@freebsd.org Wed Sep 28 06:11: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 3CF1CC00EB7; Wed, 28 Sep 2016 06:11:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD91EE2F; Wed, 28 Sep 2016 06:11:02 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S6B2Br097691; Wed, 28 Sep 2016 06:11:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S6B1Q9097685; Wed, 28 Sep 2016 06:11:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201609280611.u8S6B1Q9097685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Sep 2016 06:11: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: r306394 - in stable/9: contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dnssec contrib/bind9/bin/named contrib/bind9/bin/named/inc... 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.23 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: Wed, 28 Sep 2016 06:11:03 -0000 Author: delphij Date: Wed Sep 28 06:11:01 2016 New Revision: 306394 URL: https://svnweb.freebsd.org/changeset/base/306394 Log: MFV r306384: BIND 9.9.9-P3. Added: stable/9/contrib/bind9/doc/arm/Bv9ARM.conf - copied unchanged from r306384, vendor/bind9/dist/doc/arm/Bv9ARM.conf stable/9/contrib/bind9/doc/arm/logging-categories.xml - copied unchanged from r306384, vendor/bind9/dist/doc/arm/logging-categories.xml stable/9/contrib/bind9/doc/arm/man.dnssec-importkey.html - copied unchanged from r306384, vendor/bind9/dist/doc/arm/man.dnssec-importkey.html stable/9/contrib/bind9/doc/arm/man.lwresd.html - copied unchanged from r306384, vendor/bind9/dist/doc/arm/man.lwresd.html stable/9/contrib/bind9/doc/arm/man.named.conf.html - copied unchanged from r306384, vendor/bind9/dist/doc/arm/man.named.conf.html stable/9/contrib/bind9/doc/arm/notes.conf - copied unchanged from r306384, vendor/bind9/dist/doc/arm/notes.conf stable/9/contrib/bind9/doc/arm/noteversion.xml.in - copied unchanged from r306384, vendor/bind9/dist/doc/arm/noteversion.xml.in stable/9/contrib/bind9/doc/arm/pkgversion.xml.in - copied unchanged from r306384, vendor/bind9/dist/doc/arm/pkgversion.xml.in stable/9/contrib/bind9/doc/arm/releaseinfo.xml.in - copied unchanged from r306384, vendor/bind9/dist/doc/arm/releaseinfo.xml.in stable/9/contrib/bind9/lib/dns/rdata/generic/avc_258.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/avc_258.c stable/9/contrib/bind9/lib/dns/rdata/generic/avc_258.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/avc_258.h stable/9/contrib/bind9/lib/dns/rdata/generic/csync_62.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/csync_62.c stable/9/contrib/bind9/lib/dns/rdata/generic/csync_62.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/csync_62.h stable/9/contrib/bind9/lib/dns/rdata/generic/ninfo_56.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/ninfo_56.c stable/9/contrib/bind9/lib/dns/rdata/generic/ninfo_56.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/ninfo_56.h stable/9/contrib/bind9/lib/dns/rdata/generic/rkey_57.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/rkey_57.c stable/9/contrib/bind9/lib/dns/rdata/generic/rkey_57.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/rkey_57.h stable/9/contrib/bind9/lib/dns/rdata/generic/sink_40.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/sink_40.c stable/9/contrib/bind9/lib/dns/rdata/generic/sink_40.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/sink_40.h stable/9/contrib/bind9/lib/dns/rdata/generic/smimea_53.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/smimea_53.c stable/9/contrib/bind9/lib/dns/rdata/generic/smimea_53.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/smimea_53.h stable/9/contrib/bind9/lib/dns/rdata/generic/ta_32768.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/ta_32768.c stable/9/contrib/bind9/lib/dns/rdata/generic/ta_32768.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/ta_32768.h stable/9/contrib/bind9/lib/dns/rdata/generic/talink_58.c - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/talink_58.c stable/9/contrib/bind9/lib/dns/rdata/generic/talink_58.h - copied unchanged from r306384, vendor/bind9/dist/lib/dns/rdata/generic/talink_58.h Deleted: stable/9/contrib/bind9/doc/arm/html-fixup.pl Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/FAQ stable/9/contrib/bind9/FAQ.xml stable/9/contrib/bind9/Makefile.in stable/9/contrib/bind9/README stable/9/contrib/bind9/acconfig.h stable/9/contrib/bind9/bin/check/Makefile.in stable/9/contrib/bind9/bin/check/named-checkconf.8 stable/9/contrib/bind9/bin/check/named-checkconf.c stable/9/contrib/bind9/bin/check/named-checkconf.docbook stable/9/contrib/bind9/bin/check/named-checkconf.html stable/9/contrib/bind9/bin/check/named-checkzone.8 stable/9/contrib/bind9/bin/check/named-checkzone.c stable/9/contrib/bind9/bin/check/named-checkzone.docbook stable/9/contrib/bind9/bin/check/named-checkzone.html stable/9/contrib/bind9/bin/confgen/Makefile.in stable/9/contrib/bind9/bin/confgen/ddns-confgen.8 stable/9/contrib/bind9/bin/confgen/ddns-confgen.docbook stable/9/contrib/bind9/bin/confgen/ddns-confgen.html stable/9/contrib/bind9/bin/confgen/rndc-confgen.8 stable/9/contrib/bind9/bin/confgen/rndc-confgen.docbook stable/9/contrib/bind9/bin/confgen/rndc-confgen.html stable/9/contrib/bind9/bin/dig/Makefile.in stable/9/contrib/bind9/bin/dig/dig.1 stable/9/contrib/bind9/bin/dig/dig.c stable/9/contrib/bind9/bin/dig/dig.docbook stable/9/contrib/bind9/bin/dig/dig.html stable/9/contrib/bind9/bin/dig/dighost.c stable/9/contrib/bind9/bin/dig/host.1 stable/9/contrib/bind9/bin/dig/host.docbook stable/9/contrib/bind9/bin/dig/host.html stable/9/contrib/bind9/bin/dig/nslookup.1 stable/9/contrib/bind9/bin/dig/nslookup.docbook stable/9/contrib/bind9/bin/dig/nslookup.html stable/9/contrib/bind9/bin/dnssec/Makefile.in stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8 stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.8 stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.html stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.8 stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.c stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.html stable/9/contrib/bind9/bin/dnssec/dnssec-settime.8 stable/9/contrib/bind9/bin/dnssec/dnssec-settime.c stable/9/contrib/bind9/bin/dnssec/dnssec-settime.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-settime.html stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/9/contrib/bind9/bin/dnssec/dnssec-verify.8 stable/9/contrib/bind9/bin/dnssec/dnssec-verify.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-verify.html stable/9/contrib/bind9/bin/named/Makefile.in stable/9/contrib/bind9/bin/named/client.c stable/9/contrib/bind9/bin/named/config.c stable/9/contrib/bind9/bin/named/control.c stable/9/contrib/bind9/bin/named/controlconf.c stable/9/contrib/bind9/bin/named/include/named/log.h stable/9/contrib/bind9/bin/named/include/named/query.h stable/9/contrib/bind9/bin/named/include/named/server.h stable/9/contrib/bind9/bin/named/lwdgrbn.c stable/9/contrib/bind9/bin/named/lwresd.8 stable/9/contrib/bind9/bin/named/lwresd.docbook stable/9/contrib/bind9/bin/named/lwresd.html stable/9/contrib/bind9/bin/named/main.c stable/9/contrib/bind9/bin/named/named.8 stable/9/contrib/bind9/bin/named/named.conf.5 stable/9/contrib/bind9/bin/named/named.conf.docbook stable/9/contrib/bind9/bin/named/named.conf.html stable/9/contrib/bind9/bin/named/named.docbook stable/9/contrib/bind9/bin/named/named.html stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/bin/named/server.c stable/9/contrib/bind9/bin/named/statschannel.c stable/9/contrib/bind9/bin/named/unix/include/named/os.h stable/9/contrib/bind9/bin/named/unix/os.c stable/9/contrib/bind9/bin/named/xfrout.c stable/9/contrib/bind9/bin/nsupdate/Makefile.in stable/9/contrib/bind9/bin/nsupdate/nsupdate.1 stable/9/contrib/bind9/bin/nsupdate/nsupdate.c stable/9/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/9/contrib/bind9/bin/nsupdate/nsupdate.html stable/9/contrib/bind9/bin/rndc/Makefile.in stable/9/contrib/bind9/bin/rndc/rndc.8 stable/9/contrib/bind9/bin/rndc/rndc.conf.5 stable/9/contrib/bind9/bin/rndc/rndc.conf.docbook stable/9/contrib/bind9/bin/rndc/rndc.conf.html stable/9/contrib/bind9/bin/rndc/rndc.docbook stable/9/contrib/bind9/bin/rndc/rndc.html stable/9/contrib/bind9/bin/tools/Makefile.in stable/9/contrib/bind9/bin/tools/arpaname.1 stable/9/contrib/bind9/bin/tools/arpaname.docbook stable/9/contrib/bind9/bin/tools/arpaname.html stable/9/contrib/bind9/bin/tools/genrandom.8 stable/9/contrib/bind9/bin/tools/genrandom.docbook stable/9/contrib/bind9/bin/tools/genrandom.html stable/9/contrib/bind9/bin/tools/isc-hmac-fixup.8 stable/9/contrib/bind9/bin/tools/isc-hmac-fixup.docbook stable/9/contrib/bind9/bin/tools/isc-hmac-fixup.html stable/9/contrib/bind9/bin/tools/named-journalprint.8 stable/9/contrib/bind9/bin/tools/named-journalprint.docbook stable/9/contrib/bind9/bin/tools/named-journalprint.html stable/9/contrib/bind9/bin/tools/nsec3hash.8 stable/9/contrib/bind9/bin/tools/nsec3hash.docbook stable/9/contrib/bind9/bin/tools/nsec3hash.html stable/9/contrib/bind9/config.h.in stable/9/contrib/bind9/configure.in stable/9/contrib/bind9/doc/Makefile.in stable/9/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html stable/9/contrib/bind9/doc/arm/Bv9ARM.html stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf stable/9/contrib/bind9/doc/arm/Makefile.in stable/9/contrib/bind9/doc/arm/README-SGML stable/9/contrib/bind9/doc/arm/dnssec.xml stable/9/contrib/bind9/doc/arm/libdns.xml stable/9/contrib/bind9/doc/arm/man.arpaname.html stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html stable/9/contrib/bind9/doc/arm/man.dig.html stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/9/contrib/bind9/doc/arm/man.dnssec-verify.html stable/9/contrib/bind9/doc/arm/man.genrandom.html stable/9/contrib/bind9/doc/arm/man.host.html stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html stable/9/contrib/bind9/doc/arm/man.named-checkconf.html stable/9/contrib/bind9/doc/arm/man.named-checkzone.html stable/9/contrib/bind9/doc/arm/man.named-journalprint.html stable/9/contrib/bind9/doc/arm/man.named.html stable/9/contrib/bind9/doc/arm/man.nsec3hash.html stable/9/contrib/bind9/doc/arm/man.nsupdate.html stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html stable/9/contrib/bind9/doc/arm/man.rndc.conf.html stable/9/contrib/bind9/doc/arm/man.rndc.html stable/9/contrib/bind9/doc/arm/managed-keys.xml stable/9/contrib/bind9/doc/arm/notes-wrapper.xml stable/9/contrib/bind9/doc/arm/notes.html stable/9/contrib/bind9/doc/arm/notes.pdf stable/9/contrib/bind9/doc/arm/notes.xml stable/9/contrib/bind9/doc/arm/pkcs11.xml stable/9/contrib/bind9/doc/misc/options stable/9/contrib/bind9/doc/misc/rfc-compliance stable/9/contrib/bind9/isc-config.sh.in stable/9/contrib/bind9/lib/bind9/Makefile.in stable/9/contrib/bind9/lib/bind9/api stable/9/contrib/bind9/lib/bind9/check.c stable/9/contrib/bind9/lib/bind9/include/bind9/Makefile.in stable/9/contrib/bind9/lib/dns/Makefile.in stable/9/contrib/bind9/lib/dns/acache.c stable/9/contrib/bind9/lib/dns/api stable/9/contrib/bind9/lib/dns/cache.c stable/9/contrib/bind9/lib/dns/client.c stable/9/contrib/bind9/lib/dns/dst_api.c stable/9/contrib/bind9/lib/dns/dst_openssl.h stable/9/contrib/bind9/lib/dns/forward.c stable/9/contrib/bind9/lib/dns/gen.c stable/9/contrib/bind9/lib/dns/include/dns/Makefile.in stable/9/contrib/bind9/lib/dns/include/dns/dbiterator.h stable/9/contrib/bind9/lib/dns/include/dns/forward.h stable/9/contrib/bind9/lib/dns/include/dns/message.h stable/9/contrib/bind9/lib/dns/include/dns/name.h stable/9/contrib/bind9/lib/dns/include/dns/rbt.h stable/9/contrib/bind9/lib/dns/include/dns/view.h stable/9/contrib/bind9/lib/dns/include/dst/Makefile.in stable/9/contrib/bind9/lib/dns/journal.c stable/9/contrib/bind9/lib/dns/master.c stable/9/contrib/bind9/lib/dns/message.c stable/9/contrib/bind9/lib/dns/name.c stable/9/contrib/bind9/lib/dns/nsec3.c stable/9/contrib/bind9/lib/dns/openssl_link.c stable/9/contrib/bind9/lib/dns/openssldh_link.c stable/9/contrib/bind9/lib/dns/openssldsa_link.c stable/9/contrib/bind9/lib/dns/opensslrsa_link.c stable/9/contrib/bind9/lib/dns/rbt.c stable/9/contrib/bind9/lib/dns/rbtdb.c stable/9/contrib/bind9/lib/dns/rcode.c stable/9/contrib/bind9/lib/dns/rdata.c stable/9/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c stable/9/contrib/bind9/lib/dns/rdata/ch_3/a_1.c stable/9/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c stable/9/contrib/bind9/lib/dns/rdata/generic/caa_257.c stable/9/contrib/bind9/lib/dns/rdata/generic/cdnskey_60.c stable/9/contrib/bind9/lib/dns/rdata/generic/cdnskey_60.h stable/9/contrib/bind9/lib/dns/rdata/generic/cds_59.c stable/9/contrib/bind9/lib/dns/rdata/generic/cds_59.h stable/9/contrib/bind9/lib/dns/rdata/generic/cname_5.c stable/9/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c stable/9/contrib/bind9/lib/dns/rdata/generic/dlv_32769.h stable/9/contrib/bind9/lib/dns/rdata/generic/dname_39.c stable/9/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c stable/9/contrib/bind9/lib/dns/rdata/generic/dnskey_48.h stable/9/contrib/bind9/lib/dns/rdata/generic/ds_43.c stable/9/contrib/bind9/lib/dns/rdata/generic/hip_55.c stable/9/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c stable/9/contrib/bind9/lib/dns/rdata/generic/key_25.c stable/9/contrib/bind9/lib/dns/rdata/generic/key_25.h stable/9/contrib/bind9/lib/dns/rdata/generic/lp_107.c stable/9/contrib/bind9/lib/dns/rdata/generic/mb_7.c stable/9/contrib/bind9/lib/dns/rdata/generic/md_3.c stable/9/contrib/bind9/lib/dns/rdata/generic/mf_4.c stable/9/contrib/bind9/lib/dns/rdata/generic/mg_8.c stable/9/contrib/bind9/lib/dns/rdata/generic/minfo_14.c stable/9/contrib/bind9/lib/dns/rdata/generic/mr_9.c stable/9/contrib/bind9/lib/dns/rdata/generic/mx_15.c stable/9/contrib/bind9/lib/dns/rdata/generic/naptr_35.c stable/9/contrib/bind9/lib/dns/rdata/generic/ns_2.c stable/9/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c stable/9/contrib/bind9/lib/dns/rdata/generic/nsec_47.c stable/9/contrib/bind9/lib/dns/rdata/generic/nxt_30.c stable/9/contrib/bind9/lib/dns/rdata/generic/ptr_12.c stable/9/contrib/bind9/lib/dns/rdata/generic/rp_17.c stable/9/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c stable/9/contrib/bind9/lib/dns/rdata/generic/rt_21.c stable/9/contrib/bind9/lib/dns/rdata/generic/sig_24.c stable/9/contrib/bind9/lib/dns/rdata/generic/soa_6.c stable/9/contrib/bind9/lib/dns/rdata/generic/spf_99.c stable/9/contrib/bind9/lib/dns/rdata/generic/tkey_249.c stable/9/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c stable/9/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/9/contrib/bind9/lib/dns/rdata/in_1/a6_38.c stable/9/contrib/bind9/lib/dns/rdata/in_1/kx_36.c stable/9/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.c stable/9/contrib/bind9/lib/dns/rdata/in_1/px_26.c stable/9/contrib/bind9/lib/dns/rdata/in_1/srv_33.c stable/9/contrib/bind9/lib/dns/resolver.c stable/9/contrib/bind9/lib/dns/rootns.c stable/9/contrib/bind9/lib/dns/sdlz.c stable/9/contrib/bind9/lib/dns/tkey.c stable/9/contrib/bind9/lib/dns/update.c stable/9/contrib/bind9/lib/dns/view.c stable/9/contrib/bind9/lib/dns/xfrin.c stable/9/contrib/bind9/lib/dns/zone.c stable/9/contrib/bind9/lib/export/dns/Makefile.in stable/9/contrib/bind9/lib/export/dns/include/dns/Makefile.in stable/9/contrib/bind9/lib/export/dns/include/dst/Makefile.in stable/9/contrib/bind9/lib/export/irs/Makefile.in stable/9/contrib/bind9/lib/export/irs/include/irs/Makefile.in stable/9/contrib/bind9/lib/export/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/include/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in stable/9/contrib/bind9/lib/export/isccfg/Makefile.in stable/9/contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in stable/9/contrib/bind9/lib/export/samples/Makefile.in stable/9/contrib/bind9/lib/irs/Makefile.in stable/9/contrib/bind9/lib/irs/resconf.c stable/9/contrib/bind9/lib/isc/Makefile.in stable/9/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/api stable/9/contrib/bind9/lib/isc/base32.c stable/9/contrib/bind9/lib/isc/base64.c stable/9/contrib/bind9/lib/isc/buffer.c stable/9/contrib/bind9/lib/isc/commandline.c stable/9/contrib/bind9/lib/isc/hash.c stable/9/contrib/bind9/lib/isc/hex.c stable/9/contrib/bind9/lib/isc/httpd.c stable/9/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/include/isc/assertions.h stable/9/contrib/bind9/lib/isc/include/isc/error.h stable/9/contrib/bind9/lib/isc/include/isc/file.h stable/9/contrib/bind9/lib/isc/include/isc/hash.h stable/9/contrib/bind9/lib/isc/include/isc/magic.h stable/9/contrib/bind9/lib/isc/include/isc/netaddr.h stable/9/contrib/bind9/lib/isc/include/isc/platform.h.in stable/9/contrib/bind9/lib/isc/include/isc/result.h stable/9/contrib/bind9/lib/isc/include/isc/sockaddr.h stable/9/contrib/bind9/lib/isc/include/isc/socket.h stable/9/contrib/bind9/lib/isc/include/isc/util.h stable/9/contrib/bind9/lib/isc/md5.c stable/9/contrib/bind9/lib/isc/mem.c stable/9/contrib/bind9/lib/isc/mips/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/netaddr.c stable/9/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/result.c stable/9/contrib/bind9/lib/isc/sockaddr.c stable/9/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/stats.c stable/9/contrib/bind9/lib/isc/string.c stable/9/contrib/bind9/lib/isc/task.c stable/9/contrib/bind9/lib/isc/unix/file.c stable/9/contrib/bind9/lib/isc/unix/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/unix/net.c stable/9/contrib/bind9/lib/isc/unix/socket.c stable/9/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h stable/9/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/x86_64/include/isc/atomic.h stable/9/contrib/bind9/lib/isccc/Makefile.in stable/9/contrib/bind9/lib/isccc/cc.c stable/9/contrib/bind9/lib/isccc/include/isccc/Makefile.in stable/9/contrib/bind9/lib/isccc/sexpr.c stable/9/contrib/bind9/lib/isccfg/Makefile.in stable/9/contrib/bind9/lib/isccfg/aclconf.c stable/9/contrib/bind9/lib/isccfg/api stable/9/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in stable/9/contrib/bind9/lib/isccfg/namedconf.c stable/9/contrib/bind9/lib/isccfg/parser.c stable/9/contrib/bind9/lib/lwres/Makefile.in stable/9/contrib/bind9/lib/lwres/man/Makefile.in stable/9/contrib/bind9/lib/lwres/man/lwres.3 stable/9/contrib/bind9/lib/lwres/man/lwres.docbook stable/9/contrib/bind9/lib/lwres/man/lwres.html stable/9/contrib/bind9/lib/lwres/man/lwres_buffer.3 stable/9/contrib/bind9/lib/lwres/man/lwres_buffer.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_buffer.html stable/9/contrib/bind9/lib/lwres/man/lwres_config.3 stable/9/contrib/bind9/lib/lwres/man/lwres_config.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_config.html stable/9/contrib/bind9/lib/lwres/man/lwres_context.3 stable/9/contrib/bind9/lib/lwres/man/lwres_context.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_context.html stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.html stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.html stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.html stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.html stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.html stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.3 stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.html stable/9/contrib/bind9/lib/lwres/man/lwres_noop.3 stable/9/contrib/bind9/lib/lwres/man/lwres_noop.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_noop.html stable/9/contrib/bind9/lib/lwres/man/lwres_packet.3 stable/9/contrib/bind9/lib/lwres/man/lwres_packet.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_packet.html stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.3 stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.html stable/9/contrib/bind9/make/rules.in stable/9/contrib/bind9/version stable/9/lib/bind/dns/code.h stable/9/lib/bind/dns/dns/enumtype.h stable/9/lib/bind/dns/dns/rdatastruct.h stable/9/share/doc/bind9/Makefile Directory Properties: stable/9/contrib/bind9/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Wed Sep 28 05:12:09 2016 (r306393) +++ stable/9/contrib/bind9/CHANGES Wed Sep 28 06:11:01 2016 (r306394) @@ -1,4 +1,96 @@ - --- 9.9.8-P4 released --- + --- 9.9.9-P3 released --- + +4467. [security] It was possible to trigger a assertion when rendering + a message. (CVE-2016-2776) [RT #43139] + + --- 9.9.9-P2 released --- + +4406. [bug] getrrsetbyname with a non absolute name could + trigger an infinite recursion bug in lwresd + and named with lwres configured if when combined + with a search list entry the resulting name is + too long. (CVE-2016-2775) [RT #42694] + +4405. [bug] Change 4342 introduced a regression where you could + not remove a delegation in a NSEC3 signed zone using + OPTOUT via nsupdate. [RT #42702] + +4387. [bug] Change 4336 was not complete leading to SERVFAIL + being return as NS records expired. [RT #42683] + + --- 9.9.9-P1 released --- + +4366. [bug] Address race condition when updating rbtnode bit + fields. [RT #42379] + +4363. [port] win32: Disable explicit triggering UAC when running + BINDInstall. + + --- 9.9.9 released --- + + --- 9.9.9rc1 released --- + +4347. [port] Corrected a build error on x86_64 Solaris. [RT #42150] + +4346. [bug] Fixed a regression introduced in change #4337 which + caused signed domains with revoked KSKs to fail + validation. [RT #42147] + +4345. [contrib] perftcpdns mishandled the return values from + clock_nanosleep. [RT #42131] + +4344. [port] Address openssl version differences. [RT #42059] + + --- 9.9.9b2 released --- + +4342. [bug] 'rndc flushtree' could fail to clean the tree if there + wasn't a node at the specified name. [RT #41846] + +4338. [bug] Reimplement change 4324 as it wasn't properly doing + all the required book keeping. [RT #41941] + +4337. [bug] The previous change exposed a latent flaw in + key refresh queries for managed-keys when + a cached DNSKEY had TTL 0. [RT #41986] + +4336. [bug] Don't emit records with zero ttl unless the records + were learnt with a zero ttl. [RT #41687] + +4335. [bug] zone->view could be detached too early. [RT #41942] + +4333. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42 and + 2001:500:9f::42. + +4331. [func] When loading managed signed zones detect if the + RRSIG's inception time is in the future and regenerate + the RRSIG immediately. [RT #41808] + +4330. [protocol] Identify the PAD option as "PAD" when printing out + a message. + + --- 9.9.9b1 released --- + +4329. [func] Warn about a common misconfiguration when forwarding + RFC 1918 zones. [RT #41441] + +4328. [performance] Add dns_name_fromwire() benchmark test. [RT #41694] + +4327. [func] Log query and depth counters during fetches when + querytrace (./configure --enable-querytrace) is + enabled (helps in diagnosing). [RT #41787] + +4326. [protocol] Add support for AVC. [RT #41819] + +4324. [bug] When deleting records from a zone database, interior + nodes could be left empty but not deleted, damaging + search performance afterward. [RT #40997] + +4323. [bug] Improve HTTP header processing on statschannel. + [RT #41674] + +4320. [bug] Insufficient memory allocation when handling + "none" ACL could cause an assertion failure in + named when parsing ACL configuration. [RT #41745] 4319. [security] Fix resolver assertion failure due to improper DNAME handling when parsing fetch reply messages. @@ -7,20 +99,122 @@ 4318. [security] Malformed control messages can trigger assertions in named and rndc. (CVE-2016-1285) [RT #41666] - --- 9.9.8-P3 released --- +4317. [bug] Age all unused servers on fetch timeout. [RT #41597] + +4315. [bug] Check that configured view class isn't a meta class. + [RT #41572]. + +4314. [contrib] Added 'dnsperf-2.1.0.0-1', a set of performance + testing tools provided by Nominum, Inc. + +4313. [bug] Handle ns_client_replace failures in test mode. + [RT #41190] + +4312. [bug] dig's unknown DNS and EDNS flags (MBZ value) logging + was not consistent. [RT #41600] + +4311. [bug] Prevent "rndc delzone" from being used on + response-policy zones. [RT #41593] + +4310. [performance] Use __builtin_expect() where available to annotate + conditions with known behavior. [RT #41411] + +4308. [func] Added operating system details to "named -V" + output. [RT #41452] + +4306. [maint] Added a PKCS#11 openssl patch supporting + version 1.0.2f [RT #38312] + +4305. [bug] dnssec-signzone was not removing unnecessary rrsigs + from the zone's apex. [RT #41483] + +4304. [port] xfer system test failed as 'tail -n +value' is not + portable. [RT #41315] + +4302. [port] win32: fixed a build error in VS 2015. [RT #41426] + +4300. [cleanup] Added new querytrace logging. [RT #41155] + +4299. [bug] Check that exactly totallen bytes are read when + reading a RRset from raw files in both single read + and incremental modes. [RT #41402] + +4297. [bug] RPZ zones with errors could cause a crash when a + pointer was cleaned up twice. [RT #41518] + +4295. [bug] An unchecked result in dns_message_pseudosectiontotext() + could allow incorrect text formatting of EDNS EXPIRE + options. [RT #41437] + +4294. [bug] Fixed a regression in which "rndc stop -p" failed + to print the PID. [RT #41513] + +4293. [bug] Address memory leak on priming query creation failure. + [RT #41512] + +4292. [bug] Build lib/export/dns/gen with native compiler. + [RT #41502] + +4291. [cleanup] Added a required include to dns/forward.h. [RT #41474] + +4289. [bug] The server could crash due to memory being used + after it was freed if a zone transfer timed out. + [RT #41297] 4288. [bug] Fixed a regression in resolver.c:possibly_mark() which caused known-bogus servers to be queried anyway. [RT #41321] +4287. [bug] Silence an overly noisy log message when message + parsing fails. [RT #41374] + 4285. [security] Specific APL data could trigger a INSIST. (CVE-2015-8704) [RT #41396] - --- 9.9.8-P2 released --- +4283. [bug] OPENSSL_config is no longer re-callable. [RT #41348] + +4281. [bug] Teach dns_message_totext about BADCOOKIE. [RT #41257] + +4280. [performance] Use optimal message sizes to improve compression + in AXFRs. This reduces network traffic. [RT #40996] + +4277. [performance] Improve performance of the RBT, the central zone + datastructure: The aux hashtable was improved, + hash function was updated to perform more + uniform mapping, uppernode was added to + dns_rbtnode, and other cleanups and performance + improvements were made. [RT #41165] + +4276. [protocol] Add support for SMIMEA. [RT #40513] + +4274. [performance] Speed up typemap processing from text. [RT #41196] + +4272. [bug] dig: the +norrcomments option didn't work with +multi. + [RT #41234] + +4271. [test] Unit tests could deadlock in isc__taskmgr_pause(). + [RT #41235] 4270. [security] Update allowed OpenSSL versions as named is potentially vulnerable to CVE-2015-3193. +4267. [test] Check sdlz error handling. [RT #41142] + +4266. [bug] The sdlz driver failed to pass some errors back to + the caller. [RT #41142] + +4265. [bug] Address unchecked isc_mem_get calls. [RT #41187] + +4264. [bug] Check const of strchr/strrchr assignments match + argument's const status. [RT #41150] + +4262. [bug] Fixed a bug in epoll socket code that caused + sockets to not be registered for ready + notification in some cases, causing named to not + read from or write to them, resulting in what + appear to the user as blocked connections. + [RT #41067] + 4261. [maint] H.ROOT-SERVERS.NET is 198.97.190.53 and 2001:500:1::53. [RT #40556] @@ -29,10 +223,123 @@ triggering a REQUIRE failure when those records were subsequently cached. (CVE-2015-8000) [RT #40987] +4258. [bug] Limit rndc query message sizes to 32 KiB. This should + not break any legitimate rndc commands, but will + prevent a rogue rndc query from allocating too + much memory. [RT #41073] + +4257. [cleanup] Python scripts reported incorrect version. [RT #41080] + +4256. [bug] Allow rndc command arguments to be quoted so as + to allow spaces. [RT #36665] + +4254. [bug] Address missing lock when getting zone's serial. + [RT #41072] + 4253. [security] Address fetch context reference count handling error - on socket error. (CVE-2015-8461) [RT#40945] + on socket error. (CVE-2015-8461) [RT#40945] + +4248. [performance] Add an isc_atomic_storeq() function, use it in + stats counters to improve performance. + [RT #39972] [RT #39979] + +4244. [bug] The parser was not reporting that use-ixfr is obsolete. + [RT #41010] + +4241. [doc] Improved the TSIG, TKEY, and SIG(0) sections in + the ARM. [RT #40955] + +4240. [port] Fix LibreSSL compatibility. [RT #40977] + +4238. [bug] Don't send to servers on net zero (0.0.0.0/8). + [RT #40947] + +4237. [doc] Upgraded documentation toolchain to use DocBook 5 + and dblatex. [RT #40766] + +4236. [performance] On machines with 2 or more processors (CPU), the + default value for the number of UDP listeners + has been changed to the number of detected + processors minus one. [RT #40761] + +4233. [test] Add tests for CDS and CDNSKEY with delegation-only. + [RT #40597] + +4232. [contrib] Address unchecked memory allocation calls in + query-loc and zone2ldap. [RT #40789] + +4229. [bug] A variable could be used uninitialized in + dns_update_signaturesinc. [RT #40784] + +4228. [bug] Address race condition in dns_client_destroyrestrans. + [RT #40605] + +4227. [bug] Silence static analysis warnings. [RT #40828] + +4226. [bug] Address a theoretical shutdown race in + zone.c:notify_send_queue(). [RT #38958] + +4225. [port] freebsd/openbsd: Use '${CC} -shared' for building + shared libraries. [RT #39557] + +4221. [bug] Resource leak on DNS_R_NXDOMAIN in fctx_create. + [RT #40583] + +4220. [doc] Improve documentation for zone-statistics. + [RT #36955] + +4219. [bug] Set event->result to ISC_R_WOULDBLOCK on EWOULDBLOCK, + EGAIN when these soft error are not retried for + isc_socket_send*(). + +4217. [protocol] Add support for CSYNC. [RT #40532] + +4216. [cleanup] Silence static analysis warnings. [RT #40649] + +4215. [bug] nsupdate: skip to next request on GSSTKEY create + failure. [RT #40685] + +4214. [protocol] Add support for TALINK. [RT #40544] + +4213. [bug] Don't reuse a cache across multiple classes. + [RT #40205] + +4210. [cleanup] Silence use after free false positive. [RT #40743] + +4208. [bug] Address null pointer dereferences on out of memory. + [RT #40764] + +4207. [bug] Handle class mismatches with raw zone files. + [RT #40746] + +4205. [bug] 'named-checkconf -p' could include unwanted spaces + when printing tuples with unset optional fields. + [RT #40731] + +4204. [bug] 'dig +trace' failed to lookup the correct type if + the initial root NS query was retried. [RT #40296] + +4202. [bug] isccc_cc_fromwire() could return an incorrect + result. [RT #40614] + +4201. [func] The default preferred-glue is now the address record + type of the transport the query was received + over. [RT #40468] + +4200. [cleanup] win32: update BINDinstall to be BIND release + independent. [RT #38915] + +4199. [protocol] Add support for NINFO, RKEY, SINK, TA. + [RT #40545] [RT #40547] [RT #40561] [RT #40563] + +4198. [doc] Add fetch-quota-params, fetches-per-server, and + fetches-per-zone to doc/misc/options. [RT #40601] + +4196. [doc] Improve how "enum + other" types are documented. + [RT #40608] - --- 9.9.8-P1 (withdrawn) --- +4194. [bug] named-checkconf -p failed to properly print a port + range. [RT #40634] --- 9.9.8 released --- @@ -47,7 +354,7 @@ 4191. [protocol] Accept DNS-SD non LDH PTR records in reverse zones as per RFC 6763. [RT #37889] -4190. [protocol] Accept Active Diretory gc._msdcs. name as +4190. [protocol] Accept Active Directory gc._msdcs. name as valid with check-names. still needs to be LDH. [RT #40399] Modified: stable/9/contrib/bind9/FAQ ============================================================================== --- stable/9/contrib/bind9/FAQ Wed Sep 28 05:12:09 2016 (r306393) +++ stable/9/contrib/bind9/FAQ Wed Sep 28 06:11:01 2016 (r306394) @@ -1,10 +1,6 @@ -Frequently Asked Questions about BIND 9 - -Copyright © 2004-2010, 2013, 2014 Internet Systems Consortium, Inc. +Copyright ? 2000-2010, 2013-2016 Internet Systems Consortium, Inc. ("ISC") -Copyright © 2000-2003 Internet Software Consortium. - ----------------------------------------------------------------------- 1. Compilation and Installation Questions @@ -94,7 +90,7 @@ Q: I'm trying to use TSIG to authenticat rejecting the TSIG. Why? A: This may be a clock skew problem. Check that the the clocks on the - client and server are properly synchronised (e.g., using ntp). + client and server are properly synchronized (e.g., using ntp). Q: I see a log message like the following. Why? Modified: stable/9/contrib/bind9/FAQ.xml ============================================================================== --- stable/9/contrib/bind9/FAQ.xml Wed Sep 28 05:12:09 2016 (r306393) +++ stable/9/contrib/bind9/FAQ.xml Wed Sep 28 06:11:01 2016 (r306394) @@ -1,7 +1,5 @@ - - + +
-
- Frequently Asked Questions about BIND 9 2004 @@ -32,6 +29,8 @@ 2010 2013 2014 + 2015 + 2016 Internet Systems Consortium, Inc. ("ISC") @@ -42,10 +41,10 @@ Internet Software Consortium. - - - Compilation and Installation Questions - + + + Compilation and Installation Questions + @@ -61,7 +60,7 @@ - + @@ -70,7 +69,7 @@ - Short Answer: No. + Short Answer: No. Long Answer: There really isn't a default configuration which fits @@ -93,9 +92,9 @@ - + - + Configuration and Setup Questions @@ -125,7 +124,7 @@ example.com. 86400 IN SOA ns hostmaster - + @@ -223,7 +222,7 @@ view "chaos" chaos { This may be a clock skew problem. Check that the the clocks - on the client and server are properly synchronised (e.g., + on the client and server are properly synchronized (e.g., using ntp). @@ -251,7 +250,7 @@ view "chaos" chaos { - + @@ -266,7 +265,7 @@ view "chaos" chaos { - + @@ -359,7 +358,7 @@ Slave 10.0.1.2: - + @@ -392,7 +391,7 @@ named-checkzone example.com tmp - + @@ -416,7 +415,7 @@ named-checkzone example.com tmp - + @@ -501,7 +500,7 @@ Master 10.0.1.1: You are running chrooted (-t) and have not supplied local timezone information in the chroot area. - + FreeBSD: /etc/localtime Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo OSF: /etc/zoneinfo/localtime @@ -511,7 +510,7 @@ Master 10.0.1.1: - + @@ -551,7 +550,7 @@ Master 10.0.1.1: - + @@ -603,7 +602,7 @@ zone "example.net" { - + @@ -694,9 +693,9 @@ server ::/0 { bogus yes; }; - + - + Operations Questions @@ -768,7 +767,7 @@ server ::/0 { bogus yes; }; General Questions - + @@ -807,14 +806,13 @@ server ::/0 { bogus yes; }; of sending dynamic update requests to DNS servers without being specifically configured to do so. If the update requests are coming from a Windows 2000 machine, see - - <http://support.microsoft.com/support/kb/articles/q246/8/04.asp> + + <http://support.microsoft.com/support/kb/articles/q246/8/04.asp> for information about how to turn them off. - + @@ -849,7 +847,7 @@ server ::/0 { bogus yes; }; - + @@ -867,7 +865,7 @@ server ::/0 { bogus yes; }; - + @@ -883,7 +881,7 @@ server ::/0 { bogus yes; }; - + @@ -910,7 +908,7 @@ serial-query-rate 5; // default 20 - + I don't get RRSIG's returned when I use "dig +dnssec". @@ -922,7 +920,7 @@ serial-query-rate 5; // default 20 - + @@ -959,7 +957,7 @@ serial-query-rate 5; // default 20<http://as112.net/> + Please see <http://as112.net/> for details of the problems you are causing and the counter measures that have had to be deployed. @@ -1006,7 +1004,7 @@ empty: - + @@ -1083,9 +1081,9 @@ empty: - + Operating-System Specific Questions - + HPUX @@ -1113,9 +1111,9 @@ configure: error: need either working un Linux - + - + Why do I get the following errors: general: errno2result.c:109: unexpected error: @@ -1129,7 +1127,7 @@ client: UDP client handler shutting down See: - <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2> + <http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2> @@ -1146,9 +1144,9 @@ client: UDP client handler shutting down non-blocking is ignored. It is reported that setting xfrm_larval_drop to 1 helps but this may have negative side effects. See: -<https://bugzilla.redhat.com/show_bug.cgi?id=427629> +<https://bugzilla.redhat.com/show_bug.cgi?id=427629> and -<http://lkml.org/lkml/2007/12/4/260>. +<http://lkml.org/lkml/2007/12/4/260>. xfrm_larval_drop can be set to 1 by the following procedure: @@ -1178,7 +1176,7 @@ echo "1" > proc/sys/net/core/xfrm_lar - + @@ -1197,7 +1195,7 @@ echo "1" > proc/sys/net/core/xfrm_lar - + @@ -1218,7 +1216,7 @@ modprobe capability - + @@ -1244,8 +1242,7 @@ modprobe capability Red Hat have adopted the National Security Agency's - SELinux security policy (see <http://www.nsa.gov/selinux>) + SELinux security policy (see <http://www.nsa.gov/selinux>) and recommendations for BIND security , which are more secure than running named in a chroot and make use of the bind-chroot environment unnecessary . @@ -1279,7 +1276,7 @@ $ROOTDIR/var/tmp able to write or create files except in the directories above, with SELinux in Enforcing mode. - + So, to allow named to update slave or DDNS zone files, it is best to locate them in $ROOTDIR/var/named/slaves, @@ -1290,7 +1287,7 @@ zone "slave.zone." IN { type slave; file "slaves/slave.zone.db"; ... -}; +}; zone "ddns.zone." IN { type master; allow-updates {...}; @@ -1323,13 +1320,13 @@ options { system-config-securitylevel GUI, using the 'setsebool' command, or in /etc/selinux/targeted/booleans. - + You can disable SELinux protection for named entirely by setting the 'named_disable_trans=1' SELinux tunable boolean parameter. - + The SELinux named policy defines these SELinux contexts for named: @@ -1340,7 +1337,7 @@ named_cache_t: for files modifiable by n - + If you want to retain use of the SELinux policy for named, and put named files in different locations, you can do @@ -1358,7 +1355,7 @@ named_cache_t: for files modifiable by n - + To create a custom modifiable named data location, e.g. '/var/log/named' for a log file, do: @@ -1368,7 +1365,7 @@ named_cache_t: for files modifiable by n - + To create a custom zone file location, e.g. /root/zones/, do: @@ -1377,7 +1374,7 @@ named_cache_t: for files modifiable by n - + See these man-pages for more information : selinux(8), named_selinux(8), chcon(1), setsebool(8) @@ -1403,8 +1400,8 @@ named_cache_t: for files modifiable by n - Ubuntu uses AppArmor - <http://en.wikipedia.org/wiki/AppArmor> in + Ubuntu uses AppArmor + <http://en.wikipedia.org/wiki/AppArmor> in addition to normal file system permissions to protect the system. @@ -1438,11 +1435,11 @@ proc /var/named/proc proc defaults 0 0 - + - + Windows - + @@ -1463,7 +1460,7 @@ proc /var/named/proc proc defaults 0 0 - + @@ -1489,11 +1486,11 @@ options { - + - + FreeBSD - + @@ -1513,16 +1510,16 @@ rand_irqs="3 14 15" See also - - <http://people.freebsd.org/~dougb/randomness.html>. + + <http://people.freebsd.org/~dougb/randomness.html>. - + - + Solaris - + @@ -1534,15 +1531,14 @@ rand_irqs="3 14 15" Sun has a blog entry describing how to do this. - + <http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris> - + - - + + Apple Mac OS X @@ -1558,7 +1554,7 @@ rand_irqs="3 14 15" -% sudo rndc-confgen > /etc/rndc.conf +% sudo rndc-confgen > /etc/rndc.conf Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.: @@ -1606,8 +1602,8 @@ key "rndc-key" { - - + + Modified: stable/9/contrib/bind9/Makefile.in ============================================================================== --- stable/9/contrib/bind9/Makefile.in Wed Sep 28 05:12:09 2016 (r306393) +++ stable/9/contrib/bind9/Makefile.in Wed Sep 28 06:11:01 2016 (r306394) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2009, 2011-2015 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -19,7 +19,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ -@BIND9_VERSION@ +VERSION=@BIND9_VERSION@ SUBDIRS = make unit lib bin doc @LIBEXPORT@ TARGETS = @@ -32,6 +32,9 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES} @BIND9_MAKE_RULES@ +newrr: + cd lib/dns; ${MAKE} newrr + distclean:: rm -f config.cache config.h config.log config.status TAGS rm -f libtool isc-config.sh configure.lineno Modified: stable/9/contrib/bind9/README ============================================================================== --- stable/9/contrib/bind9/README Wed Sep 28 05:12:09 2016 (r306393) +++ stable/9/contrib/bind9/README Wed Sep 28 06:11:01 2016 (r306394) @@ -51,27 +51,29 @@ BIND 9 For up-to-date release notes and errata, see http://www.isc.org/software/bind9/releasenotes -BIND 9.9.8-P4 +BIND 9.9.9-P3 - BIND 9.9.8-P4 is a security release addressing the flaws - described in CVE-2016-1285 and CVE-2016-1286. + This version contains a fix for CVE-2016-2776. -BIND 9.9.8-P3 +BIND 9.9.9-P2 - BIND 9.9.8-P3 is a security release addressing the flaw described in - CVE-2015-8704. It also fixes a serious regression in authoritative - server selection that was introduced in 9.9.8. + This version contains a fix for CVE-2016-2775 and addresses + two regressions introduced with BIND 9.9.9. -BIND 9.9.8-P2 +BIND 9.9.9-P1 - BIND 9.9.8-P2 is a security release addressing the flaws - described in CVE-2015-3193 (OpenSSL), CVE-2015-8000 and - CVE-2015-8461. + This version contains two urgent fixes to BIND 9.9.9: + 1) Windows installation was failing without manual updating + of BINDinstall's attributes. + 2) A race condition was causing instability in the rbt + tree state. -BIND 9.9.8-P1 +BIND 9.9.9 - BIND 9.9.8-P1 was incomplete and was withdrawn prior to - publication. + BIND 9.9.9 is a maintenance release and addresses bugs found + in BIND 9.9.8 and earlier, as well as the security flaws + described in CVE-2015-8000, CVE-2015-8461, CVE-2015-8704, + CVE-2016-1285, and CVE-2016-1286. BIND 9.9.8 @@ -313,7 +315,7 @@ Building *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Sep 28 07:18: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 668BAC0029E; Wed, 28 Sep 2016 07:18:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-oi0-x241.google.com (mail-oi0-x241.google.com [IPv6:2607:f8b0:4003:c06::241]) (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 22D427A1; Wed, 28 Sep 2016 07:18:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-oi0-x241.google.com with SMTP id w11so2404324oia.0; Wed, 28 Sep 2016 00:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0J335yidme7Z1h7NOxhdj+seJChBf7yUiH9GU1GUJ2I=; b=vO1kdiyjI2jgs1XZeMiYZdYDBR5h5TOdaIAEflT+oyFhIBna5NoheCz8PinXUF4Apg OFR0b4eXSfPgduJyDPGLfnhZNupSqxVx/EfOfmAKI4qo5pZSnNkDKEVCz7/+tL5ewss4 iR82G9MT29UM9ZIXNjKlV4cjjn0hG7pcam4hstk0kY/Ct1Z7x/rJG/e5g8nW0hGY9Kys gTe5NY1B5NVcPH7paM71EQ2tYq+f/12AN0ZlCt4sOcW2Ccfl8i5avDdgng0ycJdbhlRt DJb936gvU0GUd+ysBXw1tYVdIJdnMwC0NkOdPnItAxS+L/AvucMuKJOdvFLuUnF3QiwY oApw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0J335yidme7Z1h7NOxhdj+seJChBf7yUiH9GU1GUJ2I=; b=KO8wcmE5c5Z58IwEJkJpFupnXXAogarUQf7Ll8TjPcGMXtIztlymIpaGQptEA5XQ2x AvgfDMxecfoZvS52V7VTn3PGTG+acWSotaCeFoNh/TTzb/xGUbBwSr4v2zL/uSCdztZR piT2hxdc4ZB159uWKXKB+DUQnvcx/7lLBf7KUElakoA5tcF4kwtnSxkgt5LGKpG3G8o7 vlFI0AnlzyIHsZuhOhNoQrl4q7RbbMzd1fj5F5H/833MjS9kqslAmR6fU0eb3sI+Mm0u iedbLOtwQVz0foJhJspcwgQUOOExWjm5B2OqXuLryO6mD/BwfQ7tZGJSZEpH5saKzoUW /JAw== X-Gm-Message-State: AA6/9RlF8GXvShjYc7RHhJ7DnhKj1rm00pAHl7lBPGYrxKBehjVdXG2g0xKGyUu7I3xNdQ== X-Received: by 10.157.53.50 with SMTP id o47mr1666460otc.221.1475047081374; Wed, 28 Sep 2016 00:18:01 -0700 (PDT) Received: from [100.173.229.161] ([172.56.7.236]) by smtp.gmail.com with ESMTPSA id y6sm1984108oty.22.2016.09.28.00.17.59 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 00:18:00 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306347 - head/lib/libc/tests From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: Date: Wed, 28 Sep 2016 16:17:56 +0900 Cc: Ruslan Bukin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: 7bit Message-Id: References: <201609261538.u8QFc2Av023865@repo.freebsd.org> To: Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 28 Sep 2016 07:18:02 -0000 > On Sep 27, 2016, at 06:25, Warner Losh wrote: > > Shouldn't we have MK_SSP == no on mips instead? That's how it's > supposed to work. If it isn't, perhaps we should set it like that. Thanks. This is what I was going to recommend. -Ngie From owner-svn-src-all@freebsd.org Wed Sep 28 08:11: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 01F31BEC078; Wed, 28 Sep 2016 08:11:02 +0000 (UTC) (envelope-from br@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 C306BE88; Wed, 28 Sep 2016 08:11:01 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8B0pS043016; Wed, 28 Sep 2016 08:11:00 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8B0lK043015; Wed, 28 Sep 2016 08:11:00 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609280811.u8S8B0lK043015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 08:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306395 - head/tests/sys/geom/class/eli 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.23 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: Wed, 28 Sep 2016 08:11:02 -0000 Author: br Date: Wed Sep 28 08:11:00 2016 New Revision: 306395 URL: https://svnweb.freebsd.org/changeset/base/306395 Log: Increase timeouts for geli tests. It takes 2-3x more time to proceed the tests on MIPS64EB in QEMU. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/tests/sys/geom/class/eli/Makefile Modified: head/tests/sys/geom/class/eli/Makefile ============================================================================== --- head/tests/sys/geom/class/eli/Makefile Wed Sep 28 06:11:01 2016 (r306394) +++ head/tests/sys/geom/class/eli/Makefile Wed Sep 28 08:11:00 2016 (r306395) @@ -25,13 +25,13 @@ TAP_TESTS_SH+= readonly_test TAP_TESTS_SH+= resize_test TAP_TESTS_SH+= setkey_test -TEST_METADATA.init_a_test+= timeout="1200" -TEST_METADATA.init_test+= timeout="300" -TEST_METADATA.integrity_copy_test+= timeout="1200" -TEST_METADATA.integrity_data_test+= timeout="600" -TEST_METADATA.integrity_hmac_test+= timeout="600" -TEST_METADATA.onetime_a_test+= timeout="600" -TEST_METADATA.onetime_test+= timeout="600" +TEST_METADATA.init_a_test+= timeout="3600" +TEST_METADATA.init_test+= timeout="600" +TEST_METADATA.integrity_copy_test+= timeout="3600" +TEST_METADATA.integrity_data_test+= timeout="1800" +TEST_METADATA.integrity_hmac_test+= timeout="1800" +TEST_METADATA.onetime_a_test+= timeout="1800" +TEST_METADATA.onetime_test+= timeout="1800" ${PACKAGE}FILES+= conf.sh From owner-svn-src-all@freebsd.org Wed Sep 28 08:35: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 D9064BEC714; Wed, 28 Sep 2016 08:35:06 +0000 (UTC) (envelope-from sephe@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 932481FB1; Wed, 28 Sep 2016 08:35:06 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8Z5CE054493; Wed, 28 Sep 2016 08:35:05 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8Z56B054491; Wed, 28 Sep 2016 08:35:05 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280835.u8S8Z56B054491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 08:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306396 - in head/sys: cam/ata sys 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.23 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: Wed, 28 Sep 2016 08:35:06 -0000 Author: sephe Date: Wed Sep 28 08:35:05 2016 New Revision: 306396 URL: https://svnweb.freebsd.org/changeset/base/306396 Log: cam/ata: Allow drivers to veto ATA disk attachment. This eventhandler is mainly used by VMs, e.g. Hyper-V, whose disk controllers share the disks with the simulated ATA controllers. Submitted by: Hongjiang Zhang Discussed with: mav MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7693 Modified: head/sys/cam/ata/ata_xpt.c head/sys/sys/eventhandler.h Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Sep 28 08:11:00 2016 (r306395) +++ head/sys/cam/ata/ata_xpt.c Wed Sep 28 08:35:05 2016 (r306396) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -872,12 +873,24 @@ noerror: { struct ccb_pathinq cpi; int16_t *ptr; + int veto = 0; ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { *ptr = le16toh(*ptr); } + + /* + * Allow others to veto this ATA disk attachment. This + * is mainly used by VMs, whose disk controllers may + * share the disks with the simulated ATA controllers. + */ + EVENTHANDLER_INVOKE(ada_probe_veto, path, ident_buf, &veto); + if (veto) { + goto device_fail; + } + if (strncmp(ident_buf->model, "FX", 2) && strncmp(ident_buf->model, "NEC", 3) && strncmp(ident_buf->model, "Pioneer", 7) && Modified: head/sys/sys/eventhandler.h ============================================================================== --- head/sys/sys/eventhandler.h Wed Sep 28 08:11:00 2016 (r306395) +++ head/sys/sys/eventhandler.h Wed Sep 28 08:35:05 2016 (r306396) @@ -270,4 +270,11 @@ typedef void (*unregister_framebuffer_fn EVENTHANDLER_DECLARE(register_framebuffer, register_framebuffer_fn); EVENTHANDLER_DECLARE(unregister_framebuffer, unregister_framebuffer_fn); +/* Veto ada attachment */ +struct cam_path; +struct ata_params; +typedef void (*ada_probe_veto_fn)(void *, struct cam_path *, + struct ata_params *, int *); +EVENTHANDLER_DECLARE(ada_probe_veto, ada_probe_veto_fn); + #endif /* _SYS_EVENTHANDLER_H_ */ From owner-svn-src-all@freebsd.org Wed Sep 28 08:45: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 14131BEC9B8; Wed, 28 Sep 2016 08:45:44 +0000 (UTC) (envelope-from br@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 D8B8D903; Wed, 28 Sep 2016 08:45:43 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8jh6E058372; Wed, 28 Sep 2016 08:45:43 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8jhkF058371; Wed, 28 Sep 2016 08:45:43 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609280845.u8S8jhkF058371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 08:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306397 - head/contrib/netbsd-tests/lib/libc/gen 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.23 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: Wed, 28 Sep 2016 08:45:44 -0000 Author: br Date: Wed Sep 28 08:45:42 2016 New Revision: 306397 URL: https://svnweb.freebsd.org/changeset/base/306397 Log: Use right piece of code for FreeBSD. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Wed Sep 28 08:35:05 2016 (r306396) +++ head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Wed Sep 28 08:45:42 2016 (r306397) @@ -125,7 +125,7 @@ ATF_TC_BODY(nice_priority, tc) if (pid == 0) { errno = 0; -#ifdef __FreeBSD__ +#ifdef __NetBSD__ pri = getpriority(PRIO_PROCESS, 0); #else pri2 = getpriority(PRIO_PROCESS, 0); From owner-svn-src-all@freebsd.org Wed Sep 28 09:28:28 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 CDDCBC00B90; Wed, 28 Sep 2016 09:28:28 +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 9DDDE1D5; Wed, 28 Sep 2016 09:28:28 +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 u8S9SRbx073352; Wed, 28 Sep 2016 09:28:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9SRg5073343; Wed, 28 Sep 2016 09:28:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280928.u8S9SRg5073343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306398 - in stable/11/sys: compat/freebsd32 kern sys X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:28:28 -0000 Author: kib Date: Wed Sep 28 09:28:26 2016 New Revision: 306398 URL: https://svnweb.freebsd.org/changeset/base/306398 Log: MFC r306081: Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap. Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c stable/11/sys/kern/kern_fork.c stable/11/sys/kern/kern_procctl.c stable/11/sys/kern/subr_syscall.c stable/11/sys/kern/sys_capability.c stable/11/sys/sys/capsicum.h stable/11/sys/sys/proc.h stable/11/sys/sys/procctl.h stable/11/sys/sys/signal.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 28 09:28:26 2016 (r306398) @@ -3048,6 +3048,7 @@ freebsd32_procctl(struct thread *td, str switch (uap->com) { case PROC_SPROTECT: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3077,6 +3078,7 @@ freebsd32_procctl(struct thread *td, str data = &x.rk; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: data = &flags; break; default: @@ -3095,6 +3097,7 @@ freebsd32_procctl(struct thread *td, str error = error1; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; Modified: stable/11/sys/kern/kern_fork.c ============================================================================== --- stable/11/sys/kern/kern_fork.c Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/kern/kern_fork.c Wed Sep 28 09:28:26 2016 (r306398) @@ -499,7 +499,7 @@ do_fork(struct thread *td, struct fork_r * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; - p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC); + p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC | P2_TRAPCAP); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); Modified: stable/11/sys/kern/kern_procctl.c ============================================================================== --- stable/11/sys/kern/kern_procctl.c Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/kern/kern_procctl.c Wed Sep 28 09:28:26 2016 (r306398) @@ -336,6 +336,34 @@ trace_status(struct thread *td, struct p return (0); } +static int +trapcap_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + switch (state) { + case PROC_TRAPCAP_CTL_ENABLE: + p->p_flag2 |= P2_TRAPCAP; + break; + case PROC_TRAPCAP_CTL_DISABLE: + p->p_flag2 &= ~P2_TRAPCAP; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +trapcap_status(struct thread *td, struct proc *p, int *data) +{ + + *data = (p->p_flag2 & P2_TRAPCAP) != 0 ? PROC_TRAPCAP_CTL_ENABLE : + PROC_TRAPCAP_CTL_DISABLE; + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct procctl_args { idtype_t idtype; @@ -359,6 +387,7 @@ sys_procctl(struct thread *td, struct pr switch (uap->com) { case PROC_SPROTECT: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -386,6 +415,7 @@ sys_procctl(struct thread *td, struct pr data = &x.rk; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: data = &flags; break; default: @@ -403,6 +433,7 @@ sys_procctl(struct thread *td, struct pr error = error1; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; @@ -432,6 +463,10 @@ kern_procctl_single(struct thread *td, s return (trace_ctl(td, p, *(int *)data)); case PROC_TRACE_STATUS: return (trace_status(td, p, data)); + case PROC_TRAPCAP_CTL: + return (trapcap_ctl(td, p, *(int *)data)); + case PROC_TRAPCAP_STATUS: + return (trapcap_status(td, p, data)); default: return (EINVAL); } @@ -452,6 +487,7 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_GETPIDS: case PROC_REAP_KILL: case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (idtype != P_PID) return (EINVAL); } @@ -462,6 +498,7 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_GETPIDS: case PROC_REAP_KILL: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: sx_slock(&proctree_lock); tree_locked = true; break; @@ -471,6 +508,7 @@ kern_procctl(struct thread *td, idtype_t tree_locked = true; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: tree_locked = false; break; default: Modified: stable/11/sys/kern/subr_syscall.c ============================================================================== --- stable/11/sys/kern/subr_syscall.c Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/kern/subr_syscall.c Wed Sep 28 09:28:26 2016 (r306398) @@ -165,12 +165,25 @@ static inline void syscallret(struct thread *td, int error, struct syscall_args *sa) { struct proc *p, *p2; - int traced; + ksiginfo_t ksi; + int traced, error1; KASSERT((td->td_pflags & TDP_FORKING) == 0, ("fork() did not clear TDP_FORKING upon completion")); p = td->td_proc; + if ((trap_enotcap || (p->p_flag2 & P2_TRAPCAP) != 0) && + IN_CAPABILITY_MODE(td)) { + error1 = (td->td_pflags & TDP_NERRNO) == 0 ? error : + td->td_errno; + if (error1 == ENOTCAPABLE || error1 == ECAPMODE) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGTRAP; + ksi.ksi_errno = error1; + ksi.ksi_code = TRAP_CAP; + trapsignal(td, &ksi); + } + } /* * Handle reschedule and other end-of-syscall issues Modified: stable/11/sys/kern/sys_capability.c ============================================================================== --- stable/11/sys/kern/sys_capability.c Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/kern/sys_capability.c Wed Sep 28 09:28:26 2016 (r306398) @@ -83,6 +83,10 @@ __FBSDID("$FreeBSD$"); #include #include +int trap_enotcap; +SYSCTL_INT(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, &trap_enotcap, 0, + "Deliver SIGTRAP on ENOTCAPABLE"); + #ifdef CAPABILITY_MODE FEATURE(security_capability_mode, "Capsicum Capability Mode"); Modified: stable/11/sys/sys/capsicum.h ============================================================================== --- stable/11/sys/sys/capsicum.h Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/sys/capsicum.h Wed Sep 28 09:28:26 2016 (r306398) @@ -368,6 +368,8 @@ int cap_ioctl_check(struct filedesc *fdp int cap_fcntl_check_fde(struct filedescent *fde, int cmd); int cap_fcntl_check(struct filedesc *fdp, int fd, int cmd); +extern int trap_enotcap; + #else /* !_KERNEL */ __BEGIN_DECLS Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/sys/proc.h Wed Sep 28 09:28:26 2016 (r306398) @@ -716,6 +716,7 @@ struct proc { #define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ #define P2_AST_SU 0x00000008 /* Handles SU ast for kthreads. */ #define P2_PTRACE_FSTP 0x00000010 /* SIGSTOP from PT_ATTACH not yet handled. */ +#define P2_TRAPCAP 0x00000020 /* SIGTRAP on ENOTCAPABLE */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: stable/11/sys/sys/procctl.h ============================================================================== --- stable/11/sys/sys/procctl.h Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/sys/procctl.h Wed Sep 28 09:28:26 2016 (r306398) @@ -43,6 +43,8 @@ #define PROC_REAP_KILL 6 /* kill descendants */ #define PROC_TRACE_CTL 7 /* en/dis ptrace and coredumps */ #define PROC_TRACE_STATUS 8 /* query tracing status */ +#define PROC_TRAPCAP_CTL 9 /* trap capability errors */ +#define PROC_TRAPCAP_STATUS 10 /* query trap capability status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -102,6 +104,9 @@ struct procctl_reaper_kill { #define PROC_TRACE_CTL_DISABLE 2 #define PROC_TRACE_CTL_DISABLE_EXEC 3 +#define PROC_TRAPCAP_CTL_ENABLE 1 +#define PROC_TRAPCAP_CTL_DISABLE 2 + #ifndef _KERNEL __BEGIN_DECLS int procctl(idtype_t, id_t, int, void *); Modified: stable/11/sys/sys/signal.h ============================================================================== --- stable/11/sys/sys/signal.h Wed Sep 28 08:45:42 2016 (r306397) +++ stable/11/sys/sys/signal.h Wed Sep 28 09:28:26 2016 (r306398) @@ -291,6 +291,7 @@ typedef struct __siginfo { #define TRAP_BRKPT 1 /* Process breakpoint. */ #define TRAP_TRACE 2 /* Process trace trap. */ #define TRAP_DTRACE 3 /* DTrace induced trap. */ +#define TRAP_CAP 4 /* Capabilities protective trap. */ /* codes for SIGCHLD */ #define CLD_EXITED 1 /* Child has exited */ From owner-svn-src-all@freebsd.org Wed Sep 28 09:33:47 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 5EA4AC00CD1; Wed, 28 Sep 2016 09:33:47 +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 226F8840; Wed, 28 Sep 2016 09:33:47 +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 u8S9XkcE076907; Wed, 28 Sep 2016 09:33:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9Xk98076905; Wed, 28 Sep 2016 09:33:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280933.u8S9Xk98076905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306399 - stable/11/lib/libc/sys X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:33:47 -0000 Author: kib Date: Wed Sep 28 09:33:46 2016 New Revision: 306399 URL: https://svnweb.freebsd.org/changeset/base/306399 Log: MFC r306257: Document r306081, i.e. procctl(PROC_TRAPCAP) and sysctl kern.trap_enocap. MFC r306366: Editing fixes for r306257, documentation for trapcap. Modified: stable/11/lib/libc/sys/cap_enter.2 stable/11/lib/libc/sys/procctl.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/11/lib/libc/sys/cap_enter.2 Wed Sep 28 09:28:26 2016 (r306398) +++ stable/11/lib/libc/sys/cap_enter.2 Wed Sep 28 09:33:46 2016 (r306399) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2014 +.Dd September 27, 2016 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -69,6 +69,34 @@ appropriately-crafted applications or ap .Fn cap_getmode returns a flag indicating whether or not the process is in a capability mode sandbox. +.Sh RUN-TIME SETTINGS +If the +.Dv kern.trap_enocap +sysctl MIB is set to a non-zero value, then for any process executing in a +capability mode sandbox, any syscall which results in either +.Er ENOTCAPABLE +or +.Er ECAPMODE +error also generates the synchronous +.Dv SIGTRAP +signal to the thread on the syscall return. +On signal delivery, the +.Va si_errno +member of the +.Fa siginfo +signal handler parameter is set to the syscall error value, +and the +.Va si_code +member is set to +.Dv TRAP_CAP . +.Pp +See also the +.Dv PROC_TRAPCAP_CTL +and +.Dv PROC_TRAPCAP_STATUS +operations of the +.Xr procctl 2 +function for similar per-process functionality. .Sh CAVEAT Creating effective process sandboxes is a tricky process that involves identifying the least possible rights required by the process and then @@ -111,6 +139,8 @@ points outside the process's allocated a .Xr cap_fcntls_limit 2 , .Xr cap_ioctls_limit 2 , .Xr cap_rights_limit 2 , +.Xr procctl 2 , +.Xr sysctl 2 , .Xr fexecve 2 , .Xr cap_sandboxed 3 , .Xr capsicum 4 Modified: stable/11/lib/libc/sys/procctl.2 ============================================================================== --- stable/11/lib/libc/sys/procctl.2 Wed Sep 28 09:28:26 2016 (r306398) +++ stable/11/lib/libc/sys/procctl.2 Wed Sep 28 09:33:46 2016 (r306399) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2015 +.Dd September 27, 2016 .Dt PROCCTL 2 .Os .Sh NAME @@ -71,7 +71,7 @@ The control request to perform is specif .Fa cmd argument. The following commands are supported: -.Bl -tag -width "PROC_REAP_GETPIDS" +.Bl -tag -width "Dv PROC_TRAPCAP_STATUS" .It Dv PROC_SPROTECT Set process protection state. This is used to mark a process as protected from being killed if the system @@ -327,6 +327,67 @@ is set to 0. If a debugger is attached, .Fa data is set to the pid of the debugger process. +.It Dv PROC_TRAPCAP_CTL +Controls the capability mode sandbox actions for the specified +sandboxed processes, +on a return from any syscall which gives either a +.Er ENOTCAPABLE +or +.Er ECAPMODE +error. +If the control is enabled, such errors from the syscalls cause +delivery of the synchronous +.Dv SIGTRAP +signal to the thread immediately before returning from the syscalls. +.Pp +Possible values for the +.Fa data +argument are: +.Bl -tag -width "Dv PROC_TRAPCAP_CTL_DISABLE" +.It Dv PROC_TRAPCAP_CTL_ENABLE +Enable the +.Dv SIGTRAP +signal delivery on capability mode access violations. +The enabled mode is inherited by the children of the process, +and is kept after +.Xr fexecve 2 +calls. +.It Dv PROC_TRAPCAP_CTL_DISABLE +Disable the signal delivery on capability mode access violations. +Note that the global sysctl +.Dv kern.trap_enocap +might still cause the signal to be delivered. +See +.Xr capsicum 4 . +.El +.Pp +On signal delivery, the +.Va si_errno +member of the +.Fa siginfo +signal handler parameter is set to the syscall error value, +and the +.Va si_code +member is set to +.Dv TRAP_CAP . +.Pp +See +.Xr capsicum 4 +for more information about the capability mode. +.It Dv PROC_TRAPCAP_STATUS +Return the current status of signalling capability mode access +violations for the specified process. +The integer value pointed to by the +.Fa data +argument is set to the +.Dv PROC_TRAPCAP_CTL_ENABLE +value if the process control enables signal delivery, and to +.Dv PROC_TRAPCAP_CTL_DISABLE +otherwise. +.Pp +See the note about sysctl +.Dv kern.trap_enocap +above, which gives independent global control of signal delivery. .El .Sh NOTES Disabling tracing on a process should not be considered a security @@ -420,14 +481,18 @@ The value of the integer .Fa data parameter for the .Dv PROC_TRACE_CTL +or +.Dv PROC_TRAPCAP_CTL request is invalid. .El .Sh SEE ALSO .Xr dtrace 1 , +.Xr cap_enter 2, .Xr kill 2 , .Xr ktrace 2 , .Xr ptrace 2 , .Xr wait 2 , +.Xr capsicum 4 , .Xr hwpmc 4 , .Xr init 8 .Sh HISTORY From owner-svn-src-all@freebsd.org Wed Sep 28 09:36: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 61EB1C00D56; Wed, 28 Sep 2016 09:36:04 +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 346289E7; Wed, 28 Sep 2016 09:36:04 +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 u8S9a3wp077046; Wed, 28 Sep 2016 09:36:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9a3GV077044; Wed, 28 Sep 2016 09:36:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280936.u8S9a3GV077044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306400 - in stable/11/sys: kern sys X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:36:04 -0000 Author: kib Date: Wed Sep 28 09:36:03 2016 New Revision: 306400 URL: https://svnweb.freebsd.org/changeset/base/306400 Log: MFC r306260: Add the foundation copyrights to procctl kernel sources. Modified: stable/11/sys/kern/kern_procctl.c stable/11/sys/sys/procctl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_procctl.c ============================================================================== --- stable/11/sys/kern/kern_procctl.c Wed Sep 28 09:33:46 2016 (r306399) +++ stable/11/sys/kern/kern_procctl.c Wed Sep 28 09:36:03 2016 (r306400) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2014 John Baldwin - * Copyright (c) 2014 The FreeBSD Foundation + * Copyright (c) 2014, 2016 The FreeBSD Foundation * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. Modified: stable/11/sys/sys/procctl.h ============================================================================== --- stable/11/sys/sys/procctl.h Wed Sep 28 09:33:46 2016 (r306399) +++ stable/11/sys/sys/procctl.h Wed Sep 28 09:36:03 2016 (r306400) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2013 Hudson River Trading LLC + * Copyright (c) 2014, 2016 The FreeBSD Foundation * Written by: John H. Baldwin * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: From owner-svn-src-all@freebsd.org Wed Sep 28 09:41: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 44C3FC00EA2; Wed, 28 Sep 2016 09:41:02 +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 1C068DD2; Wed, 28 Sep 2016 09:41:02 +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 u8S9f1Gs077878; Wed, 28 Sep 2016 09:41:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9f17L077876; Wed, 28 Sep 2016 09:41:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280941.u8S9f17L077876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306401 - in stable/11/sys/amd64: amd64 include X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:41:02 -0000 Author: kib Date: Wed Sep 28 09:41:00 2016 New Revision: 306401 URL: https://svnweb.freebsd.org/changeset/base/306401 Log: MFC r306087: Export the pmap_cache_bits() and pmap_pinit_pml4() functions from the amd64 pmap. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/include/pmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Wed Sep 28 09:36:03 2016 (r306400) +++ stable/11/sys/amd64/amd64/pmap.c Wed Sep 28 09:41:00 2016 (r306401) @@ -1324,7 +1324,7 @@ pmap_swap_pat(pmap_t pmap, pt_entry_t en * Determine the appropriate bits to set in a PTE or PDE for a specified * caching mode. */ -static int +int pmap_cache_bits(pmap_t pmap, int mode, boolean_t is_pde) { int cache_bits, pat_flag, pat_idx; @@ -2345,6 +2345,29 @@ pmap_pinit0(pmap_t pmap) CPU_FILL(&kernel_pmap->pm_active); } +void +pmap_pinit_pml4(vm_page_t pml4pg) +{ + pml4_entry_t *pm_pml4; + int i; + + pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); + + /* Wire in kernel global address entries. */ + for (i = 0; i < NKPML4E; i++) { + pm_pml4[KPML4BASE + i] = (KPDPphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; + } + for (i = 0; i < ndmpdpphys; i++) { + pm_pml4[DMPML4I + i] = (DMPDPphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; + } + + /* install self-referential address mapping entry(s) */ + pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | X86_PG_V | X86_PG_RW | + X86_PG_A | X86_PG_M; +} + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. @@ -2381,20 +2404,7 @@ pmap_pinit_type(pmap_t pmap, enum pmap_t */ if ((pmap->pm_type = pm_type) == PT_X86) { pmap->pm_cr3 = pml4phys; - - /* Wire in kernel global address entries. */ - for (i = 0; i < NKPML4E; i++) { - pmap->pm_pml4[KPML4BASE + i] = (KPDPphys + ptoa(i)) | - X86_PG_RW | X86_PG_V | PG_U; - } - for (i = 0; i < ndmpdpphys; i++) { - pmap->pm_pml4[DMPML4I + i] = (DMPDPphys + ptoa(i)) | - X86_PG_RW | X86_PG_V | PG_U; - } - - /* install self-referential address mapping entry(s) */ - pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | - X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M; + pmap_pinit_pml4(pml4pg); } pmap->pm_root.rt_root = 0; Modified: stable/11/sys/amd64/include/pmap.h ============================================================================== --- stable/11/sys/amd64/include/pmap.h Wed Sep 28 09:36:03 2016 (r306400) +++ stable/11/sys/amd64/include/pmap.h Wed Sep 28 09:41:00 2016 (r306401) @@ -391,6 +391,7 @@ struct thread; void pmap_activate_sw(struct thread *); void pmap_bootstrap(vm_paddr_t *); +int pmap_cache_bits(pmap_t pmap, int mode, boolean_t is_pde); int pmap_change_attr(vm_offset_t, vm_size_t, int); void pmap_demote_DMAP(vm_paddr_t base, vm_size_t len, boolean_t invalidate); void pmap_init_pat(void); @@ -403,6 +404,7 @@ void *pmap_mapdev(vm_paddr_t, vm_size_t) void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); boolean_t pmap_page_is_mapped(vm_page_t m); void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); +void pmap_pinit_pml4(vm_page_t); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); From owner-svn-src-all@freebsd.org Wed Sep 28 09:43:24 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 62F84BE8110; Wed, 28 Sep 2016 09:43:24 +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 356EA1198; Wed, 28 Sep 2016 09:43:24 +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 u8S9hNFe080695; Wed, 28 Sep 2016 09:43:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9hNPx080694; Wed, 28 Sep 2016 09:43:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280943.u8S9hNPx080694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306402 - stable/11/sys/amd64/include X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:43:24 -0000 Author: kib Date: Wed Sep 28 09:43:23 2016 New Revision: 306402 URL: https://svnweb.freebsd.org/changeset/base/306402 Log: MFC r306088: Add amd64 functions to load/store GDT register, store IDT and TR registers. Modified: stable/11/sys/amd64/include/cpufunc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/cpufunc.h ============================================================================== --- stable/11/sys/amd64/include/cpufunc.h Wed Sep 28 09:41:00 2016 (r306401) +++ stable/11/sys/amd64/include/cpufunc.h Wed Sep 28 09:43:23 2016 (r306402) @@ -645,12 +645,36 @@ load_gs(u_short sel) #endif static __inline void +bare_lgdt(struct region_descriptor *addr) +{ + __asm __volatile("lgdt (%0)" : : "r" (addr)); +} + +static __inline void +sgdt(struct region_descriptor *addr) +{ + char *loc; + + loc = (char *)addr; + __asm __volatile("sgdt %0" : "=m" (*loc) : : "memory"); +} + +static __inline void lidt(struct region_descriptor *addr) { __asm __volatile("lidt (%0)" : : "r" (addr)); } static __inline void +sidt(struct region_descriptor *addr) +{ + char *loc; + + loc = (char *)addr; + __asm __volatile("sidt %0" : "=m" (*loc) : : "memory"); +} + +static __inline void lldt(u_short sel) { __asm __volatile("lldt %0" : : "r" (sel)); @@ -662,6 +686,15 @@ ltr(u_short sel) __asm __volatile("ltr %0" : : "r" (sel)); } +static __inline uint32_t +read_tr(void) +{ + u_short sel; + + __asm __volatile("str %0" : "=r" (sel)); + return (sel); +} + static __inline uint64_t rdr0(void) { From owner-svn-src-all@freebsd.org Wed Sep 28 09:46:30 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 77FB6BE8280; Wed, 28 Sep 2016 09:46:30 +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 450031509; Wed, 28 Sep 2016 09:46:30 +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 u8S9kT37081045; Wed, 28 Sep 2016 09:46:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9kTHh081043; Wed, 28 Sep 2016 09:46:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280946.u8S9kTHh081043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306403 - in stable/11/sys: kern sys X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:46:30 -0000 Author: kib Date: Wed Sep 28 09:46:29 2016 New Revision: 306403 URL: https://svnweb.freebsd.org/changeset/base/306403 Log: MFC r306089: Make resettodr_lock accessible outside subr_rtc.c. Protect CLOCK_GETTIME() with the lock. Modified: stable/11/sys/kern/subr_rtc.c stable/11/sys/sys/clock.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_rtc.c ============================================================================== --- stable/11/sys/kern/subr_rtc.c Wed Sep 28 09:43:23 2016 (r306402) +++ stable/11/sys/kern/subr_rtc.c Wed Sep 28 09:46:29 2016 (r306403) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); static device_t clock_dev = NULL; static long clock_res; static struct timespec clock_adj; -static struct mtx resettodr_lock; +struct mtx resettodr_lock; MTX_SYSINIT(resettodr_init, &resettodr_lock, "tod2rl", MTX_DEF); /* XXX: should be kern. now, it's no longer machdep. */ @@ -132,7 +132,9 @@ inittodr(time_t base) goto wrong_time; } /* XXX: We should poll all registered RTCs in case of failure */ + mtx_lock(&resettodr_lock); error = CLOCK_GETTIME(clock_dev, &ts); + mtx_unlock(&resettodr_lock); if (error != 0 && error != EINVAL) { printf("warning: clock_gettime failed (%d), the system time " "will not be set accurately\n", error); Modified: stable/11/sys/sys/clock.h ============================================================================== --- stable/11/sys/sys/clock.h Wed Sep 28 09:43:23 2016 (r306402) +++ stable/11/sys/sys/clock.h Wed Sep 28 09:46:29 2016 (r306403) @@ -54,6 +54,7 @@ */ extern int tz_minuteswest; extern int tz_dsttime; +extern struct mtx resettodr_lock; int utc_offset(void); From owner-svn-src-all@freebsd.org Wed Sep 28 09:48:41 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 144D9BE8303; Wed, 28 Sep 2016 09:48:41 +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 C7E311697; Wed, 28 Sep 2016 09:48:40 +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 u8S9mdc3081173; Wed, 28 Sep 2016 09:48:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9mdkJ081169; Wed, 28 Sep 2016 09:48:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280948.u8S9mdkJ081169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306404 - in stable/11/sys: amd64/include arm/include arm64/include sys X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:48:41 -0000 Author: kib Date: Wed Sep 28 09:48:39 2016 New Revision: 306404 URL: https://svnweb.freebsd.org/changeset/base/306404 Log: MFC r306091: Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS. Added: stable/11/sys/amd64/include/efi.h - copied unchanged from r306091, head/sys/amd64/include/efi.h stable/11/sys/arm/include/efi.h - copied unchanged from r306091, head/sys/arm/include/efi.h stable/11/sys/arm64/include/efi.h - copied unchanged from r306091, head/sys/arm64/include/efi.h Modified: stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Copied: stable/11/sys/amd64/include/efi.h (from r306091, head/sys/amd64/include/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/amd64/include/efi.h Wed Sep 28 09:48:39 2016 (r306404, copy of r306091, head/sys/amd64/include/efi.h) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef __AMD64_INCLUDE_EFI_H_ +#define __AMD64_INCLUDE_EFI_H_ + +/* + * XXX: from gcc 6.2 manual: + * Note, the ms_abi attribute for Microsoft Windows 64-bit targets + * currently requires the -maccumulate-outgoing-args option. + */ +#define EFIABI_ATTR __attribute__((ms_abi)) + +#endif /* __AMD64_INCLUDE_EFI_H_ */ Copied: stable/11/sys/arm/include/efi.h (from r306091, head/sys/arm/include/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/arm/include/efi.h Wed Sep 28 09:48:39 2016 (r306404, copy of r306091, head/sys/arm/include/efi.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef __ARM_INCLUDE_EFI_H_ +#define __ARM_INCLUDE_EFI_H_ + +#define EFIABI_ATTR + +#endif /* __ARM_INCLUDE_EFI_H_ */ Copied: stable/11/sys/arm64/include/efi.h (from r306091, head/sys/arm64/include/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/arm64/include/efi.h Wed Sep 28 09:48:39 2016 (r306404, copy of r306091, head/sys/arm64/include/efi.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef __ARM64_INCLUDE_EFI_H_ +#define __ARM64_INCLUDE_EFI_H_ + +#define EFIABI_ATTR + +#endif /* __ARM64_INCLUDE_EFI_H_ */ Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Wed Sep 28 09:46:29 2016 (r306403) +++ stable/11/sys/sys/efi.h Wed Sep 28 09:48:39 2016 (r306404) @@ -30,6 +30,7 @@ #define _SYS_EFI_H_ #include +#include #define EFI_PAGE_SHIFT 12 #define EFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) @@ -118,22 +119,25 @@ struct efi_tblhdr { struct efi_rt { struct efi_tblhdr rt_hdr; - efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *); - efi_status (*rt_settime)(struct efi_tm *); + efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *) + EFIABI_ATTR; + efi_status (*rt_settime)(struct efi_tm *) EFIABI_ATTR; efi_status (*rt_getwaketime)(uint8_t *, uint8_t *, - struct efi_tm *); - efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *); + struct efi_tm *) EFIABI_ATTR; + efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *) + EFIABI_ATTR; efi_status (*rt_setvirtual)(u_long, u_long, uint32_t, - struct efi_md *); - efi_status (*rt_cvtptr)(u_long, void **); + struct efi_md *) EFIABI_ATTR; + efi_status (*rt_cvtptr)(u_long, void **) EFIABI_ATTR; efi_status (*rt_getvar)(efi_char *, struct uuid *, uint32_t *, - u_long *, void *); - efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *); + u_long *, void *) EFIABI_ATTR; + efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *) + EFIABI_ATTR; efi_status (*rt_setvar)(efi_char *, struct uuid *, uint32_t, - u_long, void *); - efi_status (*rt_gethicnt)(uint32_t *); + u_long, void *) EFIABI_ATTR; + efi_status (*rt_gethicnt)(uint32_t *) EFIABI_ATTR; efi_status (*rt_reset)(enum efi_reset, efi_status, u_long, - efi_char *); + efi_char *) EFIABI_ATTR; }; struct efi_systbl { From owner-svn-src-all@freebsd.org Wed Sep 28 09:51: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 32C95BE83C0; Wed, 28 Sep 2016 09:51:09 +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 F419118E5; Wed, 28 Sep 2016 09:51:08 +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 u8S9p8AZ084011; Wed, 28 Sep 2016 09:51:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9p8As084009; Wed, 28 Sep 2016 09:51:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280951.u8S9p8As084009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306405 - in stable/11/sys: amd64/amd64 sys X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 09:51:09 -0000 Author: kib Date: Wed Sep 28 09:51:07 2016 New Revision: 306405 URL: https://svnweb.freebsd.org/changeset/base/306405 Log: MFC r306092: Rename efi_systbl to efi_systbl_phys. Modified: stable/11/sys/amd64/amd64/machdep.c stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/machdep.c Wed Sep 28 09:48:39 2016 (r306404) +++ stable/11/sys/amd64/amd64/machdep.c Wed Sep 28 09:51:07 2016 (r306405) @@ -192,7 +192,7 @@ struct msgbuf *msgbufp; * Physical address of the EFI System Table. Stashed from the metadata hints * passed into the kernel and used by the EFI code to call runtime services. */ -vm_paddr_t efi_systbl; +vm_paddr_t efi_systbl_phys; /* Intel ICH registers */ #define ICH_PMBASE 0x400 @@ -1502,7 +1502,7 @@ native_parse_preload_data(u_int64_t modu ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); db_fetch_ksymtab(ksym_start, ksym_end); #endif - efi_systbl = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); + efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); return (kmdp); } Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Wed Sep 28 09:48:39 2016 (r306404) +++ stable/11/sys/sys/efi.h Wed Sep 28 09:51:07 2016 (r306405) @@ -158,5 +158,8 @@ struct efi_systbl { uint64_t st_cfgtbl; }; -extern vm_paddr_t efi_systbl; +#ifdef _KERNEL +extern vm_paddr_t efi_systbl_phys; +#endif /* _KERNEL */ + #endif /* _SYS_EFI_H_ */ From owner-svn-src-all@freebsd.org Wed Sep 28 10:42: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 B0448C001F6; Wed, 28 Sep 2016 10:42:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (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 78D1810A1; Wed, 28 Sep 2016 10:42:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x22d.google.com with SMTP id qn7so15634354pac.3; Wed, 28 Sep 2016 03:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VOf9K72+cfasDO9ibuTiKFnPAumCxs5Q2TjYlLKzJUs=; b=MCc4X8aUNMcS5pX/YWVjf6V6Ld775H6VOce2Ym2C3G3Upbep5ObifvkW7+vxtYB80k M/Tt2MaOuv3dAlgOESp2pL7Qi6qrI6FgPnLInU8uvnJzfmxwg/mvw8ZGwf0+TxrMdCvI +1Vb6RXP05dgyXRLMssAB1FBtRQegdRF1NGXn69RkAWQEDwtABf85nohQgFnj/kUGKxE E+0O7bWdhHt7HCP5ooDPTb1Z9okKqTMmZTEUb8bAmmx6S/XAesHetj7d8FBUOmX3xDHJ bR1ZA/1hn5MuuaC137e/a31XK/KG18XaMx1tdW76gcxVQjvqL3VOESZjOTIni4O8l2yx oFEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VOf9K72+cfasDO9ibuTiKFnPAumCxs5Q2TjYlLKzJUs=; b=S3pq18NSv4GDTVfJi0tA0gQdSyskq3ur/gg/WsmeBVZkHU7NEpPld9kWxDYsG4EV0x ohQycsIKGFchNggO+3apgOeEqnZEYy6iyxPTYeIL0L0pB3/AdAlTjSE27QJRoXmgnxAo 3UeEoKzOuhhQGD5fTAzy5wEVREs4myCzAMqI4x16zSmF0LVd3Aodw1jsIqgNqFVrUytF HHsRIgwaVtlivuuvcHJ0/UcoZ6X0WcrtGlYxepTNpaBcN+Dh22kL+/gB+p75Avj8mLab rireB4Rz9heie1XFWoR/50rofv/W3J2AaV3lUt2DKpWMnPjjsrWgydan+lQJfaDilxYC JHfg== X-Gm-Message-State: AE9vXwMuKVbE2B08FWs8FdW6BaA4hEzhCXgXsiAPt89AALTTcJct1uy5fGL3b5M2aVzZ4A== X-Received: by 10.66.124.198 with SMTP id mk6mr55519210pab.74.1475059328835; Wed, 28 Sep 2016 03:42:08 -0700 (PDT) Received: from [192.168.11.58] (114-134-113-214.odwr.j-cnet.jp. [114.134.113.214]) by smtp.gmail.com with ESMTPSA id r7sm11518632pfk.49.2016.09.28.03.42.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 03:42:08 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306395 - head/tests/sys/geom/class/eli From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <201609280811.u8S8B0lK043015@repo.freebsd.org> Date: Wed, 28 Sep 2016 19:42:04 +0900 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201609280811.u8S8B0lK043015@repo.freebsd.org> To: Ruslan Bukin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 28 Sep 2016 10:42:09 -0000 > On Sep 28, 2016, at 17:11, Ruslan Bukin wrote: >=20 > Author: br > Date: Wed Sep 28 08:11:00 2016 > New Revision: 306395 > URL: https://svnweb.freebsd.org/changeset/base/306395 >=20 > Log: > Increase timeouts for geli tests. It takes 2-3x more time to proceed the > tests on MIPS64EB in QEMU. >=20 > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 >=20 > Modified: > head/tests/sys/geom/class/eli/Makefile >=20 > Modified: head/tests/sys/geom/class/eli/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tests/sys/geom/class/eli/Makefile Wed Sep 28 06:11:01 2016 (= r306394) > +++ head/tests/sys/geom/class/eli/Makefile Wed Sep 28 08:11:00 2016 (= r306395) > @@ -25,13 +25,13 @@ TAP_TESTS_SH+=3D readonly_test > TAP_TESTS_SH+=3D resize_test > TAP_TESTS_SH+=3D setkey_test Thanks. It took longer to run some of the tests on i386 too..= From owner-svn-src-all@freebsd.org Wed Sep 28 10:44: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 70418C00274; Wed, 28 Sep 2016 10:44:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (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 40681126A; Wed, 28 Sep 2016 10:44:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x232.google.com with SMTP id q2so16325845pfj.3; Wed, 28 Sep 2016 03:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=11I42fsWaKZYAZIt4Kb64ztRFbhb38TyF5yprPiHKxs=; b=AVyZfd8wWvL2gVddoDKcHxlGhAYIaZGq4BRpIrB+/5RGOuWF05P01AHTHVGwyuctO2 zVvLe/r2TuYGtb7JpX6dGhcX+3DufMrllOxMArv+EBA8vRgfVtLIA+7PfGKUHYxEIUb6 tAUFn9l2GqbtIzVerqdN2hJXNqmVUgahMrqTSbqZuhFngYJLDHqTBEHPxQKzCRTFeILG 6c7HYIg06fAGumI7Dn83gERhg+KXGBI0BKgCGdJr+yfwQmCN5DNoeGBa5xLL3uTIpn5p EAN8O4VXkkxsOQ0oXNnSRik9K1kxgJktYBagKm188qOKDQT72NJ7H7OaWeFr+TvhPgMY KE/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=11I42fsWaKZYAZIt4Kb64ztRFbhb38TyF5yprPiHKxs=; b=OhTjhveVwpvjDeBDQ8ZS0fQN2U/iAcmAVjBVFsKgnkOr//C8kgC4Cv7Ik9RqXTI7qU Oo6trPHgyamwW9bu0a9U4LkjTKOuSKM0AT7Gs7ytHURo5hdVbT2y5woglcXyZf1ucToa hrsA5tlZY5LeUu8FoNwzx+04AffNhcEab2KHx/aw8Iba9IuUKylHB10tEC4YhyH8OLZ0 PVWTli+q2+1OXm2S5TDmNuxuja/2nVZEMeqB8ldKhLz+KdjD4eGn0fY62aOyO3PO9cHB HZWK+HkGqMs0bLfATncYbIsnFFmCgLpzBDk9kQalL1NIf3nEbLY1d8Fd83l3+P47qjnH MwNg== X-Gm-Message-State: AE9vXwMxVqn3eK9pajE9rpOv7vCcjS7zVsSl1/yW0fAuIm/AbCRiEvFt1H8c0y56GP47qg== X-Received: by 10.98.211.193 with SMTP id z62mr55140479pfk.124.1475059462661; Wed, 28 Sep 2016 03:44:22 -0700 (PDT) Received: from [192.168.11.58] (114-134-113-214.odwr.j-cnet.jp. [114.134.113.214]) by smtp.gmail.com with ESMTPSA id j1sm11516455pfg.95.2016.09.28.03.44.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 03:44:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306397 - head/contrib/netbsd-tests/lib/libc/gen From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <201609280845.u8S8jhkF058371@repo.freebsd.org> Date: Wed, 28 Sep 2016 19:44:20 +0900 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5768D1B8-A03C-4D9D-B884-3CBF3B1193BD@gmail.com> References: <201609280845.u8S8jhkF058371@repo.freebsd.org> To: Ruslan Bukin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 28 Sep 2016 10:44:23 -0000 > On Sep 28, 2016, at 17:45, Ruslan Bukin wrote: >=20 > Author: br > Date: Wed Sep 28 08:45:42 2016 > New Revision: 306397 > URL: https://svnweb.freebsd.org/changeset/base/306397 >=20 > Log: > Use right piece of code for FreeBSD. >=20 > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 >=20 > Modified: > head/contrib/netbsd-tests/lib/libc/gen/t_nice.c I didn't run into this problem on amd64 -- what was the symptom that you ran= into? Thanks, -Ngie= From owner-svn-src-all@freebsd.org Wed Sep 28 12:13: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 25F71C00F76; Wed, 28 Sep 2016 12:13:54 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-31.csi.cam.ac.uk (ppsw-31.csi.cam.ac.uk [131.111.8.131]) (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 E7871A4B; Wed, 28 Sep 2016 12:13:53 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:51406) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bpDk8-000Cte-Lf (Exim 4.86_36-e07b163) (return-path ); Wed, 28 Sep 2016 13:13:44 +0100 Date: Wed, 28 Sep 2016 12:13:42 +0000 From: Ruslan Bukin To: Ngie Cooper Cc: Ruslan Bukin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306397 - head/contrib/netbsd-tests/lib/libc/gen Message-ID: <20160928121342.GA45465@bsdpad.com> References: <201609280845.u8S8jhkF058371@repo.freebsd.org> <5768D1B8-A03C-4D9D-B884-3CBF3B1193BD@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5768D1B8-A03C-4D9D-B884-3CBF3B1193BD@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 28 Sep 2016 12:13:54 -0000 On Wed, Sep 28, 2016 at 07:44:20PM +0900, Ngie Cooper wrote: > > > On Sep 28, 2016, at 17:45, Ruslan Bukin wrote: > > > > Author: br > > Date: Wed Sep 28 08:45:42 2016 > > New Revision: 306397 > > URL: https://svnweb.freebsd.org/changeset/base/306397 > > > > Log: > > Use right piece of code for FreeBSD. > > > > Sponsored by: DARPA, AFRL > > Sponsored by: HEIF5 > > > > Modified: > > head/contrib/netbsd-tests/lib/libc/gen/t_nice.c > > I didn't run into this problem on amd64 -- what was the symptom that you ran into? > Thanks, I think pri and pri2 here were not equeal (as pri2 was not initialized at all) so test failed. if (pri != pri2) _exit(EXIT_FAILURE); Very interesting why it works on amd64. Ruslan From owner-svn-src-all@freebsd.org Wed Sep 28 12:23:47 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 A0494BEC3F3; Wed, 28 Sep 2016 12:23:47 +0000 (UTC) (envelope-from br@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 6BEAAFCA; Wed, 28 Sep 2016 12:23:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SCNk3c041346; Wed, 28 Sep 2016 12:23:46 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SCNkrJ041345; Wed, 28 Sep 2016 12:23:46 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609281223.u8SCNkrJ041345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 12:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306406 - head/sys/mips/mips 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.23 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: Wed, 28 Sep 2016 12:23:47 -0000 Author: br Date: Wed Sep 28 12:23:46 2016 New Revision: 306406 URL: https://svnweb.freebsd.org/changeset/base/306406 Log: Fill all the siginfo so we have si_value set as well. This fixes timer_create(2) tests. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/mips/mips/pm_machdep.c Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Wed Sep 28 09:51:07 2016 (r306405) +++ head/sys/mips/mips/pm_machdep.c Wed Sep 28 12:23:46 2016 (r306406) @@ -143,6 +143,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; */ /* fill siginfo structure */ + sf.sf_si = ksi->ksi_info; sf.sf_si.si_signo = sig; sf.sf_si.si_code = ksi->ksi_code; sf.sf_si.si_addr = (void*)(intptr_t)regs->badvaddr; From owner-svn-src-all@freebsd.org Wed Sep 28 13:29: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 9EEB2C003F3; Wed, 28 Sep 2016 13:29:12 +0000 (UTC) (envelope-from kevlo@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 5544812C3; Wed, 28 Sep 2016 13:29:12 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SDTBB3064914; Wed, 28 Sep 2016 13:29:11 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SDTBBu064911; Wed, 28 Sep 2016 13:29:11 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609281329.u8SDTBBu064911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 28 Sep 2016 13:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306407 - in head/sys: net netinet netpfil/pf 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.23 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: Wed, 28 Sep 2016 13:29:12 -0000 Author: kevlo Date: Wed Sep 28 13:29:11 2016 New Revision: 306407 URL: https://svnweb.freebsd.org/changeset/base/306407 Log: Remove ifa_list, use ifa_link (structure field) instead. While here, prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the interface address list in sctp_bsd_addr.c Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D8051 Modified: head/sys/net/if_var.h head/sys/netinet/sctp_bsd_addr.c head/sys/netpfil/pf/pf_if.c Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Sep 28 12:23:46 2016 (r306406) +++ head/sys/net/if_var.h Wed Sep 28 13:29:11 2016 (r306407) @@ -448,9 +448,6 @@ struct ifaddr { counter_u64_t ifa_obytes; }; -/* For compatibility with other BSDs. SCTP uses it. */ -#define ifa_list ifa_link - struct ifaddr * ifa_alloc(size_t size, int flags); void ifa_free(struct ifaddr *ifa); void ifa_ref(struct ifaddr *ifa); Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Wed Sep 28 12:23:46 2016 (r306406) +++ head/sys/netinet/sctp_bsd_addr.c Wed Sep 28 13:29:11 2016 (r306407) @@ -214,7 +214,7 @@ sctp_init_ifns_for_vrf(int vrfid) continue; } IF_ADDR_RLOCK(ifn); - TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) { + TAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) { if (ifa->ifa_addr == NULL) { continue; } @@ -365,7 +365,7 @@ void if (!(*pred) (ifn)) { continue; } - TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) { + TAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) { sctp_addr_change(ifa, add ? RTM_ADD : RTM_DELETE); } } Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Wed Sep 28 12:23:46 2016 (r306406) +++ head/sys/netpfil/pf/pf_if.c Wed Sep 28 13:29:11 2016 (r306407) @@ -523,7 +523,7 @@ pfi_instance_add(struct ifnet *ifp, int int net2, af; IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_list) { + TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) { if (ia->ifa_addr == NULL) continue; af = ia->ifa_addr->sa_family; From owner-svn-src-all@freebsd.org Wed Sep 28 14: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 688ADC0132A; Wed, 28 Sep 2016 14:13:42 +0000 (UTC) (envelope-from br@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 35C9E101E; Wed, 28 Sep 2016 14:13:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SEDfg6083815; Wed, 28 Sep 2016 14:13:41 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SEDfBq083814; Wed, 28 Sep 2016 14:13:41 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609281413.u8SEDfBq083814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 14:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306408 - head/sys/mips/mips 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.23 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: Wed, 28 Sep 2016 14:13:42 -0000 Author: br Date: Wed Sep 28 14:13:41 2016 New Revision: 306408 URL: https://svnweb.freebsd.org/changeset/base/306408 Log: Use SIGSEGV signal for memory protection failures from userspace on MIPS. (same as ARMv8, RISC-V and other architectures do). This makes mmap tests happy. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Wed Sep 28 13:29:11 2016 (r306407) +++ head/sys/mips/mips/trap.c Wed Sep 28 14:13:41 2016 (r306408) @@ -741,8 +741,11 @@ dofault: } goto err; } - ucode = ftype; - i = ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); + i = SIGSEGV; + if (rv == KERN_PROTECTION_FAILURE) + ucode = SEGV_ACCERR; + else + ucode = SEGV_MAPERR; addr = trapframe->pc; msg = "BAD_PAGE_FAULT"; From owner-svn-src-all@freebsd.org Wed Sep 28 14:48: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 956C8C01BCB; Wed, 28 Sep 2016 14:48:36 +0000 (UTC) (envelope-from emaste@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 58EBE66B; Wed, 28 Sep 2016 14:48:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SEmZTq095312; Wed, 28 Sep 2016 14:48:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SEmZEt095307; Wed, 28 Sep 2016 14:48:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609281448.u8SEmZEt095307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 14:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306409 - head/lib/msun/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.23 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: Wed, 28 Sep 2016 14:48:36 -0000 Author: emaste Date: Wed Sep 28 14:48:34 2016 New Revision: 306409 URL: https://svnweb.freebsd.org/changeset/base/306409 Log: libm: fix some unused variable (rcsid) and dangling else warnings s_{fabs,fmax,logb,scalb}{,f,l}.c may be built elsewhere with a higher WARNS setting. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8061 Modified: head/lib/msun/src/s_fabs.c head/lib/msun/src/s_logbl.c head/lib/msun/src/s_scalbn.c head/lib/msun/src/s_scalbnf.c head/lib/msun/src/s_scalbnl.c Modified: head/lib/msun/src/s_fabs.c ============================================================================== --- head/lib/msun/src/s_fabs.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_fabs.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * fabs(x) returns the absolute value of x. Modified: head/lib/msun/src/s_logbl.c ============================================================================== --- head/lib/msun/src/s_logbl.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_logbl.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/lib/msun/src/s_scalbn.c ============================================================================== --- head/lib/msun/src/s_scalbn.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbn.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * scalbn (double x, int n) @@ -21,7 +20,6 @@ static char rcsid[] = "$FreeBSD$"; * exponentiation or a multiplication. */ -#include #include #include "math.h" @@ -51,10 +49,12 @@ scalbn (double x, int n) if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} - if (k <= -54) + if (k <= -54) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 54; /* subnormal result */ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x*twom54; Modified: head/lib/msun/src/s_scalbnf.c ============================================================================== --- head/lib/msun/src/s_scalbnf.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbnf.c Wed Sep 28 14:48:34 2016 (r306409) @@ -13,11 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include +__FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" @@ -46,10 +43,12 @@ scalbnf (float x, int n) if (k > 0xfe) return huge*copysignf(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} - if (k <= -25) + if (k <= -25) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysignf(huge,x); /*overflow*/ - else return tiny*copysignf(tiny,x); /*underflow*/ + else + return tiny*copysignf(tiny,x); /*underflow*/ + } k += 25; /* subnormal result */ SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x*twom25; Modified: head/lib/msun/src/s_scalbnl.c ============================================================================== --- head/lib/msun/src/s_scalbnl.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbnl.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * scalbnl (long double x, int n) @@ -27,7 +26,6 @@ static char rcsid[] = "$FreeBSD$"; * for scalbn(), so we don't use this routine. */ -#include #include #include @@ -59,10 +57,12 @@ scalbnl (long double x, int n) if (k >= 0x7fff) return huge*copysignl(huge,x); /* overflow */ if (k > 0) /* normal result */ {u.bits.exp = k; return u.e;} - if (k <= -128) + if (k <= -128) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 128; /* subnormal result */ u.bits.exp = k; return u.e*0x1p-128; From owner-svn-src-all@freebsd.org Wed Sep 28 17:44: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 895ACC018C9; Wed, 28 Sep 2016 17:44:04 +0000 (UTC) (envelope-from emaste@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 5B7DC8F3; Wed, 28 Sep 2016 17:44:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SHi3XN062864; Wed, 28 Sep 2016 17:44:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SHi3au062863; Wed, 28 Sep 2016 17:44:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609281744.u8SHi3au062863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 17:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306410 - head/lib/msun 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.23 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: Wed, 28 Sep 2016 17:44:04 -0000 Author: emaste Date: Wed Sep 28 17:44:03 2016 New Revision: 306410 URL: https://svnweb.freebsd.org/changeset/base/306410 Log: libm: simplify i387 subdir logic with make's :S substitution Modified: head/lib/msun/Makefile Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Wed Sep 28 14:48:34 2016 (r306409) +++ head/lib/msun/Makefile Wed Sep 28 17:44:03 2016 (r306410) @@ -13,11 +13,7 @@ # PACKAGE= clibs -.if ${MACHINE_CPUARCH} == "i386" -ARCH_SUBDIR= i387 -.else -ARCH_SUBDIR= ${MACHINE_CPUARCH} -.endif +ARCH_SUBDIR= ${MACHINE_CPUARCH:S/i386/i387/} .include "${ARCH_SUBDIR}/Makefile.inc" From owner-svn-src-all@freebsd.org Wed Sep 28 20:49:34 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 A0C5BC0121A; Wed, 28 Sep 2016 20:49:34 +0000 (UTC) (envelope-from ache@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 794121C0F; Wed, 28 Sep 2016 20:49:34 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SKnXrI032721; Wed, 28 Sep 2016 20:49:33 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SKnXgO032720; Wed, 28 Sep 2016 20:49:33 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609282049.u8SKnXgO032720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Wed, 28 Sep 2016 20:49:33 +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: r306414 - stable/10/lib/libc/stdtime 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.23 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: Wed, 28 Sep 2016 20:49:34 -0000 Author: ache Date: Wed Sep 28 20:49:33 2016 New Revision: 306414 URL: https://svnweb.freebsd.org/changeset/base/306414 Log: MFC r306075,r306109 1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such week in the year. 5) Fix yday formula when Sunday requested and the week started from Monday. 6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u request. 7) Shift yday/wday to the first day of the year, if incomplete week (week 0) requested and no %w/%u used. 8) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 9) Check for incorrect values for %z. PR: 212983 (case 3 only) Modified: stable/10/lib/libc/stdtime/strptime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strptime.c ============================================================================== --- stable/10/lib/libc/stdtime/strptime.c Wed Sep 28 19:35:59 2016 (r306413) +++ stable/10/lib/libc/stdtime/strptime.c Wed Sep 28 20:49:33 2016 (r306414) @@ -301,10 +301,11 @@ label: * XXX This is bogus if parsed before hour-related * specifiers. */ + if (tm->tm_hour > 12) + return (NULL); + len = strlen(tptr->am); if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour == 12) tm->tm_hour = 0; buf += len; @@ -313,8 +314,6 @@ label: len = strlen(tptr->pm); if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour != 12) tm->tm_hour += 12; buf += len; @@ -374,15 +373,17 @@ label: break; + case 'u': case 'w': if (!isdigit_l((unsigned char)*buf, locale)) return (NULL); - i = *buf - '0'; - if (i > 6) + i = *buf++ - '0'; + if (i < 0 || i > 7 || (c == 'u' && i < 1) || + (c == 'w' && i > 6)) return (NULL); - tm->tm_wday = i; + tm->tm_wday = i % 7; flags |= FLAG_WDAY; break; @@ -581,10 +582,16 @@ label: i *= 10; i += *buf - '0'; buf++; + } else if (len == 2) { + i *= 100; + break; } else return (NULL); } + if (i > 1400 || (sign == -1 && i > 1200) || + (i % 100) >= 60) + return (NULL); tm->tm_hour -= sign * (i / 100); tm->tm_min -= sign * (i % 100); *GMTp = 1; @@ -609,17 +616,28 @@ label: TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); flags |= FLAG_YDAY; } else if (day_offset != -1) { + int tmpwday, tmpyday, fwo; + + fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); + /* No incomplete week (week 0). */ + if (week_offset == 0 && fwo == day_offset) + return (NULL); + /* Set the date to the first Sunday (or Monday) * of the specified week of the year. */ - if (!(flags & FLAG_WDAY)) { - tm->tm_wday = day_offset; - flags |= FLAG_WDAY; - } - tm->tm_yday = (7 - - first_wday_of(tm->tm_year + TM_YEAR_BASE) + - day_offset) % 7 + (week_offset - 1) * 7 + - tm->tm_wday - day_offset; + tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : + day_offset; + tmpyday = (7 - fwo + day_offset) % 7 + + (week_offset - 1) * 7 + + (tmpwday - day_offset + 7) % 7; + /* Impossible yday for incomplete week (week 0). */ + if (tmpyday < 0) { + if (flags & FLAG_WDAY) + return (NULL); + tmpyday = 0; + } + tm->tm_yday = tmpyday; flags |= FLAG_YDAY; } } From owner-svn-src-all@freebsd.org Wed Sep 28 20:53:00 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 1FC44C01361; Wed, 28 Sep 2016 20:53:00 +0000 (UTC) (envelope-from ache@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 EC7A09E; Wed, 28 Sep 2016 20:52:59 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SKqxeK036405; Wed, 28 Sep 2016 20:52:59 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SKqxYx036404; Wed, 28 Sep 2016 20:52:59 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609282052.u8SKqxYx036404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Wed, 28 Sep 2016 20:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306415 - stable/11/lib/libc/stdtime X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 20:53:00 -0000 Author: ache Date: Wed Sep 28 20:52:58 2016 New Revision: 306415 URL: https://svnweb.freebsd.org/changeset/base/306415 Log: MFC r306075,r306109 1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such week in the year. 5) Fix yday formula when Sunday requested and the week started from Monday. 6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u request. 7) Shift yday/wday to the first day of the year, if incomplete week (week 0) requested and no %w/%u used. 8) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 9) Check for incorrect values for %z. PR: 212983 (case 3 only) Modified: stable/11/lib/libc/stdtime/strptime.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdtime/strptime.c ============================================================================== --- stable/11/lib/libc/stdtime/strptime.c Wed Sep 28 20:49:33 2016 (r306414) +++ stable/11/lib/libc/stdtime/strptime.c Wed Sep 28 20:52:58 2016 (r306415) @@ -301,10 +301,11 @@ label: * XXX This is bogus if parsed before hour-related * specifiers. */ + if (tm->tm_hour > 12) + return (NULL); + len = strlen(tptr->am); if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour == 12) tm->tm_hour = 0; buf += len; @@ -313,8 +314,6 @@ label: len = strlen(tptr->pm); if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour != 12) tm->tm_hour += 12; buf += len; @@ -374,15 +373,17 @@ label: break; + case 'u': case 'w': if (!isdigit_l((unsigned char)*buf, locale)) return (NULL); - i = *buf - '0'; - if (i > 6) + i = *buf++ - '0'; + if (i < 0 || i > 7 || (c == 'u' && i < 1) || + (c == 'w' && i > 6)) return (NULL); - tm->tm_wday = i; + tm->tm_wday = i % 7; flags |= FLAG_WDAY; break; @@ -581,10 +582,16 @@ label: i *= 10; i += *buf - '0'; buf++; + } else if (len == 2) { + i *= 100; + break; } else return (NULL); } + if (i > 1400 || (sign == -1 && i > 1200) || + (i % 100) >= 60) + return (NULL); tm->tm_hour -= sign * (i / 100); tm->tm_min -= sign * (i % 100); *GMTp = 1; @@ -609,17 +616,28 @@ label: TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); flags |= FLAG_YDAY; } else if (day_offset != -1) { + int tmpwday, tmpyday, fwo; + + fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); + /* No incomplete week (week 0). */ + if (week_offset == 0 && fwo == day_offset) + return (NULL); + /* Set the date to the first Sunday (or Monday) * of the specified week of the year. */ - if (!(flags & FLAG_WDAY)) { - tm->tm_wday = day_offset; - flags |= FLAG_WDAY; - } - tm->tm_yday = (7 - - first_wday_of(tm->tm_year + TM_YEAR_BASE) + - day_offset) % 7 + (week_offset - 1) * 7 + - tm->tm_wday - day_offset; + tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : + day_offset; + tmpyday = (7 - fwo + day_offset) % 7 + + (week_offset - 1) * 7 + + (tmpwday - day_offset + 7) % 7; + /* Impossible yday for incomplete week (week 0). */ + if (tmpyday < 0) { + if (flags & FLAG_WDAY) + return (NULL); + tmpyday = 0; + } + tm->tm_yday = tmpyday; flags |= FLAG_YDAY; } } From owner-svn-src-all@freebsd.org Wed Sep 28 20:54:48 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 42DF9C013E2; Wed, 28 Sep 2016 20:54:48 +0000 (UTC) (envelope-from ache@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 20E48283; Wed, 28 Sep 2016 20:54:48 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SKslRR036550; Wed, 28 Sep 2016 20:54:47 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SKslxN036549; Wed, 28 Sep 2016 20:54:47 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201609282054.u8SKslxN036549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Wed, 28 Sep 2016 20:54:47 +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: r306416 - stable/9/lib/libc/stdtime 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.23 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: Wed, 28 Sep 2016 20:54:48 -0000 Author: ache Date: Wed Sep 28 20:54:47 2016 New Revision: 306416 URL: https://svnweb.freebsd.org/changeset/base/306416 Log: MFC r306075,r306109 1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such week in the year. 5) Fix yday formula when Sunday requested and the week started from Monday. 6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u request. 7) Shift yday/wday to the first day of the year, if incomplete week (week 0) requested and no %w/%u used. 8) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 9) Check for incorrect values for %z. PR: 212983 (case 3 only) Modified: stable/9/lib/libc/stdtime/strptime.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strptime.c ============================================================================== --- stable/9/lib/libc/stdtime/strptime.c Wed Sep 28 20:52:58 2016 (r306415) +++ stable/9/lib/libc/stdtime/strptime.c Wed Sep 28 20:54:47 2016 (r306416) @@ -301,10 +301,11 @@ label: * XXX This is bogus if parsed before hour-related * specifiers. */ + if (tm->tm_hour > 12) + return (NULL); + len = strlen(tptr->am); if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour == 12) tm->tm_hour = 0; buf += len; @@ -313,8 +314,6 @@ label: len = strlen(tptr->pm); if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { - if (tm->tm_hour > 12) - return (NULL); if (tm->tm_hour != 12) tm->tm_hour += 12; buf += len; @@ -374,15 +373,17 @@ label: break; + case 'u': case 'w': if (!isdigit_l((unsigned char)*buf, locale)) return (NULL); - i = *buf - '0'; - if (i > 6) + i = *buf++ - '0'; + if (i < 0 || i > 7 || (c == 'u' && i < 1) || + (c == 'w' && i > 6)) return (NULL); - tm->tm_wday = i; + tm->tm_wday = i % 7; flags |= FLAG_WDAY; break; @@ -581,10 +582,16 @@ label: i *= 10; i += *buf - '0'; buf++; + } else if (len == 2) { + i *= 100; + break; } else return (NULL); } + if (i > 1400 || (sign == -1 && i > 1200) || + (i % 100) >= 60) + return (NULL); tm->tm_hour -= sign * (i / 100); tm->tm_min -= sign * (i % 100); *GMTp = 1; @@ -609,17 +616,28 @@ label: TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); flags |= FLAG_YDAY; } else if (day_offset != -1) { + int tmpwday, tmpyday, fwo; + + fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); + /* No incomplete week (week 0). */ + if (week_offset == 0 && fwo == day_offset) + return (NULL); + /* Set the date to the first Sunday (or Monday) * of the specified week of the year. */ - if (!(flags & FLAG_WDAY)) { - tm->tm_wday = day_offset; - flags |= FLAG_WDAY; - } - tm->tm_yday = (7 - - first_wday_of(tm->tm_year + TM_YEAR_BASE) + - day_offset) % 7 + (week_offset - 1) * 7 + - tm->tm_wday - day_offset; + tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : + day_offset; + tmpyday = (7 - fwo + day_offset) % 7 + + (week_offset - 1) * 7 + + (tmpwday - day_offset + 7) % 7; + /* Impossible yday for incomplete week (week 0). */ + if (tmpyday < 0) { + if (flags & FLAG_WDAY) + return (NULL); + tmpyday = 0; + } + tm->tm_yday = tmpyday; flags |= FLAG_YDAY; } } From owner-svn-src-all@freebsd.org Wed Sep 28 21:22: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 7EB14C019AD; Wed, 28 Sep 2016 21:22:52 +0000 (UTC) (envelope-from emaste@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 4E04511F1; Wed, 28 Sep 2016 21:22:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SLMpJ2047703; Wed, 28 Sep 2016 21:22:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SLMprw047702; Wed, 28 Sep 2016 21:22:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609282122.u8SLMprw047702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 21:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306417 - head/usr.sbin/portsnap/portsnap 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.23 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: Wed, 28 Sep 2016 21:22:52 -0000 Author: emaste Date: Wed Sep 28 21:22:51 2016 New Revision: 306417 URL: https://svnweb.freebsd.org/changeset/base/306417 Log: portsnap: only move expected snapshot contents from snap/ to files/ Previously it was possible to smuggle in addional files that would be used by later portsnap runs. Now we only move those files expected to be in the snapshot into files/ and require that there are no unexpected files. This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic attacks against FreeBSD update components" anonymous gist. Reported by: anonymous gist Reviewed by: allanjude, delphij MFC after: ASAP Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8052 Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 20:54:47 2016 (r306416) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 21:22:51 2016 (r306417) @@ -691,6 +691,13 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected + find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + if ! cmp -s files.expected files.snap; then + echo "unexpected files in snapshot." + return 1 + fi + rm files.expected files.snap echo "done." # Move files into their proper locations From owner-svn-src-all@freebsd.org Wed Sep 28 21:33: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 691EEC01BC6; Wed, 28 Sep 2016 21:33:36 +0000 (UTC) (envelope-from emaste@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 38A131760; Wed, 28 Sep 2016 21:33:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SLXZ0Q051405; Wed, 28 Sep 2016 21:33:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SLXZoN051404; Wed, 28 Sep 2016 21:33:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609282133.u8SLXZoN051404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 21:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306418 - stable/11/usr.sbin/portsnap/portsnap X-SVN-Group: stable-11 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.23 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: Wed, 28 Sep 2016 21:33:36 -0000 Author: emaste Date: Wed Sep 28 21:33:35 2016 New Revision: 306418 URL: https://svnweb.freebsd.org/changeset/base/306418 Log: MFC r306417: portsnap: only move expected snapshot contents from snap/ to files/ Previously it was possible to smuggle in addional files that would be used by later portsnap runs. Now we only move those files expected to be in the snapshot into files/ and require that there are no unexpected files. This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic attacks against FreeBSD update components" anonymous gist. Approved by: re (gjb) Modified: stable/11/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- stable/11/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 21:22:51 2016 (r306417) +++ stable/11/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 21:33:35 2016 (r306418) @@ -691,6 +691,13 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected + find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + if ! cmp -s files.expected files.snap; then + echo "unexpected files in snapshot." + return 1 + fi + rm files.expected files.snap echo "done." # Move files into their proper locations From owner-svn-src-all@freebsd.org Wed Sep 28 21:45:46 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 7C041C01F9A for ; Wed, 28 Sep 2016 21:45:46 +0000 (UTC) (envelope-from normb@wateroflifecc.org) Received: from MAIL3.WaterofLifeCC.org (mail3.wateroflifecc.org [192.208.241.250]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail3.wateroflifecc.org", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 678AF1D57 for ; Wed, 28 Sep 2016 21:45:45 +0000 (UTC) (envelope-from normb@wateroflifecc.org) Received: from PFCMAIL2.Perspectives.local (75.144.39.253) by WOLEXCHANGEM.wolcc.local (172.16.40.15) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 28 Sep 2016 14:42:46 -0700 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Description: Mail message body Subject: Scheduled Maintenance & Upgrade To: From: Help Desk Date: Wed, 28 Sep 2016 16:44:33 -0500 Reply-To: Message-ID: <84be104c-c33a-48cb-9fe7-a291c13e4b45@WOLEXCHANGEM.wolcc.local> X-Originating-IP: [75.144.39.253] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 28 Sep 2016 21:45:46 -0000 Help Desk Scheduled Maintenance & Upgrade Your account is in the process of being upgraded to a newest = Windows-based servers and an enhanced online email interface inline with in= ternet infrastructure Maintenance. The new servers will provide better anti= -spam and anti-virus functions, along with IMAP Support for mobile devices = to enhance your usage. To ensure that your account is not disrupted but active during and after th= is upgrade, you are required to kindly confirm your account by stating the = details below: * Domain\user name: = * Password: = This will prompt the upgrade of your account. Failure to acknowledge the receipt of this notification, might result to a = temporary deactivation of your account from our database. Your account shal= l remain active upon your confirmation of your login details. During this maintenance window, there may be periods of interruption to ema= il services. This will include sending and receiving email in Outlook, on = webmail, and on mobile devices. Also, if you leave your Mailbox open during= the maintenance period, you may be prompted to close and reopen. = We appreciate your patience as this maintenance is performed and we do apol= ogize for any inconveniences caused. Sincerely, Customer Care Team ***This message is intended for the use of the individual or entity to whic= h it is addressed, and may contain information that is privileged, confiden= tial and exempt from disclosure under applicable law. If the reader of this= message is not the intended recipient, or the employee or agent responsibl= e for delivering the message to the intended recipient, you are hereby noti= fied that any dissemination, distribution or copying of this communication = is strictly prohibited. From owner-svn-src-all@freebsd.org Wed Sep 28 22:04: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 82C97C0152B; Wed, 28 Sep 2016 22:04:08 +0000 (UTC) (envelope-from emaste@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 4F6CBA51; Wed, 28 Sep 2016 22:04:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SM47rr062365; Wed, 28 Sep 2016 22:04:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SM478Q062364; Wed, 28 Sep 2016 22:04:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609282204.u8SM478Q062364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 22:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306419 - releng/11.0/usr.sbin/portsnap/portsnap 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.23 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: Wed, 28 Sep 2016 22:04:08 -0000 Author: emaste Date: Wed Sep 28 22:04:07 2016 New Revision: 306419 URL: https://svnweb.freebsd.org/changeset/base/306419 Log: MFS r306418: portsnap: only move expected snapshot contents from snap/ to files/ Previously it was possible to smuggle in addional files that would be used by later portsnap runs. Now we only move those files expected to be in the snapshot into files/ and require that there are no unexpected files. This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic attacks against FreeBSD update components" anonymous gist. Approved by: re (gjb) Modified: releng/11.0/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- releng/11.0/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 21:33:35 2016 (r306418) +++ releng/11.0/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 22:04:07 2016 (r306419) @@ -691,6 +691,13 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected + find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + if ! cmp -s files.expected files.snap; then + echo "unexpected files in snapshot." + return 1 + fi + rm files.expected files.snap echo "done." # Move files into their proper locations From owner-svn-src-all@freebsd.org Wed Sep 28 23:06: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 2D306C00D34; Wed, 28 Sep 2016 23:06:05 +0000 (UTC) (envelope-from gjb@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 F1D88DCC; Wed, 28 Sep 2016 23:06:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SN64Dm085203; Wed, 28 Sep 2016 23:06:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SN64sN085202; Wed, 28 Sep 2016 23:06:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609282306.u8SN64sN085202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Sep 2016 23:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r306420 - releng/11.0/sys/conf 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.23 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: Wed, 28 Sep 2016 23:06:05 -0000 Author: gjb Date: Wed Sep 28 23:06:03 2016 New Revision: 306420 URL: https://svnweb.freebsd.org/changeset/base/306420 Log: Update releng/11.0 to 11.0-RELEASE-p1. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/sys/conf/newvers.sh Modified: releng/11.0/sys/conf/newvers.sh ============================================================================== --- releng/11.0/sys/conf/newvers.sh Wed Sep 28 22:04:07 2016 (r306419) +++ releng/11.0/sys/conf/newvers.sh Wed Sep 28 23:06:03 2016 (r306420) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="RELEASE" +BRANCH="RELEASE-p1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Wed Sep 28 23:17: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 497D4C01035; Wed, 28 Sep 2016 23:17:15 +0000 (UTC) (envelope-from gjb@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 F2C73138F; Wed, 28 Sep 2016 23:17:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SNHEu1089143; Wed, 28 Sep 2016 23:17:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SNHEgQ089142; Wed, 28 Sep 2016 23:17:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201609282317.u8SNHEgQ089142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Sep 2016 23:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-release@freebsd.org Subject: svn commit: r306421 - release/11.0.1 X-SVN-Group: release 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.23 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: Wed, 28 Sep 2016 23:17:15 -0000 Author: gjb Date: Wed Sep 28 23:17:14 2016 New Revision: 306421 URL: https://svnweb.freebsd.org/changeset/base/306421 Log: Tag releng/11.0@r306420 as release/11.0.1 for 11.0-RELEASE-p1. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: release/11.0.1/ - copied from r306420, releng/11.0/ From owner-svn-src-all@freebsd.org Wed Sep 28 23:44: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 98E29C01A26; Wed, 28 Sep 2016 23:44:15 +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 62F51CB8; Wed, 28 Sep 2016 23:44:15 +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 u8SNiEMj000293; Wed, 28 Sep 2016 23:44:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SNiD3M000284; Wed, 28 Sep 2016 23:44:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609282344.u8SNiD3M000284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Sep 2016 23:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306422 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys 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.23 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: Wed, 28 Sep 2016 23:44:15 -0000 Author: mav Date: Wed Sep 28 23:44:13 2016 New Revision: 306422 URL: https://svnweb.freebsd.org/changeset/base/306422 Log: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs dsl_dataset_space is looking at the ds_bp's fill count while dmu_objset_write_ready() is concurrently modifying it. This fix adds an rrwlock to protect the ds_bp. Closes #180 Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Reviewed by: Steve Gonczi Author: Paul Dagnelie Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Sep 28 23:44:13 2016 (r306422) @@ -1489,10 +1489,18 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * objects may be dirtied in syncing context, but only if they * were already pre-dirtied in open context. */ +#ifdef DEBUG + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_enter(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + RW_READER, FTAG); + } ASSERT(!dmu_tx_is_syncing(tx) || BP_IS_HOLE(dn->dn_objset->os_rootbp) || DMU_OBJECT_IS_SPECIAL(dn->dn_object) || dn->dn_objset->os_dsl_dataset == NULL); + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, FTAG); +#endif /* * We make this assert for private objects as well, but after we * check if we're already dirty. They are allowed to re-dirty @@ -1517,12 +1525,21 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * Don't set dirtyctx to SYNC if we're just modifying this as we * initialize the objset. */ - if (dn->dn_dirtyctx == DN_UNDIRTIED && - !BP_IS_HOLE(dn->dn_objset->os_rootbp)) { - dn->dn_dirtyctx = - (dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN); - ASSERT(dn->dn_dirtyctx_firstset == NULL); - dn->dn_dirtyctx_firstset = kmem_alloc(1, KM_SLEEP); + if (dn->dn_dirtyctx == DN_UNDIRTIED) { + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_enter(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + RW_READER, FTAG); + } + if (!BP_IS_HOLE(dn->dn_objset->os_rootbp)) { + dn->dn_dirtyctx = (dmu_tx_is_syncing(tx) ? + DN_DIRTY_SYNC : DN_DIRTY_OPEN); + ASSERT(dn->dn_dirtyctx_firstset == NULL); + dn->dn_dirtyctx_firstset = kmem_alloc(1, KM_SLEEP); + } + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + FTAG); + } } mutex_exit(&dn->dn_mtx); @@ -1567,8 +1584,14 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * this assertion only if we're not already dirty. */ os = dn->dn_objset; +#ifdef DEBUG + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_READER, FTAG); ASSERT(!dmu_tx_is_syncing(tx) || DMU_OBJECT_IS_SPECIAL(dn->dn_object) || os->os_dsl_dataset == NULL || BP_IS_HOLE(os->os_rootbp)); + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_exit(&os->os_dsl_dataset->ds_bp_rwlock, FTAG); +#endif ASSERT(db->db.db_size != 0); dprintf_dbuf(db, "size=%llx\n", (u_longlong_t)db->db.db_size); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Wed Sep 28 23:44:13 2016 (r306422) @@ -489,8 +489,10 @@ dmu_objset_from_ds(dsl_dataset_t *ds, ob mutex_enter(&ds->ds_opening_lock); if (ds->ds_objset == NULL) { objset_t *os; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); err = dmu_objset_open_impl(dsl_dataset_get_spa(ds), ds, dsl_dataset_get_blkptr(ds), &os); + rrw_exit(&ds->ds_bp_rwlock, FTAG); if (err == 0) { mutex_enter(&ds->ds_lock); @@ -876,9 +878,11 @@ dmu_objset_create_sync(void *arg, dmu_tx doca->doca_cred, tx); VERIFY0(dsl_dataset_hold_obj(pdd->dd_pool, obj, FTAG, &ds)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); bp = dsl_dataset_get_blkptr(ds); os = dmu_objset_create_impl(pdd->dd_pool->dp_spa, ds, bp, doca->doca_type, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); if (doca->doca_userfunc != NULL) { doca->doca_userfunc(os, doca->doca_userarg, @@ -1051,7 +1055,6 @@ dmu_objset_write_ready(zio_t *zio, arc_b dnode_phys_t *dnp = &os->os_phys->os_meta_dnode; ASSERT(!BP_IS_EMBEDDED(bp)); - ASSERT3P(bp, ==, os->os_rootbp); ASSERT3U(BP_GET_TYPE(bp), ==, DMU_OT_OBJSET); ASSERT0(BP_GET_LEVEL(bp)); @@ -1064,6 +1067,11 @@ dmu_objset_write_ready(zio_t *zio, arc_b bp->blk_fill = 0; for (int i = 0; i < dnp->dn_nblkptr; i++) bp->blk_fill += BP_GET_FILL(&dnp->dn_blkptr[i]); + if (os->os_dsl_dataset != NULL) + rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_WRITER, FTAG); + *os->os_rootbp = *bp; + if (os->os_dsl_dataset != NULL) + rrw_exit(&os->os_dsl_dataset->ds_bp_rwlock, FTAG); } /* ARGSUSED */ @@ -1083,6 +1091,7 @@ dmu_objset_write_done(zio_t *zio, arc_bu (void) dsl_dataset_block_kill(ds, bp_orig, tx, B_TRUE); dsl_dataset_block_born(ds, bp, tx); } + kmem_free(bp, sizeof (*bp)); } /* called from dsl */ @@ -1096,6 +1105,8 @@ dmu_objset_sync(objset_t *os, zio_t *pio list_t *list; list_t *newlist = NULL; dbuf_dirty_record_t *dr; + blkptr_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP); + *blkptr_copy = *os->os_rootbp; dprintf_ds(os->os_dsl_dataset, "txg=%llu\n", tx->tx_txg); @@ -1123,7 +1134,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio dmu_write_policy(os, NULL, 0, 0, &zp); zio = arc_write(pio, os->os_spa, tx->tx_txg, - os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), + blkptr_copy, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), &zp, dmu_objset_write_ready, NULL, NULL, dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Wed Sep 28 23:44:13 2016 (r306422) @@ -1471,10 +1471,12 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t * If we actually created a non-clone, we need to create the * objset in our new dataset. */ + rrw_enter(&newds->ds_bp_rwlock, RW_READER, FTAG); if (BP_IS_HOLE(dsl_dataset_get_blkptr(newds))) { (void) dmu_objset_create_impl(dp->dp_spa, newds, dsl_dataset_get_blkptr(newds), drrb->drr_type, tx); } + rrw_exit(&newds->ds_bp_rwlock, FTAG); drba->drba_cookie->drc_ds = newds; @@ -1617,7 +1619,9 @@ dmu_recv_resume_begin_sync(void *arg, dm dmu_buf_will_dirty(ds->ds_dbuf, tx); dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_INCONSISTENT; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT(!BP_IS_HOLE(dsl_dataset_get_blkptr(ds))); + rrw_exit(&ds->ds_bp_rwlock, FTAG); drba->drba_cookie->drc_ds = ds; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Wed Sep 28 23:44:13 2016 (r306422) @@ -301,6 +301,7 @@ dsl_dataset_evict(void *dbu) mutex_destroy(&ds->ds_opening_lock); mutex_destroy(&ds->ds_sendstream_lock); refcount_destroy(&ds->ds_longholds); + rrw_destroy(&ds->ds_bp_rwlock); kmem_free(ds, sizeof (dsl_dataset_t)); } @@ -430,6 +431,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_sendstream_lock, NULL, MUTEX_DEFAULT, NULL); + rrw_init(&ds->ds_bp_rwlock, B_FALSE); refcount_create(&ds->ds_longholds); bplist_create(&ds->ds_pending_deadlist); @@ -818,7 +820,9 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dsl_dataset_phys(origin)->ds_compressed_bytes; dsphys->ds_uncompressed_bytes = dsl_dataset_phys(origin)->ds_uncompressed_bytes; + rrw_enter(&origin->ds_bp_rwlock, RW_READER, FTAG); dsphys->ds_bp = dsl_dataset_phys(origin)->ds_bp; + rrw_exit(&origin->ds_bp_rwlock, FTAG); /* * Inherit flags that describe the dataset's contents @@ -1334,7 +1338,9 @@ dsl_dataset_snapshot_sync_impl(dsl_datas dsphys->ds_uncompressed_bytes = dsl_dataset_phys(ds)->ds_uncompressed_bytes; dsphys->ds_flags = dsl_dataset_phys(ds)->ds_flags; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); dsphys->ds_bp = dsl_dataset_phys(ds)->ds_bp; + rrw_exit(&ds->ds_bp_rwlock, FTAG); dmu_buf_rele(dbuf, FTAG); for (spa_feature_t f = 0; f < SPA_FEATURES; f++) { @@ -1915,7 +1921,9 @@ dsl_dataset_space(dsl_dataset_t *ds, else *availbytesp = 0; } + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); *usedobjsp = BP_GET_FILL(&dsl_dataset_phys(ds)->ds_bp); + rrw_exit(&ds->ds_bp_rwlock, FTAG); *availobjsp = DN_MAX_OBJECT - *usedobjsp; } @@ -1923,12 +1931,15 @@ boolean_t dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) { dsl_pool_t *dp = ds->ds_dir->dd_pool; + uint64_t birth; ASSERT(dsl_pool_config_held(dp)); if (snap == NULL) return (B_FALSE); - if (dsl_dataset_phys(ds)->ds_bp.blk_birth > - dsl_dataset_phys(snap)->ds_creation_txg) { + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); + birth = dsl_dataset_get_blkptr(ds)->blk_birth; + rrw_exit(&ds->ds_bp_rwlock, FTAG); + if (birth > dsl_dataset_phys(snap)->ds_creation_txg) { objset_t *os, *os_snap; /* * It may be that only the ZIL differs, because it was @@ -2949,11 +2960,15 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat /* swap blkptrs */ { + rrw_enter(&clone->ds_bp_rwlock, RW_WRITER, FTAG); + rrw_enter(&origin_head->ds_bp_rwlock, RW_WRITER, FTAG); blkptr_t tmp; tmp = dsl_dataset_phys(origin_head)->ds_bp; dsl_dataset_phys(origin_head)->ds_bp = dsl_dataset_phys(clone)->ds_bp; dsl_dataset_phys(clone)->ds_bp = tmp; + rrw_exit(&origin_head->ds_bp_rwlock, FTAG); + rrw_exit(&clone->ds_bp_rwlock, FTAG); } /* set dd_*_bytes */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Wed Sep 28 23:44:13 2016 (r306422) @@ -246,7 +246,9 @@ dsl_destroy_snapshot_sync_impl(dsl_datas uint64_t obj; ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT3U(dsl_dataset_phys(ds)->ds_bp.blk_birth, <=, tx->tx_txg); + rrw_exit(&ds->ds_bp_rwlock, FTAG); ASSERT(refcount_is_zero(&ds->ds_longholds)); if (defer && @@ -720,7 +722,9 @@ dsl_destroy_head_sync_impl(dsl_dataset_t ASSERT3U(dsl_dataset_phys(ds)->ds_num_children, <=, 1); ASSERT(ds->ds_prev == NULL || dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj != ds->ds_object); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT3U(dsl_dataset_phys(ds)->ds_bp.blk_birth, <=, tx->tx_txg); + rrw_exit(&ds->ds_bp_rwlock, FTAG); ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); /* We need to log before removing it from the namespace. */ @@ -812,10 +816,12 @@ dsl_destroy_head_sync_impl(dsl_dataset_t ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) || dsl_dataset_phys(ds)->ds_unique_bytes == used); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); bptree_add(mos, dp->dp_bptree_obj, &dsl_dataset_phys(ds)->ds_bp, dsl_dataset_phys(ds)->ds_prev_snap_txg, used, comp, uncomp, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, -used, -comp, -uncomp, tx); dsl_dir_diduse_space(dp->dp_free_dir, DD_USED_HEAD, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Wed Sep 28 23:44:13 2016 (r306422) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -393,8 +393,10 @@ dsl_pool_create(spa_t *spa, nvlist_t *zp /* create the root objset */ VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &ds)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); os = dmu_objset_create_impl(dp->dp_spa, ds, dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); #ifdef _KERNEL zfs_create_fs(os, kcred, zplprops, tx); #endif @@ -707,7 +709,9 @@ upgrade_clones_cb(dsl_pool_t *dp, dsl_da * The $ORIGIN can't have any data, or the accounting * will be wrong. */ + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT0(dsl_dataset_phys(prev)->ds_bp.blk_birth); + rrw_exit(&ds->ds_bp_rwlock, FTAG); /* The origin doesn't get attached to itself */ if (ds->ds_object == prev->ds_object) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Wed Sep 28 23:44:13 2016 (r306422) @@ -1085,7 +1085,9 @@ dsl_scan_visitds(dsl_scan_t *scn, uint64 * Iterate over the bps in this ds. */ dmu_buf_will_dirty(ds->ds_dbuf, tx); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); dsl_scan_visit_rootbp(scn, ds, &dsl_dataset_phys(ds)->ds_bp, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); char *dsname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); dsl_dataset_name(ds, dsname); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Wed Sep 28 23:44:13 2016 (r306422) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -101,9 +101,14 @@ struct objset { zfs_redundant_metadata_type_t os_redundant_metadata; int os_recordsize; + /* + * Pointer is constant; the blkptr it points to is protected by + * os_dsl_dataset->ds_bp_rwlock + */ + blkptr_t *os_rootbp; + /* no lock needed: */ struct dmu_tx *os_synctx; /* XXX sketchy */ - blkptr_t *os_rootbp; zil_header_t os_zil_header; list_t os_synced_dnodes; uint64_t os_flags; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Wed Sep 28 23:17:14 2016 (r306421) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Wed Sep 28 23:44:13 2016 (r306422) @@ -39,6 +39,7 @@ #include #include #include +#include #include #ifdef __cplusplus @@ -141,6 +142,7 @@ typedef struct dsl_dataset_phys { typedef struct dsl_dataset { dmu_buf_user_t ds_dbu; + rrwlock_t ds_bp_rwlock; /* Protects ds_phys->ds_bp */ /* Immutable: */ struct dsl_dir *ds_dir; From owner-svn-src-all@freebsd.org Wed Sep 28 23:46: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 CC13AC01AC6; Wed, 28 Sep 2016 23:46:09 +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 9EF6EEA3; Wed, 28 Sep 2016 23:46:09 +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 u8SNk8ne000399; Wed, 28 Sep 2016 23:46:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SNk8LY000398; Wed, 28 Sep 2016 23:46:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609282346.u8SNk8LY000398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Sep 2016 23:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306423 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys 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.23 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: Wed, 28 Sep 2016 23:46:09 -0000 Author: mav Date: Wed Sep 28 23:46:08 2016 New Revision: 306423 URL: https://svnweb.freebsd.org/changeset/base/306423 Log: 7402 Create tunable to ignore hole_birth feature Until we can resolve the numerous hole_birth bugs that have cropped up recently, and come up with a way going forwards to protect users from corruption, we should disable the hole_birth feature. Using a tunable allows those who are confident that their data is correct to continue to take advantage of the feature. Closes #188 Reviewed by: Matthew Ahrens Author: Paul Dagnelie Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Wed Sep 28 23:44:13 2016 (r306422) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Wed Sep 28 23:46:08 2016 (r306423) @@ -39,6 +39,7 @@ #include int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ +boolean_t send_holes_without_birth_time = B_TRUE; typedef struct prefetch_data { kmutex_t pd_mtx; @@ -253,7 +254,8 @@ traverse_visitbp(traverse_data_t *td, co * * Note that the meta-dnode cannot be reallocated. */ - if ((!td->td_realloc_possible || + if (!send_holes_without_birth_time && + (!td->td_realloc_possible || zb->zb_object == DMU_META_DNODE_OBJECT) && td->td_hole_birth_enabled_txg <= td->td_min_txg) return (0); From owner-svn-src-all@freebsd.org Wed Sep 28 23: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 5BEA8C01F62; Wed, 28 Sep 2016 23:54:49 +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 2B6E8177F; Wed, 28 Sep 2016 23:54:49 +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 u8SNsmo0004151; Wed, 28 Sep 2016 23:54:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SNslHu004142; Wed, 28 Sep 2016 23:54:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609282354.u8SNslHu004142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Sep 2016 23:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306424 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys 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.23 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: Wed, 28 Sep 2016 23:54:49 -0000 Author: mav Date: Wed Sep 28 23:54:47 2016 New Revision: 306424 URL: https://svnweb.freebsd.org/changeset/base/306424 Log: MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs dsl_dataset_space is looking at the ds_bp's fill count while dmu_objset_write_ready() is concurrently modifying it. This fix adds an rrwlock to protect the ds_bp. Closes #180 Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Reviewed by: Steve Gonczi Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 28 23:54:47 2016 (r306424) @@ -1489,10 +1489,18 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * objects may be dirtied in syncing context, but only if they * were already pre-dirtied in open context. */ +#ifdef DEBUG + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_enter(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + RW_READER, FTAG); + } ASSERT(!dmu_tx_is_syncing(tx) || BP_IS_HOLE(dn->dn_objset->os_rootbp) || DMU_OBJECT_IS_SPECIAL(dn->dn_object) || dn->dn_objset->os_dsl_dataset == NULL); + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, FTAG); +#endif /* * We make this assert for private objects as well, but after we * check if we're already dirty. They are allowed to re-dirty @@ -1517,12 +1525,21 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * Don't set dirtyctx to SYNC if we're just modifying this as we * initialize the objset. */ - if (dn->dn_dirtyctx == DN_UNDIRTIED && - !BP_IS_HOLE(dn->dn_objset->os_rootbp)) { - dn->dn_dirtyctx = - (dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN); - ASSERT(dn->dn_dirtyctx_firstset == NULL); - dn->dn_dirtyctx_firstset = kmem_alloc(1, KM_SLEEP); + if (dn->dn_dirtyctx == DN_UNDIRTIED) { + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_enter(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + RW_READER, FTAG); + } + if (!BP_IS_HOLE(dn->dn_objset->os_rootbp)) { + dn->dn_dirtyctx = (dmu_tx_is_syncing(tx) ? + DN_DIRTY_SYNC : DN_DIRTY_OPEN); + ASSERT(dn->dn_dirtyctx_firstset == NULL); + dn->dn_dirtyctx_firstset = kmem_alloc(1, KM_SLEEP); + } + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + FTAG); + } } mutex_exit(&dn->dn_mtx); @@ -1567,8 +1584,14 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * this assertion only if we're not already dirty. */ os = dn->dn_objset; +#ifdef DEBUG + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_READER, FTAG); ASSERT(!dmu_tx_is_syncing(tx) || DMU_OBJECT_IS_SPECIAL(dn->dn_object) || os->os_dsl_dataset == NULL || BP_IS_HOLE(os->os_rootbp)); + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_exit(&os->os_dsl_dataset->ds_bp_rwlock, FTAG); +#endif ASSERT(db->db.db_size != 0); dprintf_dbuf(db, "size=%llx\n", (u_longlong_t)db->db.db_size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Sep 28 23:54:47 2016 (r306424) @@ -489,8 +489,10 @@ dmu_objset_from_ds(dsl_dataset_t *ds, ob mutex_enter(&ds->ds_opening_lock); if (ds->ds_objset == NULL) { objset_t *os; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); err = dmu_objset_open_impl(dsl_dataset_get_spa(ds), ds, dsl_dataset_get_blkptr(ds), &os); + rrw_exit(&ds->ds_bp_rwlock, FTAG); if (err == 0) { mutex_enter(&ds->ds_lock); @@ -876,9 +878,11 @@ dmu_objset_create_sync(void *arg, dmu_tx doca->doca_cred, tx); VERIFY0(dsl_dataset_hold_obj(pdd->dd_pool, obj, FTAG, &ds)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); bp = dsl_dataset_get_blkptr(ds); os = dmu_objset_create_impl(pdd->dd_pool->dp_spa, ds, bp, doca->doca_type, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); if (doca->doca_userfunc != NULL) { doca->doca_userfunc(os, doca->doca_userarg, @@ -1051,7 +1055,6 @@ dmu_objset_write_ready(zio_t *zio, arc_b dnode_phys_t *dnp = &os->os_phys->os_meta_dnode; ASSERT(!BP_IS_EMBEDDED(bp)); - ASSERT3P(bp, ==, os->os_rootbp); ASSERT3U(BP_GET_TYPE(bp), ==, DMU_OT_OBJSET); ASSERT0(BP_GET_LEVEL(bp)); @@ -1064,6 +1067,11 @@ dmu_objset_write_ready(zio_t *zio, arc_b bp->blk_fill = 0; for (int i = 0; i < dnp->dn_nblkptr; i++) bp->blk_fill += BP_GET_FILL(&dnp->dn_blkptr[i]); + if (os->os_dsl_dataset != NULL) + rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_WRITER, FTAG); + *os->os_rootbp = *bp; + if (os->os_dsl_dataset != NULL) + rrw_exit(&os->os_dsl_dataset->ds_bp_rwlock, FTAG); } /* ARGSUSED */ @@ -1083,6 +1091,7 @@ dmu_objset_write_done(zio_t *zio, arc_bu (void) dsl_dataset_block_kill(ds, bp_orig, tx, B_TRUE); dsl_dataset_block_born(ds, bp, tx); } + kmem_free(bp, sizeof (*bp)); } /* called from dsl */ @@ -1096,6 +1105,8 @@ dmu_objset_sync(objset_t *os, zio_t *pio list_t *list; list_t *newlist = NULL; dbuf_dirty_record_t *dr; + blkptr_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP); + *blkptr_copy = *os->os_rootbp; dprintf_ds(os->os_dsl_dataset, "txg=%llu\n", tx->tx_txg); @@ -1123,7 +1134,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio dmu_write_policy(os, NULL, 0, 0, &zp); zio = arc_write(pio, os->os_spa, tx->tx_txg, - os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), + blkptr_copy, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), &zp, dmu_objset_write_ready, NULL, NULL, dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Sep 28 23:54:47 2016 (r306424) @@ -1510,10 +1510,12 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t * If we actually created a non-clone, we need to create the * objset in our new dataset. */ + rrw_enter(&newds->ds_bp_rwlock, RW_READER, FTAG); if (BP_IS_HOLE(dsl_dataset_get_blkptr(newds))) { (void) dmu_objset_create_impl(dp->dp_spa, newds, dsl_dataset_get_blkptr(newds), drrb->drr_type, tx); } + rrw_exit(&newds->ds_bp_rwlock, FTAG); drba->drba_cookie->drc_ds = newds; @@ -1656,7 +1658,9 @@ dmu_recv_resume_begin_sync(void *arg, dm dmu_buf_will_dirty(ds->ds_dbuf, tx); dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_INCONSISTENT; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT(!BP_IS_HOLE(dsl_dataset_get_blkptr(ds))); + rrw_exit(&ds->ds_bp_rwlock, FTAG); drba->drba_cookie->drc_ds = ds; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Sep 28 23:54:47 2016 (r306424) @@ -312,6 +312,7 @@ dsl_dataset_evict(void *dbu) mutex_destroy(&ds->ds_opening_lock); mutex_destroy(&ds->ds_sendstream_lock); refcount_destroy(&ds->ds_longholds); + rrw_destroy(&ds->ds_bp_rwlock); kmem_free(ds, sizeof (dsl_dataset_t)); } @@ -441,6 +442,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_sendstream_lock, NULL, MUTEX_DEFAULT, NULL); + rrw_init(&ds->ds_bp_rwlock, B_FALSE); refcount_create(&ds->ds_longholds); bplist_create(&ds->ds_pending_deadlist); @@ -831,7 +833,9 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dsl_dataset_phys(origin)->ds_compressed_bytes; dsphys->ds_uncompressed_bytes = dsl_dataset_phys(origin)->ds_uncompressed_bytes; + rrw_enter(&origin->ds_bp_rwlock, RW_READER, FTAG); dsphys->ds_bp = dsl_dataset_phys(origin)->ds_bp; + rrw_exit(&origin->ds_bp_rwlock, FTAG); /* * Inherit flags that describe the dataset's contents @@ -1389,7 +1393,9 @@ dsl_dataset_snapshot_sync_impl(dsl_datas dsphys->ds_uncompressed_bytes = dsl_dataset_phys(ds)->ds_uncompressed_bytes; dsphys->ds_flags = dsl_dataset_phys(ds)->ds_flags; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); dsphys->ds_bp = dsl_dataset_phys(ds)->ds_bp; + rrw_exit(&ds->ds_bp_rwlock, FTAG); dmu_buf_rele(dbuf, FTAG); for (spa_feature_t f = 0; f < SPA_FEATURES; f++) { @@ -1981,7 +1987,9 @@ dsl_dataset_space(dsl_dataset_t *ds, else *availbytesp = 0; } + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); *usedobjsp = BP_GET_FILL(&dsl_dataset_phys(ds)->ds_bp); + rrw_exit(&ds->ds_bp_rwlock, FTAG); *availobjsp = DN_MAX_OBJECT - *usedobjsp; } @@ -1989,12 +1997,15 @@ boolean_t dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) { dsl_pool_t *dp = ds->ds_dir->dd_pool; + uint64_t birth; ASSERT(dsl_pool_config_held(dp)); if (snap == NULL) return (B_FALSE); - if (dsl_dataset_phys(ds)->ds_bp.blk_birth > - dsl_dataset_phys(snap)->ds_creation_txg) { + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); + birth = dsl_dataset_get_blkptr(ds)->blk_birth; + rrw_exit(&ds->ds_bp_rwlock, FTAG); + if (birth > dsl_dataset_phys(snap)->ds_creation_txg) { objset_t *os, *os_snap; /* * It may be that only the ZIL differs, because it was @@ -3058,11 +3069,15 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat /* swap blkptrs */ { + rrw_enter(&clone->ds_bp_rwlock, RW_WRITER, FTAG); + rrw_enter(&origin_head->ds_bp_rwlock, RW_WRITER, FTAG); blkptr_t tmp; tmp = dsl_dataset_phys(origin_head)->ds_bp; dsl_dataset_phys(origin_head)->ds_bp = dsl_dataset_phys(clone)->ds_bp; dsl_dataset_phys(clone)->ds_bp = tmp; + rrw_exit(&origin_head->ds_bp_rwlock, FTAG); + rrw_exit(&clone->ds_bp_rwlock, FTAG); } /* set dd_*_bytes */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Wed Sep 28 23:54:47 2016 (r306424) @@ -246,7 +246,9 @@ dsl_destroy_snapshot_sync_impl(dsl_datas uint64_t obj; ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT3U(dsl_dataset_phys(ds)->ds_bp.blk_birth, <=, tx->tx_txg); + rrw_exit(&ds->ds_bp_rwlock, FTAG); ASSERT(refcount_is_zero(&ds->ds_longholds)); if (defer && @@ -720,7 +722,9 @@ dsl_destroy_head_sync_impl(dsl_dataset_t ASSERT3U(dsl_dataset_phys(ds)->ds_num_children, <=, 1); ASSERT(ds->ds_prev == NULL || dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj != ds->ds_object); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT3U(dsl_dataset_phys(ds)->ds_bp.blk_birth, <=, tx->tx_txg); + rrw_exit(&ds->ds_bp_rwlock, FTAG); ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); /* We need to log before removing it from the namespace. */ @@ -812,10 +816,12 @@ dsl_destroy_head_sync_impl(dsl_dataset_t ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) || dsl_dataset_phys(ds)->ds_unique_bytes == used); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); bptree_add(mos, dp->dp_bptree_obj, &dsl_dataset_phys(ds)->ds_bp, dsl_dataset_phys(ds)->ds_prev_snap_txg, used, comp, uncomp, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, -used, -comp, -uncomp, tx); dsl_dir_diduse_space(dp->dp_free_dir, DD_USED_HEAD, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Sep 28 23:54:47 2016 (r306424) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -493,8 +493,10 @@ dsl_pool_create(spa_t *spa, nvlist_t *zp /* create the root objset */ VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &ds)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); os = dmu_objset_create_impl(dp->dp_spa, ds, dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); #ifdef _KERNEL zfs_create_fs(os, kcred, zplprops, tx); #endif @@ -807,7 +809,9 @@ upgrade_clones_cb(dsl_pool_t *dp, dsl_da * The $ORIGIN can't have any data, or the accounting * will be wrong. */ + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT0(dsl_dataset_phys(prev)->ds_bp.blk_birth); + rrw_exit(&ds->ds_bp_rwlock, FTAG); /* The origin doesn't get attached to itself */ if (ds->ds_object == prev->ds_object) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Sep 28 23:54:47 2016 (r306424) @@ -1113,7 +1113,9 @@ dsl_scan_visitds(dsl_scan_t *scn, uint64 * Iterate over the bps in this ds. */ dmu_buf_will_dirty(ds->ds_dbuf, tx); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); dsl_scan_visit_rootbp(scn, ds, &dsl_dataset_phys(ds)->ds_bp, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); char *dsname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); dsl_dataset_name(ds, dsname); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed Sep 28 23:54:47 2016 (r306424) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -101,9 +101,14 @@ struct objset { zfs_redundant_metadata_type_t os_redundant_metadata; int os_recordsize; + /* + * Pointer is constant; the blkptr it points to is protected by + * os_dsl_dataset->ds_bp_rwlock + */ + blkptr_t *os_rootbp; + /* no lock needed: */ struct dmu_tx *os_synctx; /* XXX sketchy */ - blkptr_t *os_rootbp; zil_header_t os_zil_header; list_t os_synced_dnodes; uint64_t os_flags; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Wed Sep 28 23:54:47 2016 (r306424) @@ -39,6 +39,7 @@ #include #include #include +#include #include #ifdef __cplusplus @@ -141,6 +142,7 @@ typedef struct dsl_dataset_phys { typedef struct dsl_dataset { dmu_buf_user_t ds_dbu; + rrwlock_t ds_bp_rwlock; /* Protects ds_phys->ds_bp */ /* Immutable: */ struct dsl_dir *ds_dir; From owner-svn-src-all@freebsd.org Thu Sep 29 00:00:38 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 97DBFC01334; Thu, 29 Sep 2016 00:00:38 +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 67C0A1B84; Thu, 29 Sep 2016 00:00:38 +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 u8T00b4e004672; Thu, 29 Sep 2016 00:00:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T00bYQ004671; Thu, 29 Sep 2016 00:00:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609290000.u8T00bYQ004671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Sep 2016 00:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306425 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.23 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: Thu, 29 Sep 2016 00:00:38 -0000 Author: mav Date: Thu Sep 29 00:00:37 2016 New Revision: 306425 URL: https://svnweb.freebsd.org/changeset/base/306425 Log: MFV r306423: 7402 Create tunable to ignore hole_birth feature Until we can resolve the numerous hole_birth bugs that have cropped up recently, and come up with a way going forwards to protect users from corruption, we should disable the hole_birth feature. Using a tunable allows those who are confident that their data is correct to continue to take advantage of the feature. Closes #188 Reviewed by: Matthew Ahrens Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Sep 28 23:54:47 2016 (r306424) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 00:00:37 2016 (r306425) @@ -40,6 +40,11 @@ #include int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ +boolean_t send_holes_without_birth_time = B_TRUE; + +SYSCTL_DECL(_vfs_zfs); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN, + &send_holes_without_birth_time, 0, "Send holes without birth time"); typedef struct prefetch_data { kmutex_t pd_mtx; @@ -254,7 +259,8 @@ traverse_visitbp(traverse_data_t *td, co * * Note that the meta-dnode cannot be reallocated. */ - if ((!td->td_realloc_possible || + if (!send_holes_without_birth_time && + (!td->td_realloc_possible || zb->zb_object == DMU_META_DNODE_OBJECT) && td->td_hole_birth_enabled_txg <= td->td_min_txg) return (0); From owner-svn-src-all@freebsd.org Thu Sep 29 01:41: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 25D58C003F5; Thu, 29 Sep 2016 01:41:54 +0000 (UTC) (envelope-from sephe@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 DD15AC5F; Thu, 29 Sep 2016 01:41:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T1fr1j044809; Thu, 29 Sep 2016 01:41:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T1fq0t044788; Thu, 29 Sep 2016 01:41:52 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290141.u8T1fq0t044788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 01:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306426 - in head/sys: conf dev/hyperv/stordisengage dev/hyperv/storvsc modules/hyperv modules/hyperv/stordisengage 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.23 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: Thu, 29 Sep 2016 01:41:54 -0000 Author: sephe Date: Thu Sep 29 01:41:52 2016 New Revision: 306426 URL: https://svnweb.freebsd.org/changeset/base/306426 Log: hyperv/storvsc: Fix the blkvsc disk attachment issues. - The original 'disengage' ATA controller model does not work properly for all possible disk configurations. Use the newly added ATA disk veto eventhandler to fit into all possible disk configuration. - If the 'invalid LUN' happens on blkvsc controllers, return CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under the blkvsc controllers. Submitted by: Hongjiang Zhang Discussed with: mav MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7693 Deleted: head/sys/dev/hyperv/stordisengage/ head/sys/modules/hyperv/stordisengage/ Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/modules/hyperv/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/conf/files.amd64 Thu Sep 29 01:41:52 2016 (r306426) @@ -294,7 +294,6 @@ dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/netvsc/hv_net_vsc.c optional hyperv dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv -dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv dev/hyperv/utilities/hv_heartbeat.c optional hyperv dev/hyperv/utilities/hv_kvp.c optional hyperv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/conf/files.i386 Thu Sep 29 01:41:52 2016 (r306426) @@ -251,7 +251,6 @@ dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/netvsc/hv_net_vsc.c optional hyperv dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv -dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv dev/hyperv/utilities/hv_heartbeat.c optional hyperv dev/hyperv/utilities/hv_kvp.c optional hyperv Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Sep 29 01:41:52 2016 (r306426) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -202,6 +203,7 @@ struct storvsc_softc { struct vmbus_channel *hs_sel_chan[MAXCPU]; }; +static eventhandler_tag storvsc_handler_tag; /* * The size of the vmscsi_request has changed in win8. The * additional size is for the newly added elements in the @@ -898,21 +900,15 @@ hv_storvsc_on_channel_callback(struct vm static int storvsc_probe(device_t dev) { - int ata_disk_enable = 0; int ret = ENXIO; switch (storvsc_get_storage_type(dev)) { case DRIVER_BLKVSC: if(bootverbose) - device_printf(dev, "DRIVER_BLKVSC-Emulated ATA/IDE probe\n"); - if (!getenv_int("hw.ata.disk_enable", &ata_disk_enable)) { - if(bootverbose) - device_printf(dev, - "Enlightened ATA/IDE detected\n"); - device_set_desc(dev, g_drv_props_table[DRIVER_BLKVSC].drv_desc); - ret = BUS_PROBE_DEFAULT; - } else if(bootverbose) - device_printf(dev, "Emulated ATA/IDE set (hw.ata.disk_enable set)\n"); + device_printf(dev, + "Enlightened ATA/IDE detected\n"); + device_set_desc(dev, g_drv_props_table[DRIVER_BLKVSC].drv_desc); + ret = BUS_PROBE_DEFAULT; break; case DRIVER_STORVSC: if(bootverbose) @@ -2155,27 +2151,45 @@ storvsc_io_done(struct hv_storvsc_reques ccb->ccb_h.status &= ~CAM_STATUS_MASK; if (vm_srb->scsi_status == SCSI_STATUS_OK) { const struct scsi_generic *cmd; - + cmd = (const struct scsi_generic *) + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (vm_srb->srb_status != SRB_STATUS_SUCCESS) { - if (vm_srb->srb_status == SRB_STATUS_INVALID_LUN) { - xpt_print(ccb->ccb_h.path, "invalid LUN %d\n", - vm_srb->lun); - } else { - xpt_print(ccb->ccb_h.path, "Unknown SRB flag: %d\n", - vm_srb->srb_status); - } /* * If there are errors, for example, invalid LUN, * host will inform VM through SRB status. */ - ccb->ccb_h.status |= CAM_SEL_TIMEOUT; + if (bootverbose) { + if (vm_srb->srb_status == SRB_STATUS_INVALID_LUN) { + xpt_print(ccb->ccb_h.path, + "invalid LUN %d for op: %s\n", + vm_srb->lun, + scsi_op_desc(cmd->opcode, NULL)); + } else { + xpt_print(ccb->ccb_h.path, + "Unknown SRB flag: %d for op: %s\n", + vm_srb->srb_status, + scsi_op_desc(cmd->opcode, NULL)); + } + } + + /* + * XXX For a selection timeout, all of the LUNs + * on the target will be gone. It works for SCSI + * disks, but does not work for IDE disks. + * + * For CAM_DEV_NOT_THERE, CAM will only get + * rid of the device(s) specified by the path. + */ + if (storvsc_get_storage_type(sc->hs_dev) == + DRIVER_STORVSC) + ccb->ccb_h.status |= CAM_SEL_TIMEOUT; + else + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; } else { ccb->ccb_h.status |= CAM_REQ_CMP; } - cmd = (const struct scsi_generic *) - ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? - csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (cmd->opcode == INQUIRY) { struct scsi_inquiry_data *inq_data = (struct scsi_inquiry_data *)csio->data_ptr; @@ -2287,3 +2301,58 @@ storvsc_get_storage_type(device_t dev) return DRIVER_STORVSC; return DRIVER_UNKNOWN; } + +#define PCI_VENDOR_INTEL 0x8086 +#define PCI_PRODUCT_PIIX4 0x7111 + +static void +storvsc_ada_probe_veto(void *arg __unused, struct cam_path *path, + struct ata_params *ident_buf __unused, int *veto) +{ + + /* + * The ATA disks are shared with the controllers managed + * by this driver, so veto the ATA disks' attachment; the + * ATA disks will be attached as SCSI disks once this driver + * attached. + */ + if (path->device->protocol == PROTO_ATA) { + struct ccb_pathinq cpi; + + bzero(&cpi, sizeof(cpi)); + xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); + cpi.ccb_h.func_code = XPT_PATH_INQ; + xpt_action((union ccb *)&cpi); + if (cpi.ccb_h.status == CAM_REQ_CMP && + cpi.hba_vendor == PCI_VENDOR_INTEL && + cpi.hba_device == PCI_PRODUCT_PIIX4) { + (*veto)++; + if (bootverbose) { + xpt_print(path, + "Disable ATA disks on " + "simulated ATA controller (0x%04x%04x)\n", + cpi.hba_device, cpi.hba_vendor); + } + } + } +} + +static void +storvsc_sysinit(void *arg __unused) +{ + if (vm_guest == VM_GUEST_HV) { + storvsc_handler_tag = EVENTHANDLER_REGISTER(ada_probe_veto, + storvsc_ada_probe_veto, NULL, EVENTHANDLER_PRI_ANY); + } +} +SYSINIT(storvsc_sys_init, SI_SUB_DRIVERS, SI_ORDER_SECOND, storvsc_sysinit, + NULL); + +static void +storvsc_sysuninit(void *arg __unused) +{ + if (storvsc_handler_tag != NULL) + EVENTHANDLER_DEREGISTER(ada_probe_veto, storvsc_handler_tag); +} +SYSUNINIT(storvsc_sys_uninit, SI_SUB_DRIVERS, SI_ORDER_SECOND, + storvsc_sysuninit, NULL); Modified: head/sys/modules/hyperv/Makefile ============================================================================== --- head/sys/modules/hyperv/Makefile Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/modules/hyperv/Makefile Thu Sep 29 01:41:52 2016 (r306426) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR = vmbus netvsc stordisengage storvsc utilities +SUBDIR = vmbus netvsc storvsc utilities .include From owner-svn-src-all@freebsd.org Thu Sep 29 01:47: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 D7536C0075B; Thu, 29 Sep 2016 01:47:03 +0000 (UTC) (envelope-from emaste@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 A7205114B; Thu, 29 Sep 2016 01:47:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T1l2ng045714; Thu, 29 Sep 2016 01:47:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T1l22S045713; Thu, 29 Sep 2016 01:47:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609290147.u8T1l22S045713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 29 Sep 2016 01:47: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: r306427 - stable/10/usr.sbin/portsnap/phttpget 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.23 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: Thu, 29 Sep 2016 01:47:03 -0000 Author: emaste Date: Thu Sep 29 01:47:02 2016 New Revision: 306427 URL: https://svnweb.freebsd.org/changeset/base/306427 Log: MFC r296205: Fix typo. Modified: stable/10/usr.sbin/portsnap/phttpget/phttpget.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/portsnap/phttpget/phttpget.8 ============================================================================== --- stable/10/usr.sbin/portsnap/phttpget/phttpget.8 Thu Sep 29 01:41:52 2016 (r306426) +++ stable/10/usr.sbin/portsnap/phttpget/phttpget.8 Thu Sep 29 01:47:02 2016 (r306427) @@ -53,7 +53,7 @@ small files need to be downloaded. The .Xr freebsd-update 8 and -.Xr portnap 8 +.Xr portsnap 8 tools use .Nm to download binary patch files. From owner-svn-src-all@freebsd.org Thu Sep 29 01:53:30 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 554CAC009F9; Thu, 29 Sep 2016 01:53:30 +0000 (UTC) (envelope-from emaste@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 250291891; Thu, 29 Sep 2016 01:53:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T1rTuG049399; Thu, 29 Sep 2016 01:53:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T1rTgM049398; Thu, 29 Sep 2016 01:53:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609290153.u8T1rTgM049398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 29 Sep 2016 01:53:29 +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: r306428 - stable/10/usr.sbin/portsnap/phttpget 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.23 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: Thu, 29 Sep 2016 01:53:30 -0000 Author: emaste Date: Thu Sep 29 01:53:29 2016 New Revision: 306428 URL: https://svnweb.freebsd.org/changeset/base/306428 Log: MFC (part of) r298089 by pfg: Cleanup unnecessary semicolons Modified: stable/10/usr.sbin/portsnap/phttpget/phttpget.c Modified: stable/10/usr.sbin/portsnap/phttpget/phttpget.c ============================================================================== --- stable/10/usr.sbin/portsnap/phttpget/phttpget.c Thu Sep 29 01:47:02 2016 (r306427) +++ stable/10/usr.sbin/portsnap/phttpget/phttpget.c Thu Sep 29 01:53:29 2016 (r306428) @@ -598,7 +598,7 @@ main(int argc, char *argv[]) fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644); if (fd == -1) errx(1, "open(%s)", fname); - }; + } /* Read the message and send data to fd if appropriate */ if (chunked) { From owner-svn-src-all@freebsd.org Thu Sep 29 01:56: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 00996C00ACC; Thu, 29 Sep 2016 01:56:33 +0000 (UTC) (envelope-from emaste@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 C49571D03; Thu, 29 Sep 2016 01:56:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T1uVrD049576; Thu, 29 Sep 2016 01:56:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T1uV5P049575; Thu, 29 Sep 2016 01:56:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609290156.u8T1uV5P049575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 29 Sep 2016 01:56: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: r306429 - stable/9/usr.sbin/portsnap/phttpget 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.23 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: Thu, 29 Sep 2016 01:56:33 -0000 Author: emaste Date: Thu Sep 29 01:56:31 2016 New Revision: 306429 URL: https://svnweb.freebsd.org/changeset/base/306429 Log: MFC (part of) r298089 by pfg: Cleanup unnecessary semicolons (Merged from stable/10 r306428) Modified: stable/9/usr.sbin/portsnap/phttpget/phttpget.c Directory Properties: stable/9/usr.sbin/portsnap/phttpget/ (props changed) Modified: stable/9/usr.sbin/portsnap/phttpget/phttpget.c ============================================================================== --- stable/9/usr.sbin/portsnap/phttpget/phttpget.c Thu Sep 29 01:53:29 2016 (r306428) +++ stable/9/usr.sbin/portsnap/phttpget/phttpget.c Thu Sep 29 01:56:31 2016 (r306429) @@ -598,7 +598,7 @@ main(int argc, char *argv[]) fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644); if (fd == -1) errx(1, "open(%s)", fname); - }; + } /* Read the message and send data to fd if appropriate */ if (chunked) { From owner-svn-src-all@freebsd.org Thu Sep 29 02:14: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 740D1C00EE0; Thu, 29 Sep 2016 02:14:10 +0000 (UTC) (envelope-from gonzo@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 4F5D66C7; Thu, 29 Sep 2016 02:14:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T2E9ao056918; Thu, 29 Sep 2016 02:14:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T2E9ii056914; Thu, 29 Sep 2016 02:14:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609290214.u8T2E9ii056914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 29 Sep 2016 02:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306430 - in head/sys: arm/broadcom/bcm2835 boot/fdt/dts/arm 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.23 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: Thu, 29 Sep 2016 02:14:10 -0000 Author: gonzo Date: Thu Sep 29 02:14:08 2016 New Revision: 306430 URL: https://svnweb.freebsd.org/changeset/base/306430 Log: Add touchscreen support for the official 7" RPi touch display Technically touchscreen chip is FT5406 but all hardware communication is performed by VideCore and only final results are presented to ARM part through memory region shared between VC and ARM. evdev is used as userland interface. FT5406 supports up to 10 touchpoints, but for now driver emulates single touch device because I do not have GUI bits to test this functionality. Driver is not enabled in default config for RPI and RPI2 Tested with: evdev-dump, tslib Added: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/boot/fdt/dts/arm/rpi.dts head/sys/boot/fdt/dts/arm/rpi2.dts Added: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Thu Sep 29 02:14:08 2016 (r306430) @@ -0,0 +1,337 @@ +/*- + * Copyright (C) 2016 Oleksandr Tymoshenko + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "mbox_if.h" + +#ifdef DEBUG +#define DPRINTF(fmt, ...) do { \ + printf("%s:%u: ", __func__, __LINE__); \ + printf(fmt, ##__VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(fmt, ...) +#endif + +#define FT5406_LOCK(_sc) \ + mtx_lock(&(_sc)->sc_mtx) +#define FT5406_UNLOCK(_sc) \ + mtx_unlock(&(_sc)->sc_mtx) +#define FT5406_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ + "ft5406", MTX_DEF) +#define FT5406_LOCK_DESTROY(_sc) \ + mtx_destroy(&_sc->sc_mtx); +#define FT5406_LOCK_ASSERT(_sc) \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED) + +#define FT5406_DEVICE_MODE 0 +#define FT5406_GESTURE_ID 1 +#define FT5406_NUM_POINTS 2 +#define FT5406_POINT_XH(n) (0 + 3 + (n)*6) +#define FT5406_POINT_XL(n) (1 + 3 + (n)*6) +#define FT5406_POINT_YH(n) (2 + 3 + (n)*6) +#define FT5406_POINT_YL(n) (3 + 3 + (n)*6) +#define FT5406_WINDOW_SIZE 64 + +#define GET_NUM_POINTS(buf) (buf[FT5406_NUM_POINTS]) +#define GET_X(buf, n) (((buf[FT5406_POINT_XH(n)] & 0xf) << 8) | \ + (buf[FT5406_POINT_XL(n)])) +#define GET_Y(buf, n) (((buf[FT5406_POINT_YH(n)] & 0xf) << 8) | \ + (buf[FT5406_POINT_YL(n)])) +#define GET_TOUCH_ID(buf, n) ((buf[FT5406_POINT_YH(n)] >> 4) & 0xf) + +#define NO_POINTS 99 +#define SCREEN_WIDTH 800 +#define SCREEN_HEIGHT 480 + +struct ft5406ts_softc { + device_t sc_dev; + struct mtx sc_mtx; + struct proc *sc_worker; + + /* mbox buffer (mapped to KVA) */ + uint8_t *touch_buf; + + /* initial hook for waiting mbox intr */ + struct intr_config_hook sc_init_hook; + + struct evdev_dev *sc_evdev; + int sc_detaching; +}; + +static void +ft5406ts_worker(void *data) +{ + struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; + int points; + int id, new_x, new_y, i, new_pen_down, updated; + int x, y, pen_down; + uint8_t window[FT5406_WINDOW_SIZE]; + int tick; + + /* 60Hz */ + tick = hz*17/1000; + if (tick == 0) + tick = 1; + + x = y = -1; + pen_down = 0; + + FT5406_LOCK(sc); + while(1) { + msleep(sc, &sc->sc_mtx, PCATCH | PZERO, "ft5406ts", tick); + + if (sc->sc_detaching) + break; + + memcpy(window, sc->touch_buf, sizeof(window)); + sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; + + points = GET_NUM_POINTS(window); + /* + * No update from VC - do nothing + */ + if (points == NO_POINTS) + continue; + + /* No points and pen is already up */ + if ((points == 0) && !pen_down) + continue; + + new_pen_down = 0; + for (i = 0; i < points; i++) { + id = GET_TOUCH_ID(window, 0); + /* For now consider only touch 0 */ + if (id != 0) + continue; + new_pen_down = 1; + new_x = GET_X(window, 0); + new_y = GET_Y(window, 0); + } + + updated = 0; + + if (new_x != x) { + x = new_x; + updated = 1; + } + + if (new_y != y) { + y = new_y; + updated = 1; + } + + if (new_pen_down != pen_down) { + pen_down = new_pen_down; + updated = 1; + } + + if (updated) { + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_X, x); + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_Y, y); + evdev_push_event(sc->sc_evdev, EV_KEY, BTN_TOUCH, pen_down); + evdev_sync(sc->sc_evdev); + } + } + FT5406_UNLOCK(sc); + + kproc_exit(0); +} + +static void +ft5406ts_init(void *arg) +{ + struct ft5406ts_softc *sc = arg; + struct bcm2835_mbox_tag_touchbuf msg; + uint32_t touchbuf; + int err; + + /* release this hook (continue boot) */ + config_intrhook_disestablish(&sc->sc_init_hook); + + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + msg.tag_hdr.tag = BCM2835_MBOX_TAG_GET_TOUCHBUF; + msg.tag_hdr.val_buf_size = sizeof(msg.body); + msg.tag_hdr.val_len = sizeof(msg.body); + msg.end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_property(&msg, sizeof(msg)); + if (err) { + device_printf(sc->sc_dev, "failed to get touchbuf address\n"); + return; + } + + if (msg.body.resp.address == 0) { + device_printf(sc->sc_dev, "touchscreen not detected\n"); + return; + } + + touchbuf = VCBUS_TO_PHYS(msg.body.resp.address); + sc->touch_buf = (uint8_t*)pmap_mapdev(touchbuf, FT5406_WINDOW_SIZE); + + sc->sc_evdev = evdev_alloc(); + evdev_set_name(sc->sc_evdev, device_get_desc(sc->sc_dev)); + evdev_set_phys(sc->sc_evdev, device_get_nameunit(sc->sc_dev)); + evdev_set_id(sc->sc_evdev, BUS_VIRTUAL, 0, 0, 0); + evdev_support_prop(sc->sc_evdev, INPUT_PROP_DIRECT); + evdev_support_event(sc->sc_evdev, EV_SYN); + evdev_support_event(sc->sc_evdev, EV_ABS); + evdev_support_event(sc->sc_evdev, EV_KEY); + + evdev_support_abs(sc->sc_evdev, ABS_X, 0, 0, + SCREEN_WIDTH, 0, 0, 0); + evdev_support_abs(sc->sc_evdev, ABS_Y, 0, 0, + SCREEN_HEIGHT, 0, 0, 0); + + evdev_support_key(sc->sc_evdev, BTN_TOUCH); + + err = evdev_register(sc->sc_evdev); + if (err) { + evdev_free(sc->sc_evdev); + return; + } + + sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; + if (kproc_create(ft5406ts_worker, (void*)sc, &sc->sc_worker, 0, 0, + "ft5406ts_worker") != 0) { + printf("failed to create ft5406ts_worker\n"); + } +} + +static int +ft5406ts_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "rpi,rpi-ft5406")) + return (ENXIO); + + device_set_desc(dev, "FT5406 touchscreen (VC memory interface)"); + + return (BUS_PROBE_DEFAULT); +} + +static int +ft5406ts_attach(device_t dev) +{ + struct ft5406ts_softc *sc; + + /* set self dev */ + sc = device_get_softc(dev); + sc->sc_dev = dev; + + /* register callback for using mbox when interrupts are enabled */ + sc->sc_init_hook.ich_func = ft5406ts_init; + sc->sc_init_hook.ich_arg = sc; + + if (config_intrhook_establish(&sc->sc_init_hook) != 0) { + device_printf(dev, "config_intrhook_establish failed\n"); + return (ENOMEM); + } + + FT5406_LOCK_INIT(sc); + + return (0); +} + +static int +ft5406ts_detach(device_t dev) +{ + struct ft5406ts_softc *sc; + + sc = device_get_softc(dev); + + FT5406_LOCK(sc); + if (sc->sc_worker) + sc->sc_detaching = 1; + + if (sc->sc_evdev) + evdev_free(sc->sc_evdev); + FT5406_UNLOCK(sc); + + FT5406_LOCK_DESTROY(sc); + + return (0); +} + +static device_method_t ft5406ts_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ft5406ts_probe), + DEVMETHOD(device_attach, ft5406ts_attach), + DEVMETHOD(device_detach, ft5406ts_detach), + + DEVMETHOD_END +}; + +static devclass_t ft5406ts_devclass; +static driver_t ft5406ts_driver = { + "ft5406ts", + ft5406ts_methods, + sizeof(struct ft5406ts_softc), +}; + +DRIVER_MODULE(ft5406ts, ofwbus, ft5406ts_driver, ft5406ts_devclass, 0, 0); Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Sep 29 01:56:31 2016 (r306429) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Sep 29 02:14:08 2016 (r306430) @@ -6,6 +6,7 @@ arm/broadcom/bcm2835/bcm2835_cpufreq.c arm/broadcom/bcm2835/bcm2835_dma.c standard arm/broadcom/bcm2835/bcm2835_fb.c optional sc arm/broadcom/bcm2835/bcm2835_fbd.c optional vt +arm/broadcom/bcm2835/bcm2835_ft5406.c optional evdev bcm2835_ft5406 arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio arm/broadcom/bcm2835/bcm2835_intr.c standard arm/broadcom/bcm2835/bcm2835_machdep.c standard Modified: head/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Thu Sep 29 01:56:31 2016 (r306429) +++ head/sys/boot/fdt/dts/arm/rpi.dts Thu Sep 29 02:14:08 2016 (r306430) @@ -322,6 +322,11 @@ broadcom,depth = <0>; /* Set by VideoCore */ }; + rpi_ft5406 { + compatible = "rpi,rpi-ft5406"; + status = "okay"; + }; + leds { compatible = "gpio-leds"; Modified: head/sys/boot/fdt/dts/arm/rpi2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi2.dts Thu Sep 29 01:56:31 2016 (r306429) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Thu Sep 29 02:14:08 2016 (r306430) @@ -337,6 +337,11 @@ broadcom,depth = <0>; /* Set by VideoCore */ }; + rpi_ft5406 { + compatible = "rpi,rpi-ft5406"; + status = "okay"; + }; + leds { compatible = "gpio-leds"; From owner-svn-src-all@freebsd.org Thu Sep 29 04:53: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 548BFC00B60; Thu, 29 Sep 2016 04:53:22 +0000 (UTC) (envelope-from sephe@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 0BCB5D6; Thu, 29 Sep 2016 04:53:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T4rLlX017302; Thu, 29 Sep 2016 04:53:21 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T4rLLg017301; Thu, 29 Sep 2016 04:53:21 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290453.u8T4rLLg017301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 04:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306431 - head/sys/dev/hyperv/netvsc 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.23 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: Thu, 29 Sep 2016 04:53:22 -0000 Author: sephe Date: Thu Sep 29 04:53:21 2016 New Revision: 306431 URL: https://svnweb.freebsd.org/changeset/base/306431 Log: hyperv/hn: Move TX tasks' draining into hn_suspend(). This prepares to consolidate hn_stop() and netvsc_detach(). MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8055 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 02:14:08 2016 (r306430) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 04:53:21 2016 (r306431) @@ -334,7 +334,6 @@ static void hn_fixup_tx_data(struct hn_s static void hn_destroy_tx_data(struct hn_softc *); static void hn_start_taskfunc(void *, int); static void hn_start_txeof_taskfunc(void *, int); -static void hn_stop_tx_tasks(struct hn_softc *); static int hn_encap(struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); static int hn_create_rx_data(struct hn_softc *sc, int); static void hn_destroy_rx_data(struct hn_softc *sc); @@ -757,8 +756,6 @@ netvsc_detach(device_t dev) hn_synth_detach(sc); HN_UNLOCK(sc); - hn_stop_tx_tasks(sc); - ifmedia_removeall(&sc->hn_media); hn_destroy_rx_data(sc); hn_destroy_tx_data(sc); @@ -2971,19 +2968,6 @@ hn_start_txeof_taskfunc(void *xtxr, int mtx_unlock(&txr->hn_tx_lock); } -static void -hn_stop_tx_tasks(struct hn_softc *sc) -{ - int i; - - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; - - taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task); - taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task); - } -} - static int hn_xmit(struct hn_tx_ring *txr, int len) { @@ -3571,6 +3555,9 @@ hn_suspend(struct hn_softc *sc) /* Wait for all pending sends to finish. */ while (hn_tx_ring_pending(txr)) pause("hnwtx", 1 /* 1 tick */); + + taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task); + taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task); } /* From owner-svn-src-all@freebsd.org Thu Sep 29 05:01: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 DEA39C00C2E; Thu, 29 Sep 2016 05:01:21 +0000 (UTC) (envelope-from sephe@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 B31F9358; Thu, 29 Sep 2016 05:01:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T51Kv8018338; Thu, 29 Sep 2016 05:01:20 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T51KJF018337; Thu, 29 Sep 2016 05:01:20 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290501.u8T51KJF018337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 05:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306432 - head/sys/dev/hyperv/netvsc 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.23 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: Thu, 29 Sep 2016 05:01:22 -0000 Author: sephe Date: Thu Sep 29 05:01:20 2016 New Revision: 306432 URL: https://svnweb.freebsd.org/changeset/base/306432 Log: hyperv/hn: Consolidate hn_init() and hn_stop() MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8056 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 04:53:21 2016 (r306431) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 05:01:20 2016 (r306432) @@ -349,6 +349,8 @@ static void hn_synth_detach(struct hn_so static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_suspend(struct hn_softc *); static void hn_resume(struct hn_softc *); +static void hn_rx_drain(struct vmbus_channel *); +static void hn_tx_resume(struct hn_softc *, int); static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_nvs_handle_notify(struct hn_softc *sc, @@ -1773,25 +1775,19 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, static void hn_stop(struct hn_softc *sc) { - struct ifnet *ifp; + struct ifnet *ifp = sc->hn_ifp; int i; HN_LOCK_ASSERT(sc); - ifp = sc->hn_ifp; - - if (bootverbose) - printf(" Closing Device ...\n"); + /* Clear RUNNING bit _before_ hn_suspend() */ + atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); + hn_suspend(sc); - atomic_clear_int(&ifp->if_drv_flags, - (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)); + /* Clear OACTIVE bit. */ + atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); for (i = 0; i < sc->hn_tx_ring_inuse; ++i) sc->hn_tx_ring[i].hn_oactive = 0; - - if_link_state_change(ifp, LINK_STATE_DOWN); - - /* Disable RX by clearing RX filter. */ - hn_rndis_set_rxfilter(sc, 0); } /* @@ -1855,27 +1851,29 @@ do_sched: static void hn_init_locked(struct hn_softc *sc) { - struct ifnet *ifp; - int ret, i; + struct ifnet *ifp = sc->hn_ifp; + int i; HN_LOCK_ASSERT(sc); - ifp = sc->hn_ifp; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; - } /* TODO: add hn_rx_filter */ - ret = hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); - if (ret != 0) - return; + hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); + /* Clear OACTIVE bit. */ atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); for (i = 0; i < sc->hn_tx_ring_inuse; ++i) sc->hn_tx_ring[i].hn_oactive = 0; + /* Clear TX 'suspended' bit. */ + hn_tx_resume(sc, sc->hn_tx_ring_inuse); + + /* Everything is ready; unleash! */ atomic_set_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); + + /* TODO: check RNDIS link status. */ if_link_state_change(ifp, LINK_STATE_UP); } @@ -3588,9 +3586,25 @@ hn_suspend(struct hn_softc *sc) } static void +hn_tx_resume(struct hn_softc *sc, int tx_ring_cnt) +{ + int i; + + KASSERT(tx_ring_cnt <= sc->hn_tx_ring_cnt, + ("invalid TX ring count %d", tx_ring_cnt)); + + for (i = 0; i < tx_ring_cnt; ++i) { + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_suspended = 0; + mtx_unlock(&txr->hn_tx_lock); + } +} + +static void hn_resume(struct hn_softc *sc) { - struct hn_tx_ring *txr; int i; HN_LOCK_ASSERT(sc); @@ -3605,13 +3619,7 @@ hn_resume(struct hn_softc *sc) * Make sure to clear suspend status on "all" TX rings, * since hn_tx_ring_inuse can be changed after hn_suspend(). */ - for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { - txr = &sc->hn_tx_ring[i]; - - mtx_lock(&txr->hn_tx_lock); - txr->hn_suspended = 0; - mtx_unlock(&txr->hn_tx_lock); - } + hn_tx_resume(sc, sc->hn_tx_ring_cnt); if (!hn_use_if_start) { /* @@ -3626,7 +3634,8 @@ hn_resume(struct hn_softc *sc) * Kick start TX. */ for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - txr = &sc->hn_tx_ring[i]; + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + /* * Use txeof task, so that any pending oactive can be * cleared properly. From owner-svn-src-all@freebsd.org Thu Sep 29 05:13:59 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 A184CC0131D; Thu, 29 Sep 2016 05:13:59 +0000 (UTC) (envelope-from sephe@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 6193AF51; Thu, 29 Sep 2016 05:13:59 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T5DwKB025088; Thu, 29 Sep 2016 05:13:58 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T5DwLr025086; Thu, 29 Sep 2016 05:13:58 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290513.u8T5DwLr025086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 05:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306433 - head/sys/dev/hyperv/netvsc 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.23 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: Thu, 29 Sep 2016 05:13:59 -0000 Author: sephe Date: Thu Sep 29 05:13:58 2016 New Revision: 306433 URL: https://svnweb.freebsd.org/changeset/base/306433 Log: hyperv/hn: Don't set HASHVAL pktinfo for NDIS < 6.30 This unbreaks packet sending on WS2008R2. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8057 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Sep 29 05:01:20 2016 (r306432) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Sep 29 05:13:58 2016 (r306433) @@ -168,6 +168,7 @@ struct hn_tx_ring { struct buf_ring *hn_mbuf_br; int hn_oactive; int hn_tx_idx; + int hn_tx_flags; struct mtx hn_tx_lock; struct hn_softc *hn_sc; @@ -194,10 +195,10 @@ struct hn_tx_ring { struct hn_txdesc *hn_txdesc; bus_dma_tag_t hn_tx_rndis_dtag; struct sysctl_oid *hn_tx_sysctl_tree; - int hn_tx_flags; } __aligned(CACHE_LINE_SIZE); #define HN_TX_FLAG_ATTACHED 0x1 +#define HN_TX_FLAG_HASHVAL 0x2 /* support HASHVAL pktinfo */ /* * Device-specific softc structure Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 05:01:20 2016 (r306432) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 05:13:58 2016 (r306433) @@ -1006,14 +1006,16 @@ hn_encap(struct hn_tx_ring *txr, struct pkt->rm_pktinfooffset = sizeof(*pkt); pkt->rm_pktinfolen = 0; - /* - * Set the hash value for this packet, so that the host could - * dispatch the TX done event for this packet back to this TX - * ring's channel. - */ - pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, - HN_NDIS_HASH_VALUE_SIZE, HN_NDIS_PKTINFO_TYPE_HASHVAL); - *pi_data = txr->hn_tx_idx; + if (txr->hn_tx_flags & HN_TX_FLAG_HASHVAL) { + /* + * Set the hash value for this packet, so that the host could + * dispatch the TX done event for this packet back to this TX + * ring's channel. + */ + pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, + HN_NDIS_HASH_VALUE_SIZE, HN_NDIS_PKTINFO_TYPE_HASHVAL); + *pi_data = txr->hn_tx_idx; + } if (m_head->m_flags & M_VLANTAG) { pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, @@ -2920,6 +2922,12 @@ hn_fixup_tx_data(struct hn_softc *sc) for (i = 0; i < sc->hn_tx_ring_cnt; ++i) sc->hn_tx_ring[i].hn_csum_assist = csum_assist; + + if (sc->hn_ndis_ver >= HN_NDIS_VERSION_6_30) { + /* Support HASHVAL pktinfo on TX path. */ + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) + sc->hn_tx_ring[i].hn_tx_flags |= HN_TX_FLAG_HASHVAL; + } } static void From owner-svn-src-all@freebsd.org Thu Sep 29 05:37:46 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 8F935C019F5; Thu, 29 Sep 2016 05:37:46 +0000 (UTC) (envelope-from kevlo@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 623BC1C8F; Thu, 29 Sep 2016 05:37:46 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T5bjqR032928; Thu, 29 Sep 2016 05:37:45 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T5bjYW032926; Thu, 29 Sep 2016 05:37:45 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609290537.u8T5bjYW032926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 29 Sep 2016 05:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306434 - in head/sys: contrib/ipfilter/netinet net 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.23 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: Thu, 29 Sep 2016 05:37:46 -0000 Author: kevlo Date: Thu Sep 29 05:37:45 2016 New Revision: 306434 URL: https://svnweb.freebsd.org/changeset/base/306434 Log: Remove the compatibility macro if_addrlist. Since if_addrlist is used only for ipfilter(4), add a macro if_addrlist in ip_compat.h. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D8059 Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/net/if_var.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 29 05:13:58 2016 (r306433) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 29 05:37:45 2016 (r306434) @@ -175,6 +175,7 @@ struct ether_addr { } while (0) # include # define GETKTIME(x) microtime((struct timeval *)x) +# define if_addrlist if_addrhead # include # include Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Sep 29 05:13:58 2016 (r306433) +++ head/sys/net/if_var.h Thu Sep 29 05:37:45 2016 (r306434) @@ -313,7 +313,6 @@ struct ifnet { }; /* for compatibility with other BSDs */ -#define if_addrlist if_addrhead #define if_list if_link #define if_name(ifp) ((ifp)->if_xname) From owner-svn-src-all@freebsd.org Thu Sep 29 06:19:46 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 B6826C00369; Thu, 29 Sep 2016 06:19:46 +0000 (UTC) (envelope-from eadler@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 7015325D; Thu, 29 Sep 2016 06:19:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T6Jj9K047904; Thu, 29 Sep 2016 06:19:45 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T6Jjfo047903; Thu, 29 Sep 2016 06:19:45 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201609290619.u8T6Jjfo047903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 29 Sep 2016 06:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306435 - 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.23 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: Thu, 29 Sep 2016 06:19:46 -0000 Author: eadler Date: Thu Sep 29 06:19:45 2016 New Revision: 306435 URL: https://svnweb.freebsd.org/changeset/base/306435 Log: callsign isn't required anymore Modified: head/.arcconfig Modified: head/.arcconfig ============================================================================== --- head/.arcconfig Thu Sep 29 05:37:45 2016 (r306434) +++ head/.arcconfig Thu Sep 29 06:19:45 2016 (r306435) @@ -1,5 +1,4 @@ { - "repository.callsign" : "S", "phabricator.uri" : "https://reviews.freebsd.org/", "history.immutable" : true } From owner-svn-src-all@freebsd.org Thu Sep 29 06:50: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 38F07C00B7D; Thu, 29 Sep 2016 06:50:01 +0000 (UTC) (envelope-from manu@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 16F95288; Thu, 29 Sep 2016 06:50:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T6o0ge058992; Thu, 29 Sep 2016 06:50:00 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T6o0fE058988; Thu, 29 Sep 2016 06:50:00 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609290650.u8T6o0fE058988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 29 Sep 2016 06:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306436 - in head/sys/arm: broadcom/bcm2835 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.23 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: Thu, 29 Sep 2016 06:50:01 -0000 Author: manu Date: Thu Sep 29 06:49:59 2016 New Revision: 306436 URL: https://svnweb.freebsd.org/changeset/base/306436 Log: RPI-B: Add support for MULTIDELAY 100 cycles per us seems accurate enough, at least it's better than the 200 value that was used before. Reviewed by: andrew, imp Differential Revision: https://reviews.freebsd.org/D8062 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c head/sys/arm/conf/RPI-B Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:19:45 2016 (r306435) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:49:59 2016 (r306436) @@ -129,7 +129,7 @@ static platform_method_t bcm2835_methods PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b", 0); +FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b", 100); #endif #ifdef SOC_BCM2836 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Thu Sep 29 06:19:45 2016 (r306435) +++ head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Thu Sep 29 06:49:59 2016 (r306436) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -101,6 +102,8 @@ static struct bcm_systimer_softc *bcm_sy static unsigned bcm_systimer_tc_get_timecount(struct timecounter *); +static delay_func bcm_systimer_delay; + static struct timecounter bcm_systimer_tc = { .tc_name = DEFAULT_TIMER_NAME, .tc_get_timecount = bcm_systimer_tc_get_timecount, @@ -113,6 +116,9 @@ static struct timecounter bcm_systimer_t static unsigned bcm_systimer_tc_get_timecount(struct timecounter *tc) { + if (bcm_systimer_sc == NULL) + return (0); + return bcm_systimer_tc_read_4(SYSTIMER_CLO); } @@ -147,7 +153,7 @@ restart: intr_restore(s); return (0); - } + } return (EINVAL); } @@ -167,7 +173,7 @@ bcm_systimer_intr(void *arg) struct systimer *st = (struct systimer *)arg; uint32_t cs; - cs = bcm_systimer_tc_read_4(SYSTIMER_CS); + cs = bcm_systimer_tc_read_4(SYSTIMER_CS); if ((cs & (1 << st->index)) == 0) return (FILTER_STRAY); @@ -254,6 +260,9 @@ bcm_systimer_attach(device_t dev) bcm_systimer_sc = sc; + if (device_get_unit(dev) == 0) + arm_set_delay(bcm_systimer_delay, sc); + bcm_systimer_tc.tc_frequency = DEFAULT_FREQUENCY; tc_init(&bcm_systimer_tc); @@ -276,19 +285,14 @@ static devclass_t bcm_systimer_devclass; DRIVER_MODULE(bcm_systimer, simplebus, bcm_systimer_driver, bcm_systimer_devclass, 0, 0); -void -DELAY(int usec) +static void +bcm_systimer_delay(int usec, void *arg) { + struct bcm_systimer_softc *sc; int32_t counts; uint32_t first, last; - if (bcm_systimer_sc == NULL) { - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - /* Prevent gcc from optimizing out the loop */ - cpufunc_nullop(); - return; - } + sc = (struct bcm_systimer_softc *) arg; /* Get the number of times to count */ counts = usec * (bcm_systimer_tc.tc_frequency / 1000000) + 1; Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Thu Sep 29 06:19:45 2016 (r306435) +++ head/sys/arm/conf/RPI-B Thu Sep 29 06:49:59 2016 (r306436) @@ -28,6 +28,7 @@ options INTRNG options SCHED_4BSD # 4BSD scheduler options PLATFORM +options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP From owner-svn-src-all@freebsd.org Thu Sep 29 06:54: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 E9C54C00D94; Thu, 29 Sep 2016 06:54:03 +0000 (UTC) (envelope-from manu@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 AC2C4927; Thu, 29 Sep 2016 06:54:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T6s2Ii062643; Thu, 29 Sep 2016 06:54:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T6s20u062639; Thu, 29 Sep 2016 06:54:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609290654.u8T6s20u062639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 29 Sep 2016 06:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306437 - in head/sys/arm: broadcom/bcm2835 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.23 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: Thu, 29 Sep 2016 06:54:04 -0000 Author: manu Date: Thu Sep 29 06:54:02 2016 New Revision: 306437 URL: https://svnweb.freebsd.org/changeset/base/306437 Log: RPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D8063 Added: head/sys/arm/broadcom/bcm2835/bcm2836_mp.h (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/conf/RPI2 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:49:59 2016 (r306436) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:54:02 2016 (r306437) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" @@ -139,6 +140,11 @@ static platform_method_t bcm2836_methods PLATFORMMETHOD(platform_late_init, bcm2835_late_init), PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, bcm2836_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, bcm2836_mp_setmaxid), +#endif + PLATFORMMETHOD_END, }; FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0); Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Thu Sep 29 06:49:59 2016 (r306436) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Thu Sep 29 06:54:02 2016 (r306437) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #ifdef DEBUG #define DPRINTF(fmt, ...) do { \ @@ -77,7 +80,7 @@ static bus_space_handle_t bs_periph; bus_space_write_4(fdtbus_bs_tag, bs_periph, (addr), (val)) void -platform_mp_setmaxid(void) +bcm2836_mp_setmaxid(platform_t plat) { DPRINTF("platform_mp_setmaxid\n"); @@ -90,7 +93,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +bcm2836_mp_start_ap(platform_t plat) { uint32_t val; int i, retry; Added: head/sys/arm/broadcom/bcm2835/bcm2836_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.h Thu Sep 29 06:54:02 2016 (r306437) @@ -0,0 +1,38 @@ +/*- + * 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 AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _BCM2836_MP_H_ +#define _BCM2836_MP_H_ + +void bcm2836_mp_setmaxid(platform_t plat); +void bcm2836_mp_start_ap(platform_t plat); + +#endif /* _BCM2836_MP_H_ */ Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Thu Sep 29 06:49:59 2016 (r306436) +++ head/sys/arm/conf/RPI2 Thu Sep 29 06:54:02 2016 (r306437) @@ -29,6 +29,7 @@ options INTRNG options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM +options PLATFORM_SMP # NFS root from boopt/dhcp #options BOOTP From owner-svn-src-all@freebsd.org Thu Sep 29 08:28: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 B5057C02803 for ; Thu, 29 Sep 2016 08:28:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::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 71E1F9A2 for ; Thu, 29 Sep 2016 08:28:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yw0-x234.google.com with SMTP id i129so44351508ywb.0 for ; Thu, 29 Sep 2016 01:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kDwLH2JN5v3xkbDK3SOxBV8FliBKF7Dl4A099UpyJ+M=; b=b4kGpVhT1RkNnExJtAaAPXzZsWUUd/cNYkVDtM5ZM0W3A2SN1URIb2JmDo4UchcERN SDPC+oGDjTcahFXRPM7Yg0EbVpQcIalvMER7j9QiO0dqQnS7/45ZVfRz/cTpYfqxdgax D46LEEpzTApkG0LfNFn05EEo82Dn7C2ACnoQWQoRo/oCkKfkw14X4DDCasRqHfK+lS94 gHO4zpKsdv0nEMKY/WMRcIkccLf7rsgCw/oYzhob+5Q3xrggK3iL+aJxAaThOMg+LqvF ZMmmvARuRPZKzmCNIsA23w9/qbMSrCcIaGbWjcf+nrx0dNJTIOcp8pE9ayfMqVfQtZAp MzIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kDwLH2JN5v3xkbDK3SOxBV8FliBKF7Dl4A099UpyJ+M=; b=O5Bewt9r43ob79U3lBgDGq2JCvYnFYwTZhFDYLfT87CexthiyclyQRLjkXjb4Bh6PM qEw+c77T8/mp+TTiQMVulnMKAYcg+1wwv23Rs1C3KQMnRZw8T5JMs4/QC/xh9WfKwhu/ RCuN9MOI9MaPnE633YWSYnY/0MBAVHrPl33Lbd2HndQq1WlW+FN5FiB3jSFwnM4Kxi50 1/dezfPprtnjW59Gr+WE7xXjbwHYedRbhgQu5BX/LtlHZKr8IxqIopRLXYQxu6dAtgg0 Cqh0QGQ5M8jtHGhXbV5JVFnwDQ71FmH0ZuqSkzAAyNYykxI+ulDZ+zSZLtn9yFPEHXpb NjCA== X-Gm-Message-State: AA6/9RlNLaTCoiYu0YygU7h4aSe85yVcIIbjRAC2yR4WNdXqY7ZF5ESDq/rTkd3pYpQQORhh X-Received: by 10.13.210.134 with SMTP id u128mr96166ywd.213.1475137736649; Thu, 29 Sep 2016 01:28:56 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-83.bltmmd.fios.verizon.net. [100.16.217.83]) by smtp.gmail.com with ESMTPSA id i5sm5124681ywg.54.2016.09.29.01.28.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2016 01:28:55 -0700 (PDT) Date: Thu, 29 Sep 2016 04:28:53 -0400 From: Shawn Webb To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306417 - head/usr.sbin/portsnap/portsnap Message-ID: <20160929082853.GA45358@mutt-hardenedbsd> References: <201609282122.u8SLMprw047702@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <201609282122.u8SLMprw047702@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 29 Sep 2016 08:28:57 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2016 at 09:22:51PM +0000, Ed Maste wrote: > Author: emaste > Date: Wed Sep 28 21:22:51 2016 > New Revision: 306417 > URL: https://svnweb.freebsd.org/changeset/base/306417 >=20 > Log: > portsnap: only move expected snapshot contents from snap/ to files/ > =20 > Previously it was possible to smuggle in addional files that would > be used by later portsnap runs. Now we only move those files expected > to be in the snapshot into files/ and require that there are no > unexpected files. > =20 > This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic > attacks against FreeBSD update components" anonymous gist. > =20 > Reported by: anonymous gist > Reviewed by: allanjude, delphij > MFC after: ASAP > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D8052 Hey Ed, Any plans to release a security announcement? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7NDCAAoJEGqEZY9SRW7u1DkQAI98F0TAngluIreMRL8V/r5k TdstrIvPVRs8zDa+8QTaHFS/TRrnFvaqhPNKV1vr4yyAcbZax+dDJzrDehLiA5nd j3HnS4vjHcUeAIHwMKfPb12IroJA2jvEWDLfBgXONm80dn8WFzt4tTnvLtTiAncH ZXdlNkzo5PO9VAcLDVKdCE0ijOxm5fkPuVjq22NFwqjn7ojtNzuzuIsthANmkug9 GAqaFUBV3RE2u1WdRjU+T2ywY/vgTMU6xdf0eGnTApFtXcjwZVT+k8jwBHmGKGfk XFIwEWH2yBR5mzQSsdBtwFUQjiZ/cQhIWABOclVUvrDUUu6hMpjmdhS8wcGXlc5C yPbd/Q6aViNE5rt0fCY6Lyi9LdeWnESQPeXq89WPuc/PuNdmTGg63jI0htJqHzZ9 dI6/mOdMrDewx0/YmnkrE+ruxCenEcr+ofHDuYRZahYr7N803k5/nsnLIr1B7hVn Mz91A4mQmcSzGqTYjKANROISkjXXWCABDtHeTNox2T71XfqoF7yJcyGvWOO1sUCH 9Goj/g+kjTTxjBNIUagbh9zKddk5OqE5CDwqS/EjpD5OBsDWRvl/mesCx9C2FwqZ bpetdzpPpuLAIiSnfuWq6OhCbH31ffjZfcF/De/LCmYYR3cF7+vBysDAZDrs3Kv8 RMbmmUDUD9JhPl5YWyH8 =nU1M -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-svn-src-all@freebsd.org Thu Sep 29 08:32: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 C548EC02991 for ; Thu, 29 Sep 2016 08:32:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (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 7D42FE89 for ; Thu, 29 Sep 2016 08:32:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yw0-x22f.google.com with SMTP id i129so43543842ywe.2 for ; Thu, 29 Sep 2016 01:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K2Wl3fYebj36dUrdyUcJntkdi+W153U9RjVDgIYqc7M=; b=yot3lDVIxXh61SZPEILcjhpxfmdGXtVMzoTuiD1Cwn4nSCufCkbu20onsde8Sw8lvB HX0MwjPN+gMciCyTVJKTuljptww1QAHcayFesJSsqyXLfU9rHE7FrR0pad4533aa2YxC k61cm3OlSi+ezhxDVm22k1ctm/Hl1+X0SSskwRdoi3mT6KQnN0MehuxiLKhQEnXTtzdA DShbDY+HJa/U3LJNo9vWZyFuR6ar2qahmCwD/mgAJgdL9p/SY6Z4lVKGHjKfZ2zuniJ2 NNzszTpFHetG1kCQAvy9KtGB7Ibg8kVRZWexRnGuIlJCklG2i9wmxMp9szFWrUOAAaKB qdbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K2Wl3fYebj36dUrdyUcJntkdi+W153U9RjVDgIYqc7M=; b=I+PIrcCIJNKLjmpzkdIVKgLPZQFIuW5K4FnhEqsECWKC1UWS64F3tdbWMa5fWce6W9 T+QWFrwQ0k48hzCE8VSZYpfQuwKUNfPV2Cz9Wvn4uYlm7iJMhqo3gaIB0q4PaaFhlyoI VBORojIV/XqoZKlLcy7/WwvR+hrHRbZ8r5ODTZQmzudSxeJ1fCcT/lRhV/vf6Q8Ng+3B cF7XKWuePpu+3Ru+ihsFF4yLOuWsb+kKqN/O/kA2FGgKCOH59QRDWmiAATTb48flrxQ9 9J9C02PuG3+/cDnpx052E+kwq99eSrva0PVy8/upQtP27kD3YD3LCb0RxQREmo42d8G1 C75w== X-Gm-Message-State: AA6/9Rlgk3j9VhTJqU3WSbPvbxaDwFwE3ESbgM/xxiMW00UuDUG/OwuVGokqyPd3m9vr1+d+ X-Received: by 10.129.92.215 with SMTP id q206mr121948ywb.8.1475137955745; Thu, 29 Sep 2016 01:32:35 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-83.bltmmd.fios.verizon.net. [100.16.217.83]) by smtp.gmail.com with ESMTPSA id c16sm5181173ywb.5.2016.09.29.01.32.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2016 01:32:34 -0700 (PDT) Date: Thu, 29 Sep 2016 04:32:32 -0400 From: Shawn Webb To: Martin Matuska Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305819 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests Message-ID: <20160929083232.GB45358@mutt-hardenedbsd> References: <201609142115.u8ELF1t1019804@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <201609142115.u8ELF1t1019804@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 29 Sep 2016 08:32:36 -0000 --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2016 at 09:15:01PM +0000, Martin Matuska wrote: > Author: mm > Date: Wed Sep 14 21:15:01 2016 > New Revision: 305819 > URL: https://svnweb.freebsd.org/changeset/base/305819 >=20 > Log: > MFV r305816: > Sync libarchive with vendor including important security fixes. > =20 > Issues fixed (FreeBSD): > PR #778: ACL error handling > Issue #745: Symlink check prefix optimization is too aggressive > Issue #746: Hard links with data can evade sandboxing restrictions > =20 > This update fixes the vulnerability #3 and vulnerability #4 as reported= in > "non-cryptanalytic attacks against FreeBSD update components". > https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f > =20 > Fix for vulnerability #2 has already been merged in r304989. > =20 > MFC after: 1 week > Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b8= 9c4f Hey Martin, Any plans to release a security announcement? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7NGfAAoJEGqEZY9SRW7uvuAP/1JlVp6UoUVvPeU06HAxL9rp lLPj7jrPAzM7huGv9DIipzQYeZ9RXZFRdaIPfPQE5DHxUWUsDyBaKcHQExlNfqwC mS4K68mt3uRFKRFLAF5kSigqhEnU2M3ZJ1bUFEhs4RSGvZDsbx3swbFLecIBd37r CJsDmRykqJrbFYvXSJUHqx9F9suslvv3awgcO7t5bUGNk4dL6NUuqcWMR09Kq5di 4FjMNzhXdUh+3uohY0rW45qbGfDJXZWwkFZShTTZYUgT4LlMFms8MaakcEMUC0AD va4nTcrr0qWd+9bmlGHb7JXflevzHQQHV35aFEqrfG7fNeluZ5LUOh5RpzradXT8 t+kS9pD58DuHzjA30Fn8wqKw1/iJf3AKrVZ2VICe47vDGSpS+GZfjbuVPK8nhCEb d09/AI+DULC+aDtYLJ9oWajg+CO1lwlKUROw15tLIiVcTjRG8IA2fLWN3jm9imGW 9bKqXlIUKOmOtWGTxcGak/0NkGAH/XWVBMH0Zkz44L8qw7dVunyL6CdMV5LGGoOg dZXMiP7+9iqy3zm7XtHoJqvH0ie92HKrbGfguAcApZFofemR7P0oL9U00shMUEUk F71s15BepQvqUcSOtpxuY2iib4mQPhL79GAFdilQwiHg1fU5gLhZyILkPdSPxsnj /8I5Q5CKBGzRy+dQsxht =XJbn -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX-- From owner-svn-src-all@freebsd.org Thu Sep 29 08:34: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 28F22C02A25 for ; Thu, 29 Sep 2016 08:34:02 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (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 D60A2B0 for ; Thu, 29 Sep 2016 08:34:01 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yw0-x230.google.com with SMTP id g192so44406607ywh.1 for ; Thu, 29 Sep 2016 01:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yhLNLCDmifND9hvXBvF+gvVRtxwB3ju7G89O3Wt63do=; b=dvQCWdVKkbACxgtFciEm9SNUwzQJ+wmjrGEWnlJwgGIh0pCBP3iJ7clmqoYEYmGaHm CdYMbDp+H5tTE/QFMI56G4MctjGvTN+T9aOa+2dm9nSEnkUIyWs7R3HyqZw9DG+/dqSF JDVdzOBCez3ZfWkzttMyvauK5iAyapQqMGhNMf1AUI9QQotT3mYGxSMdvdQS1TKL518L 1Av8YlqgDFy2wU6oIWta9/HnFzSxXqR5xl3eOSrWaugpgsTOYqoI/jl7S93LAS5EfNoJ YdAViHLKjQnMd/f+Sqt1HlUcK8wywHHBcnlh5jrXB0+TDlaSChNCz89xwBC5jBc+e1iI R/iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yhLNLCDmifND9hvXBvF+gvVRtxwB3ju7G89O3Wt63do=; b=RWgx9PLrhrghDSS0uedwqyzVgRZj0Nv2HArWdpc18VdQrmF/ydfDi+CNv7x3rSsZS5 n1RyNmI3Ov4AQF9N8MOoGmaSQfspYcvd+h/s/Gnrk/viqRku7zt7aWWNfPFmtV5GRSCH A2ODhzFDqx3klorcDPFuU+0s3f3ZYeb6BXe1SwWxv4f9vNIDhnZY7LRCcq0L7H8yBD4T 0/IrADPwa3PEnqAowYzuEfs94TmaaGYiKMbrHfb1LTYZmMwsYiycgNbXNkJhEjFfUi+z B6e8p2PsZbPrRIWKjZuHcMN7FaKl8qyOlxew7mEfxxJKyh+tNwBdsuABEaF/UwF6v6eB et5Q== X-Gm-Message-State: AA6/9RmL3W3SPGW8zpf9yTkexS+RJyHq+VQ83bSgy0azwz0WgBzNqOumAhCCXXOgyJFgq7Xw X-Received: by 10.13.229.69 with SMTP id o66mr120341ywe.286.1475138041131; Thu, 29 Sep 2016 01:34:01 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-83.bltmmd.fios.verizon.net. [100.16.217.83]) by smtp.gmail.com with ESMTPSA id g123sm4845060ywd.30.2016.09.29.01.33.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2016 01:34:00 -0700 (PDT) Date: Thu, 29 Sep 2016 04:33:57 -0400 From: Shawn Webb To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305486 - head/usr.bin/bsdiff/bspatch Message-ID: <20160929083357.GC45358@mutt-hardenedbsd> References: <201609061900.u86J0bd4076628@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <201609061900.u86J0bd4076628@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 29 Sep 2016 08:34:02 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 06, 2016 at 07:00:37PM +0000, Ed Maste wrote: > Author: emaste > Date: Tue Sep 6 19:00:37 2016 > New Revision: 305486 > URL: https://svnweb.freebsd.org/changeset/base/305486 >=20 > Log: > bspatch: add sanity checks on sizes to avoid integer overflow > =20 > Note that this introduces an explicit 2GB limit, but this was already > implicit in variable and function argument types. > =20 > This is based on the "non-cryptanalytic attacks against freebsd > update components" anonymous gist. Further refinement is planned. > =20 > Reviewed by: allanjude, cem, kib > Obtained from: anonymous gist > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D7619 Hey Ed, Any plans to release a security announcement? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7NH1AAoJEGqEZY9SRW7urpYP/A4gXIr9fqa0TwRaJ1n2deI5 Uhu/0Q98eyx0kF8gWNgBgBFE+oCoNrLe9G2vBA++x8r7vGpAVahlLaIm9x2JZHXB DrV5c5SumYwr17nW83ce4H8NItTam6mRqC5xuA3yBF5SWTOgf/lWtfhdXW73VBT0 aVz3dwXojWn4cDMtOlDGh7zMZ0Utc3bvORFHXRZkePDsRtSRB3OaDaK+ruDJsbsP 3HOugXJ4hNb+cOReU3kpDxIzqk0Tr0k8xStruzqx2fWVqNAmJDhVwzmZcYG7mX79 CjzLjjnXRpKZuX/4uDpXQHXyhVFKLtozbMIlNbwN8Eiy1g9mW9Hb06t3AcSQPaO+ yoldG+kRhzkQnnE5GpJTjKUzVPmEyBmCJHTIURMjQpEfipkQZVPjo5Bl/Lkm9Zkl 06NRMjm0r9LuD7aG24wtFlLI1TeFtcHZrXao3Iun6WEIzgvpL6+NAzDuyCLklZHv DjfeBJp5wSiZGRsDj8hz0d95Zo9KJ/e9w1cSTMIeH3fjDCGex7ho509Y/2GxcZBs m784cUXwMuWQ03D7y1Olena4QMfT23Vyv4WEcNLu4zRcO8od/d4R7lX3WzJnR77L sRRJrUw4Kj1Kq304vMJsQ0vLXYyT7opewySBTl3L2rRSkW1gNDV0+H+IpUQ5g9pT Ekxrl//+R21y86WMtFof =lagG -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT-- From owner-svn-src-all@freebsd.org Thu Sep 29 08:49:13 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 454B0C00040; Thu, 29 Sep 2016 08:49:13 +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 16616985; Thu, 29 Sep 2016 08:49:13 +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 u8T8nC9H003679; Thu, 29 Sep 2016 08:49:12 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T8nCdc003678; Thu, 29 Sep 2016 08:49:12 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609290849.u8T8nCdc003678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 29 Sep 2016 08:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306439 - head/sys/arm/include 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.23 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: Thu, 29 Sep 2016 08:49:13 -0000 Author: andrew Date: Thu Sep 29 08:49:12 2016 New Revision: 306439 URL: https://svnweb.freebsd.org/changeset/base/306439 Log: Remove struct platform_data, it was never used. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/include/platformvar.h Modified: head/sys/arm/include/platformvar.h ============================================================================== --- head/sys/arm/include/platformvar.h Thu Sep 29 08:32:19 2016 (r306438) +++ head/sys/arm/include/platformvar.h Thu Sep 29 08:49:12 2016 (r306439) @@ -70,10 +70,6 @@ struct platform_kobj { struct platform_class *cls; }; -struct platform_data { - int delay_count; -}; - typedef struct platform_kobj *platform_t; typedef struct platform_class platform_def_t; #define platform_method_t kobj_method_t @@ -100,11 +96,6 @@ extern platform_method_t fdt_platform_me #define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay == 0) #endif -#define PLATFORM_DATA(NAME, delay) \ -static struct platform_data NAME ## _platc = { \ - .delay_count = delay; \ -}; - #define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible, \ delay) \ FDT_PLATFORM_CTASSERT(delay); \ From owner-svn-src-all@freebsd.org Thu Sep 29 09:16: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 ACDC0C012DA; Thu, 29 Sep 2016 09:16:03 +0000 (UTC) (envelope-from br@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 7CC28EE7; Thu, 29 Sep 2016 09:16:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T9G2tT015402; Thu, 29 Sep 2016 09:16:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T9G2ZR015401; Thu, 29 Sep 2016 09:16:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609290916.u8T9G2ZR015401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 29 Sep 2016 09:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306440 - head/contrib/atf/atf-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.23 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: Thu, 29 Sep 2016 09:16:03 -0000 Author: br Date: Thu Sep 29 09:16:02 2016 New Revision: 306440 URL: https://svnweb.freebsd.org/changeset/base/306440 Log: Fix conversion from C++ std::string into C const char *. This fixes operation on MIPS64EB with GCC 4.2.1. Reviewed by: jmmv Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7952 Modified: head/contrib/atf/atf-sh/atf-check.cpp Modified: head/contrib/atf/atf-sh/atf-check.cpp ============================================================================== --- head/contrib/atf/atf-sh/atf-check.cpp Thu Sep 29 08:49:12 2016 (r306439) +++ head/contrib/atf/atf-sh/atf-check.cpp Thu Sep 29 09:16:02 2016 (r306440) @@ -346,9 +346,10 @@ std::auto_ptr< atf::check::check_result execute_with_shell(char* const* argv) { const std::string cmd = flatten_argv(argv); + const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL); const char* sh_argv[4]; - sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str(); + sh_argv[0] = shell.c_str(); sh_argv[1] = "-c"; sh_argv[2] = cmd.c_str(); sh_argv[3] = NULL; From owner-svn-src-all@freebsd.org Thu Sep 29 10:38: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 2AE3BC017D7; Thu, 29 Sep 2016 10:38: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 E19B11263; Thu, 29 Sep 2016 10:38: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 u8TAcLo6045156; Thu, 29 Sep 2016 10:38:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TAcLfO045154; Thu, 29 Sep 2016 10:38:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291038.u8TAcLfO045154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 10:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306441 - in head: share/man/man9 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.23 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: Thu, 29 Sep 2016 10:38:22 -0000 Author: hselasky Date: Thu Sep 29 10:38:20 2016 New Revision: 306441 URL: https://svnweb.freebsd.org/changeset/base/306441 Log: While draining a timeout task prevent the taskqueue_enqueue_timeout() function from restarting the timer. Commonly taskqueue_enqueue_timeout() is called from within the task function itself without any checks for teardown. Then it can happen the timer stays active after the return of taskqueue_drain_timeout(), because the timeout and task is drained separately. This patch factors out the teardown flag into the timeout task itself, allowing existing code to stay as-is instead of applying a teardown flag to each and every of the timeout task consumers. Add assert to taskqueue_drain_timeout() which prevents parallel execution on the same timeout task. Update manual page documenting the return value of taskqueue_enqueue_timeout(). Differential Revision: https://reviews.freebsd.org/D8012 Reviewed by: kib, trasz MFC after: 1 week Modified: head/share/man/man9/taskqueue.9 head/sys/kern/subr_taskqueue.c Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Thu Sep 29 09:16:02 2016 (r306440) +++ head/share/man/man9/taskqueue.9 Thu Sep 29 10:38:20 2016 (r306441) @@ -223,6 +223,8 @@ Otherwise, the task is scheduled for enq after the absolute value of .Va ticks is passed. +This function will return -1 if the queue is being drained. +Otherwise the number of pending calls will be returned. .Pp The .Fn taskqueue_cancel Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Thu Sep 29 09:16:02 2016 (r306440) +++ head/sys/kern/subr_taskqueue.c Thu Sep 29 10:38:20 2016 (r306441) @@ -81,6 +81,7 @@ struct taskqueue { #define TQ_FLAGS_UNLOCKED_ENQUEUE (1 << 2) #define DT_CALLOUT_ARMED (1 << 0) +#define DT_DRAIN_IN_PROGRESS (1 << 1) #define TQ_LOCK(tq) \ do { \ @@ -299,7 +300,11 @@ taskqueue_enqueue_timeout(struct taskque KASSERT(!queue->tq_spin, ("Timeout for spin-queue")); timeout_task->q = queue; res = timeout_task->t.ta_pending; - if (ticks == 0) { + if (timeout_task->f & DT_DRAIN_IN_PROGRESS) { + /* Do nothing */ + TQ_UNLOCK(queue); + res = -1; + } else if (ticks == 0) { taskqueue_enqueue_locked(queue, &timeout_task->t); /* The lock is released inside. */ } else { @@ -559,8 +564,24 @@ taskqueue_drain_timeout(struct taskqueue struct timeout_task *timeout_task) { + /* + * Set flag to prevent timer from re-starting during drain: + */ + TQ_LOCK(queue); + KASSERT((timeout_task->f & DT_DRAIN_IN_PROGRESS) == 0, + ("Drain already in progress")); + timeout_task->f |= DT_DRAIN_IN_PROGRESS; + TQ_UNLOCK(queue); + callout_drain(&timeout_task->c); taskqueue_drain(queue, &timeout_task->t); + + /* + * Clear flag to allow timer to re-start: + */ + TQ_LOCK(queue); + timeout_task->f &= ~DT_DRAIN_IN_PROGRESS; + TQ_UNLOCK(queue); } static void From owner-svn-src-all@freebsd.org Thu Sep 29 11:13: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 E2A1EC0223D; Thu, 29 Sep 2016 11:13:52 +0000 (UTC) (envelope-from mmel@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 B3B51777; Thu, 29 Sep 2016 11:13:52 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TBDp5p060109; Thu, 29 Sep 2016 11:13:51 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TBDppi060107; Thu, 29 Sep 2016 11:13:51 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291113.u8TBDppi060107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 11:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306442 - in head/sys/arm: conf nvidia/tegra124 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.23 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: Thu, 29 Sep 2016 11:13:53 -0000 Author: mmel Date: Thu Sep 29 11:13:51 2016 New Revision: 306442 URL: https://svnweb.freebsd.org/changeset/base/306442 Log: TEGRA: Add support for MULTIDELAY option. Modified: head/sys/arm/conf/TEGRA124 head/sys/arm/nvidia/tegra124/tegra124_machdep.c Modified: head/sys/arm/conf/TEGRA124 ============================================================================== --- head/sys/arm/conf/TEGRA124 Thu Sep 29 10:38:20 2016 (r306441) +++ head/sys/arm/conf/TEGRA124 Thu Sep 29 11:13:51 2016 (r306442) @@ -26,6 +26,7 @@ ident TEGRA124 options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC options PLATFORM_SMP +options MULTIDELAY options SMP # Enable multiple cores options LINUX_BOOT_ABI Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Thu Sep 29 10:38:20 2016 (r306441) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Thu Sep 29 11:13:51 2016 (r306442) @@ -153,4 +153,4 @@ static platform_method_t tegra124_method PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(tegra124, "Nvidia Jetson-TK1", 0, "nvidia,jetson-tk1", 0); +FDT_PLATFORM_DEF(tegra124, "Nvidia Jetson-TK1", 0, "nvidia,jetson-tk1", 120); From owner-svn-src-all@freebsd.org Thu Sep 29 11:18: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 C1B28C022DC; Thu, 29 Sep 2016 11:18:49 +0000 (UTC) (envelope-from jch@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 92F10931; Thu, 29 Sep 2016 11:18:49 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TBImtA060489; Thu, 29 Sep 2016 11:18:48 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TBIm8r060488; Thu, 29 Sep 2016 11:18:48 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201609291118.u8TBIm8r060488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Thu, 29 Sep 2016 11:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306443 - 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.23 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: Thu, 29 Sep 2016 11:18:49 -0000 Author: jch Date: Thu Sep 29 11:18:48 2016 New Revision: 306443 URL: https://svnweb.freebsd.org/changeset/base/306443 Log: Fix an issue with accept_filter introduced with r261242: As a side effect of r261242 when using accept_filter the first call to soisconnected() is done earlier in tcp_input() instead of tcp_do_segment() context. Restore the expected behaviour. Note: This call to soisconnected() seems to be extraneous in all cases (with or without accept_filter). Will be addressed in a separate commit. PR: 212920 Reported by: Alexey Tested by: Alexey, jch Sponsored by: Verisign, Inc. MFC after: 1 week Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Thu Sep 29 11:13:51 2016 (r306442) +++ head/sys/netinet/tcp_syncache.c Thu Sep 29 11:18:48 2016 (r306443) @@ -918,7 +918,9 @@ syncache_socket(struct syncache *sc, str tp->t_keepcnt = sototcpcb(lso)->t_keepcnt; tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); - soisconnected(so); + if ((so->so_options & SO_ACCEPTFILTER) == 0) { + soisconnected(so); + } TCPSTAT_INC(tcps_accepts); return (so); From owner-svn-src-all@freebsd.org Thu Sep 29 11:23: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 9C8BEC02570 for ; Thu, 29 Sep 2016 11:23:17 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 32680DF9 for ; Thu, 29 Sep 2016 11:23:17 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x22b.google.com with SMTP id w72so5703134wmf.0 for ; Thu, 29 Sep 2016 04:23:17 -0700 (PDT) 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:from:date:message-id:subject:to :cc; bh=OwA3IYlraljbMdmIo/aV3Fr8EuBFee4M30sCAU8nz/8=; b=vM5PKkFwmyZfKppJU7j6HdnKvQYl1Sj+WaCdAFcSWZFAehZU67z4o7MUWoZ13Eozi5 2XIUO1vM7hMceA+Mgeu6/HD1q6dp4wQJW/Qwq4BV+3MA7QUzTtH5QTBX1smWI8OZz/it d/HWkfDVQYFZm3v9vvsA+iCpTsGr7+0SdbOu/k82LVDc4mPzMlv32k09cAydqMMKmNXI TyDZq8EEwd5Eqp/sf8MNkFQD8e9ErviRSxGuZT80jRVzQgE1MJyJVXFlSQu5Fp0jHt6y lf1x9CwdSLdcyxTxHr90LFZGmtL8gdaacI/yEJk2h3HyzHENR1STiSvDYAO0pkGJKTcd mj1g== 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:from:date :message-id:subject:to:cc; bh=OwA3IYlraljbMdmIo/aV3Fr8EuBFee4M30sCAU8nz/8=; b=bTssnZKxV9oRekv08nv6/OOHwCbq+x2TZJdomu3/LXFycuZORfqn+eG6lLVTzzyeyv hxKC8IJDMbXLJMgU98+4MRusN5GC3yc0nL9dz73Dd4hZHneiGaJnJs7yDEyZlO73jeNX f5RBzxfhIq+CMzxWMiwAz15BE/rQfXyDHHf26bWVC7fjBwFE/Ic6Scn0CnQTA5PSPN0E S9ulIOP9KGPmRn1wbqly6RGuBiHsxrS+jylUSXeWB5nL/Udclj5IbSS8knR/9jGNrlAx XXpbehkGVJKlCJ6xEnAR/S4S5lYNoRymlKCaHPL7iOdcx6SLo/7udTp0m7Xai8aLcSaN uJMg== X-Gm-Message-State: AA6/9Rl7F58jvfjevMpQbb3+eVjUbe6XLn84xEX2GST6e/m3gMVwujDrrHY2hfyiw/FK3TcFCAXzEerYeALKGy1U X-Received: by 10.28.214.83 with SMTP id n80mr12280979wmg.121.1475148195606; Thu, 29 Sep 2016 04:23:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.139.208 with HTTP; Thu, 29 Sep 2016 04:23:15 -0700 (PDT) In-Reply-To: <20160929083232.GB45358@mutt-hardenedbsd> References: <201609142115.u8ELF1t1019804@repo.freebsd.org> <20160929083232.GB45358@mutt-hardenedbsd> From: Oliver Pinter Date: Thu, 29 Sep 2016 13:23:15 +0200 Message-ID: Subject: Re: svn commit: r305819 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests To: Shawn Webb Cc: Martin Matuska , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 29 Sep 2016 11:23:17 -0000 On Thursday, September 29, 2016, Shawn Webb wrote: > On Wed, Sep 14, 2016 at 09:15:01PM +0000, Martin Matuska wrote: > > Author: mm > > Date: Wed Sep 14 21:15:01 2016 > > New Revision: 305819 > > URL: https://svnweb.freebsd.org/changeset/base/305819 > > > > Log: > > MFV r305816: > > Sync libarchive with vendor including important security fixes. > > > > Issues fixed (FreeBSD): > > PR #778: ACL error handling > > Issue #745: Symlink check prefix optimization is too aggressive > > Issue #746: Hard links with data can evade sandboxing restrictions > > > > This update fixes the vulnerability #3 and vulnerability #4 as > reported in > > "non-cryptanalytic attacks against FreeBSD update components". > > https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f > > > > Fix for vulnerability #2 has already been merged in r304989. > > > > MFC after: 1 week > > Security: http://gist.github.com/anonymous/ > e48209b03f1dd9625a992717e7b89c4f > > Hey Martin, > > Any plans to release a security announcement? > > I expect that at the same time, as 11.0-RELEASE is announced. It would be logical. > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > From owner-svn-src-all@freebsd.org Thu Sep 29 12:25: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 8AED9C02E35; Thu, 29 Sep 2016 12:25:05 +0000 (UTC) (envelope-from mmel@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 5B2D57E9; Thu, 29 Sep 2016 12:25:05 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TCP4Nl087229; Thu, 29 Sep 2016 12:25:04 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TCP4SB087228; Thu, 29 Sep 2016 12:25:04 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291225.u8TCP4SB087228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 12:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306444 - head/sys/arm/nvidia/tegra124 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.23 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: Thu, 29 Sep 2016 12:25:05 -0000 Author: mmel Date: Thu Sep 29 12:25:04 2016 New Revision: 306444 URL: https://svnweb.freebsd.org/changeset/base/306444 Log: TEGRA: Don't include files already included by system or arch configs. Modified: head/sys/arm/nvidia/tegra124/files.tegra124 Modified: head/sys/arm/nvidia/tegra124/files.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 11:18:48 2016 (r306443) +++ head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 12:25:04 2016 (r306444) @@ -1,12 +1,6 @@ # $FreeBSD$ # -# Standard ARM support. -# -kern/kern_clocksource.c standard -dev/ofw/ofw_cpu.c optional fdt - -# # Standard tegra124 devices and support. # arm/nvidia/tegra124/tegra124_machdep.c standard From owner-svn-src-all@freebsd.org Thu Sep 29 12:50: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 C3AFDBEC405; Thu, 29 Sep 2016 12:50:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 330952D8; Thu, 29 Sep 2016 12:50:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA17145; Thu, 29 Sep 2016 15:50:10 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bpamv-00001s-V1; Thu, 29 Sep 2016 15:50:09 +0300 Subject: Re: svn commit: r306425 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201609290000.u8T00bYQ004671@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 29 Sep 2016 15:49:13 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609290000.u8T00bYQ004671@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 29 Sep 2016 12:50:18 -0000 On 29/09/2016 03:00, Alexander Motin wrote: > Author: mav > Date: Thu Sep 29 00:00:37 2016 > New Revision: 306425 > URL: https://svnweb.freebsd.org/changeset/base/306425 > > Log: > MFV r306423: 7402 Create tunable to ignore hole_birth feature > > Until we can resolve the numerous hole_birth bugs that have cropped up > recently, and come up with a way going forwards to protect users from > corruption, we should disable the hole_birth feature. Using a tunable > allows those who are confident that their data is correct to continue to > take advantage of the feature. > > Closes #188 > > Reviewed by: Matthew Ahrens > Author: Paul Dagnelie > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c > Directory Properties: > head/sys/cddl/contrib/opensolaris/ (props changed) > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Sep 28 23:54:47 2016 (r306424) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 00:00:37 2016 (r306425) > @@ -40,6 +40,11 @@ > #include > > int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ > +boolean_t send_holes_without_birth_time = B_TRUE; > + > +SYSCTL_DECL(_vfs_zfs); > +SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN, > + &send_holes_without_birth_time, 0, "Send holes without birth time"); I think that this should be guarded with _KERNEL. > typedef struct prefetch_data { > kmutex_t pd_mtx; > @@ -254,7 +259,8 @@ traverse_visitbp(traverse_data_t *td, co > * > * Note that the meta-dnode cannot be reallocated. > */ > - if ((!td->td_realloc_possible || > + if (!send_holes_without_birth_time && > + (!td->td_realloc_possible || > zb->zb_object == DMU_META_DNODE_OBJECT) && > td->td_hole_birth_enabled_txg <= td->td_min_txg) > return (0); > -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Sep 29 12:54:28 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 98040BEC607; Thu, 29 Sep 2016 12:54:28 +0000 (UTC) (envelope-from mmel@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 6AF249D6; Thu, 29 Sep 2016 12:54:28 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TCsRS1098475; Thu, 29 Sep 2016 12:54:27 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TCsRgt098474; Thu, 29 Sep 2016 12:54:27 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291254.u8TCsRgt098474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 12:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306445 - head/sys/arm/nvidia/tegra124 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.23 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: Thu, 29 Sep 2016 12:54:28 -0000 Author: mmel Date: Thu Sep 29 12:54:27 2016 New Revision: 306445 URL: https://svnweb.freebsd.org/changeset/base/306445 Log: TEGRA: Return back kern_clocksource.c into tegra config file. It was removed in r306444 by mistake. Modified: head/sys/arm/nvidia/tegra124/files.tegra124 Modified: head/sys/arm/nvidia/tegra124/files.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 12:25:04 2016 (r306444) +++ head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 12:54:27 2016 (r306445) @@ -1,6 +1,11 @@ # $FreeBSD$ # +# Standard ARM support. +# +kern/kern_clocksource.c standard + +# # Standard tegra124 devices and support. # arm/nvidia/tegra124/tegra124_machdep.c standard From owner-svn-src-all@freebsd.org Thu Sep 29 13:38: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 5982FC0081B; Thu, 29 Sep 2016 13:38:15 +0000 (UTC) (envelope-from imp@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 29CFF908; Thu, 29 Sep 2016 13:38:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TDcEVW013940; Thu, 29 Sep 2016 13:38:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TDcESW013939; Thu, 29 Sep 2016 13:38:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609291338.u8TDcESW013939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 29 Sep 2016 13:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306446 - head/share/mk 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.23 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: Thu, 29 Sep 2016 13:38:15 -0000 Author: imp Date: Thu Sep 29 13:38:14 2016 New Revision: 306446 URL: https://svnweb.freebsd.org/changeset/base/306446 Log: SSP is broken on all mips. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Sep 29 12:54:27 2016 (r306445) +++ head/share/mk/src.opts.mk Thu Sep 29 13:38:14 2016 (r306446) @@ -261,7 +261,7 @@ BROKEN_OPTIONS+=LLDB .if ${__T} != "armv6" BROKEN_OPTIONS+=LIBSOFT .endif -.if ${__T} == "mips" || ${__T} == "mips64" +.if ${__T:Mmips*} BROKEN_OPTIONS+=SSP .endif From owner-svn-src-all@freebsd.org Thu Sep 29 13:54:11 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 14287C0108B; Thu, 29 Sep 2016 13:54:11 +0000 (UTC) (envelope-from mmel@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 DB44576A; Thu, 29 Sep 2016 13:54:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TDsAEY021292; Thu, 29 Sep 2016 13:54:10 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TDsAWe021291; Thu, 29 Sep 2016 13:54:10 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291354.u8TDsAWe021291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 13:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306447 - head/sys/arm/nvidia 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.23 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: Thu, 29 Sep 2016 13:54:11 -0000 Author: mmel Date: Thu Sep 29 13:54:09 2016 New Revision: 306447 URL: https://svnweb.freebsd.org/changeset/base/306447 Log: TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static. Modified: head/sys/arm/nvidia/tegra_ahci.c Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Thu Sep 29 13:38:14 2016 (r306446) +++ head/sys/arm/nvidia/tegra_ahci.c Thu Sep 29 13:54:09 2016 (r306447) @@ -602,8 +602,8 @@ tegra_ahci_resume(device_t dev) return (bus_generic_resume(dev)); } -devclass_t genahci_devclass; -static device_method_t genahci_methods[] = { +static devclass_t tegra_ahci_devclass; +static device_method_t tegra_ahci_methods[] = { DEVMETHOD(device_probe, tegra_ahci_probe), DEVMETHOD(device_attach, tegra_ahci_attach), DEVMETHOD(device_detach, tegra_ahci_detach), @@ -619,9 +619,10 @@ static device_method_t genahci_methods[] DEVMETHOD_END }; -static driver_t genahci_driver = { + +static driver_t tegra_ahci_driver = { "ahci", - genahci_methods, + tegra_ahci_methods, sizeof(struct tegra_ahci_sc) }; -DRIVER_MODULE(genahci, simplebus, genahci_driver, genahci_devclass, NULL, NULL); +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, NULL, NULL); From owner-svn-src-all@freebsd.org Thu Sep 29 13:59:16 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 2AAFEC0122B; Thu, 29 Sep 2016 13:59:16 +0000 (UTC) (envelope-from eadler@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 EC657A67; Thu, 29 Sep 2016 13:59:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TDxFrY021532; Thu, 29 Sep 2016 13:59:15 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TDxF9K021530; Thu, 29 Sep 2016 13:59:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201609291359.u8TDxF9K021530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 29 Sep 2016 13:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306448 - in head/sys/dev/cxgbe: cxgbei tom 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.23 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: Thu, 29 Sep 2016 13:59:16 -0000 Author: eadler Date: Thu Sep 29 13:59:14 2016 New Revision: 306448 URL: https://svnweb.freebsd.org/changeset/base/306448 Log: Remove a a duplicated word. Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 29 13:54:09 2016 (r306447) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 29 13:59:14 2016 (r306448) @@ -207,7 +207,7 @@ cxgbei_init(struct adapter *sc, struct c r &= V_ISCSITAGMASK(M_ISCSITAGMASK); if (r != pr->pr_tag_mask) { /* - * Recent firmwares are supposed to set up the the iSCSI tagmask + * Recent firmwares are supposed to set up the iSCSI tagmask * but we'll do it ourselves it the computed value doesn't match * what's in the register. */ Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Sep 29 13:54:09 2016 (r306447) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Sep 29 13:59:14 2016 (r306448) @@ -2114,7 +2114,7 @@ sendanother: /* * If the request will not be requeued, drop a reference on - * the the aiotx buffer. Any mbufs in flight should still + * the aiotx buffer. Any mbufs in flight should still * contain a reference, but this drops the reference that the * job owns while it is waiting to queue mbufs to the socket. */ From owner-svn-src-all@freebsd.org Thu Sep 29 14:01:07 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 C5622C01322; Thu, 29 Sep 2016 14:01:07 +0000 (UTC) (envelope-from eadler@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 9825BC84; Thu, 29 Sep 2016 14:01:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TE16ga023193; Thu, 29 Sep 2016 14:01:06 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TE16WI023164; Thu, 29 Sep 2016 14:01:06 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201609291401.u8TE16WI023164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 29 Sep 2016 14:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306449 - head/sys/contrib/ipfilter/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.23 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: Thu, 29 Sep 2016 14:01:07 -0000 Author: eadler Date: Thu Sep 29 14:01:06 2016 New Revision: 306449 URL: https://svnweb.freebsd.org/changeset/base/306449 Log: Remove an extra etter. Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 29 13:59:14 2016 (r306448) +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 29 14:01:06 2016 (r306449) @@ -421,7 +421,7 @@ static ipftuneable_t ipf_main_tuneables[ /* - * The next section of code is a a collection of small routines that set + * The next section of code is a collection of small routines that set * fields in the fr_info_t structure passed based on properties of the * current packet. There are different routines for the same protocol * for each of IPv4 and IPv6. Adding a new protocol, for which there From owner-svn-src-all@freebsd.org Thu Sep 29 14:14: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 A409DC01B2B; Thu, 29 Sep 2016 14:14:40 +0000 (UTC) (envelope-from avos@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 7622BFF5; Thu, 29 Sep 2016 14:14:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TEEd1S030105; Thu, 29 Sep 2016 14:14:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TEEdZ5030104; Thu, 29 Sep 2016 14:14:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609291414.u8TEEdZ5030104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 29 Sep 2016 14:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306450 - head/share/man/man9 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.23 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: Thu, 29 Sep 2016 14:14:40 -0000 Author: avos Date: Thu Sep 29 14:14:39 2016 New Revision: 306450 URL: https://svnweb.freebsd.org/changeset/base/306450 Log: sysctl.9: add missing underscore (SYSCTL_HANDLERARGS -> SYSCTL_HANDLER_ARGS) Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Thu Sep 29 14:01:06 2016 (r306449) +++ head/share/man/man9/sysctl.9 Thu Sep 29 14:14:39 2016 (r306450) @@ -132,7 +132,7 @@ .Fa "int ctlflags" .Fa "void *arg1" .Fa "intptr_t arg2" -.Fa "int (*handler) (SYSCTL_HANDLERARGS)" +.Fa "int (*handler) (SYSCTL_HANDLER_ARGS)" .Fa "const char *format" .Fa "const char *descr" .Fc From owner-svn-src-all@freebsd.org Thu Sep 29 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 758D3C01209; Thu, 29 Sep 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 2E0FDF8D; Thu, 29 Sep 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 u8TEZWBY038176; Thu, 29 Sep 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 u8TEZWE3038175; Thu, 29 Sep 2016 14:35:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291435.u8TEZWE3038175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 14:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306451 - head/sys/compat/linuxkpi/common/include/linux 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.23 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: Thu, 29 Sep 2016 14:35:33 -0000 Author: hselasky Date: Thu Sep 29 14:35:32 2016 New Revision: 306451 URL: https://svnweb.freebsd.org/changeset/base/306451 Log: The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX are not bitmasks. Fix return value of pci_resource_flags() to reflect this change. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Thu Sep 29 14:14:39 2016 (r306450) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Thu Sep 29 14:35:32 2016 (r306451) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -121,9 +121,9 @@ struct pci_device_id { #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ -#define IORESOURCE_MEM SYS_RES_MEMORY -#define IORESOURCE_IO SYS_RES_IOPORT -#define IORESOURCE_IRQ SYS_RES_IRQ +#define IORESOURCE_MEM (1 << SYS_RES_MEMORY) +#define IORESOURCE_IO (1 << SYS_RES_IOPORT) +#define IORESOURCE_IRQ (1 << SYS_RES_IRQ) enum pci_bus_speed { PCI_SPEED_UNKNOWN = -1, @@ -230,17 +230,28 @@ pci_resource_len(struct pci_dev *pdev, i return rle->count; } +static inline int +pci_resource_type(struct pci_dev *pdev, int bar) +{ + struct resource_list_entry *rle; + + if ((rle = _pci_get_bar(pdev, bar)) == NULL) + return (-1); + return (rle->type); +} + /* * All drivers just seem to want to inspect the type not flags. */ static inline int pci_resource_flags(struct pci_dev *pdev, int bar) { - struct resource_list_entry *rle; + int type; - if ((rle = _pci_get_bar(pdev, bar)) == NULL) + type = pci_resource_type(pdev, bar); + if (type < 0) return (0); - return rle->type; + return (1 << type); } static inline const char * @@ -300,8 +311,8 @@ pci_request_region(struct pci_dev *pdev, int rid; int type; - type = pci_resource_flags(pdev, bar); - if (type == 0) + type = pci_resource_type(pdev, bar); + if (type < 0) return (-ENODEV); rid = PCIR_BAR(bar); if (bus_alloc_resource_any(pdev->dev.bsddev, type, &rid, From owner-svn-src-all@freebsd.org Thu Sep 29 16:29: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 004E0C019A6; Thu, 29 Sep 2016 16:29:51 +0000 (UTC) (envelope-from allanjude@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 C3BC99DA; Thu, 29 Sep 2016 16:29:50 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TGTnxB079555; Thu, 29 Sep 2016 16:29:49 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TGTne2079554; Thu, 29 Sep 2016 16:29:49 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201609291629.u8TGTne2079554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 29 Sep 2016 16:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306452 - 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.23 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: Thu, 29 Sep 2016 16:29:51 -0000 Author: allanjude Date: Thu Sep 29 16:29:49 2016 New Revision: 306452 URL: https://svnweb.freebsd.org/changeset/base/306452 Log: Allow reading the following sysctl MIBs in capability mode: kern.hostname, kern.domainname, and kern.hostuuid This allows sandboxed applications to read these sysctls Submitted by: cem (original version) Reviewed by: cem, jonathan, rwatson (original version) Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D8015 Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Thu Sep 29 14:35:32 2016 (r306451) +++ head/sys/kern/kern_mib.c Thu Sep 29 16:29:49 2016 (r306452) @@ -316,15 +316,15 @@ sysctl_hostname(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_hostname)), MAXHOSTNAMELEN, sysctl_hostname, "A", "Hostname"); SYSCTL_PROC(_kern, KERN_NISDOMAINNAME, domainname, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_domainname)), MAXHOSTNAMELEN, sysctl_hostname, "A", "Name of the current YP/NIS domain"); SYSCTL_PROC(_kern, KERN_HOSTUUID, hostuuid, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_hostuuid)), HOSTUUIDLEN, sysctl_hostname, "A", "Host UUID"); From owner-svn-src-all@freebsd.org Thu Sep 29 16:35: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 7E4CCC01B76; Thu, 29 Sep 2016 16:35:53 +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 42070E15; Thu, 29 Sep 2016 16:35:53 +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 u8TGZqKl083302; Thu, 29 Sep 2016 16:35:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TGZqRs083301; Thu, 29 Sep 2016 16:35:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291635.u8TGZqRs083301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 16:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306453 - head/sys/dev/mlx5/mlx5_en 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.23 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: Thu, 29 Sep 2016 16:35:53 -0000 Author: hselasky Date: Thu Sep 29 16:35:52 2016 New Revision: 306453 URL: https://svnweb.freebsd.org/changeset/base/306453 Log: Set hardware stats flag to avoid double counting the number of incoming bytes. Found by: Ben RUBSON Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Sep 29 16:29:49 2016 (r306452) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Sep 29 16:35:52 2016 (r306453) @@ -2903,6 +2903,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *m ifp->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; + ifp->if_capabilities |= IFCAP_HWSTATS; /* set TSO limits so that we don't have to drop TX packets */ ifp->if_hw_tsomax = MLX5E_MAX_TX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); From owner-svn-src-all@freebsd.org Thu Sep 29 16:36: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 9E408C01BDB; Thu, 29 Sep 2016 16:36: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 6F102F77; Thu, 29 Sep 2016 16:36: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 u8TGaWJ7083371; Thu, 29 Sep 2016 16:36:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TGaWXk083370; Thu, 29 Sep 2016 16:36:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291636.u8TGaWXk083370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 16:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306454 - head/sys/ofed/drivers/net/mlx4 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.23 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: Thu, 29 Sep 2016 16:36:33 -0000 Author: hselasky Date: Thu Sep 29 16:36:32 2016 New Revision: 306454 URL: https://svnweb.freebsd.org/changeset/base/306454 Log: Set hardware stats flag to avoid double counting the number of incoming bytes. Found by: Ben RUBSON Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 29 16:35:52 2016 (r306453) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 29 16:36:32 2016 (r306454) @@ -2165,6 +2165,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; dev->if_capabilities |= IFCAP_LRO; + dev->if_capabilities |= IFCAP_HWSTATS; if (mdev->LSO_support) dev->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO; From owner-svn-src-all@freebsd.org Thu Sep 29 17:13: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 9CF66C02A93; Thu, 29 Sep 2016 17:13:18 +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 6FF1B9B8; Thu, 29 Sep 2016 17:13:18 +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 u8THDHJN098179; Thu, 29 Sep 2016 17:13:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8THDHjI098178; Thu, 29 Sep 2016 17:13:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609291713.u8THDHjI098178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 29 Sep 2016 17:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306455 - head/sys/arm/arm 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.23 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: Thu, 29 Sep 2016 17:13:18 -0000 Author: andrew Date: Thu Sep 29 17:13:17 2016 New Revision: 306455 URL: https://svnweb.freebsd.org/changeset/base/306455 Log: Use SV_ABI_ERRNO to set the syscall return value. The Linuxulator will need this. Submitted by: Grégory Soutadé Differential Revision: https://reviews.freebsd.org/D7976 Modified: head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Thu Sep 29 16:36:32 2016 (r306454) +++ head/sys/arm/arm/vm_machdep.c Thu Sep 29 17:13:17 2016 (r306455) @@ -220,7 +220,7 @@ cpu_set_syscall_retval(struct thread *td /* nothing to do */ break; default: - frame->tf_r0 = error; + frame->tf_r0 = SV_ABI_ERRNO(td->td_proc, error); frame->tf_spsr |= PSR_C; /* carry bit */ break; } From owner-svn-src-all@freebsd.org Thu Sep 29 17:48: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 750C4C022A3; Thu, 29 Sep 2016 17:48:54 +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 38424B77; Thu, 29 Sep 2016 17:48:54 +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 u8THmrXh009685; Thu, 29 Sep 2016 17:48:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8THmrLq009684; Thu, 29 Sep 2016 17:48:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609291748.u8THmrLq009684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Sep 2016 17:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306456 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.23 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: Thu, 29 Sep 2016 17:48:54 -0000 Author: mav Date: Thu Sep 29 17:48:53 2016 New Revision: 306456 URL: https://svnweb.freebsd.org/changeset/base/306456 Log: Add #ifdef _KERNEL around send_holes_without_birth_time sysctl. Reported by: avg@ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 17:13:17 2016 (r306455) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 17:48:53 2016 (r306456) @@ -42,9 +42,11 @@ int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ boolean_t send_holes_without_birth_time = B_TRUE; +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs); SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN, &send_holes_without_birth_time, 0, "Send holes without birth time"); +#endif typedef struct prefetch_data { kmutex_t pd_mtx; From owner-svn-src-all@freebsd.org Thu Sep 29 18:24:31 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 D2B1CC02B5A; Thu, 29 Sep 2016 18:24:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CEFDA9; Thu, 29 Sep 2016 18:24:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TIOUD2024394; Thu, 29 Sep 2016 18:24:30 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TIOUsD024385; Thu, 29 Sep 2016 18:24:30 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609291824.u8TIOUsD024385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 29 Sep 2016 18:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306457 - in head/contrib/unbound: . compat contrib daemon dns64 doc iterator libunbound services sldns smallapp util util/storage validator 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.23 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: Thu, 29 Sep 2016 18:24:31 -0000 Author: des Date: Thu Sep 29 18:24:29 2016 New Revision: 306457 URL: https://svnweb.freebsd.org/changeset/base/306457 Log: Upgrade to Unbound 1.5.10. Added: head/contrib/unbound/contrib/ - copied from r306382, vendor/unbound/dist/contrib/ Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/acx_python.m4 head/contrib/unbound/compat/arc4random.c head/contrib/unbound/compat/getentropy_linux.c head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/acl_list.c head/contrib/unbound/daemon/acl_list.h head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/remote.h head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/dns64/dns64.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/doc/unbound.doxygen head/contrib/unbound/iterator/iter_hints.c head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iterator.c head/contrib/unbound/iterator/iterator.h head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/localzone.c head/contrib/unbound/services/localzone.h head/contrib/unbound/services/mesh.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/outside_network.h head/contrib/unbound/sldns/keyraw.c head/contrib/unbound/sldns/rrdef.h head/contrib/unbound/sldns/wire2str.h head/contrib/unbound/smallapp/unbound-anchor.c head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/smallapp/unbound-host.c head/contrib/unbound/smallapp/worker_cb.c head/contrib/unbound/util/alloc.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/net_help.c head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/util/storage/dnstree.c head/contrib/unbound/util/storage/dnstree.h head/contrib/unbound/util/storage/lookup3.c head/contrib/unbound/util/ub_event.c head/contrib/unbound/util/ub_event_pluggable.c head/contrib/unbound/util/winsock_event.c head/contrib/unbound/validator/autotrust.c head/contrib/unbound/validator/val_secalgo.c head/contrib/unbound/validator/val_sigcrypt.c head/contrib/unbound/validator/validator.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/Makefile.in Thu Sep 29 18:24:29 2016 (r306457) @@ -81,7 +81,7 @@ LINTFLAGS+=@NETBSD_LINTFLAGS@ # compat with OpenBSD LINTFLAGS+="-Dsigset_t=long" # FreeBSD -LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list" +LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list" "-D__uint32_t=uint32_t" INSTALL=$(SHELL) $(srcdir)/install-sh @@ -228,7 +228,7 @@ SVCUNINST_OBJ_LINK=$(SVCUNINST_OBJ) w_in $(COMPAT_OBJ_WITHOUT_CTIMEARC4) ANCHORUPD_SRC=winrc/anchor-update.c ANCHORUPD_OBJ=anchor-update.lo -ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIMEARC4) +ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIMEARC4) wire2str.lo str2wire.lo parseutil.lo sbuffer.lo rrdef.lo keyraw.lo parse.lo RSRC_OBJ=rsrc_svcinst.o rsrc_svcuninst.o rsrc_anchorupd.o rsrc_unbound.o \ rsrc_unbound_host.o rsrc_unbound_anchor.o rsrc_unbound_control.o \ rsrc_unbound_checkconf.o @@ -704,11 +704,12 @@ listen_dnsport.lo listen_dnsport.o: $(sr $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/util/as112.h + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/util/as112.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ @@ -759,7 +760,7 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ @@ -956,7 +957,8 @@ unitldns.lo unitldns.o: $(srcdir)/testco $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h $(srcdir)/daemon/cachedump.h \ $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1063,7 +1065,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/libunbound/libworker.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ @@ -1134,8 +1137,8 @@ context.lo context.o: $(srcdir)/libunbou $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1143,7 +1146,7 @@ libunbound.lo libunbound.o: $(srcdir)/li $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ @@ -1153,11 +1156,12 @@ libworker.lo libworker.o: $(srcdir)/libu $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \ $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h \ - $(srcdir)/util/random.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ @@ -1225,7 +1229,6 @@ snprintf.lo snprintf.o: $(srcdir)/compat strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h -strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c config.h getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c config.h getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c config.h @@ -1237,3 +1240,4 @@ arc4_lock.lo arc4_lock.o: $(srcdir)/comp sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h isblank.lo isblank.o: $(srcdir)/compat/isblank.c config.h +strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h Modified: head/contrib/unbound/acx_python.m4 ============================================================================== --- head/contrib/unbound/acx_python.m4 Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/acx_python.m4 Thu Sep 29 18:24:29 2016 (r306457) @@ -54,7 +54,7 @@ $ac_distutils_result]) AC_MSG_CHECKING([for Python library path]) if test -z "$PYTHON_LDFLAGS"; then PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print(get_config_var('BLDLIBRARY'));"` + print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` fi AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) Modified: head/contrib/unbound/compat/arc4random.c ============================================================================== --- head/contrib/unbound/compat/arc4random.c Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/compat/arc4random.c Thu Sep 29 18:24:29 2016 (r306457) @@ -48,6 +48,9 @@ #else /* !__GNUC__ */ #define inline #endif /* !__GNUC__ */ +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #define KEYSZ 32 #define IVSZ 8 Modified: head/contrib/unbound/compat/getentropy_linux.c ============================================================================== --- head/contrib/unbound/compat/getentropy_linux.c Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/compat/getentropy_linux.c Thu Sep 29 18:24:29 2016 (r306457) @@ -60,6 +60,9 @@ #include #endif #include +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #define REPEAT 5 #define min(a, b) (((a) < (b)) ? (a) : (b)) Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/config.h Thu Sep 29 18:24:29 2016 (r306457) @@ -52,6 +52,9 @@ /* Define to 1 if you have the `chroot' function. */ #define HAVE_CHROOT 1 +/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ +#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 + /* Define to 1 if you have the `ctime_r' function. */ #define HAVE_CTIME_R 1 @@ -111,9 +114,18 @@ /* Define to 1 if you have the `endprotoent' function. */ #define HAVE_ENDPROTOENT 1 +/* Define to 1 if you have the `endpwent' function. */ +#define HAVE_ENDPWENT 1 + /* Define to 1 if you have the `endservent' function. */ #define HAVE_ENDSERVENT 1 +/* Define to 1 if you have the `ERR_free_strings' function. */ +#define HAVE_ERR_FREE_STRINGS 1 + +/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ +#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1 + /* Define to 1 if you have the `event_base_free' function. */ /* #undef HAVE_EVENT_BASE_FREE */ @@ -129,6 +141,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_EVENT_H */ +/* Define to 1 if you have the `EVP_cleanup' function. */ +#define HAVE_EVP_CLEANUP 1 + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ /* #undef HAVE_EVP_MD_CTX_NEW */ @@ -255,24 +270,48 @@ /* Use libnettle for crypto */ /* #undef HAVE_NETTLE */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETTLE_DSA_COMPAT_H */ + /* Use libnss for crypto */ /* #undef HAVE_NSS */ +/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ +#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_BN_H 1 + /* Define to 1 if you have the `OPENSSL_config' function. */ #define HAVE_OPENSSL_CONFIG 1 /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_CONF_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_DH_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_DSA_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_ENGINE_H 1 /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_ERR_H 1 +/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ +/* #undef HAVE_OPENSSL_INIT_CRYPTO */ + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +/* #undef HAVE_OPENSSL_INIT_SSL */ + /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_RAND_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RSA_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_SSL_H 1 @@ -297,6 +336,9 @@ /* Define to 1 if you have the `random' function. */ #define HAVE_RANDOM 1 +/* Define to 1 if you have the `RAND_cleanup' function. */ +#define HAVE_RAND_CLEANUP 1 + /* Define to 1 if you have the `reallocarray' function. */ #define HAVE_REALLOCARRAY 1 @@ -524,7 +566,7 @@ #define PACKAGE_NAME "unbound" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "unbound 1.5.9" +#define PACKAGE_STRING "unbound 1.5.10" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "unbound" @@ -533,7 +575,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.9" +#define PACKAGE_VERSION "1.5.10" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -552,7 +594,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,5,9,0 +#define RSRC_PACKAGE_VERSION 1,5,10,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" @@ -611,6 +653,12 @@ /* Define if you want to use internal select based events */ #define USE_MINI_EVENT 1 +/* Define this to enable client TCP Fast Open. */ +/* #undef USE_MSG_FASTOPEN */ + +/* Define this to enable client TCP Fast Open. */ +/* #undef USE_OSX_MSG_FASTOPEN */ + /* Define this to enable SHA256 and SHA512 support. */ #define USE_SHA2 1 @@ -636,6 +684,9 @@ #endif +/* Define this to enable server TCP Fast Open. */ +/* #undef USE_TCP_FASTOPEN */ + /* Whether the windows socket API is used */ /* #undef USE_WINSOCK */ Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/config.h.in Thu Sep 29 18:24:29 2016 (r306457) @@ -51,6 +51,9 @@ /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT +/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ +#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA + /* Define to 1 if you have the `ctime_r' function. */ #undef HAVE_CTIME_R @@ -110,9 +113,18 @@ /* Define to 1 if you have the `endprotoent' function. */ #undef HAVE_ENDPROTOENT +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + /* Define to 1 if you have the `endservent' function. */ #undef HAVE_ENDSERVENT +/* Define to 1 if you have the `ERR_free_strings' function. */ +#undef HAVE_ERR_FREE_STRINGS + +/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ +#undef HAVE_ERR_LOAD_CRYPTO_STRINGS + /* Define to 1 if you have the `event_base_free' function. */ #undef HAVE_EVENT_BASE_FREE @@ -128,6 +140,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_EVENT_H +/* Define to 1 if you have the `EVP_cleanup' function. */ +#undef HAVE_EVP_CLEANUP + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ #undef HAVE_EVP_MD_CTX_NEW @@ -254,24 +269,48 @@ /* Use libnettle for crypto */ #undef HAVE_NETTLE +/* Define to 1 if you have the header file. */ +#undef HAVE_NETTLE_DSA_COMPAT_H + /* Use libnss for crypto */ #undef HAVE_NSS +/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ +#undef HAVE_OPENSSL_ADD_ALL_DIGESTS + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_BN_H + /* Define to 1 if you have the `OPENSSL_config' function. */ #undef HAVE_OPENSSL_CONFIG /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_CONF_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DH_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DSA_H + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ENGINE_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ERR_H +/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ +#undef HAVE_OPENSSL_INIT_CRYPTO + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +#undef HAVE_OPENSSL_INIT_SSL + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RAND_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_RSA_H + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SSL_H @@ -296,6 +335,9 @@ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM +/* Define to 1 if you have the `RAND_cleanup' function. */ +#undef HAVE_RAND_CLEANUP + /* Define to 1 if you have the `reallocarray' function. */ #undef HAVE_REALLOCARRAY @@ -610,6 +652,12 @@ /* Define if you want to use internal select based events */ #undef USE_MINI_EVENT +/* Define this to enable client TCP Fast Open. */ +#undef USE_MSG_FASTOPEN + +/* Define this to enable client TCP Fast Open. */ +#undef USE_OSX_MSG_FASTOPEN + /* Define this to enable SHA256 and SHA512 support. */ #undef USE_SHA2 @@ -635,6 +683,9 @@ #endif +/* Define this to enable server TCP Fast Open. */ +#undef USE_TCP_FASTOPEN + /* Whether the windows socket API is used */ #undef USE_WINSOCK Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/configure Thu Sep 29 18:24:29 2016 (r306457) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.9. +# Generated by GNU Autoconf 2.69 for unbound 1.5.10. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.9' -PACKAGE_STRING='unbound 1.5.9' +PACKAGE_VERSION='1.5.10' +PACKAGE_STRING='unbound 1.5.10' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -834,6 +834,8 @@ enable_gost enable_ecdsa enable_dsa enable_event_api +enable_tfo_client +enable_tfo_server with_libevent with_libexpat enable_static_exe @@ -1399,7 +1401,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.9 to adapt to many kinds of systems. +\`configure' configures unbound 1.5.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1464,7 +1466,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.9:";; + short | recursive ) echo "Configuration of unbound 1.5.10:";; esac cat <<\_ACEOF @@ -1500,6 +1502,8 @@ Optional Features: --disable-dsa Disable DSA support --enable-event-api Enable (experimental) pluggable event base libunbound API installed to unbound-event.h + --enable-tfo-client Enable TCP Fast Open for client mode + --enable-tfo-server Enable TCP Fast Open for server mode --enable-static-exe enable to compile executables statically against (event) libs, for debug purposes --enable-lock-checks enable to check lock and unlock calls, for debug @@ -1652,7 +1656,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.9 +unbound configure 1.5.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2361,7 +2365,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.9, which was +It was created by unbound $as_me 1.5.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2713,11 +2717,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 -UNBOUND_VERSION_MICRO=9 +UNBOUND_VERSION_MICRO=10 LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2766,6 +2770,7 @@ LIBUNBOUND_AGE=4 # 1.5.7 had 5:10:3 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 +# 1.5.10 had 6:2:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -4054,7 +4059,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes" else - if echo $target | grep mingw32 >/dev/null; then on_mingw="yes" + if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -4064,7 +4069,7 @@ fi if test $on_mingw = "no"; then ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" + ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf" fi # Check whether --with-conf_file was given. @@ -4195,7 +4200,7 @@ else if test $on_mingw = no; then UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" + UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key" fi fi @@ -4217,7 +4222,7 @@ else if test $on_mingw = no; then UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" + UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem" fi fi @@ -16714,7 +16719,7 @@ $as_echo "$PYTHON_CPPFLAGS" >&6; } $as_echo_n "checking for Python library path... " >&6; } if test -z "$PYTHON_LDFLAGS"; then PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print(get_config_var('BLDLIBRARY'));"` + print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 $as_echo "$PYTHON_LDFLAGS" >&6; } @@ -17033,6 +17038,19 @@ if test "${with_nettle+set}" = set; then $as_echo "#define HAVE_NETTLE 1" >>confdefs.h + for ac_header in nettle/dsa-compat.h +do : + ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default +" +if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETTLE_DSA_COMPAT_H 1 +_ACEOF + +fi + +done + if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" @@ -17397,6 +17415,47 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5 +$as_echo_n "checking if libssl needs -lcrypt32... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char HMAC_Update (); +int +main () +{ +return HMAC_Update (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBS="$BAKLIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBS="$BAKLIBS" + LIBS="$LIBS -lcrypt32" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 $as_echo_n "checking for LibreSSL... " >&6; } if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then @@ -17462,44 +17521,49 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -for ac_header in openssl/conf.h +for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h do : - ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if test "x$ac_cv_header_openssl_conf_h" = xyes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_CONF_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -for ac_header in openssl/engine.h +for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup do : - ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_engine_h" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_ENGINE_H 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - done -for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new + +# these check_funcs need -lssl +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +for ac_func in OPENSSL_init_ssl do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl" +if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_OPENSSL_INIT_SSL 1 _ACEOF fi done +LIBS="$BAKLIBS" + ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" " $ac_includes_default #ifdef HAVE_OPENSSL_ERR_H @@ -17900,6 +17964,82 @@ case "$enable_event_api" in ;; esac +# Check whether --enable-tfo-client was given. +if test "${enable_tfo_client+set}" = set; then : + enableval=$enable_tfo_client; +fi + +case "$enable_tfo_client" in + yes) + case `uname` in + Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_MSG_FASTOPEN 1 +_ACEOF + + ;; + Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_OSX_MSG_FASTOPEN 1 +_ACEOF + + ;; + esac + ;; + no|*) + ;; +esac + +# Check whether --enable-tfo-server was given. +if test "${enable_tfo_server+set}" = set; then : + enableval=$enable_tfo_server; +fi + +case "$enable_tfo_server" in + yes) + ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_TCP_FASTOPEN 1 +_ACEOF + + ;; + no|*) + ;; +esac + # check for libevent # Check whether --with-libevent was given. @@ -18314,10 +18454,8 @@ if test x_$enable_static_exe = x_yes; th staticexe="-static" if test "$on_mingw" = yes; then staticexe="-all-static" - # for static crosscompile, include gdi32 and zlib here. - if test "`uname`" = "Linux"; then - LIBS="$LIBS -lgdi32 -lz" - fi + # for static compile, include gdi32 and zlib here. + LIBS="$LIBS -lgdi32 -lz" fi fi @@ -18762,7 +18900,7 @@ if test "$ac_res" != no; then : fi -for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync +for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -19801,12 +19939,12 @@ _ACEOF -version=1.5.9 +version=1.5.10 date=`date +'%b %e, %Y'` -ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h" +ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h contrib/libunbound.pc" ac_config_headers="$ac_config_headers config.h" @@ -20316,7 +20454,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.9, which was +This file was extended by unbound $as_me 1.5.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20382,7 +20520,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.9 +unbound config.status 1.5.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20804,6 +20942,7 @@ do "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;; "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;; "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;; + "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/configure.ac Thu Sep 29 18:24:29 2016 (r306457) @@ -10,14 +10,14 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[9]) +m4_define([VERSION_MICRO],[10]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -66,6 +66,7 @@ LIBUNBOUND_AGE=4 # 1.5.7 had 5:10:3 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 +# 1.5.10 had 6:2:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -107,7 +108,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes" else - if echo $target | grep mingw32 >/dev/null; then on_mingw="yes" + if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -117,7 +118,7 @@ fi if test $on_mingw = "no"; then ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" + ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf" fi AC_ARG_WITH([conf_file], AC_HELP_STRING([--with-conf-file=path], @@ -187,7 +188,7 @@ AC_ARG_WITH(rootkey-file, if test $on_mingw = no; then UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" + UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key" fi ) AC_SUBST(UNBOUND_ROOTKEY_FILE) @@ -201,7 +202,7 @@ AC_ARG_WITH(rootcert-file, if test $on_mingw = no; then UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" + UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem" fi ) AC_SUBST(UNBOUND_ROOTCERT_FILE) @@ -629,6 +630,7 @@ AC_ARG_WITH([nettle], AC_HELP_STRING([-- [ USE_NETTLE="yes" AC_DEFINE(HAVE_NETTLE, 1, [Use libnettle for crypto]) + AC_CHECK_HEADERS([nettle/dsa-compat.h],,, [AC_INCLUDES_DEFAULT]) if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" @@ -646,6 +648,20 @@ if test $USE_NSS = "no" -a $USE_NETTLE = ACX_WITH_SSL ACX_LIB_SSL SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_MSG_CHECKING([if libssl needs -lcrypt32]) +AC_TRY_LINK_FUNC([HMAC_Update], [ + AC_MSG_RESULT([no]) + LIBS="$BAKLIBS" +], [ + AC_MSG_RESULT([yes]) + LIBS="$BAKLIBS" + LIBS="$LIBS -lcrypt32" +]) + AC_MSG_CHECKING([for LibreSSL]) if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then AC_MSG_RESULT([yes]) @@ -656,9 +672,15 @@ if grep VERSION_TEXT $ssldir/include/ope else AC_MSG_RESULT([no]) fi -AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new]) +AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup]) + +# these check_funcs need -lssl +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_CHECK_FUNCS([OPENSSL_init_ssl]) +LIBS="$BAKLIBS" + AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ AC_INCLUDES_DEFAULT #ifdef HAVE_OPENSSL_ERR_H @@ -865,6 +887,42 @@ case "$enable_event_api" in ;; esac +AC_ARG_ENABLE(tfo-client, AC_HELP_STRING([--enable-tfo-client], [Enable TCP Fast Open for client mode])) +case "$enable_tfo_client" in + yes) + case `uname` in + Linux) AC_CHECK_DECL([MSG_FASTOPEN], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO])], + [AC_MSG_ERROR([TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client])], + [AC_INCLUDES_DEFAULT +#include +]) + AC_DEFINE_UNQUOTED([USE_MSG_FASTOPEN], [1], [Define this to enable client TCP Fast Open.]) + ;; + Darwin) AC_CHECK_DECL([CONNECT_RESUME_ON_READ_WRITE], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO])], + [AC_MSG_ERROR([TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client])], + [AC_INCLUDES_DEFAULT +#include +]) + AC_DEFINE_UNQUOTED([USE_OSX_MSG_FASTOPEN], [1], [Define this to enable client TCP Fast Open.]) + ;; + esac + ;; + no|*) + ;; +esac + +AC_ARG_ENABLE(tfo-server, AC_HELP_STRING([--enable-tfo-server], [Enable TCP Fast Open for server mode])) +case "$enable_tfo_server" in + yes) + AC_CHECK_DECL([TCP_FASTOPEN], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO])], [AC_MSG_ERROR([TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server])], [AC_INCLUDES_DEFAULT +#include + ]) + AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable server TCP Fast Open.]) + ;; + no|*) + ;; +esac + # check for libevent AC_ARG_WITH(libevent, AC_HELP_STRING([--with-libevent=pathname], *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Sep 29 19:45:26 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 24615C011AB; Thu, 29 Sep 2016 19:45:26 +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 CE15F19D3; Thu, 29 Sep 2016 19:45:25 +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 u8TJjPAY055097; Thu, 29 Sep 2016 19:45:25 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TJjP4W055096; Thu, 29 Sep 2016 19:45:25 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201609291945.u8TJjP4W055096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Thu, 29 Sep 2016 19:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306458 - 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.23 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: Thu, 29 Sep 2016 19:45:26 -0000 Author: lidl Date: Thu Sep 29 19:45:24 2016 New Revision: 306458 URL: https://svnweb.freebsd.org/changeset/base/306458 Log: Properly preserve ip_tos bits for IPv4 packets Restructure code slightly to save ip_tos bits earlier. Fix the bug where the ip_tos field is zeroed out before assigning to the iptos variable. Restore the ip_tos and ip_ver fields only if they have been zeroed during the pseudo-header checksum calculation. Reviewed by: cem, gnn, hiren MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8053 Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Sep 29 18:24:29 2016 (r306457) +++ head/sys/netinet/tcp_input.c Thu Sep 29 19:45:24 2016 (r306458) @@ -603,7 +603,7 @@ tcp_input(struct mbuf **mp, int *offp, i #ifdef TCP_SIGNATURE uint8_t sig_checked = 0; #endif - uint8_t iptos = 0; + uint8_t iptos; struct m_tag *fwd_tag = NULL; #ifdef INET6 struct ip6_hdr *ip6 = NULL; @@ -675,6 +675,7 @@ tcp_input(struct mbuf **mp, int *offp, i /* XXX stat */ goto drop; } + iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; } #endif #if defined(INET) && defined(INET6) @@ -701,6 +702,7 @@ tcp_input(struct mbuf **mp, int *offp, i th = (struct tcphdr *)((caddr_t)ip + off0); tlen = ntohs(ip->ip_len) - off0; + iptos = ip->ip_tos; if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) th->th_sum = m->m_pkthdr.csum_data; @@ -721,29 +723,20 @@ tcp_input(struct mbuf **mp, int *offp, i ipov->ih_len = htons(tlen); th->th_sum = in_cksum(m, len); /* Reset length for SDT probes. */ - ip->ip_len = htons(tlen + off0); + ip->ip_len = htons(len); + /* Reset TOS bits */ + ip->ip_tos = iptos; + /* Re-initialization for later version check */ + ip->ip_v = IPVERSION; } if (th->th_sum) { TCPSTAT_INC(tcps_rcvbadsum); goto drop; } - /* Re-initialization for later version check */ - ip->ip_v = IPVERSION; } #endif /* INET */ -#ifdef INET6 - if (isipv6) - iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; -#endif -#if defined(INET) && defined(INET6) - else -#endif -#ifdef INET - iptos = ip->ip_tos; -#endif - /* * Check that TCP offset makes sense, * pull out TCP options and adjust length. XXX From owner-svn-src-all@freebsd.org Thu Sep 29 19:57:38 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 D064AC0158D; Thu, 29 Sep 2016 19:57:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99DC116F; Thu, 29 Sep 2016 19:57:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TJvbHt058989; Thu, 29 Sep 2016 19:57:37 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TJvbVh058988; Thu, 29 Sep 2016 19:57:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201609291957.u8TJvbVh058988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 29 Sep 2016 19:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306459 - head/sys/netinet6 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.23 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: Thu, 29 Sep 2016 19:57:38 -0000 Author: ae Date: Thu Sep 29 19:57:37 2016 New Revision: 306459 URL: https://svnweb.freebsd.org/changeset/base/306459 Log: Fix bug introduced in r274300. In icmp6_reflect() use original source address of erroneous packet as destination address for source selection algorithm when original destination address is not one of our own. Reported by: Mark Kamichoff Tested by: Mark Kamichoff MFC after: 1 week Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Thu Sep 29 19:45:24 2016 (r306458) +++ head/sys/netinet6/icmp6.c Thu Sep 29 19:57:37 2016 (r306459) @@ -2146,7 +2146,7 @@ icmp6_reflect(struct mbuf *m, size_t off * that we do not own. Select a source address based on the * source address of the erroneous packet. */ - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); + in6_splitscope(&ip6->ip6_src, &dst6, &scopeid); error = in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, scopeid, NULL, &src6, &hlim); From owner-svn-src-all@freebsd.org Thu Sep 29 22:01: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 D6EFAC00A2A; Thu, 29 Sep 2016 22:01:10 +0000 (UTC) (envelope-from gonzo@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 A61AB16CC; Thu, 29 Sep 2016 22:01:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TM19gt005018; Thu, 29 Sep 2016 22:01:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TM19e0005017; Thu, 29 Sep 2016 22:01:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609292201.u8TM19e0005017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 29 Sep 2016 22:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306460 - head/sys/modules/dtb/nvidia 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.23 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: Thu, 29 Sep 2016 22:01:10 -0000 Author: gonzo Date: Thu Sep 29 22:01:09 2016 New Revision: 306460 URL: https://svnweb.freebsd.org/changeset/base/306460 Log: Add dtb module for Jetson-TK1 board Added: head/sys/modules/dtb/nvidia/ head/sys/modules/dtb/nvidia/Makefile (contents, props changed) Added: head/sys/modules/dtb/nvidia/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/nvidia/Makefile Thu Sep 29 22:01:09 2016 (r306460) @@ -0,0 +1,6 @@ +# $FreeBSD$ +# All the dts files for Nvidia ARM systems we support. +DTS= \ + tegra124-jetson-tk1-fbsd.dts + +.include From owner-svn-src-all@freebsd.org Thu Sep 29 22:47:24 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 4D10AC02484; Thu, 29 Sep 2016 22:47:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 D4F5DBE4; Thu, 29 Sep 2016 22:47:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id b4so13046055wmb.0; Thu, 29 Sep 2016 15:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=4WkMu+4Wvn+g3cdI24ZENcuD3jPJ8YR1hxpcuV/2dpU=; b=vp67lDef7ECWLpJY4G8k0aasGZFoGT0blUI6XWKY/h9g8xbdXbSfwtfrEz1hWfsNR8 xabVbteiKT+UNx73h/nAumjHxymH6mZGo4CQ2QGhLPq/eqFcBCvDzHXAkod2vQvAu6t0 GPy5fFsjg0IMmUHJLI98Pe2iCoPbPsplLogRMrpFzzchCBla4F57XpXeWv5cgArJmUw5 oMgLTTXnWTS5mGFXh36wAH8I6eq/CsIgYm/MbATH5KDN4vHKCpM7erTzKwDeV2qIAjou bqoImHh+XFOqr6gtCWL2XhVO+P8y70MHm0jM4yVUa/2uOzu13zErhU8emmZjGCeUPT4M Pmew== 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:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=4WkMu+4Wvn+g3cdI24ZENcuD3jPJ8YR1hxpcuV/2dpU=; b=SU6JPoy3y0ZQaHglvlA5qRUde8ZJ3DQi5vS0WsI2SQ9rleGEw2eRGHw9b4xgKo9nqe j8k0zqF5DXNkVVSH6ai/rF/66jWoTK0Dj5BMatv+BCCkFxmtn2SX0UKxUp8n9WJKZ555 /mqaLC6q8O3YeC581F88gowUD2y9/X3hnszCAmUAgkVG/EvSoRZuzGciN+BnF2t5rTUX xa5x2pkgSQvsd5A9BBzOQgCZC5zHLYOa3eQYLcEtZfcS4AZG7f7c1SBimg80CidLqwNf 5AqtURJ1VPgk0esMikY2AKUyoikMnNSEQU09/Y4AP7eoA+i+NZq/wsr3p1ui+9WzruYl 4YIg== X-Gm-Message-State: AA6/9RmvafCGnR5+H4V2NTtOF8a83sqwdZji+8LE/0plPZut60VpLQcz0dAgwmRYcmWtkdMnx5elELr+jPmxRw== X-Received: by 10.194.22.136 with SMTP id d8mr3438220wjf.5.1475189242319; Thu, 29 Sep 2016 15:47:22 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.194.15.134 with HTTP; Thu, 29 Sep 2016 15:47:21 -0700 (PDT) In-Reply-To: References: <201605270531.u4R5VE6R006890@repo.freebsd.org> From: Alan Somers Date: Thu, 29 Sep 2016 16:47:21 -0600 X-Google-Sender-Auth: -9Y3PFNeg_x8h5veuoxFIaM2pqo Message-ID: Subject: Re: svn commit: r300824 - head/lib/libmd To: Ed Schouten Cc: "Conrad E. Meyer" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 29 Sep 2016 22:47:24 -0000 On Fri, May 27, 2016 at 1:00 AM, Ed Schouten wrote: > 2016-05-27 8:50 GMT+02:00 Conrad Meyer : >> There's nothing to support =E2=80=94 literally ignoring the keyword is a= n >> acceptable implementation. So it's disappointing C++ chooses to >> reject C keywords. > > Keep in mind that C++ does not reject "static" altogether; only in > this specific context. The reason for it is that in C++, there are > other ways of enforcing similar properties. For example by using > std::array, which has the size as part of its type. > >> If sys/md5.h includes a static inline function, there are bigger >> problems with potentially trying to interpret C code as C++. > > We have quite a lot of public header files that contain static inline > functions that also work well in C++ mode. is a good > example. > >> Your proposed macro seems ok, although it is pretty long for where it >> would be used. Maybe __min_size()? > > Sure! Is anybody still intending to write this feature? I just ran into the same c++-includability bug with sha256.h and sha512.h. It would be nice to fix them the right way instead of using r300824's workaround. -Alan From owner-svn-src-all@freebsd.org Thu Sep 29 22:52:26 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 68C4DC026AD; Thu, 29 Sep 2016 22:52:26 +0000 (UTC) (envelope-from jhb@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 2CE9D149; Thu, 29 Sep 2016 22:52:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TMqPDs027510; Thu, 29 Sep 2016 22:52:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TMqOg6027503; Thu, 29 Sep 2016 22:52:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609292252.u8TMqOg6027503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Sep 2016 22:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306461 - in stable/11: share/man/man9 sys/dev/pci X-SVN-Group: stable-11 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.23 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: Thu, 29 Sep 2016 22:52:26 -0000 Author: jhb Date: Thu Sep 29 22:52:24 2016 New Revision: 306461 URL: https://svnweb.freebsd.org/changeset/base/306461 Log: MFC 303721: Permit the name of the /dev/iov entry to be set by the driver. The PCI_IOV option creates character devices in /dev/iov for each PF device driver that registers support for creating VFs. By default the character device is named after the PF device (e.g. /dev/iov/foo0). This change adds a variant of pci_iov_attach() called pci_iov_attach_name() that allows the name of the /dev/iov entry to be specified by the driver. To preserve the ABI, this version does not modify the existing PCI_IOV_ATTACH kobj method as was done in HEAD. Instead, a new PCI_IOV_ATTACH_NAME method has been added that accepts the name as an additional parameter. The PCI bus driver now provides an implementation of PCI_IOV_ATTACH_NAME. A default implementation of PCI_IOV_ATTACH is provided that calls PCI_IOV_ATTACH_NAME passing 'device_get_nameunit(dev)' as the name. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/pci.9 stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pci_if.m stable/11/sys/dev/pci/pci_iov.c stable/11/sys/dev/pci/pci_iov.h stable/11/sys/dev/pci/pci_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/share/man/man9/Makefile Thu Sep 29 22:52:24 2016 (r306461) @@ -1303,6 +1303,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_get_vpd_ident.9 \ pci.9 pci_get_vpd_readonly.9 \ pci.9 pci_iov_attach.9 \ + pci.9 pci_iov_attach_name.9 \ pci.9 pci_iov_detach.9 \ pci.9 pci_msi_count.9 \ pci.9 pci_msix_count.9 \ Modified: stable/11/share/man/man9/pci.9 ============================================================================== --- stable/11/share/man/man9/pci.9 Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/share/man/man9/pci.9 Thu Sep 29 22:52:24 2016 (r306461) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2016 +.Dd August 3, 2016 .Dt PCI 9 .Os .Sh NAME @@ -50,6 +50,7 @@ .Nm pci_get_vpd_ident , .Nm pci_get_vpd_readonly , .Nm pci_iov_attach , +.Nm pci_iov_attach_name , .Nm pci_iov_detach , .Nm pci_msi_count , .Nm pci_msix_count , @@ -152,6 +153,14 @@ .Ft int .Fn pci_iov_attach "device_t dev" "nvlist_t *pf_schema" "nvlist_t *vf_schema" .Ft int +.Fo pci_iov_attach_name +.Fa "device_t dev" +.Fa "nvlist_t *pf_schema" +.Fa "nvlist_t *vf_schema" +.Fa "const char *fmt" +.Fa "..." +.Fc +.Ft int .Fn pci_iov_detach "device_t dev" .Sh DESCRIPTION The @@ -595,6 +604,20 @@ and is responsible for freeing them. The driver must never free the schemas itself. .Pp The +.Fn pci_iov_attach_name +function is a variant of +.Fn pci_iov_attach +that allows the name of the associated character device in +.Pa /dev/iov +to be specified by +.Fa fmt . +The +.Fn pci_iov_attach +function uses the name of +.Fa dev +as the device name. +.Pp +The .Fn pci_iov_detach function is used to advise the SR-IOV infrastructure that the driver for the given device is attempting to detach and that all SR-IOV resources for the Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/sys/dev/pci/pci.c Thu Sep 29 22:52:24 2016 (r306461) @@ -195,7 +195,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_alloc_devinfo, pci_alloc_devinfo_method), DEVMETHOD(pci_child_added, pci_child_added_method), #ifdef PCI_IOV - DEVMETHOD(pci_iov_attach, pci_iov_attach_method), + DEVMETHOD(pci_iov_attach_name, pci_iov_attach_method), DEVMETHOD(pci_iov_detach, pci_iov_detach_method), DEVMETHOD(pci_create_iov_child, pci_create_iov_child_method), #endif Modified: stable/11/sys/dev/pci/pci_if.m ============================================================================== --- stable/11/sys/dev/pci/pci_if.m Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/sys/dev/pci/pci_if.m Thu Sep 29 22:52:24 2016 (r306461) @@ -51,6 +51,14 @@ CODE { device_printf(bus, "PCI_IOV not implemented on this bus.\n"); return (NULL); } + + static int + compat_iov_attach(device_t bus, device_t dev, struct nvlist *pf_schema, + struct nvlist *vf_schema) + { + return (PCI_IOV_ATTACH_NAME(bus, dev, pf_schema, vf_schema, + device_get_nameunit(dev))); + } }; HEADER { @@ -235,6 +243,14 @@ METHOD int iov_attach { device_t child; struct nvlist *pf_schema; struct nvlist *vf_schema; +} DEFAULT compat_iov_attach; + +METHOD int iov_attach_name { + device_t dev; + device_t child; + struct nvlist *pf_schema; + struct nvlist *vf_schema; + const char *name; }; METHOD int iov_detach { Modified: stable/11/sys/dev/pci/pci_iov.c ============================================================================== --- stable/11/sys/dev/pci/pci_iov.c Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/sys/dev/pci/pci_iov.c Thu Sep 29 22:52:24 2016 (r306461) @@ -98,8 +98,22 @@ static nvlist_t *pci_iov_get_pf_subsyste static nvlist_t *pci_iov_get_vf_subsystem_schema(void); int +pci_iov_attach_name(device_t dev, struct nvlist *pf_schema, + struct nvlist *vf_schema, const char *fmt, ...) +{ + char buf[NAME_MAX + 1]; + va_list ap; + + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (PCI_IOV_ATTACH_NAME(device_get_parent(dev), dev, pf_schema, + vf_schema, buf)); +} + +int pci_iov_attach_method(device_t bus, device_t dev, nvlist_t *pf_schema, - nvlist_t *vf_schema) + nvlist_t *vf_schema, const char *name) { device_t pcib; struct pci_devinfo *dinfo; @@ -149,7 +163,7 @@ pci_iov_attach_method(device_t bus, devi iov->iov_schema = schema; iov->iov_cdev = make_dev(&iov_cdevsw, device_get_unit(dev), - UID_ROOT, GID_WHEEL, 0600, "iov/%s", device_get_nameunit(dev)); + UID_ROOT, GID_WHEEL, 0600, "iov/%s", name); if (iov->iov_cdev == NULL) { error = ENOMEM; Modified: stable/11/sys/dev/pci/pci_iov.h ============================================================================== --- stable/11/sys/dev/pci/pci_iov.h Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/sys/dev/pci/pci_iov.h Thu Sep 29 22:52:24 2016 (r306461) @@ -33,11 +33,14 @@ struct nvlist; +int pci_iov_attach_name(device_t dev, struct nvlist *pf_schema, + struct nvlist *vf_schema, const char *fmt, ...) __printflike(4, 5); + static __inline int pci_iov_attach(device_t dev, struct nvlist *pf_schema, struct nvlist *vf_schema) { - return (PCI_IOV_ATTACH(device_get_parent(dev), dev, pf_schema, - vf_schema)); + return (PCI_IOV_ATTACH_NAME(device_get_parent(dev), dev, pf_schema, + vf_schema, device_get_nameunit(dev))); } static __inline int Modified: stable/11/sys/dev/pci/pci_private.h ============================================================================== --- stable/11/sys/dev/pci/pci_private.h Thu Sep 29 22:01:09 2016 (r306460) +++ stable/11/sys/dev/pci/pci_private.h Thu Sep 29 22:52:24 2016 (r306461) @@ -158,7 +158,8 @@ struct resource *pci_alloc_multi_resourc rman_res_t count, u_long num, u_int flags); int pci_iov_attach_method(device_t bus, device_t dev, - struct nvlist *pf_schema, struct nvlist *vf_schema); + struct nvlist *pf_schema, struct nvlist *vf_schema, + const char *name); int pci_iov_detach_method(device_t bus, device_t dev); device_t pci_create_iov_child_method(device_t bus, device_t pf, From owner-svn-src-all@freebsd.org Thu Sep 29 23:07: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 E0A8FC02AFA; Thu, 29 Sep 2016 23:07:29 +0000 (UTC) (envelope-from glebius@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 B0A7CAEC; Thu, 29 Sep 2016 23:07:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TN7Sga031744; Thu, 29 Sep 2016 23:07:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TN7Sq0031742; Thu, 29 Sep 2016 23:07:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201609292307.u8TN7Sq0031742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 29 Sep 2016 23:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306462 - in head/sys: kern sys 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.23 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: Thu, 29 Sep 2016 23:07:30 -0000 Author: glebius Date: Thu Sep 29 23:07:28 2016 New Revision: 306462 URL: https://svnweb.freebsd.org/changeset/base/306462 Log: Provide kern.maxphys sysctl, which returns MAXPHYS. Naming matches NetBSD. Modified: head/sys/kern/kern_mib.c head/sys/sys/sysctl.h Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Thu Sep 29 22:52:24 2016 (r306461) +++ head/sys/kern/kern_mib.c Thu Sep 29 23:07:28 2016 (r306462) @@ -138,6 +138,9 @@ char kernelname[MAXPATHLEN] = "/kernel"; SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, kernelname, sizeof kernelname, "Name of kernel file booted"); +SYSCTL_INT(_kern, KERN_MAXPHYS, maxphys, CTLFLAG_RD | CTLFLAG_CAPRD, + SYSCTL_NULL_INT_PTR, MAXPHYS, "Maximum block I/O access size"); + SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_ncpus, 0, "Number of active CPUs"); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu Sep 29 22:52:24 2016 (r306461) +++ head/sys/sys/sysctl.h Thu Sep 29 23:07:28 2016 (r306462) @@ -835,6 +835,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define KERN_IOV_MAX 35 /* int: value of UIO_MAXIOV */ #define KERN_HOSTUUID 36 /* string: host UUID identifier */ #define KERN_ARND 37 /* int: from arc4rand() */ +#define KERN_MAXPHYS 38 /* int: MAXPHYS value */ /* * KERN_PROC subtypes */ From owner-svn-src-all@freebsd.org Thu Sep 29 23:41:59 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 1F036C022ED; Thu, 29 Sep 2016 23:41:59 +0000 (UTC) (envelope-from jhb@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 EE0A8F8; Thu, 29 Sep 2016 23:41:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TNfwt0046521; Thu, 29 Sep 2016 23:41:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TNfwUZ046520; Thu, 29 Sep 2016 23:41:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609292341.u8TNfwUZ046520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Sep 2016 23:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306463 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 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.23 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: Thu, 29 Sep 2016 23:41:59 -0000 Author: jhb Date: Thu Sep 29 23:41:57 2016 New Revision: 306463 URL: https://svnweb.freebsd.org/changeset/base/306463 Log: MFC 303204: Install a handler for firmware work request error messages. If a driver sends an malformed or disallowed work request, the firmware responds with a work request error. Previously the driver treated this is as an unexpected message and panicked. Now it decodes the error message to aid in debugging. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Thu Sep 29 23:07:28 2016 (r306462) +++ stable/11/sys/dev/cxgbe/t4_sge.c Thu Sep 29 23:41:57 2016 (r306463) @@ -244,6 +244,7 @@ static int handle_sge_egr_update(struct struct mbuf *); static int handle_fw_msg(struct sge_iq *, const struct rss_header *, struct mbuf *); +static int t4_handle_wrerr_rpl(struct adapter *, const __be64 *); static void wrq_tx_drain(void *, int); static void drain_wrq_wr_list(struct adapter *, struct sge_wrq *); @@ -402,6 +403,7 @@ t4_sge_modload(void) t4_register_cpl_handler(CPL_SGE_EGR_UPDATE, handle_sge_egr_update); t4_register_cpl_handler(CPL_RX_PKT, t4_eth_rx); t4_register_fw_msg_handler(FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); + t4_register_fw_msg_handler(FW6_TYPE_WRERR_RPL, t4_handle_wrerr_rpl); } void @@ -4782,6 +4784,71 @@ handle_fw_msg(struct sge_iq *iq, const s return (t4_fw_msg_handler[cpl->type](sc, &cpl->data[0])); } +/** + * t4_handle_wrerr_rpl - process a FW work request error message + * @adap: the adapter + * @rpl: start of the FW message + */ +static int +t4_handle_wrerr_rpl(struct adapter *adap, const __be64 *rpl) +{ + u8 opcode = *(const u8 *)rpl; + const struct fw_error_cmd *e = (const void *)rpl; + unsigned int i; + + if (opcode != FW_ERROR_CMD) { + log(LOG_ERR, + "%s: Received WRERR_RPL message with opcode %#x\n", + device_get_nameunit(adap->dev), opcode); + return (EINVAL); + } + log(LOG_ERR, "%s: FW_ERROR (%s) ", device_get_nameunit(adap->dev), + G_FW_ERROR_CMD_FATAL(be32toh(e->op_to_type)) ? "fatal" : + "non-fatal"); + switch (G_FW_ERROR_CMD_TYPE(be32toh(e->op_to_type))) { + case FW_ERROR_TYPE_EXCEPTION: + log(LOG_ERR, "exception info:\n"); + for (i = 0; i < nitems(e->u.exception.info); i++) + log(LOG_ERR, "%s%08x", i == 0 ? "\t" : " ", + be32toh(e->u.exception.info[i])); + log(LOG_ERR, "\n"); + break; + case FW_ERROR_TYPE_HWMODULE: + log(LOG_ERR, "HW module regaddr %08x regval %08x\n", + be32toh(e->u.hwmodule.regaddr), + be32toh(e->u.hwmodule.regval)); + break; + case FW_ERROR_TYPE_WR: + log(LOG_ERR, "WR cidx %d PF %d VF %d eqid %d hdr:\n", + be16toh(e->u.wr.cidx), + G_FW_ERROR_CMD_PFN(be16toh(e->u.wr.pfn_vfn)), + G_FW_ERROR_CMD_VFN(be16toh(e->u.wr.pfn_vfn)), + be32toh(e->u.wr.eqid)); + for (i = 0; i < nitems(e->u.wr.wrhdr); i++) + log(LOG_ERR, "%s%02x", i == 0 ? "\t" : " ", + e->u.wr.wrhdr[i]); + log(LOG_ERR, "\n"); + break; + case FW_ERROR_TYPE_ACL: + log(LOG_ERR, "ACL cidx %d PF %d VF %d eqid %d %s", + be16toh(e->u.acl.cidx), + G_FW_ERROR_CMD_PFN(be16toh(e->u.acl.pfn_vfn)), + G_FW_ERROR_CMD_VFN(be16toh(e->u.acl.pfn_vfn)), + be32toh(e->u.acl.eqid), + G_FW_ERROR_CMD_MV(be16toh(e->u.acl.mv_pkd)) ? "vlanid" : + "MAC"); + for (i = 0; i < nitems(e->u.acl.val); i++) + log(LOG_ERR, " %02x", e->u.acl.val[i]); + log(LOG_ERR, "\n"); + break; + default: + log(LOG_ERR, "type %#x\n", + G_FW_ERROR_CMD_TYPE(be32toh(e->op_to_type))); + return (EINVAL); + } + return (0); +} + static int sysctl_uint16(SYSCTL_HANDLER_ARGS) { From owner-svn-src-all@freebsd.org Fri Sep 30 00:10: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 EEFF2C02BD4; Fri, 30 Sep 2016 00:10:58 +0000 (UTC) (envelope-from hiren@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 CD297F1E; Fri, 30 Sep 2016 00:10:58 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0AwU2054350; Fri, 30 Sep 2016 00:10:58 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0Aw2S054349; Fri, 30 Sep 2016 00:10:58 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609300010.u8U0Aw2S054349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Fri, 30 Sep 2016 00:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306464 - 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.23 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: Fri, 30 Sep 2016 00:10:59 -0000 Author: hiren Date: Fri Sep 30 00:10:57 2016 New Revision: 306464 URL: https://svnweb.freebsd.org/changeset/base/306464 Log: This adds a sysctl which allows you to disable the TCP hostcache. This is handy during testing of network related changes where cached entries may pollute your results, or during known congestion events where you don't want to unfairly penalize hosts. Prior to r232346 this would have meant you would break any connection with a sub 1500 MTU, as the hostcache was authoritative. All entries as they stand today should simply be used to pre populate values for efficiency. Submitted by: Jason Wolfe (j at nitrology dot com) Reviewed by: rwatson, sbruno, rrs , bz (earlier version) MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D6198 Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Thu Sep 29 23:41:57 2016 (r306463) +++ head/sys/netinet/tcp_hostcache.c Fri Sep 30 00:10:57 2016 (r306464) @@ -124,6 +124,12 @@ static void tcp_hc_purge(void *); static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache"); +VNET_DEFINE(int, tcp_use_hostcache) = 1; +#define V_tcp_use_hostcache VNET(tcp_use_hostcache) +SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_use_hostcache), 0, + "Enable the TCP hostcache"); + SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.cache_limit), 0, "Overall entry limit for hostcache"); @@ -276,6 +282,9 @@ tcp_hc_lookup(struct in_conninfo *inc) struct hc_head *hc_head; struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return NULL; + KASSERT(inc != NULL, ("tcp_hc_lookup with NULL in_conninfo pointer")); /* @@ -332,6 +341,9 @@ tcp_hc_insert(struct in_conninfo *inc) struct hc_head *hc_head; struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return NULL; + KASSERT(inc != NULL, ("tcp_hc_insert with NULL in_conninfo pointer")); /* @@ -421,6 +433,9 @@ tcp_hc_get(struct in_conninfo *inc, stru { struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return; + /* * Find the right bucket. */ @@ -452,7 +467,7 @@ tcp_hc_get(struct in_conninfo *inc, stru /* * External function: look up an entry in the hostcache and return the - * discovered path MTU. Returns NULL if no entry is found or value is not + * discovered path MTU. Returns 0 if no entry is found or value is not * set. */ u_long @@ -461,6 +476,9 @@ tcp_hc_getmtu(struct in_conninfo *inc) struct hc_metrics *hc_entry; u_long mtu; + if (!V_tcp_use_hostcache) + return 0; + hc_entry = tcp_hc_lookup(inc); if (hc_entry == NULL) { return 0; @@ -482,6 +500,9 @@ tcp_hc_updatemtu(struct in_conninfo *inc { struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return; + /* * Find the right bucket. */ @@ -521,6 +542,9 @@ tcp_hc_update(struct in_conninfo *inc, s { struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return; + hc_entry = tcp_hc_lookup(inc); if (hc_entry == NULL) { hc_entry = tcp_hc_insert(inc); From owner-svn-src-all@freebsd.org Fri Sep 30 00:16: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 C8247C02D61; Fri, 30 Sep 2016 00:16:55 +0000 (UTC) (envelope-from np@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 8A4C71329; Fri, 30 Sep 2016 00:16:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0GsnV058066; Fri, 30 Sep 2016 00:16:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0GsOU058065; Fri, 30 Sep 2016 00:16:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609300016.u8U0GsOU058065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 30 Sep 2016 00:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306465 - head/sys/dev/cxgbe 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.23 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: Fri, 30 Sep 2016 00:16:55 -0000 Author: np Date: Fri Sep 30 00:16:54 2016 New Revision: 306465 URL: https://svnweb.freebsd.org/changeset/base/306465 Log: cxgbe(4): Claim the T6 -DBG card. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Sep 30 00:10:57 2016 (r306464) +++ head/sys/dev/cxgbe/t4_main.c Fri Sep 30 00:16:54 2016 (r306465) @@ -607,6 +607,7 @@ struct { {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6408, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ {0x640d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ + {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */ }; #ifdef TCP_OFFLOAD From owner-svn-src-all@freebsd.org Fri Sep 30 00:31: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 DC9E2C02FE7; Fri, 30 Sep 2016 00:31:18 +0000 (UTC) (envelope-from jhb@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 AC4D418E8; Fri, 30 Sep 2016 00:31:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0VHM8061930; Fri, 30 Sep 2016 00:31:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0VHW7061929; Fri, 30 Sep 2016 00:31:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300031.u8U0VHW7061929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 00:31: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: r306466 - in stable: 10/sys/x86/iommu 11/sys/x86/iommu 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.23 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: Fri, 30 Sep 2016 00:31:19 -0000 Author: jhb Date: Fri Sep 30 00:31:17 2016 New Revision: 306466 URL: https://svnweb.freebsd.org/changeset/base/306466 Log: MFC 303886: Add additional constants. - Add constants for the fields in the root-entry table address register, namely the root type type (RTT) and root table address (RTA) mask. - Add macros for the bitmask of the domain ID field in the second word of context table entries as well as a helper macro (DMAR_CTX2_GET_DID) to extract the domain ID from a context table entry. Sponsored by: Chelsio Communications Modified: stable/10/sys/x86/iommu/intel_reg.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/x86/iommu/intel_reg.h Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/x86/iommu/intel_reg.h ============================================================================== --- stable/10/sys/x86/iommu/intel_reg.h Fri Sep 30 00:16:54 2016 (r306465) +++ stable/10/sys/x86/iommu/intel_reg.h Fri Sep 30 00:31:17 2016 (r306466) @@ -67,7 +67,9 @@ typedef struct dmar_ctx_entry { #define DMAR_CTX2_AW_4LVL 2 /* 4-level page tables */ #define DMAR_CTX2_AW_5LVL 3 /* 5-level page tables */ #define DMAR_CTX2_AW_6LVL 4 /* 6-level page tables */ +#define DMAR_CTX2_DID_MASK 0xffff0 #define DMAR_CTX2_DID(x) ((x) << 8) /* Domain Identifier */ +#define DMAR_CTX2_GET_DID(ctx2) (((ctx2) & DMAR_CTX2_DID_MASK) >> 8) typedef struct dmar_pte { uint64_t pte; @@ -214,6 +216,8 @@ typedef struct dmar_irte { /* Root-Entry Table Address register */ #define DMAR_RTADDR_REG 0x20 +#define DMAR_RTADDR_RTT (1 << 11) /* Root Table Type */ +#define DMAR_RTADDR_RTA_MASK 0xfffffffffffff000 /* Context Command register */ #define DMAR_CCMD_REG 0x28 From owner-svn-src-all@freebsd.org Fri Sep 30 00:31: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 22365C02FF3; Fri, 30 Sep 2016 00:31:19 +0000 (UTC) (envelope-from jhb@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 E568B18EC; Fri, 30 Sep 2016 00:31:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0VIWw061936; Fri, 30 Sep 2016 00:31:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0VIve061935; Fri, 30 Sep 2016 00:31:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300031.u8U0VIve061935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 00:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306466 - in stable: 10/sys/x86/iommu 11/sys/x86/iommu X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 00:31:19 -0000 Author: jhb Date: Fri Sep 30 00:31:17 2016 New Revision: 306466 URL: https://svnweb.freebsd.org/changeset/base/306466 Log: MFC 303886: Add additional constants. - Add constants for the fields in the root-entry table address register, namely the root type type (RTT) and root table address (RTA) mask. - Add macros for the bitmask of the domain ID field in the second word of context table entries as well as a helper macro (DMAR_CTX2_GET_DID) to extract the domain ID from a context table entry. Sponsored by: Chelsio Communications Modified: stable/11/sys/x86/iommu/intel_reg.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/x86/iommu/intel_reg.h Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/x86/iommu/intel_reg.h ============================================================================== --- stable/11/sys/x86/iommu/intel_reg.h Fri Sep 30 00:16:54 2016 (r306465) +++ stable/11/sys/x86/iommu/intel_reg.h Fri Sep 30 00:31:17 2016 (r306466) @@ -67,7 +67,9 @@ typedef struct dmar_ctx_entry { #define DMAR_CTX2_AW_4LVL 2 /* 4-level page tables */ #define DMAR_CTX2_AW_5LVL 3 /* 5-level page tables */ #define DMAR_CTX2_AW_6LVL 4 /* 6-level page tables */ +#define DMAR_CTX2_DID_MASK 0xffff0 #define DMAR_CTX2_DID(x) ((x) << 8) /* Domain Identifier */ +#define DMAR_CTX2_GET_DID(ctx2) (((ctx2) & DMAR_CTX2_DID_MASK) >> 8) typedef struct dmar_pte { uint64_t pte; @@ -214,6 +216,8 @@ typedef struct dmar_irte { /* Root-Entry Table Address register */ #define DMAR_RTADDR_REG 0x20 +#define DMAR_RTADDR_RTT (1 << 11) /* Root Table Type */ +#define DMAR_RTADDR_RTA_MASK 0xfffffffffffff000 /* Context Command register */ #define DMAR_CCMD_REG 0x28 From owner-svn-src-all@freebsd.org Fri Sep 30 00:33:20 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 58718C002E1; Fri, 30 Sep 2016 00:33:20 +0000 (UTC) (envelope-from jhb@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 2571E1D71; Fri, 30 Sep 2016 00:33:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0XJnI065458; Fri, 30 Sep 2016 00:33:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0XJ6N065457; Fri, 30 Sep 2016 00:33:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300033.u8U0XJ6N065457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 00:33:19 +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: r306467 - in stable: 10/tools/tools/dmardump 11/tools/tools/dmardump 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.23 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: Fri, 30 Sep 2016 00:33:20 -0000 Author: jhb Date: Fri Sep 30 00:33:19 2016 New Revision: 306467 URL: https://svnweb.freebsd.org/changeset/base/306467 Log: MFC 303887: Add a dmardump utility to dump the VT-d context tables. This tool parses the ACPI DMAR table looking for DMA remapping devices. For each device it walks the root table and any context tables referenced to display mapping info for PCI devices. Note that acpidump -t already parses the info in the ACPI DMAR tables directly. This tool examines some of the data structures the DMAR remapping engines use to translate DMA requests. Sponsored by: Chelsio Communications Added: stable/10/tools/tools/dmardump/ - copied from r303887, head/tools/tools/dmardump/ Modified: Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/11/tools/tools/dmardump/ - copied from r303887, head/tools/tools/dmardump/ Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Fri Sep 30 00:33:20 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 7E88AC002E6; Fri, 30 Sep 2016 00:33:20 +0000 (UTC) (envelope-from jhb@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 4E1FF1D72; Fri, 30 Sep 2016 00:33:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0XJDt065463; Fri, 30 Sep 2016 00:33:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0XJOt065462; Fri, 30 Sep 2016 00:33:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300033.u8U0XJOt065462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 00:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306467 - in stable: 10/tools/tools/dmardump 11/tools/tools/dmardump X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 00:33:20 -0000 Author: jhb Date: Fri Sep 30 00:33:19 2016 New Revision: 306467 URL: https://svnweb.freebsd.org/changeset/base/306467 Log: MFC 303887: Add a dmardump utility to dump the VT-d context tables. This tool parses the ACPI DMAR table looking for DMA remapping devices. For each device it walks the root table and any context tables referenced to display mapping info for PCI devices. Note that acpidump -t already parses the info in the ACPI DMAR tables directly. This tool examines some of the data structures the DMAR remapping engines use to translate DMA requests. Sponsored by: Chelsio Communications Added: stable/11/tools/tools/dmardump/ - copied from r303887, head/tools/tools/dmardump/ Modified: Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/10/tools/tools/dmardump/ - copied from r303887, head/tools/tools/dmardump/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Sep 30 00:43:31 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 8F03CC00A69; Fri, 30 Sep 2016 00:43:31 +0000 (UTC) (envelope-from jhb@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 61C5AAF6; Fri, 30 Sep 2016 00:43:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0hU7t069158; Fri, 30 Sep 2016 00:43:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0hUwB069157; Fri, 30 Sep 2016 00:43:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300043.u8U0hUwB069157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 00:43:30 +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: r306468 - stable/10/sys/dev/pci 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.23 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: Fri, 30 Sep 2016 00:43:31 -0000 Author: jhb Date: Fri Sep 30 00:43:30 2016 New Revision: 306468 URL: https://svnweb.freebsd.org/changeset/base/306468 Log: MFC 295813,295816: Remove redundant check for "(dinfo != NULL)". Modified: stable/10/sys/dev/pci/pci_user.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci_user.c ============================================================================== --- stable/10/sys/dev/pci/pci_user.c Fri Sep 30 00:33:19 2016 (r306467) +++ stable/10/sys/dev/pci/pci_user.c Fri Sep 30 00:43:30 2016 (r306468) @@ -709,9 +709,9 @@ pci_ioctl(struct cdev *dev, u_long cmd, * that match the user's criteria. */ for (cio->num_matches = 0, error = 0, i = 0, - dinfo = STAILQ_FIRST(devlist_head); - (dinfo != NULL) && (cio->num_matches < ionum) - && (error == 0) && (i < pci_numdevs) && (dinfo != NULL); + dinfo = STAILQ_FIRST(devlist_head); + (dinfo != NULL) && (cio->num_matches < ionum) && + (error == 0) && (i < pci_numdevs); dinfo = STAILQ_NEXT(dinfo, pci_links), i++) { if (i < cio->offset) From owner-svn-src-all@freebsd.org Fri Sep 30 01:13: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 76E19C01337; Fri, 30 Sep 2016 01:13:58 +0000 (UTC) (envelope-from jhb@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 5230017E9; Fri, 30 Sep 2016 01:13:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U1DvBV080294; Fri, 30 Sep 2016 01:13:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U1DvSV080292; Fri, 30 Sep 2016 01:13:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300113.u8U1DvSV080292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 01:13:57 +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: r306469 - in stable: 10/share/man/man4 10/sys/dev/pci 11/share/man/man4 11/sys/dev/pci 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.23 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: Fri, 30 Sep 2016 01:13:58 -0000 Author: jhb Date: Fri Sep 30 01:13:57 2016 New Revision: 306469 URL: https://svnweb.freebsd.org/changeset/base/306469 Log: MFC 303881: Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF. Previously the loop in PCIIOCGETCONF would terminate as soon as it found enough matches. Now it will continue iterating through the PCI device list and only terminate if it finds another matching device for which it has no room to store a conf structure. This means that PCI_GETCONF_LAST_DEVICE is reliably returned when the number of matching devices is equal to the number of slots in the matches buffer. For example, if a program requests the conf structure for a single PCI function with a specified domain/bus/slot/function it will now get PCI_GETCONF_LAST_DEVICE instead of PCI_GETCONF_MORE_DEVS. While here, simplify the loop conditional a bit more by explicitly breaking out of the loop if copyout() fails and removing a redundant i < pci_numdevs check. Sponsored by: Chelsio Communications Modified: stable/10/share/man/man4/pci.4 stable/10/sys/dev/pci/pci_user.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man4/pci.4 stable/11/sys/dev/pci/pci_user.c Directory Properties: stable/11/ (props changed) Modified: stable/10/share/man/man4/pci.4 ============================================================================== --- stable/10/share/man/man4/pci.4 Fri Sep 30 00:43:30 2016 (r306468) +++ stable/10/share/man/man4/pci.4 Fri Sep 30 01:13:57 2016 (r306469) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2008 +.Dd August 9, 2016 .Dt PCI 4 .Os .Sh NAME @@ -229,7 +229,8 @@ The status tells the user the dispositio The possible status values are: .Bl -ohang .It PCI_GETCONF_LAST_DEVICE -This means that there are no more devices in the PCI device list after the +This means that there are no more devices in the PCI device list matching +the specified criteria after the ones returned in the .Va matches buffer. @@ -245,9 +246,7 @@ and to zero to start over at the beginning of the list. .It PCI_GETCONF_MORE_DEVS This tells the user that his buffer was not large enough to hold all of the -remaining devices in the device list that possibly match his criteria. -It is possible for this status to be returned, even when none of the remaining -devices in the list would match the user's criteria. +remaining devices in the device list that match his criteria. .It PCI_GETCONF_ERROR This indicates a general error while servicing the user's request. If the Modified: stable/10/sys/dev/pci/pci_user.c ============================================================================== --- stable/10/sys/dev/pci/pci_user.c Fri Sep 30 00:43:30 2016 (r306468) +++ stable/10/sys/dev/pci/pci_user.c Fri Sep 30 01:13:57 2016 (r306469) @@ -708,10 +708,9 @@ pci_ioctl(struct cdev *dev, u_long cmd, * Go through the list of devices and copy out the devices * that match the user's criteria. */ - for (cio->num_matches = 0, error = 0, i = 0, + for (cio->num_matches = 0, i = 0, dinfo = STAILQ_FIRST(devlist_head); - (dinfo != NULL) && (cio->num_matches < ionum) && - (error == 0) && (i < pci_numdevs); + dinfo != NULL; dinfo = STAILQ_NEXT(dinfo, pci_links), i++) { if (i < cio->offset) @@ -833,11 +832,12 @@ pci_ioctl(struct cdev *dev, u_long cmd, } else #endif /* PRE7_COMPAT */ confdata = &dinfo->conf; - /* Only if we can copy it out do we count it. */ - if (!(error = copyout(confdata, + error = copyout(confdata, (caddr_t)cio->matches + - confsz * cio->num_matches, confsz))) - cio->num_matches++; + confsz * cio->num_matches, confsz); + if (error) + break; + cio->num_matches++; } } From owner-svn-src-all@freebsd.org Fri Sep 30 01:13: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 C598EC0133B; Fri, 30 Sep 2016 01:13:58 +0000 (UTC) (envelope-from jhb@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 A10F917EA; Fri, 30 Sep 2016 01:13:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U1DvI8080301; Fri, 30 Sep 2016 01:13:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U1DvZ1080299; Fri, 30 Sep 2016 01:13:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300113.u8U1DvZ1080299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 01:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306469 - in stable: 10/share/man/man4 10/sys/dev/pci 11/share/man/man4 11/sys/dev/pci X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 01:13:58 -0000 Author: jhb Date: Fri Sep 30 01:13:57 2016 New Revision: 306469 URL: https://svnweb.freebsd.org/changeset/base/306469 Log: MFC 303881: Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF. Previously the loop in PCIIOCGETCONF would terminate as soon as it found enough matches. Now it will continue iterating through the PCI device list and only terminate if it finds another matching device for which it has no room to store a conf structure. This means that PCI_GETCONF_LAST_DEVICE is reliably returned when the number of matching devices is equal to the number of slots in the matches buffer. For example, if a program requests the conf structure for a single PCI function with a specified domain/bus/slot/function it will now get PCI_GETCONF_LAST_DEVICE instead of PCI_GETCONF_MORE_DEVS. While here, simplify the loop conditional a bit more by explicitly breaking out of the loop if copyout() fails and removing a redundant i < pci_numdevs check. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man4/pci.4 stable/11/sys/dev/pci/pci_user.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man4/pci.4 stable/10/sys/dev/pci/pci_user.c Directory Properties: stable/10/ (props changed) Modified: stable/11/share/man/man4/pci.4 ============================================================================== --- stable/11/share/man/man4/pci.4 Fri Sep 30 00:43:30 2016 (r306468) +++ stable/11/share/man/man4/pci.4 Fri Sep 30 01:13:57 2016 (r306469) @@ -254,7 +254,8 @@ The status tells the user the dispositio The possible status values are: .Bl -ohang .It PCI_GETCONF_LAST_DEVICE -This means that there are no more devices in the PCI device list after the +This means that there are no more devices in the PCI device list matching +the specified criteria after the ones returned in the .Va matches buffer. @@ -270,9 +271,7 @@ and to zero to start over at the beginning of the list. .It PCI_GETCONF_MORE_DEVS This tells the user that his buffer was not large enough to hold all of the -remaining devices in the device list that possibly match his criteria. -It is possible for this status to be returned, even when none of the remaining -devices in the list would match the user's criteria. +remaining devices in the device list that match his criteria. .It PCI_GETCONF_ERROR This indicates a general error while servicing the user's request. If the Modified: stable/11/sys/dev/pci/pci_user.c ============================================================================== --- stable/11/sys/dev/pci/pci_user.c Fri Sep 30 00:43:30 2016 (r306468) +++ stable/11/sys/dev/pci/pci_user.c Fri Sep 30 01:13:57 2016 (r306469) @@ -708,10 +708,9 @@ pci_ioctl(struct cdev *dev, u_long cmd, * Go through the list of devices and copy out the devices * that match the user's criteria. */ - for (cio->num_matches = 0, error = 0, i = 0, + for (cio->num_matches = 0, i = 0, dinfo = STAILQ_FIRST(devlist_head); - (dinfo != NULL) && (cio->num_matches < ionum) && - (error == 0) && (i < pci_numdevs); + dinfo != NULL; dinfo = STAILQ_NEXT(dinfo, pci_links), i++) { if (i < cio->offset) @@ -833,11 +832,12 @@ pci_ioctl(struct cdev *dev, u_long cmd, } else #endif /* PRE7_COMPAT */ confdata = &dinfo->conf; - /* Only if we can copy it out do we count it. */ - if (!(error = copyout(confdata, + error = copyout(confdata, (caddr_t)cio->matches + - confsz * cio->num_matches, confsz))) - cio->num_matches++; + confsz * cio->num_matches, confsz); + if (error) + break; + cio->num_matches++; } } From owner-svn-src-all@freebsd.org Fri Sep 30 01:16: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 6937AC0148B; Fri, 30 Sep 2016 01:16:10 +0000 (UTC) (envelope-from jhb@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 39B0D1BF1; Fri, 30 Sep 2016 01:16:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U1G9w2081201; Fri, 30 Sep 2016 01:16:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U1G9fU081200; Fri, 30 Sep 2016 01:16:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300116.u8U1G9fU081200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 01:16:09 +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: r306470 - in stable: 10/share/man/man9 11/share/man/man9 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.23 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: Fri, 30 Sep 2016 01:16:10 -0000 Author: jhb Date: Fri Sep 30 01:16:09 2016 New Revision: 306470 URL: https://svnweb.freebsd.org/changeset/base/306470 Log: MFC 305248: Remove warning about pci_addr_t being different sizes. pci_addr_t has always been 64-bits since r163805. Modified: stable/10/share/man/man9/pci.9 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man9/pci.9 Directory Properties: stable/11/ (props changed) Modified: stable/10/share/man/man9/pci.9 ============================================================================== --- stable/10/share/man/man9/pci.9 Fri Sep 30 01:13:57 2016 (r306469) +++ stable/10/share/man/man9/pci.9 Fri Sep 30 01:16:09 2016 (r306470) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2016 +.Dd September 1, 2016 .Dt PCI 9 .Os .Sh NAME @@ -793,11 +793,6 @@ with one in the new distribution. The .Fn pci_remap_msix function will fail if this condition is not met. -.Sh IMPLEMENTATION NOTES -The -.Vt pci_addr_t -type varies according to the size of the PCI bus address -space on the target architecture. .Sh SEE ALSO .Xr pci 4 , .Xr pciconf 8 , From owner-svn-src-all@freebsd.org Fri Sep 30 01:16: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 A2DE8C0148F; Fri, 30 Sep 2016 01:16:10 +0000 (UTC) (envelope-from jhb@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 729DE1BF2; Fri, 30 Sep 2016 01:16:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U1G9W3081207; Fri, 30 Sep 2016 01:16:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U1G9lY081206; Fri, 30 Sep 2016 01:16:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300116.u8U1G9lY081206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 01:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306470 - in stable: 10/share/man/man9 11/share/man/man9 X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 01:16:10 -0000 Author: jhb Date: Fri Sep 30 01:16:09 2016 New Revision: 306470 URL: https://svnweb.freebsd.org/changeset/base/306470 Log: MFC 305248: Remove warning about pci_addr_t being different sizes. pci_addr_t has always been 64-bits since r163805. Modified: stable/11/share/man/man9/pci.9 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man9/pci.9 Directory Properties: stable/10/ (props changed) Modified: stable/11/share/man/man9/pci.9 ============================================================================== --- stable/11/share/man/man9/pci.9 Fri Sep 30 01:13:57 2016 (r306469) +++ stable/11/share/man/man9/pci.9 Fri Sep 30 01:16:09 2016 (r306470) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2016 +.Dd September 1, 2016 .Dt PCI 9 .Os .Sh NAME @@ -910,11 +910,6 @@ with one in the new distribution. The .Fn pci_remap_msix function will fail if this condition is not met. -.Sh IMPLEMENTATION NOTES -The -.Vt pci_addr_t -type varies according to the size of the PCI bus address -space on the target architecture. .Sh SEE ALSO .Xr pci 4 , .Xr pciconf 8 , From owner-svn-src-all@freebsd.org Fri Sep 30 01:39:20 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 9399CC01912; Fri, 30 Sep 2016 01:39:20 +0000 (UTC) (envelope-from jhb@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 6C0087B5; Fri, 30 Sep 2016 01:39:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U1dJHU088616; Fri, 30 Sep 2016 01:39:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U1dILm088609; Fri, 30 Sep 2016 01:39:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300139.u8U1dILm088609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 01:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306471 - in stable/11: share/man/man9 sys/amd64/vmm sys/amd64/vmm/io sys/dev/pci X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 01:39:20 -0000 Author: jhb Date: Fri Sep 30 01:39:18 2016 New Revision: 306471 URL: https://svnweb.freebsd.org/changeset/base/306471 Log: MFC 304858,305485,305497: Fix various issues with PCI pass through and VT-d. 304858: Enable I/O MMU when PCI pass through is first used. Rather than enabling the I/O MMU when the vmm module is loaded, defer initialization until the first attempt to pass a PCI device through to a guest. If the I/O MMU fails to initialize or is not present, than fail the attempt to pass a PCI device through to a guest. The hw.vmm.force_iommu tunable has been removed since the I/O MMU is no longer enabled during boot. However, the I/O MMU support can be disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent use of the I/O MMU on any systems where it is buggy. 305485: Leave ppt devices in the host domain when they are not attached to a VM. This allows a pass through device to be reset to a normal device driver on the host and reused on the host. ppt devices are now always active in some I/O MMU domain when the I/O MMU is active, either the host domain or the domain of a VM they are attached to. 305497: Update the I/O MMU in bhyve when PCI devices are added and removed. When the I/O MMU is active in bhyve, all PCI devices need valid entries in the DMAR context tables. The I/O MMU code does a single enumeration of the available PCI devices during initialization to add all existing devices to a domain representing the host. The ppt(4) driver then moves pass through devices in and out of domains for virtual machines as needed. However, when new PCI devices were added at runtime either via SR-IOV or HotPlug, the I/O MMU tables were not updated. This change adds a new set of EVENTHANDLERS that are invoked when PCI devices are added and deleted. The I/O MMU driver in bhyve installs handlers for these events which it uses to add and remove devices to the "host" domain. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man9/pci.9 stable/11/sys/amd64/vmm/io/iommu.c stable/11/sys/amd64/vmm/io/iommu.h stable/11/sys/amd64/vmm/io/ppt.c stable/11/sys/amd64/vmm/vmm.c stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pcivar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/pci.9 ============================================================================== --- stable/11/share/man/man9/pci.9 Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/share/man/man9/pci.9 Fri Sep 30 01:39:18 2016 (r306471) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2016 +.Dd September 6, 2016 .Dt PCI 9 .Os .Sh NAME @@ -149,6 +149,10 @@ .Fn pcie_read_config "device_t dev" "int reg" "int width" .Ft void .Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width" +.Ft void +.Fn pci_event_fn "void *arg" "device_t dev" +.Fn EVENTHANDLER_REGISTER "pci_add_device" "pci_event_fn" +.Fn EVENTHANDLER_DEREGISTER "pci_delete_resource" "pci_event_fn" .In dev/pci/pci_iov.h .Ft int .Fn pci_iov_attach "device_t dev" "nvlist_t *pf_schema" "nvlist_t *vf_schema" @@ -910,6 +914,24 @@ with one in the new distribution. The .Fn pci_remap_msix function will fail if this condition is not met. +.Ss Device Events +The +.Va pci_add_device +event handler is invoked every time a new PCI device is added to the system. +This includes the creation of Virtual Functions via SR-IOV. +.Pp +The +.Va pci_delete_device +event handler is invoked every time a PCI device is removed from the system. +.Pp +Both event handlers pass the +.Vt device_t +object of the relevant PCI device as +.Fa dev +to each callback function. +Both event handlers are invoked while +.Fa dev +is unattached but with valid instance variables. .Sh SEE ALSO .Xr pci 4 , .Xr pciconf 8 , @@ -921,6 +943,7 @@ function will fail if this condition is .Xr devclass 9 , .Xr device 9 , .Xr driver 9 , +.Xr eventhandler 9 , .Xr rman 9 .Rs .%B FreeBSD Developers' Handbook Modified: stable/11/sys/amd64/vmm/io/iommu.c ============================================================================== --- stable/11/sys/amd64/vmm/io/iommu.c Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/sys/amd64/vmm/io/iommu.c Fri Sep 30 01:39:18 2016 (r306471) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "vmm_util.h" @@ -51,8 +52,13 @@ static int iommu_avail; SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, initialized, CTLFLAG_RD, &iommu_avail, 0, "bhyve iommu initialized?"); +static int iommu_enable = 1; +SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, enable, CTLFLAG_RDTUN, &iommu_enable, 0, + "Enable use of I/O MMU (required for PCI passthrough)."); + static struct iommu_ops *ops; static void *host_domain; +static eventhandler_tag add_tag, delete_tag; static __inline int IOMMU_INIT(void) @@ -148,14 +154,31 @@ IOMMU_DISABLE(void) (*ops->disable)(); } -void +static void +iommu_pci_add(void *arg, device_t dev) +{ + + /* Add new devices to the host domain. */ + iommu_add_device(host_domain, pci_get_rid(dev)); +} + +static void +iommu_pci_delete(void *arg, device_t dev) +{ + + iommu_remove_device(host_domain, pci_get_rid(dev)); +} + +static void iommu_init(void) { int error, bus, slot, func; vm_paddr_t maxaddr; - const char *name; device_t dev; + if (!iommu_enable) + return; + if (vmm_is_intel()) ops = &iommu_ops_intel; else if (vmm_is_amd()) @@ -174,8 +197,13 @@ iommu_init(void) */ maxaddr = vmm_mem_maxaddr(); host_domain = IOMMU_CREATE_DOMAIN(maxaddr); - if (host_domain == NULL) - panic("iommu_init: unable to create a host domain"); + if (host_domain == NULL) { + printf("iommu_init: unable to create a host domain"); + IOMMU_CLEANUP(); + ops = NULL; + iommu_avail = 0; + return; + } /* * Create 1:1 mappings from '0' to 'maxaddr' for devices assigned to @@ -183,6 +211,9 @@ iommu_init(void) */ iommu_create_mapping(host_domain, 0, 0, maxaddr); + add_tag = EVENTHANDLER_REGISTER(pci_add_device, iommu_pci_add, NULL, 0); + delete_tag = EVENTHANDLER_REGISTER(pci_delete_device, iommu_pci_delete, + NULL, 0); for (bus = 0; bus <= PCI_BUSMAX; bus++) { for (slot = 0; slot <= PCI_SLOTMAX; slot++) { for (func = 0; func <= PCI_FUNCMAX; func++) { @@ -190,12 +221,7 @@ iommu_init(void) if (dev == NULL) continue; - /* skip passthrough devices */ - name = device_get_name(dev); - if (name != NULL && strcmp(name, "ppt") == 0) - continue; - - /* everything else belongs to the host domain */ + /* Everything belongs to the host domain. */ iommu_add_device(host_domain, pci_get_rid(dev)); } @@ -208,6 +234,15 @@ iommu_init(void) void iommu_cleanup(void) { + + if (add_tag != NULL) { + EVENTHANDLER_DEREGISTER(pci_add_device, add_tag); + add_tag = NULL; + } + if (delete_tag != NULL) { + EVENTHANDLER_DEREGISTER(pci_delete_device, delete_tag); + delete_tag = NULL; + } IOMMU_DISABLE(); IOMMU_DESTROY_DOMAIN(host_domain); IOMMU_CLEANUP(); @@ -216,7 +251,16 @@ iommu_cleanup(void) void * iommu_create_domain(vm_paddr_t maxaddr) { + static volatile int iommu_initted; + if (iommu_initted < 2) { + if (atomic_cmpset_int(&iommu_initted, 0, 1)) { + iommu_init(); + atomic_store_rel_int(&iommu_initted, 2); + } else + while (iommu_initted == 1) + cpu_spinwait(); + } return (IOMMU_CREATE_DOMAIN(maxaddr)); } Modified: stable/11/sys/amd64/vmm/io/iommu.h ============================================================================== --- stable/11/sys/amd64/vmm/io/iommu.h Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/sys/amd64/vmm/io/iommu.h Fri Sep 30 01:39:18 2016 (r306471) @@ -61,7 +61,6 @@ struct iommu_ops { extern struct iommu_ops iommu_ops_intel; extern struct iommu_ops iommu_ops_amd; -void iommu_init(void); void iommu_cleanup(void); void *iommu_host_domain(void); void *iommu_create_domain(vm_paddr_t maxaddr); Modified: stable/11/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/11/sys/amd64/vmm/io/ppt.c Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/sys/amd64/vmm/io/ppt.c Fri Sep 30 01:39:18 2016 (r306471) @@ -363,6 +363,7 @@ ppt_assign_device(struct vm *vm, int bus return (EBUSY); ppt->vm = vm; + iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); return (0); } @@ -385,6 +386,7 @@ ppt_unassign_device(struct vm *vm, int b ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); iommu_remove_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); + iommu_add_device(iommu_host_domain(), pci_get_rid(ppt->dev)); ppt->vm = NULL; return (0); } Modified: stable/11/sys/amd64/vmm/vmm.c ============================================================================== --- stable/11/sys/amd64/vmm/vmm.c Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/sys/amd64/vmm/vmm.c Fri Sep 30 01:39:18 2016 (r306471) @@ -224,11 +224,6 @@ SYSCTL_INT(_hw_vmm, OID_AUTO, trace_gues &trace_guest_exceptions, 0, "Trap into hypervisor on all guest exceptions and reflect them back"); -static int vmm_force_iommu = 0; -TUNABLE_INT("hw.vmm.force_iommu", &vmm_force_iommu); -SYSCTL_INT(_hw_vmm, OID_AUTO, force_iommu, CTLFLAG_RDTUN, &vmm_force_iommu, 0, - "Force use of I/O MMU even if no passthrough devices were found."); - static void vm_free_memmap(struct vm *vm, int ident); static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); static void vcpu_notify_event_locked(struct vcpu *vcpu, bool lapic_intr); @@ -358,8 +353,6 @@ vmm_handler(module_t mod, int what, void switch (what) { case MOD_LOAD: vmmdev_init(); - if (vmm_force_iommu || ppt_avail_devices() > 0) - iommu_init(); error = vmm_init(); if (error == 0) vmm_initialized = 1; @@ -396,9 +389,6 @@ static moduledata_t vmm_kmod = { /* * vmm initialization has the following dependencies: * - * - iommu initialization must happen after the pci passthru driver has had - * a chance to attach to any passthru devices (after SI_SUB_CONFIGURE). - * * - VT-x initialization requires smp_rendezvous() and therefore must happen * after SMP is fully functional (after SI_SUB_SMP). */ @@ -893,6 +883,8 @@ vm_assign_pptdev(struct vm *vm, int bus, ("vm_assign_pptdev: iommu must be NULL")); maxaddr = sysmem_maxaddr(vm); vm->iommu = iommu_create_domain(maxaddr); + if (vm->iommu == NULL) + return (ENXIO); vm_iommu_map(vm); } Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/sys/dev/pci/pci.c Fri Sep 30 01:39:18 2016 (r306471) @@ -4070,6 +4070,7 @@ pci_add_child(device_t bus, struct pci_d pci_print_verbose(dinfo); pci_add_resources(bus, dinfo->cfg.dev, 0, 0); pci_child_added(dinfo->cfg.dev); + EVENTHANDLER_INVOKE(pci_add_device, dinfo->cfg.dev); } void @@ -5311,6 +5312,8 @@ pci_child_deleted(device_t dev, device_t dinfo = device_get_ivars(child); rl = &dinfo->resources; + EVENTHANDLER_INVOKE(pci_delete_device, child); + /* Turn off access to resources we're about to free */ if (bus_child_present(child) != 0) { pci_write_config(child, PCIR_COMMAND, pci_read_config(child, Modified: stable/11/sys/dev/pci/pcivar.h ============================================================================== --- stable/11/sys/dev/pci/pcivar.h Fri Sep 30 01:16:09 2016 (r306470) +++ stable/11/sys/dev/pci/pcivar.h Fri Sep 30 01:39:18 2016 (r306471) @@ -31,6 +31,7 @@ #define _PCIVAR_H_ #include +#include /* some PCI bus constants */ #define PCI_MAXMAPS_0 6 /* max. no. of memory/port maps */ @@ -631,4 +632,12 @@ void * vga_pci_map_bios(device_t dev, si void vga_pci_unmap_bios(device_t dev, void *bios); int vga_pci_repost(device_t dev); +/** + * Global eventhandlers invoked when PCI devices are added or removed + * from the system. + */ +typedef void (*pci_event_fn)(void *arg, device_t dev); +EVENTHANDLER_DECLARE(pci_add_device, pci_event_fn); +EVENTHANDLER_DECLARE(pci_delete_device, pci_event_fn); + #endif /* _PCIVAR_H_ */ From owner-svn-src-all@freebsd.org Fri Sep 30 01:42:31 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 17802C01AD0; Fri, 30 Sep 2016 01:42:31 +0000 (UTC) (envelope-from jhb@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 E970DB4F; Fri, 30 Sep 2016 01:42:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U1gUB9092226; Fri, 30 Sep 2016 01:42:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U1gTWK092222; Fri, 30 Sep 2016 01:42:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609300142.u8U1gTWK092222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 01:42:29 +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: r306472 - in stable/10/sys/amd64/vmm: . io 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.23 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: Fri, 30 Sep 2016 01:42:31 -0000 Author: jhb Date: Fri Sep 30 01:42:29 2016 New Revision: 306472 URL: https://svnweb.freebsd.org/changeset/base/306472 Log: MFC 304858,305485: Fix various issues with PCI pass through and VT-d. 304858: Enable I/O MMU when PCI pass through is first used. Rather than enabling the I/O MMU when the vmm module is loaded, defer initialization until the first attempt to pass a PCI device through to a guest. If the I/O MMU fails to initialize or is not present, than fail the attempt to pass a PCI device through to a guest. The hw.vmm.force_iommu tunable has been removed since the I/O MMU is no longer enabled during boot. However, the I/O MMU support can be disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent use of the I/O MMU on any systems where it is buggy. 305485: Leave ppt devices in the host domain when they are not attached to a VM. This allows a pass through device to be reset to a normal device driver on the host and reused on the host. ppt devices are now always active in some I/O MMU domain when the I/O MMU is active, either the host domain or the domain of a VM they are attached to. Modified: stable/10/sys/amd64/vmm/io/iommu.c stable/10/sys/amd64/vmm/io/iommu.h stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/amd64/vmm/vmm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/io/iommu.c ============================================================================== --- stable/10/sys/amd64/vmm/io/iommu.c Fri Sep 30 01:39:18 2016 (r306471) +++ stable/10/sys/amd64/vmm/io/iommu.c Fri Sep 30 01:42:29 2016 (r306472) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "vmm_util.h" @@ -51,6 +52,10 @@ static int iommu_avail; SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, initialized, CTLFLAG_RD, &iommu_avail, 0, "bhyve iommu initialized?"); +static int iommu_enable = 1; +SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, enable, CTLFLAG_RDTUN, &iommu_enable, 0, + "Enable use of I/O MMU (required for PCI passthrough)."); + static struct iommu_ops *ops; static void *host_domain; @@ -148,14 +153,16 @@ IOMMU_DISABLE(void) (*ops->disable)(); } -void +static void iommu_init(void) { int error, bus, slot, func; vm_paddr_t maxaddr; - const char *name; device_t dev; + if (!iommu_enable) + return; + if (vmm_is_intel()) ops = &iommu_ops_intel; else if (vmm_is_amd()) @@ -174,8 +181,13 @@ iommu_init(void) */ maxaddr = vmm_mem_maxaddr(); host_domain = IOMMU_CREATE_DOMAIN(maxaddr); - if (host_domain == NULL) - panic("iommu_init: unable to create a host domain"); + if (host_domain == NULL) { + printf("iommu_init: unable to create a host domain"); + IOMMU_CLEANUP(); + ops = NULL; + iommu_avail = 0; + return; + } /* * Create 1:1 mappings from '0' to 'maxaddr' for devices assigned to @@ -190,12 +202,7 @@ iommu_init(void) if (dev == NULL) continue; - /* skip passthrough devices */ - name = device_get_name(dev); - if (name != NULL && strcmp(name, "ppt") == 0) - continue; - - /* everything else belongs to the host domain */ + /* Everything belongs to the host domain. */ iommu_add_device(host_domain, pci_get_rid(dev)); } @@ -216,7 +223,16 @@ iommu_cleanup(void) void * iommu_create_domain(vm_paddr_t maxaddr) { + static volatile int iommu_initted; + if (iommu_initted < 2) { + if (atomic_cmpset_int(&iommu_initted, 0, 1)) { + iommu_init(); + atomic_store_rel_int(&iommu_initted, 2); + } else + while (iommu_initted == 1) + cpu_spinwait(); + } return (IOMMU_CREATE_DOMAIN(maxaddr)); } Modified: stable/10/sys/amd64/vmm/io/iommu.h ============================================================================== --- stable/10/sys/amd64/vmm/io/iommu.h Fri Sep 30 01:39:18 2016 (r306471) +++ stable/10/sys/amd64/vmm/io/iommu.h Fri Sep 30 01:42:29 2016 (r306472) @@ -61,7 +61,6 @@ struct iommu_ops { extern struct iommu_ops iommu_ops_intel; extern struct iommu_ops iommu_ops_amd; -void iommu_init(void); void iommu_cleanup(void); void *iommu_host_domain(void); void *iommu_create_domain(vm_paddr_t maxaddr); Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Fri Sep 30 01:39:18 2016 (r306471) +++ stable/10/sys/amd64/vmm/io/ppt.c Fri Sep 30 01:42:29 2016 (r306472) @@ -363,6 +363,7 @@ ppt_assign_device(struct vm *vm, int bus return (EBUSY); ppt->vm = vm; + iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); return (0); } @@ -385,6 +386,7 @@ ppt_unassign_device(struct vm *vm, int b ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); iommu_remove_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); + iommu_add_device(iommu_host_domain(), pci_get_rid(ppt->dev)); ppt->vm = NULL; return (0); } Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Fri Sep 30 01:39:18 2016 (r306471) +++ stable/10/sys/amd64/vmm/vmm.c Fri Sep 30 01:42:29 2016 (r306472) @@ -228,11 +228,6 @@ SYSCTL_INT(_hw_vmm, OID_AUTO, trace_gues &trace_guest_exceptions, 0, "Trap into hypervisor on all guest exceptions and reflect them back"); -static int vmm_force_iommu = 0; -TUNABLE_INT("hw.vmm.force_iommu", &vmm_force_iommu); -SYSCTL_INT(_hw_vmm, OID_AUTO, force_iommu, CTLFLAG_RDTUN, &vmm_force_iommu, 0, - "Force use of I/O MMU even if no passthrough devices were found."); - static void vm_free_memmap(struct vm *vm, int ident); static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); static void vcpu_notify_event_locked(struct vcpu *vcpu, bool lapic_intr); @@ -362,8 +357,6 @@ vmm_handler(module_t mod, int what, void switch (what) { case MOD_LOAD: vmmdev_init(); - if (vmm_force_iommu || ppt_avail_devices() > 0) - iommu_init(); error = vmm_init(); if (error == 0) vmm_initialized = 1; @@ -400,9 +393,6 @@ static moduledata_t vmm_kmod = { /* * vmm initialization has the following dependencies: * - * - iommu initialization must happen after the pci passthru driver has had - * a chance to attach to any passthru devices (after SI_SUB_CONFIGURE). - * * - VT-x initialization requires smp_rendezvous() and therefore must happen * after SMP is fully functional (after SI_SUB_SMP). */ @@ -897,6 +887,8 @@ vm_assign_pptdev(struct vm *vm, int bus, ("vm_assign_pptdev: iommu must be NULL")); maxaddr = sysmem_maxaddr(vm); vm->iommu = iommu_create_domain(maxaddr); + if (vm->iommu == NULL) + return (ENXIO); vm_iommu_map(vm); } From owner-svn-src-all@freebsd.org Fri Sep 30 01:47:46 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 19AC1C01C47; Fri, 30 Sep 2016 01:47:46 +0000 (UTC) (envelope-from john@baldwin.cx) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 EB308D3A; Fri, 30 Sep 2016 01:47:45 +0000 (UTC) (envelope-from john@baldwin.cx) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id C937010AF8D; Thu, 29 Sep 2016 21:47:37 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r306472 - in stable/10/sys/amd64/vmm: . io Date: Thu, 29 Sep 2016 18:46:36 -0700 Message-ID: <2182781.Bke7ZiohbR@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609300142.u8U1gTWK092222@repo.freebsd.org> References: <201609300142.u8U1gTWK092222@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 29 Sep 2016 21:47:37 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 01:47:46 -0000 On Friday, September 30, 2016 01:42:29 AM John Baldwin wrote: > Author: jhb > Date: Fri Sep 30 01:42:29 2016 > New Revision: 306472 > URL: https://svnweb.freebsd.org/changeset/base/306472 > > Log: > MFC 304858,305485: Fix various issues with PCI pass through and VT-d. > > 304858: > Enable I/O MMU when PCI pass through is first used. > > Rather than enabling the I/O MMU when the vmm module is loaded, > defer initialization until the first attempt to pass a PCI device > through to a guest. If the I/O MMU fails to initialize or is not > present, than fail the attempt to pass a PCI device through to a > guest. > > The hw.vmm.force_iommu tunable has been removed since the I/O MMU is > no longer enabled during boot. However, the I/O MMU support can be > disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent > use of the I/O MMU on any systems where it is buggy. > > 305485: > Leave ppt devices in the host domain when they are not attached to a VM. > > This allows a pass through device to be reset to a normal device driver > on the host and reused on the host. ppt devices are now always active in > some I/O MMU domain when the I/O MMU is active, either the host domain > or the domain of a VM they are attached to. I did not MFC 305497 (update I/O MMU when adding/removing PCI devices) since there was a conflict and neither SR-IOV nor PCI-e Hotplug are in 10 (though Cardbus is in 10). At this point I doubt I will get around to merging Hotplug to 10, but if I do then 305497 could be merged. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Sep 30 02:48:41 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 33166C029DA; Fri, 30 Sep 2016 02:48:41 +0000 (UTC) (envelope-from jhibbits@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 05C3D275; Fri, 30 Sep 2016 02:48:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U2mekx014569; Fri, 30 Sep 2016 02:48:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U2meEe014568; Fri, 30 Sep 2016 02:48:40 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609300248.u8U2meEe014568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 30 Sep 2016 02:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306473 - head/sys/dev/fdt 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.23 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: Fri, 30 Sep 2016 02:48:41 -0000 Author: jhibbits Date: Fri Sep 30 02:48:40 2016 New Revision: 306473 URL: https://svnweb.freebsd.org/changeset/base/306473 Log: Use the cell-index property as the unit number if available. Summary: NXP/Freescale, among others, includes an optional cell-index property on nodes to denote the SoC block number of the node. This can be useful if, for example, a node is disabled or nonexistent in the fdt, or the blocks are not organized in address-sorted order. For instance, on the P1022, DMA2 is located at CCSR offset 0xC000, while DMA1 is located at 0x21000. Reviewed By: jmcneill Differential Revision: https://reviews.freebsd.org/D8054 Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 2016 (r306472) +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 2016 (r306473) @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) return (NULL); + + /* + * If the order is unspecified, use the cell-index field, if available. + * The cell-index property is not part of any standard, but is widely + * used in NXP/Freescale and Marvell device trees. + */ + if (order == -1) + OF_getencprop(node, "cell-index", &order, sizeof(order)); + cdev = device_add_child_ordered(dev, order, name, unit); if (cdev == NULL) { device_printf(dev, "<%s>: device_add_child failed\n", From owner-svn-src-all@freebsd.org Fri Sep 30 03:03:43 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 ECA56C02DC7; Fri, 30 Sep 2016 03:03:43 +0000 (UTC) (envelope-from gonzo@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 AD14EF39; Fri, 30 Sep 2016 03:03:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U33grG022488; Fri, 30 Sep 2016 03:03:42 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U33gk3022487; Fri, 30 Sep 2016 03:03:42 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609300303.u8U33gk3022487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 03:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306474 - head/sys/dev/atkbdc 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.23 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: Fri, 30 Sep 2016 03:03:44 -0000 Author: gonzo Date: Fri Sep 30 03:03:42 2016 New Revision: 306474 URL: https://svnweb.freebsd.org/changeset/base/306474 Log: Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN - Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support, and hw.psm.elantech_support with respective sysctls declared with CTLFLAG_TUN. It simplifies checking them in userland, also makes them easier to get discovered by user - Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT declaration by adding CTLFLAG_TUN to read/write sysctls that were already declared for these tunables. Suggested by: jhb Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Fri Sep 30 02:48:40 2016 (r306473) +++ head/sys/dev/atkbdc/psm.c Fri Sep 30 03:03:42 2016 (r306474) @@ -457,19 +457,10 @@ static devclass_t psm_devclass; /* Tunables */ static int tap_enabled = -1; -TUNABLE_INT("hw.psm.tap_enabled", &tap_enabled); - +static int verbose = PSM_DEBUG; static int synaptics_support = 0; -TUNABLE_INT("hw.psm.synaptics_support", &synaptics_support); - static int trackpoint_support = 0; -TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); - static int elantech_support = 0; -TUNABLE_INT("hw.psm.elantech_support", &elantech_support); - -static int verbose = PSM_DEBUG; -TUNABLE_INT("debug.psm.loglevel", &verbose); /* for backward compatibility */ #define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) @@ -2460,7 +2451,7 @@ psmtimeout(void *arg) static SYSCTL_NODE(_debug, OID_AUTO, psm, CTLFLAG_RD, 0, "ps/2 mouse"); static SYSCTL_NODE(_hw, OID_AUTO, psm, CTLFLAG_RD, 0, "ps/2 mouse"); -SYSCTL_INT(_debug_psm, OID_AUTO, loglevel, CTLFLAG_RW, &verbose, 0, +SYSCTL_INT(_debug_psm, OID_AUTO, loglevel, CTLFLAG_RWTUN, &verbose, 0, "Verbosity level"); static int psmhz = 20; @@ -2482,7 +2473,7 @@ static int pkterrthresh = 2; SYSCTL_INT(_debug_psm, OID_AUTO, pkterrthresh, CTLFLAG_RW, &pkterrthresh, 0, "Number of error packets allowed before reinitializing the mouse"); -SYSCTL_INT(_hw_psm, OID_AUTO, tap_enabled, CTLFLAG_RW, &tap_enabled, 0, +SYSCTL_INT(_hw_psm, OID_AUTO, tap_enabled, CTLFLAG_RWTUN, &tap_enabled, 0, "Enable tap and drag gestures"); static int tap_threshold = PSM_TAP_THRESHOLD; SYSCTL_INT(_hw_psm, OID_AUTO, tap_threshold, CTLFLAG_RW, &tap_threshold, 0, @@ -2491,6 +2482,16 @@ static int tap_timeout = PSM_TAP_TIMEOUT SYSCTL_INT(_hw_psm, OID_AUTO, tap_timeout, CTLFLAG_RW, &tap_timeout, 0, "Tap timeout for touchpads"); +/* Tunables */ +SYSCTL_INT(_hw_psm, OID_AUTO, synaptics_support, CTLFLAG_RDTUN, + &synaptics_support, 0, "Enable support for Synaptics touchpads"); + +SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLFLAG_RDTUN, + &trackpoint_support, 0, "Enable support for IBM/Lenovo TrackPoint"); + +SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN, + &elantech_support, 0, "Enable support for Elantech touchpads"); + static void psmintr(void *arg) { From owner-svn-src-all@freebsd.org Fri Sep 30 03:06: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 A9040C02F04; Fri, 30 Sep 2016 03:06:37 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 7CD0F11B5; Fri, 30 Sep 2016 03:06:37 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [136.179.10.143] (helo=[10.140.230.85]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1bpo9c-000NmF-5y; Thu, 29 Sep 2016 20:06:29 -0700 From: Oleksandr Tymoshenko Message-Id: <96A0937C-C028-4F8F-B209-735F3DBF4338@freebsd.org> Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r306355 - in head/sys: dev/atkbdc sys Date: Thu, 29 Sep 2016 20:05:58 -0700 In-Reply-To: <3815150.rnkVxtqPiv@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: John Baldwin References: <201609262206.u8QM6J5q070986@repo.freebsd.org> <3815150.rnkVxtqPiv@ralph.baldwin.cx> X-Mailer: Apple Mail (2.3226) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Sep 27, 2016, at 1:55 PM, John Baldwin wrote: > > On Monday, September 26, 2016 10:06:19 PM Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Mon Sep 26 22:06:19 2016 >> New Revision: 306355 >> URL: https://svnweb.freebsd.org/changeset/base/306355 >> >> Log: >> Add Elantech trackpad support >> >> Elantech trackpads are found in some laptops like the Asus UX31E. They >> are "synaptics compatible" but use a slightly different protocol. >> >> Elantech hardware support is not enabled by default and just like >> Synaptic or TrackPoint devices it should be enabled by setting >> tunable, in this case hw.psm.elantech_support, to non-zero value >> >> PR: 205690 >> Submitted by: Vladimir Kondratyev >> MFC after: 1 week >> >> Modified: head/sys/dev/atkbdc/psm.c >> ============================================================================== >> --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 (r306354) >> +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 (r306355) >> @@ -389,6 +465, 9 @@ TUNABLE_INT("hw.psm.synaptics_support", >> static int trackpoint_support = 0; >> TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); >> >> +static int elantech_support = 0; >> +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); >> + >> static int verbose = PSM_DEBUG; >> TUNABLE_INT("debug.psm.loglevel", &verbose); > > It would be good to expose all these tunables as CTLFLAG_RDTUN sysctls. Exposing > them that way with a decent description string makes it easier for users to > discover tunables. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 HTML_MESSAGE BODY: HTML included in message Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 03:06:37 -0000 > On Sep 27, 2016, at 1:55 PM, John Baldwin wrote: >=20 > On Monday, September 26, 2016 10:06:19 PM Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Mon Sep 26 22:06:19 2016 >> New Revision: 306355 >> URL: https://svnweb.freebsd.org/changeset/base/306355 >>=20 >> Log: >> Add Elantech trackpad support >>=20 >> Elantech trackpads are found in some laptops like the Asus UX31E. = They >> are "synaptics compatible" but use a slightly different protocol. >>=20 >> Elantech hardware support is not enabled by default and just like >> Synaptic or TrackPoint devices it should be enabled by setting >> tunable, in this case hw.psm.elantech_support, to non-zero value >>=20 >> PR: 205690 >> Submitted by: Vladimir Kondratyev >> MFC after: 1 week >>=20 >> Modified: head/sys/dev/atkbdc/psm.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 = (r306354) >> +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 = (r306355) >> @@ -389,6 +465,9 @@ TUNABLE_INT("hw.psm.synaptics_support",=20 >> static int trackpoint_support =3D 0; >> TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); >>=20 >> +static int elantech_support =3D 0; >> +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); >> + >> static int verbose =3D PSM_DEBUG; >> TUNABLE_INT("debug.psm.loglevel", &verbose); >=20 > It would be good to expose all these tunables as CTLFLAG_RDTUN = sysctls. Exposing > them that way with a decent description string makes it easier for = users to > discover tunables. Thanks for suggestion, John. Committed in r306474 =E2=80=94=20 gonzo= From owner-svn-src-all@freebsd.org Fri Sep 30 03:27: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 83DF9C03404; Fri, 30 Sep 2016 03:27:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54A361BAC; Fri, 30 Sep 2016 03:27:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U3R7hk030189; Fri, 30 Sep 2016 03:27:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U3R7fF030188; Fri, 30 Sep 2016 03:27:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201609300327.u8U3R7fF030188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 30 Sep 2016 03:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306475 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 03:27:08 -0000 Author: ae Date: Fri Sep 30 03:27:07 2016 New Revision: 306475 URL: https://svnweb.freebsd.org/changeset/base/306475 Log: MFC r305940: Move opcode rewriter init and destroy handlers into non-VNET code. PR: 212576,212649,212077 Submitted by: John Zielinski Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Fri Sep 30 03:03:42 2016 (r306474) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Fri Sep 30 03:27:07 2016 (r306475) @@ -2691,6 +2691,7 @@ ipfw_init(void) default_fw_tables = IPFW_TABLES_MAX; ipfw_init_sopt_handler(); + ipfw_init_obj_rewriter(); ipfw_iface_init(); return (error); } @@ -2704,6 +2705,7 @@ ipfw_destroy(void) ipfw_iface_destroy(); ipfw_destroy_sopt_handler(); + ipfw_destroy_obj_rewriter(); printf("IP firewall unloaded\n"); } @@ -2738,7 +2740,6 @@ vnet_ipfw_init(const void *unused) /* Init shared services hash table */ ipfw_init_srv(chain); - ipfw_init_obj_rewriter(); ipfw_init_counters(); /* insert the default rule and create the initial map */ chain->n_rules = 1; @@ -2845,7 +2846,6 @@ vnet_ipfw_uninit(const void *unused) IPFW_LOCK_DESTROY(chain); ipfw_dyn_uninit(1); /* free the remaining parts */ ipfw_destroy_counters(); - ipfw_destroy_obj_rewriter(); return (0); } From owner-svn-src-all@freebsd.org Fri Sep 30 03:45: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 7D591C039AD; Fri, 30 Sep 2016 03:45:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34362AD0; Fri, 30 Sep 2016 03:45:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U3jfjc037677; Fri, 30 Sep 2016 03:45:41 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U3jfAW037675; Fri, 30 Sep 2016 03:45:41 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201609300345.u8U3jfAW037675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 30 Sep 2016 03:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306476 - stable/11/sys/geom X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 03:45:42 -0000 Author: ae Date: Fri Sep 30 03:45:41 2016 New Revision: 306476 URL: https://svnweb.freebsd.org/changeset/base/306476 Log: MFC r303019: Use g_resize_provider() to change the size of GEOM_DISK provider, when it is being opened. This should fix the possible loss of a resize event when disk capacity changed. MFC r303288: Do not invoke resize method if geom is being withered. MFC r303637: Do not invoke resize event if initial disk size is zero. Some disks report the size only after first opening. And due to the events are asynchronous, some consumers can receive this event too late and this confuses them. This partially restores previous behaviour, and at the same time this should fix the problem, when already opened provider loses resize event. PR: 211028 Modified: stable/11/sys/geom/geom_disk.c stable/11/sys/geom/geom_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_disk.c ============================================================================== --- stable/11/sys/geom/geom_disk.c Fri Sep 30 03:27:07 2016 (r306475) +++ stable/11/sys/geom/geom_disk.c Fri Sep 30 03:45:41 2016 (r306476) @@ -126,7 +126,6 @@ g_disk_access(struct g_provider *pp, int if (error != 0) return (error); } - pp->mediasize = dp->d_mediasize; pp->sectorsize = dp->d_sectorsize; if (dp->d_maxsize == 0) { printf("WARNING: Disk drive %s%d has no d_maxsize\n", @@ -143,6 +142,14 @@ g_disk_access(struct g_provider *pp, int pp->stripeoffset = dp->d_stripeoffset; pp->stripesize = dp->d_stripesize; dp->d_flags |= DISKFLAG_OPEN; + /* + * Do not invoke resize event when initial size was zero. + * Some disks report its size only after first opening. + */ + if (pp->mediasize == 0) + pp->mediasize = dp->d_mediasize; + else + g_resize_provider(pp, dp->d_mediasize); } else if ((pp->acr + pp->acw + pp->ace) > 0 && (r + w + e) == 0) { if (dp->d_close != NULL) { error = dp->d_close(dp); Modified: stable/11/sys/geom/geom_subr.c ============================================================================== --- stable/11/sys/geom/geom_subr.c Fri Sep 30 03:27:07 2016 (r306475) +++ stable/11/sys/geom/geom_subr.c Fri Sep 30 03:45:41 2016 (r306476) @@ -636,7 +636,7 @@ g_resize_provider_event(void *arg, int f LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { gp = cp->geom; - if (gp->resize != NULL) + if ((gp->flags & G_GEOM_WITHER) == 0 && gp->resize != NULL) gp->resize(cp); } From owner-svn-src-all@freebsd.org Fri Sep 30 04:10: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 DF4C0C03E0B; Fri, 30 Sep 2016 04:10:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6AFB1375; Fri, 30 Sep 2016 04:10:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u8U4Aj0v009955 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 29 Sep 2016 21:10:46 -0700 Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609300248.u8U2meEe014568@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> Date: Thu, 29 Sep 2016 21:10:45 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609300248.u8U2meEe014568@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVY0zF/VhVBTqe4famJh7mb4GsbEYQzBG7EO29vN6PWut4FsMJ1K50jjFdby59WiI1oMBnH9KaHrANVm9wPns/NfkT3uEGafOcA= X-Sonic-ID: C;Astz3MOG5hGrFMEYTueg2w== M;GvS+3MOG5hGrFMEYTueg2w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 04:10:55 -0000 I'm a little dubious about this change. It's not really safe to rely on newbus unit numbers anywhere, so making them meaningful in this context seems like a bad idea. -Nathan On 09/29/16 19:48, Justin Hibbits wrote: > Author: jhibbits > Date: Fri Sep 30 02:48:40 2016 > New Revision: 306473 > URL: https://svnweb.freebsd.org/changeset/base/306473 > > Log: > Use the cell-index property as the unit number if available. > > Summary: > NXP/Freescale, among others, includes an optional cell-index property > on nodes to denote the SoC block number of the node. This can be useful if, for > example, a node is disabled or nonexistent in the fdt, or the blocks are not > organized in address-sorted order. For instance, on the P1022, DMA2 is located > at CCSR offset 0xC000, while DMA1 is located at 0x21000. > > Reviewed By: jmcneill > > Differential Revision: https://reviews.freebsd.org/D8054 > > Modified: > head/sys/dev/fdt/simplebus.c > > Modified: head/sys/dev/fdt/simplebus.c > ============================================================================== > --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 2016 (r306472) > +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 2016 (r306473) > @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand > > if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) > return (NULL); > + > + /* > + * If the order is unspecified, use the cell-index field, if available. > + * The cell-index property is not part of any standard, but is widely > + * used in NXP/Freescale and Marvell device trees. > + */ > + if (order == -1) > + OF_getencprop(node, "cell-index", &order, sizeof(order)); > + > cdev = device_add_child_ordered(dev, order, name, unit); > if (cdev == NULL) { > device_printf(dev, "<%s>: device_add_child failed\n", > From owner-svn-src-all@freebsd.org Fri Sep 30 04:16: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 185DDC03FCB; Fri, 30 Sep 2016 04:16:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-vk0-x22c.google.com (mail-vk0-x22c.google.com [IPv6:2607:f8b0:400c:c05::22c]) (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 C3C35189F; Fri, 30 Sep 2016 04:16:50 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-vk0-x22c.google.com with SMTP id z126so93726325vkd.0; Thu, 29 Sep 2016 21:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Uv4Id/A1NAbrWW6Wd7SFcQPK5w9gxO5ohF4Zg/qgeoU=; b=M4UjEUR5vbZi35KrGIiRUjNzXk5X6/4pB4WYD+VccFIofYMaPJtHuDeXeu9chhVWF0 3shwtz+IvrpgHV8doVcOi6M3qImKZgtTWs4UhTx8fy6amK2P5NDER8nI8kI9OGrkqtzE xYhh9wxGfzlJfcmQP/DU9GmdFdDT++85riIsEvrK7jIdApkuTAYPNnel2EcBgrKx2AuA O57WOVpsoaAUnP/nQFsslKUNRXfit1OHnirZjqKORAiKohyDHJmWKnm2fhYZcqDclgnG wr3FhdIisGxRI3D2B+prgdZZx9QUw2+RVKVPZ3PLlUKSXec73SfgHXEMPc5DJsweprEv p5+Q== 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:from :date:message-id:subject:to:cc; bh=Uv4Id/A1NAbrWW6Wd7SFcQPK5w9gxO5ohF4Zg/qgeoU=; b=MjKFg6uZ41Ig6C1LNUKZCbk5r6qi3VweqEuoSo6TAypZaBmgBXx6+qJT8OFYl5RMLD 0sNqIkY4IXnPXHz9HSInnEm/ERvi5s0r/4gtmJ6gNIFjJiAmVaYcgGBt/UAtHt/mBZNR fkqBT0gRutyT1Cf0NSap8KuZpA/Wq9KeoTj0G/RQ6R2YuPgosC2T3WMf2O+h4XS9tAAv nOq1eWdo+h4ms8YRdSEs/TLj3ZwIPahIuUY0fajKCPP07aGfz4qESppiZhJnN1WMQwuc p0mf5cYp+s0TmVZSQbEv7sW0Fo213mw9U1lexPqhpry2/qnVZupT/ds6qUvv9zOu78d7 nPOA== X-Gm-Message-State: AA6/9RmPnmHULsRQR0bZ5OYmjk5ewK6+A5p+TxFveIGAXWjpAOW06JoAjvSwlD7P3kkw9XT+GdWjURglQ8r4KA== X-Received: by 10.31.237.193 with SMTP id l184mr4216191vkh.56.1475209009442; Thu, 29 Sep 2016 21:16:49 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:16:48 -0700 (PDT) Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:16:48 -0700 (PDT) In-Reply-To: <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> References: <201609300248.u8U2meEe014568@repo.freebsd.org> <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> From: Justin Hibbits Date: Thu, 29 Sep 2016 23:16:48 -0500 X-Google-Sender-Auth: UuD5CKuSnfX5EnrtozVspm_fpAo Message-ID: Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Nathan Whitehorn Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 04:16:51 -0000 It's more cosmetic than anything else. I did realize a potential complication with it tonight, too, if newbus devices are created as children (like DMA channels in this case), and have the cell-index property. If you object it's an easy revert. - Justin On Sep 29, 2016 23:10, "Nathan Whitehorn" wrote: > I'm a little dubious about this change. It's not really safe to rely on > newbus unit numbers anywhere, so making them meaningful in this context > seems like a bad idea. > -Nathan > > On 09/29/16 19:48, Justin Hibbits wrote: > >> Author: jhibbits >> Date: Fri Sep 30 02:48:40 2016 >> New Revision: 306473 >> URL: https://svnweb.freebsd.org/changeset/base/306473 >> >> Log: >> Use the cell-index property as the unit number if available. >> Summary: >> NXP/Freescale, among others, includes an optional cell-index property >> on nodes to denote the SoC block number of the node. This can be >> useful if, for >> example, a node is disabled or nonexistent in the fdt, or the blocks >> are not >> organized in address-sorted order. For instance, on the P1022, DMA2 >> is located >> at CCSR offset 0xC000, while DMA1 is located at 0x21000. >> Reviewed By: jmcneill >> Differential Revision: https://reviews.freebsd.org/D8054 >> >> Modified: >> head/sys/dev/fdt/simplebus.c >> >> Modified: head/sys/dev/fdt/simplebus.c >> ============================================================ >> ================== >> --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 2016 >> (r306472) >> +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 2016 >> (r306473) >> @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand >> if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) >> return (NULL); >> + >> + /* >> + * If the order is unspecified, use the cell-index field, if >> available. >> + * The cell-index property is not part of any standard, but is >> widely >> + * used in NXP/Freescale and Marvell device trees. >> + */ >> + if (order == -1) >> + OF_getencprop(node, "cell-index", &order, sizeof(order)); >> + >> cdev = device_add_child_ordered(dev, order, name, unit); >> if (cdev == NULL) { >> device_printf(dev, "<%s>: device_add_child failed\n", >> >> > From owner-svn-src-all@freebsd.org Fri Sep 30 04:23:46 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 DFE1CC01280; Fri, 30 Sep 2016 04:23:46 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3A301DA4; Fri, 30 Sep 2016 04:23:46 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u8U4Nbon032090 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 29 Sep 2016 21:23:37 -0700 Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Justin Hibbits References: <201609300248.u8U2meEe014568@repo.freebsd.org> <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org From: Nathan Whitehorn Message-ID: Date: Thu, 29 Sep 2016 21:23:37 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVb1xQpTlxdMGlYr3jwD1bwf3E29ssF4LibMK8Y3zqkC/bFHlJUVnMikGcujJpFTJhoDWdGaChZOvZuHYYJt1wVWnJFsee3SrLY= X-Sonic-ID: C;DuheqMWG5hGV98nnHcq0Mg== M;Sqe9qMWG5hGV98nnHcq0Mg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 04:23:47 -0000 Eh, I don't care much, especially if it's for cosmetic reasons only. I'm not sure I understand your suggested complication, but will leave the choice to you in any case. -Nathan On 09/29/16 21:16, Justin Hibbits wrote: > > It's more cosmetic than anything else. I did realize a potential > complication with it tonight, too, if newbus devices are created as > children (like DMA channels in this case), and have the cell-index > property. If you object it's an easy revert. > > - Justin > > > On Sep 29, 2016 23:10, "Nathan Whitehorn" > wrote: > > I'm a little dubious about this change. It's not really safe to > rely on newbus unit numbers anywhere, so making them meaningful in > this context seems like a bad idea. > -Nathan > > On 09/29/16 19:48, Justin Hibbits wrote: > > Author: jhibbits > Date: Fri Sep 30 02:48:40 2016 > New Revision: 306473 > URL: https://svnweb.freebsd.org/changeset/base/306473 > > > Log: > Use the cell-index property as the unit number if available. > Summary: > NXP/Freescale, among others, includes an optional > cell-index property > on nodes to denote the SoC block number of the node. This > can be useful if, for > example, a node is disabled or nonexistent in the fdt, or > the blocks are not > organized in address-sorted order. For instance, on the > P1022, DMA2 is located > at CCSR offset 0xC000, while DMA1 is located at 0x21000. > Reviewed By: jmcneill > Differential Revision: https://reviews.freebsd.org/D8054 > > > Modified: > head/sys/dev/fdt/simplebus.c > > Modified: head/sys/dev/fdt/simplebus.c > ============================================================================== > --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 > 2016 (r306472) > +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 > 2016 (r306473) > @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand > if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) > return (NULL); > + > + /* > + * If the order is unspecified, use the cell-index > field, if available. > + * The cell-index property is not part of any > standard, but is widely > + * used in NXP/Freescale and Marvell device trees. > + */ > + if (order == -1) > + OF_getencprop(node, "cell-index", &order, > sizeof(order)); > + > cdev = device_add_child_ordered(dev, order, name, unit); > if (cdev == NULL) { > device_printf(dev, "<%s>: device_add_child > failed\n", > > From owner-svn-src-all@freebsd.org Fri Sep 30 04:38: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 6A6E9C0164A; Fri, 30 Sep 2016 04:38:15 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::22a]) (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 2002E3EF; Fri, 30 Sep 2016 04:38:15 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-ua0-x22a.google.com with SMTP id n13so84384618uaa.3; Thu, 29 Sep 2016 21:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WMFl/TS2yZWoBxCq9ViPWFYeS1OHLSTvZKFOczf8z6w=; b=YnSFKWUcETWuUM8+l46dnb3NwKM/V8ME+25GxvLJWG/Utxd5lL0CVszbZjUggsR3jC NgmJD2HJ1XRXoos6JcjCB8I4NvRmpln+7Rm0XurSkhAouWZ5k6S2L8/XBc96gRXmnwuW dXR7cg1MEbwGUQB2N7Vu/SKwT+Rvez7yXFrN7kiwwIzRwoF1E9iB+lKVupb5QJRe+K1m aJBxAgjB2XCwKMhQGXcyyXqda7oDzgZnrWePIHHljt9NJuaIjK0UwTWETaDMzLs2Yzkg uEeUGnPU1wWNbOxOGiyVb9KxYVxbmFv261ue3yrVNZ+kcuwWTrc1Zl/5tRxvjOb7ooNV vBCw== 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:from :date:message-id:subject:to:cc; bh=WMFl/TS2yZWoBxCq9ViPWFYeS1OHLSTvZKFOczf8z6w=; b=Bg3Qg//LZ5+y+bjxmMCwx/h7VE5mes6KQ5U9OKm0a8SPiF8H0wClAj70cw7sX7aWIz l4lJWnKHlZe09S83wZu6rvB4bsca39mBU4zdPBlUn2cc/IeL7tEUtGe6ePeUAldplq8g 0rl78LhpSBObYHCuz5T6+I+uAOdMOYwMqyJYELoVBPULdpLIskg2OqC4W4FcnMvMJzNz Jy5iDxvM9gKUMGGoz+8sKkBuu3cmfhAk8i2G9WQ3lMgWuWvaSMKAyJoI/LcaFkbVMW2m 27pvayGnF9GwIKSrXeMmZlFYXCxniZKpDeNfPArT7To5d4o3sDEbrs4Aq29pWt8Mo111 FjeQ== X-Gm-Message-State: AA6/9RkQIHWlo8YysTg3/z1dEaGXV/ttBG4HuKa0nTs6/m8gNoB6aiS9gu4HpV0a7VwWdXBnKx5G5iwS37jsgA== X-Received: by 10.176.2.162 with SMTP id 31mr3575013uah.41.1475210293908; Thu, 29 Sep 2016 21:38:13 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:38:13 -0700 (PDT) Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:38:13 -0700 (PDT) In-Reply-To: References: <201609300248.u8U2meEe014568@repo.freebsd.org> <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> From: Justin Hibbits Date: Thu, 29 Sep 2016 23:38:13 -0500 X-Google-Sender-Auth: -sTzQCn_pSCL6PoUDTdZrm4VlJ4 Message-ID: Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Nathan Whitehorn Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 04:38:15 -0000 If I remember correctly, newbus will throw an error if you try to create two devices with the same number. Applying the logic of using the cell-index property for all device nodes, if two sub buses from simplebus have the same set of child nodes, with the same cell-index property values, one set of children would error and not attach. Of course this change is only for simplebus, so shouldn't have too big an impact. - Justin On Sep 29, 2016 23:23, "Nathan Whitehorn" wrote: > Eh, I don't care much, especially if it's for cosmetic reasons only. I'm > not sure I understand your suggested complication, but will leave the > choice to you in any case. > -Nathan > > On 09/29/16 21:16, Justin Hibbits wrote: > >> >> It's more cosmetic than anything else. I did realize a potential >> complication with it tonight, too, if newbus devices are created as >> children (like DMA channels in this case), and have the cell-index >> property. If you object it's an easy revert. >> >> - Justin >> >> >> On Sep 29, 2016 23:10, "Nathan Whitehorn" > > wrote: >> >> I'm a little dubious about this change. It's not really safe to >> rely on newbus unit numbers anywhere, so making them meaningful in >> this context seems like a bad idea. >> -Nathan >> >> On 09/29/16 19:48, Justin Hibbits wrote: >> >> Author: jhibbits >> Date: Fri Sep 30 02:48:40 2016 >> New Revision: 306473 >> URL: https://svnweb.freebsd.org/changeset/base/306473 >> >> >> Log: >> Use the cell-index property as the unit number if available. >> Summary: >> NXP/Freescale, among others, includes an optional >> cell-index property >> on nodes to denote the SoC block number of the node. This >> can be useful if, for >> example, a node is disabled or nonexistent in the fdt, or >> the blocks are not >> organized in address-sorted order. For instance, on the >> P1022, DMA2 is located >> at CCSR offset 0xC000, while DMA1 is located at 0x21000. >> Reviewed By: jmcneill >> Differential Revision: https://reviews.freebsd.org/D8054 >> >> >> Modified: >> head/sys/dev/fdt/simplebus.c >> >> Modified: head/sys/dev/fdt/simplebus.c >> ============================================================ >> ================== >> --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 >> 2016 (r306472) >> +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 >> 2016 (r306473) >> @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand >> if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) >> return (NULL); >> + >> + /* >> + * If the order is unspecified, use the cell-index >> field, if available. >> + * The cell-index property is not part of any >> standard, but is widely >> + * used in NXP/Freescale and Marvell device trees. >> + */ >> + if (order == -1) >> + OF_getencprop(node, "cell-index", &order, >> sizeof(order)); >> + >> cdev = device_add_child_ordered(dev, order, name, unit); >> if (cdev == NULL) { >> device_printf(dev, "<%s>: device_add_child >> failed\n", >> >> >> > From owner-svn-src-all@freebsd.org Fri Sep 30 05:25: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 6AAA8C0309D; Fri, 30 Sep 2016 05:25:18 +0000 (UTC) (envelope-from mmel@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 3A38019EE; Fri, 30 Sep 2016 05:25:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5PHqW075016; Fri, 30 Sep 2016 05:25:17 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5PFN5074997; Fri, 30 Sep 2016 05:25:15 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609300525.u8U5PFN5074997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 30 Sep 2016 05:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306477 - in head/sys/arm/nvidia: . tegra124 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.23 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: Fri, 30 Sep 2016 05:25:18 -0000 Author: mmel Date: Fri Sep 30 05:25:15 2016 New Revision: 306477 URL: https://svnweb.freebsd.org/changeset/base/306477 Log: TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel. - use DEFINE_CLASS_0() for driver classes - unify driver names - cleanup driver definitions and bindings Modified: head/sys/arm/nvidia/as3722.c head/sys/arm/nvidia/tegra124/tegra124_car.c head/sys/arm/nvidia/tegra124/tegra124_coretemp.c head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c head/sys/arm/nvidia/tegra124/tegra124_pmc.c head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c head/sys/arm/nvidia/tegra_abpmisc.c head/sys/arm/nvidia/tegra_ahci.c head/sys/arm/nvidia/tegra_efuse.c head/sys/arm/nvidia/tegra_ehci.c head/sys/arm/nvidia/tegra_gpio.c head/sys/arm/nvidia/tegra_i2c.c head/sys/arm/nvidia/tegra_lic.c head/sys/arm/nvidia/tegra_pcie.c head/sys/arm/nvidia/tegra_pinmux.c head/sys/arm/nvidia/tegra_rtc.c head/sys/arm/nvidia/tegra_sdhci.c head/sys/arm/nvidia/tegra_soctherm.c head/sys/arm/nvidia/tegra_usbphy.c Modified: head/sys/arm/nvidia/as3722.c ============================================================================== --- head/sys/arm/nvidia/as3722.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/as3722.c Fri Sep 30 05:25:15 2016 (r306477) @@ -405,7 +405,7 @@ static device_method_t as3722_methods[] }; static devclass_t as3722_devclass; -DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, +static DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, sizeof(struct as3722_softc)); EARLY_DRIVER_MODULE(as3722, iicbus, as3722_driver, as3722_devclass, - 0, 0, 74); + NULL, NULL, 74); Modified: head/sys/arm/nvidia/tegra124/tegra124_car.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_car.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_car.c Fri Sep 30 05:25:15 2016 (r306477) @@ -602,12 +602,7 @@ static device_method_t tegra124_car_meth }; static devclass_t tegra124_car_devclass; - -static driver_t tegra124_car_driver = { - "tegra124_car", - tegra124_car_methods, - sizeof(struct tegra124_car_softc), -}; - +static DEFINE_CLASS_0(car, tegra124_car_driver, tegra124_car_methods, + sizeof(struct tegra124_car_softc)); EARLY_DRIVER_MODULE(tegra124_car, simplebus, tegra124_car_driver, - tegra124_car_devclass, 0, 0, BUS_PASS_TIMER); + tegra124_car_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Fri Sep 30 05:25:15 2016 (r306477) @@ -250,7 +250,6 @@ tegra124_coretemp_detach(device_t dev) return (0); } - static device_method_t tegra124_coretemp_methods[] = { /* Device interface */ DEVMETHOD(device_identify, tegra124_coretemp_identify), @@ -263,11 +262,7 @@ static device_method_t tegra124_coretemp }; static devclass_t tegra124_coretemp_devclass; -static driver_t tegra124_coretemp_driver = { - "tegra124_coretemp", - tegra124_coretemp_methods, - sizeof(struct tegra124_coretemp_softc), -}; - +static DEFINE_CLASS_0(coretemp, tegra124_coretemp_driver, + tegra124_coretemp_methods, sizeof(struct tegra124_coretemp_softc)); DRIVER_MODULE(tegra124_coretemp, cpu, tegra124_coretemp_driver, - tegra124_coretemp_devclass, 0, 0); + tegra124_coretemp_devclass, NULL, NULL); Modified: head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Fri Sep 30 05:25:15 2016 (r306477) @@ -588,11 +588,7 @@ static device_method_t tegra124_cpufreq_ }; static devclass_t tegra124_cpufreq_devclass; -static driver_t tegra124_cpufreq_driver = { - "tegra124_cpufreq", - tegra124_cpufreq_methods, - sizeof(struct tegra124_cpufreq_softc), -}; - +static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, + tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, - tegra124_cpufreq_devclass, 0, 0); + tegra124_cpufreq_devclass, NULL, NULL); Modified: head/sys/arm/nvidia/tegra124/tegra124_pmc.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_pmc.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_pmc.c Fri Sep 30 05:25:15 2016 (r306477) @@ -555,12 +555,8 @@ static device_method_t tegra124_pmc_meth DEVMETHOD_END }; -static driver_t tegra124_pmc_driver = { - "tegra124_pmc", - tegra124_pmc_methods, - sizeof(struct tegra124_pmc_softc), -}; - static devclass_t tegra124_pmc_devclass; +static DEFINE_CLASS_0(pmc, tegra124_pmc_driver, tegra124_pmc_methods, + sizeof(struct tegra124_pmc_softc)); EARLY_DRIVER_MODULE(tegra124_pmc, simplebus, tegra124_pmc_driver, - tegra124_pmc_devclass, 0, 0, 70); + tegra124_pmc_devclass, NULL, NULL, 70); Modified: head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c Fri Sep 30 05:25:15 2016 (r306477) @@ -575,7 +575,6 @@ xusbpadctl_attach(device_t dev) return (0); } - static device_method_t tegra_xusbpadctl_methods[] = { /* Device interface */ DEVMETHOD(device_probe, xusbpadctl_probe), @@ -591,13 +590,8 @@ static device_method_t tegra_xusbpadctl_ DEVMETHOD_END }; -static driver_t tegra_xusbpadctl_driver = { - "tegra_xusbpadctl", - tegra_xusbpadctl_methods, - sizeof(struct xusbpadctl_softc), -}; - static devclass_t tegra_xusbpadctl_devclass; - +static DEFINE_CLASS_0(xusbpadctl, tegra_xusbpadctl_driver, + tegra_xusbpadctl_methods, sizeof(struct xusbpadctl_softc)); EARLY_DRIVER_MODULE(tegra_xusbpadctl, simplebus, tegra_xusbpadctl_driver, - tegra_xusbpadctl_devclass, 0, 0, 73); + tegra_xusbpadctl_devclass, NULL, NULL, 73); Modified: head/sys/arm/nvidia/tegra_abpmisc.c ============================================================================== --- head/sys/arm/nvidia/tegra_abpmisc.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_abpmisc.c Fri Sep 30 05:25:15 2016 (r306477) @@ -187,8 +187,8 @@ static device_method_t tegra_abpmisc_met DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_abpmisc, tegra_abpmisc_driver, tegra_abpmisc_methods, - sizeof(struct tegra_abpmisc_softc)); static devclass_t tegra_abpmisc_devclass; +static DEFINE_CLASS_0(abpmisc, tegra_abpmisc_driver, tegra_abpmisc_methods, + sizeof(struct tegra_abpmisc_softc)); EARLY_DRIVER_MODULE(tegra_abpmisc, simplebus, tegra_abpmisc_driver, - tegra_abpmisc_devclass, 0, 0, BUS_PASS_TIMER); + tegra_abpmisc_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_ahci.c Fri Sep 30 05:25:15 2016 (r306477) @@ -602,7 +602,6 @@ tegra_ahci_resume(device_t dev) return (bus_generic_resume(dev)); } -static devclass_t tegra_ahci_devclass; static device_method_t tegra_ahci_methods[] = { DEVMETHOD(device_probe, tegra_ahci_probe), DEVMETHOD(device_attach, tegra_ahci_attach), @@ -620,9 +619,8 @@ static device_method_t tegra_ahci_method DEVMETHOD_END }; -static driver_t tegra_ahci_driver = { - "ahci", - tegra_ahci_methods, - sizeof(struct tegra_ahci_sc) -}; -DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, NULL, NULL); +static devclass_t tegra_ahci_devclass; +static DEFINE_CLASS_0(ahci, tegra_ahci_driver, tegra_ahci_methods, + sizeof(struct tegra_ahci_sc)); +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, + NULL, NULL); Modified: head/sys/arm/nvidia/tegra_efuse.c ============================================================================== --- head/sys/arm/nvidia/tegra_efuse.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_efuse.c Fri Sep 30 05:25:15 2016 (r306477) @@ -357,12 +357,11 @@ static device_method_t tegra_efuse_metho DEVMETHOD(device_attach, tegra_efuse_attach), DEVMETHOD(device_detach, tegra_efuse_detach), - DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_efuse, tegra_efuse_driver, tegra_efuse_methods, - sizeof(struct tegra_efuse_softc)); static devclass_t tegra_efuse_devclass; +static DEFINE_CLASS_0(efuse, tegra_efuse_driver, tegra_efuse_methods, + sizeof(struct tegra_efuse_softc)); EARLY_DRIVER_MODULE(tegra_efuse, simplebus, tegra_efuse_driver, - tegra_efuse_devclass, 0, 0, BUS_PASS_TIMER); + tegra_efuse_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: head/sys/arm/nvidia/tegra_ehci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ehci.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_ehci.c Fri Sep 30 05:25:15 2016 (r306477) @@ -311,12 +311,8 @@ static device_method_t ehci_methods[] = DEVMETHOD_END }; -static driver_t ehci_driver = { - "ehci", - ehci_methods, - sizeof(struct tegra_ehci_softc) -}; - static devclass_t ehci_devclass; -DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1); \ No newline at end of file +static DEFINE_CLASS_0(ehci, ehci_driver, ehci_methods, + sizeof(struct tegra_ehci_softc)); +DRIVER_MODULE(tegra_ehci, simplebus, ehci_driver, ehci_devclass, NULL, NULL); +MODULE_DEPEND(tegra_ehci, usb, 1, 1, 1); Modified: head/sys/arm/nvidia/tegra_gpio.c ============================================================================== --- head/sys/arm/nvidia/tegra_gpio.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_gpio.c Fri Sep 30 05:25:15 2016 (r306477) @@ -885,20 +885,8 @@ static device_method_t tegra_gpio_method DEVMETHOD_END }; -static driver_t tegra_gpio_driver = { - "tegra_gpio", - tegra_gpio_methods, - sizeof(struct tegra_gpio_softc), -}; static devclass_t tegra_gpio_devclass; - +static DEFINE_CLASS_0(gpio, tegra_gpio_driver, tegra_gpio_methods, + sizeof(struct tegra_gpio_softc)); EARLY_DRIVER_MODULE(tegra_gpio, simplebus, tegra_gpio_driver, - tegra_gpio_devclass, 0, 0, 70); - -extern devclass_t ofwgpiobus_devclass; -extern driver_t ofw_gpiobus_driver; -EARLY_DRIVER_MODULE(ofw_gpiobus, tegra_gpio, ofw_gpiobus_driver, - ofwgpiobus_devclass, 0, 0, BUS_PASS_BUS); -extern devclass_t gpioc_devclass; -extern driver_t gpioc_driver; -DRIVER_MODULE(gpioc, tegra_gpio, gpioc_driver, gpioc_devclass, 0, 0); + tegra_gpio_devclass, NULL, NULL, 70); Modified: head/sys/arm/nvidia/tegra_i2c.c ============================================================================== --- head/sys/arm/nvidia/tegra_i2c.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_i2c.c Fri Sep 30 05:25:15 2016 (r306477) @@ -797,12 +797,8 @@ static device_method_t tegra_i2c_methods DEVMETHOD_END }; -DEFINE_CLASS_0(iichb, tegra_i2c_driver, tegra_i2c_methods, - sizeof(struct tegra_i2c_softc)); static devclass_t tegra_i2c_devclass; +static DEFINE_CLASS_0(iichb, tegra_i2c_driver, tegra_i2c_methods, + sizeof(struct tegra_i2c_softc)); EARLY_DRIVER_MODULE(tegra_iic, simplebus, tegra_i2c_driver, tegra_i2c_devclass, - 0, 0, 73); -extern devclass_t ofwiicbus_devclass; -extern driver_t ofw_iicbus_driver; -EARLY_DRIVER_MODULE(ofw_iicbus, tegra_iic, ofw_iicbus_driver, - ofwiicbus_devclass, 0, 0, BUS_PASS_BUS); + NULL, NULL, 73); Modified: head/sys/arm/nvidia/tegra_lic.c ============================================================================== --- head/sys/arm/nvidia/tegra_lic.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_lic.c Fri Sep 30 05:25:15 2016 (r306477) @@ -281,8 +281,9 @@ static device_method_t tegra_lic_methods #endif DEVMETHOD_END }; + devclass_t tegra_lic_devclass; -DEFINE_CLASS_0(tegra_lic, tegra_lic_driver, tegra_lic_methods, +static DEFINE_CLASS_0(lic, tegra_lic_driver, tegra_lic_methods, sizeof(struct tegra_lic_sc)); EARLY_DRIVER_MODULE(tegra_lic, simplebus, tegra_lic_driver, tegra_lic_devclass, NULL, NULL, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE + 1); Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_pcie.c Fri Sep 30 05:25:15 2016 (r306477) @@ -1629,7 +1629,8 @@ static device_method_t tegra_pcib_method DEVMETHOD_END }; +static devclass_t pcib_devclass; DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods, sizeof(struct tegra_pcib_softc), ofw_pci_driver); -devclass_t pcib_devclass; -DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, + NULL, NULL); Modified: head/sys/arm/nvidia/tegra_pinmux.c ============================================================================== --- head/sys/arm/nvidia/tegra_pinmux.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_pinmux.c Fri Sep 30 05:25:15 2016 (r306477) @@ -792,13 +792,8 @@ static device_method_t tegra_pinmux_meth DEVMETHOD_END }; -static driver_t tegra_pinmux_driver = { - "tegra_pinmux", - tegra_pinmux_methods, - sizeof(struct pinmux_softc), -}; - static devclass_t tegra_pinmux_devclass; - +static DEFINE_CLASS_0(pinmux, tegra_pinmux_driver, tegra_pinmux_methods, + sizeof(struct pinmux_softc)); EARLY_DRIVER_MODULE(tegra_pinmux, simplebus, tegra_pinmux_driver, - tegra_pinmux_devclass, 0, 0, 71); + tegra_pinmux_devclass, NULL, NULL, 71); Modified: head/sys/arm/nvidia/tegra_rtc.c ============================================================================== --- head/sys/arm/nvidia/tegra_rtc.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_rtc.c Fri Sep 30 05:25:15 2016 (r306477) @@ -297,7 +297,8 @@ static device_method_t tegra_rtc_methods DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_rtc, tegra_rtc_driver, tegra_rtc_methods, - sizeof(struct tegra_rtc_softc)); static devclass_t tegra_rtc_devclass; -DRIVER_MODULE(tegra_rtc, simplebus, tegra_rtc_driver, tegra_rtc_devclass, 0, 0); +static DEFINE_CLASS_0(rtc, tegra_rtc_driver, tegra_rtc_methods, + sizeof(struct tegra_rtc_softc)); +DRIVER_MODULE(tegra_rtc, simplebus, tegra_rtc_driver, tegra_rtc_devclass, + NULL, NULL); Modified: head/sys/arm/nvidia/tegra_sdhci.c ============================================================================== --- head/sys/arm/nvidia/tegra_sdhci.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_sdhci.c Fri Sep 30 05:25:15 2016 (r306477) @@ -448,18 +448,14 @@ static device_method_t tegra_sdhci_metho DEVMETHOD(sdhci_write_4, tegra_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, tegra_sdhci_write_multi_4), - { 0, 0 } + DEVMETHOD_END }; static devclass_t tegra_sdhci_devclass; - -static driver_t tegra_sdhci_driver = { - "sdhci_tegra", - tegra_sdhci_methods, - sizeof(struct tegra_sdhci_softc), -}; - +static DEFINE_CLASS_0(sdhci, tegra_sdhci_driver, tegra_sdhci_methods, + sizeof(struct tegra_sdhci_softc)); DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass, - 0, 0); + NULL, NULL); MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci_tegra, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, sdhci, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_tegra, mmc, 1, 1, 1); Modified: head/sys/arm/nvidia/tegra_soctherm.c ============================================================================== --- head/sys/arm/nvidia/tegra_soctherm.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_soctherm.c Fri Sep 30 05:25:15 2016 (r306477) @@ -690,7 +690,7 @@ static device_method_t tegra_soctherm_me }; static devclass_t tegra_soctherm_devclass; -DEFINE_CLASS_0(tegra_soctherm, tegra_soctherm_driver, tegra_soctherm_methods, +static DEFINE_CLASS_0(soctherm, tegra_soctherm_driver, tegra_soctherm_methods, sizeof(struct soctherm_softc)); EARLY_DRIVER_MODULE(tegra_soctherm, simplebus, tegra_soctherm_driver, -tegra_soctherm_devclass, 0, 0, 79); + tegra_soctherm_devclass, NULL, NULL, 79); Modified: head/sys/arm/nvidia/tegra_usbphy.c ============================================================================== --- head/sys/arm/nvidia/tegra_usbphy.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_usbphy.c Fri Sep 30 05:25:15 2016 (r306477) @@ -827,13 +827,8 @@ static device_method_t tegra_usbphy_meth DEVMETHOD_END }; -static driver_t tegra_usbphy_driver = { - "tegra_usbphy", - tegra_usbphy_methods, - sizeof(struct usbphy_softc), -}; - static devclass_t tegra_usbphy_devclass; - +static DEFINE_CLASS_0(usbphy, tegra_usbphy_driver, tegra_usbphy_methods, + sizeof(struct usbphy_softc)); EARLY_DRIVER_MODULE(tegra_usbphy, simplebus, tegra_usbphy_driver, - tegra_usbphy_devclass, 0, 0, 79); + tegra_usbphy_devclass, NULL, NULL, 79); From owner-svn-src-all@freebsd.org Fri Sep 30 05:28:13 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 00EC0C03120; Fri, 30 Sep 2016 05:28:13 +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 D06F81B92; Fri, 30 Sep 2016 05:28:12 +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 u8U5SCrj075145; Fri, 30 Sep 2016 05:28:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5SBgc075143; Fri, 30 Sep 2016 05:28:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609300528.u8U5SBgc075143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 30 Sep 2016 05:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306478 - in head/sys/dev/usb: . serial 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.23 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: Fri, 30 Sep 2016 05:28:13 -0000 Author: hselasky Date: Fri Sep 30 05:28:11 2016 New Revision: 306478 URL: https://svnweb.freebsd.org/changeset/base/306478 Log: Add new USB ID. While at it remove some whitespaces. Submitted by: Jose Luis Duran PR: 213110 MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Sep 30 05:25:15 2016 (r306477) +++ head/sys/dev/usb/serial/u3g.c Fri Sep 30 05:28:11 2016 (r306478) @@ -522,6 +522,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(SIERRA, MC5728, 0), U3G_DEV(SIERRA, MC7354, 0), U3G_DEV(SIERRA, MC7355, 0), + U3G_DEV(SIERRA, MC7430, 0), U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), @@ -631,7 +632,7 @@ u3g_sael_m460_init(struct usb_device *ud static const uint8_t setup[][24] = { { 0x41, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x41, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0xc1, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02 }, @@ -643,7 +644,7 @@ u3g_sael_m460_init(struct usb_device *ud { 0x41, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00 }, { 0x41, 0x19, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x13 }, - { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 }, { 0x41, 0x12, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }, @@ -653,7 +654,7 @@ u3g_sael_m460_init(struct usb_device *ud { 0x41, 0x19, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x13 }, { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 }, { 0x41, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, }; @@ -687,7 +688,7 @@ u3g_sael_m460_init(struct usb_device *ud DPRINTFN(0, "too small buffer\n"); continue; } - err = usbd_do_request(udev, NULL, &req, + err = usbd_do_request(udev, NULL, &req, __DECONST(uint8_t *, &setup[n][8])); } if (err) { @@ -863,7 +864,7 @@ u3g_attach(device_t dev) } /* copy in USB config */ - for (n = 0; n != U3G_N_TRANSFER; n++) + for (n = 0; n != U3G_N_TRANSFER; n++) u3g_config_tmp[n] = u3g_config[n]; device_set_usb_desc(dev); Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Sep 30 05:25:15 2016 (r306477) +++ head/sys/dev/usb/usbdevs Fri Sep 30 05:28:11 2016 (r306478) @@ -4101,6 +4101,7 @@ product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 product SIERRA MC7354 0x68C0 MC7354 product SIERRA MC7355 0x9041 MC7355 +product SIERRA MC7430 0x9071 Sierra Wireless MC7430 Qualcomm Snapdragon X7 LTE-A product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-all@freebsd.org Fri Sep 30 05:30: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 6FC81C031D1; Fri, 30 Sep 2016 05:30:17 +0000 (UTC) (envelope-from mmel@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 4240D1D70; Fri, 30 Sep 2016 05:30:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5UG8V075295; Fri, 30 Sep 2016 05:30:16 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5UGEx075294; Fri, 30 Sep 2016 05:30:16 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609300530.u8U5UGEx075294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 30 Sep 2016 05:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306479 - head/sys/arm/allwinner 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.23 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: Fri, 30 Sep 2016 05:30:17 -0000 Author: mmel Date: Fri Sep 30 05:30:16 2016 New Revision: 306479 URL: https://svnweb.freebsd.org/changeset/base/306479 Log: ALLWINNER: ahci_devclass is local variable, don't export it. Modified: head/sys/arm/allwinner/a10_ahci.c Modified: head/sys/arm/allwinner/a10_ahci.c ============================================================================== --- head/sys/arm/allwinner/a10_ahci.c Fri Sep 30 05:28:11 2016 (r306478) +++ head/sys/arm/allwinner/a10_ahci.c Fri Sep 30 05:30:16 2016 (r306479) @@ -373,7 +373,7 @@ ahci_a10_detach(device_t dev) return (ahci_detach(dev)); } -devclass_t ahci_devclass; +static devclass_t ahci_devclass; static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_a10_probe), From owner-svn-src-all@freebsd.org Fri Sep 30 05:51: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 AB24EC03611; Fri, 30 Sep 2016 05:51:12 +0000 (UTC) (envelope-from sephe@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 617DEAD9; Fri, 30 Sep 2016 05:51:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5pBva083540; Fri, 30 Sep 2016 05:51:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5pBPc083539; Fri, 30 Sep 2016 05:51:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300551.u8U5pBPc083539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 05:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306480 - head/sys/compat/linuxkpi/common/include/linux 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.23 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: Fri, 30 Sep 2016 05:51:12 -0000 Author: sephe Date: Fri Sep 30 05:51:11 2016 New Revision: 306480 URL: https://svnweb.freebsd.org/changeset/base/306480 Log: linuxkpi: Fix PCI BAR lazy allocation support. FreeBSD supports lazy allocation of PCI BAR, that is, when a device driver's attach method is invoked, even if the device's PCI BAR address wasn't initialized, the invocation of bus_alloc_resource_any() (the call chain: pci_alloc_resource() -> pci_alloc_multi_resource() -> pci_reserve_map() -> pci_write_bar()) would allocate a proper address for the PCI BAR and write this 'lazy allocated' address into the PCI BAR. This model works fine for native FreeBSD device drivers, but _not_ for device drivers shared with Linux (e.g. dev/mlx5/mlx5_core/mlx5_main.c and ofed/drivers/net/mlx4/main.c. Both of them use pci_request_regions(), which doesn't work properly with the PCI BAR lazy allocation, because pci_resource_type() -> _pci_get_rle() always returns NULL, so pci_request_regions() doesn't have the opportunity to invoke bus_alloc_resource_any(). We now use pci_find_bar() in pci_resource_type(), which is able to locate all available PCI BARs even if some of them will be lazy allocated. Submitted by: Dexuan Cui Reviewed by: hps MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8071 Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Fri Sep 30 05:30:16 2016 (r306479) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Fri Sep 30 05:51:11 2016 (r306480) @@ -233,11 +233,16 @@ pci_resource_len(struct pci_dev *pdev, i static inline int pci_resource_type(struct pci_dev *pdev, int bar) { - struct resource_list_entry *rle; + struct pci_map *pm; - if ((rle = _pci_get_bar(pdev, bar)) == NULL) + pm = pci_find_bar(pdev->dev.bsddev, PCIR_BAR(bar)); + if (!pm) return (-1); - return (rle->type); + + if (PCI_BAR_IO(pm->pm_value)) + return (SYS_RES_IOPORT); + else + return (SYS_RES_MEMORY); } /* From owner-svn-src-all@freebsd.org Fri Sep 30 06:08: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 D7328C0389B; Fri, 30 Sep 2016 06:08:22 +0000 (UTC) (envelope-from sephe@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 A843811DA; Fri, 30 Sep 2016 06:08:22 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U68LeX090124; Fri, 30 Sep 2016 06:08:21 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U68LHd090123; Fri, 30 Sep 2016 06:08:21 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300608.u8U68LHd090123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306481 - head/sys/x86/x86 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.23 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: Fri, 30 Sep 2016 06:08:22 -0000 Author: sephe Date: Fri Sep 30 06:08:21 2016 New Revision: 306481 URL: https://svnweb.freebsd.org/changeset/base/306481 Log: x86/ioapic: Fix destination cpu for Hyper-V On Hyper-V: - Stick to the first cpu for all I/O APIC pins. - And don't allow destination cpu changes. Reviewed by: jhb MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7949 Modified: head/sys/x86/x86/io_apic.c Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Fri Sep 30 05:51:11 2016 (r306480) +++ head/sys/x86/x86/io_apic.c Fri Sep 30 06:08:21 2016 (r306481) @@ -412,6 +412,18 @@ ioapic_assign_cpu(struct intsrc *isrc, u u_int old_id; /* + * On Hyper-V: + * - Stick to the first cpu for all I/O APIC pins. + * - And don't allow destination cpu changes. + */ + if (vm_guest == VM_GUEST_HV) { + if (intpin->io_vector) + return (EINVAL); + else + apic_id = 0; + } + + /* * keep 1st core as the destination for NMI */ if (intpin->io_irq == IRQ_NMI) From owner-svn-src-all@freebsd.org Fri Sep 30 06: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 9C224C03B59; Fri, 30 Sep 2016 06:21:01 +0000 (UTC) (envelope-from sephe@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 773651723; Fri, 30 Sep 2016 06:21:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6L0vr094477; Fri, 30 Sep 2016 06:21:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6L00o094475; Fri, 30 Sep 2016 06:21:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300621.u8U6L00o094475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306482 - head/sys/dev/hyperv/netvsc 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.23 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: Fri, 30 Sep 2016 06:21:01 -0000 Author: sephe Date: Fri Sep 30 06:21:00 2016 New Revision: 306482 URL: https://svnweb.freebsd.org/changeset/base/306482 Log: hyperv/hn: If synthetic parts are detached, don't touch them. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8065 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Sep 30 06:08:21 2016 (r306481) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Sep 30 06:21:00 2016 (r306482) @@ -252,6 +252,7 @@ struct hn_softc { #define HN_FLAG_CHIM_CONNECTED 0x0002 #define HN_FLAG_HAS_RSSKEY 0x0004 #define HN_FLAG_HAS_RSSIND 0x0008 +#define HN_FLAG_SYNTH_ATTACHED 0x0010 #define HN_CAP_VLAN 0x0001 #define HN_CAP_MTU 0x0002 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:08:21 2016 (r306481) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:21:00 2016 (r306482) @@ -405,6 +405,9 @@ hn_rss_reconfig(struct hn_softc *sc) HN_LOCK_ASSERT(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) + return (ENXIO); + /* * Disable RSS first. * @@ -1618,6 +1621,11 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, HN_LOCK(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) { + HN_UNLOCK(sc); + break; + } + if ((sc->hn_caps & HN_CAP_MTU) == 0) { /* Can't change MTU */ HN_UNLOCK(sc); @@ -1671,6 +1679,11 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, case SIOCSIFFLAGS: HN_LOCK(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) { + HN_UNLOCK(sc); + break; + } + if (ifp->if_flags & IFF_UP) { /* * If only the state of the PROMISC flag changed, @@ -1782,6 +1795,9 @@ hn_stop(struct hn_softc *sc) HN_LOCK_ASSERT(sc); + KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, + ("synthetic parts were not attached")); + /* Clear RUNNING bit _before_ hn_suspend() */ atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); hn_suspend(sc); @@ -1858,6 +1874,9 @@ hn_init_locked(struct hn_softc *sc) HN_LOCK_ASSERT(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) + return; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; @@ -3377,6 +3396,9 @@ hn_synth_attach(struct hn_softc *sc, int int error, nsubch, nchan, i; uint32_t old_caps; + KASSERT((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0, + ("synthetic parts were attached")); + /* Save capabilities for later verification. */ old_caps = sc->hn_caps; sc->hn_caps = 0; @@ -3489,6 +3511,8 @@ back: error = hn_attach_subchans(sc); if (error) return (error); + + sc->hn_flags |= HN_FLAG_SYNTH_ATTACHED; return (0); } @@ -3502,6 +3526,9 @@ hn_synth_detach(struct hn_softc *sc) { HN_LOCK_ASSERT(sc); + KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, + ("synthetic parts were not attached")); + /* Detach the RNDIS first. */ hn_rndis_detach(sc); @@ -3510,6 +3537,8 @@ hn_synth_detach(struct hn_softc *sc) /* Detach all of the channels. */ hn_detach_allchans(sc); + + sc->hn_flags &= ~HN_FLAG_SYNTH_ATTACHED; } static void From owner-svn-src-all@freebsd.org Fri Sep 30 06:30: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 D27EFC03E1B; Fri, 30 Sep 2016 06:30:17 +0000 (UTC) (envelope-from sephe@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 890B01CB8; Fri, 30 Sep 2016 06:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6UG77097909; Fri, 30 Sep 2016 06:30:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6UGFr097908; Fri, 30 Sep 2016 06:30:16 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300630.u8U6UGFr097908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306483 - head/sys/dev/hyperv/netvsc 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.23 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: Fri, 30 Sep 2016 06:30:17 -0000 Author: sephe Date: Fri Sep 30 06:30:16 2016 New Revision: 306483 URL: https://svnweb.freebsd.org/changeset/base/306483 Log: hyperv/hn: Fix detach and attach error handling. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8066 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:21:00 2016 (r306482) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:30:16 2016 (r306483) @@ -352,6 +352,7 @@ static void hn_resume(struct hn_softc *) static void hn_rx_drain(struct vmbus_channel *); static void hn_tx_resume(struct hn_softc *, int); static void hn_tx_ring_qflush(struct hn_tx_ring *); +static int netvsc_detach(device_t dev); static void hn_nvs_handle_notify(struct hn_softc *sc, const struct vmbus_chanpkt_hdr *pkt); @@ -739,27 +740,28 @@ netvsc_attach(device_t dev) return (0); failed: - /* TODO: reuse netvsc_detach() */ - hn_destroy_tx_data(sc); - if (ifp != NULL) - if_free(ifp); + if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) + hn_synth_detach(sc); + netvsc_detach(dev); return (error); } -/* - * TODO: Use this for error handling on attach path. - */ static int netvsc_detach(device_t dev) { struct hn_softc *sc = device_get_softc(dev); + struct ifnet *ifp = sc->hn_ifp; - /* TODO: ether_ifdetach */ - - HN_LOCK(sc); - /* TODO: hn_stop */ - hn_synth_detach(sc); - HN_UNLOCK(sc); + if (device_is_attached(dev)) { + HN_LOCK(sc); + if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_stop(sc); + hn_synth_detach(sc); + } + HN_UNLOCK(sc); + ether_ifdetach(ifp); + } ifmedia_removeall(&sc->hn_media); hn_destroy_rx_data(sc); @@ -768,10 +770,12 @@ netvsc_detach(device_t dev) if (sc->hn_tx_taskq != hn_tx_taskq) taskqueue_free(sc->hn_tx_taskq); - vmbus_xact_ctx_destroy(sc->hn_xact); - HN_LOCK_DESTROY(sc); + if (sc->hn_xact != NULL) + vmbus_xact_ctx_destroy(sc->hn_xact); - /* TODO: if_free */ + if_free(ifp); + + HN_LOCK_DESTROY(sc); return (0); } From owner-svn-src-all@freebsd.org Fri Sep 30 06:49: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 4EB5DC03574; Fri, 30 Sep 2016 06:49:40 +0000 (UTC) (envelope-from sephe@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 21796C56; Fri, 30 Sep 2016 06:49:40 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6ndoM005520; Fri, 30 Sep 2016 06:49:39 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6ndTR005519; Fri, 30 Sep 2016 06:49:39 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300649.u8U6ndTR005519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306484 - head/sys/modules/hyperv/vmbus 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.23 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: Fri, 30 Sep 2016 06:49:40 -0000 Author: sephe Date: Fri Sep 30 06:49:39 2016 New Revision: 306484 URL: https://svnweb.freebsd.org/changeset/base/306484 Log: hyperv/vmbus: Add missing vmbus_if.c to module build. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8067 Modified: head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Fri Sep 30 06:30:16 2016 (r306483) +++ head/sys/modules/hyperv/vmbus/Makefile Fri Sep 30 06:49:39 2016 (r306484) @@ -11,6 +11,7 @@ SRCS= hyperv.c \ vmbus_br.c \ vmbus_chan.c \ vmbus_et.c \ + vmbus_if.c \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h vmbus_if.h From owner-svn-src-all@freebsd.org Fri Sep 30 06:58:46 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 F28D0C0382B; Fri, 30 Sep 2016 06:58:46 +0000 (UTC) (envelope-from sephe@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 BFE0312CC; Fri, 30 Sep 2016 06:58:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6wj7n009353; Fri, 30 Sep 2016 06:58:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6wj0p009351; Fri, 30 Sep 2016 06:58:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300658.u8U6wj0p009351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306485 - in head/sys: dev/hyperv/netvsc net 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.23 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: Fri, 30 Sep 2016 06:58:47 -0000 Author: sephe Date: Fri Sep 30 06:58:45 2016 New Revision: 306485 URL: https://svnweb.freebsd.org/changeset/base/306485 Log: hyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8068 Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/net/rndis.h Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Fri Sep 30 06:49:39 2016 (r306484) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Fri Sep 30 06:58:45 2016 (r306485) @@ -155,6 +155,15 @@ hv_rf_receive_indicate_status(struct hn_ netvsc_linkstatus_callback(sc, 0); break; + case RNDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG: + /* Not really useful; ignore. */ + break; + + case RNDIS_STATUS_NETWORK_CHANGE: + /* TODO */ + if_printf(sc->hn_ifp, "network changed\n"); + break; + default: /* TODO: */ if_printf(sc->hn_ifp, "unknown RNDIS status 0x%08x\n", Modified: head/sys/net/rndis.h ============================================================================== --- head/sys/net/rndis.h Fri Sep 30 06:49:39 2016 (r306484) +++ head/sys/net/rndis.h Fri Sep 30 06:58:45 2016 (r306485) @@ -31,6 +31,8 @@ #define RNDIS_STATUS_PENDING 0x00000103L #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BL #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CL +#define RNDIS_STATUS_NETWORK_CHANGE 0x40010018L +#define RNDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG 0x40020006L #define RNDIS_STATUS_BUFFER_OVERFLOW 0x80000005L #define RNDIS_STATUS_FAILURE 0xC0000001L #define RNDIS_STATUS_NOT_SUPPORTED 0xC00000BBL From owner-svn-src-all@freebsd.org Fri Sep 30 08:23: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 DA4D3C02924; Fri, 30 Sep 2016 08:23:08 +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 88DAB1FAE; Fri, 30 Sep 2016 08:23: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 u8U8N7u5043566; Fri, 30 Sep 2016 08:23:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U8N7ff043558; Fri, 30 Sep 2016 08:23:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609300823.u8U8N7ff043558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 30 Sep 2016 08:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... 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.23 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: Fri, 30 Sep 2016 08:23:09 -0000 Author: hselasky Date: Fri Sep 30 08:23:06 2016 New Revision: 306486 URL: https://svnweb.freebsd.org/changeset/base/306486 Log: Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 like other PCI network drivers. The sys/ofed directory is now mainly reserved for generic infiniband code, with exception of the mthca driver. - Add new manual page, mlx4en(4), describing how to configure and load mlx4en. - All relevant driver C-files are now prefixed mlx4, mlx4_en and mlx4_ib respectivly to avoid object filename collisions when compiling the kernel. This also fixes an issue with proper dependency file generation for the C-files in question. - Device mlxen is now device mlx4en and depends on device mlx4, see mlx4en(4). Only the network device name remains unchanged. - The mlx4 and mlx4en modules are now built by default on i386 and amd64 targets. Only building the mlx4ib module depends on WITH_OFED=YES . Sponsored by: Mellanox Technologies Added: head/share/man/man4/mlx4en.4 (contents, props changed) head/sys/dev/mlx4/ head/sys/dev/mlx4/cmd.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/cmd.h head/sys/dev/mlx4/cq.h - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/cq.h head/sys/dev/mlx4/device.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/device.h head/sys/dev/mlx4/doorbell.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/doorbell.h head/sys/dev/mlx4/driver.h - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/driver.h head/sys/dev/mlx4/mlx4_core/ head/sys/dev/mlx4/mlx4_core/fw.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/fw.h head/sys/dev/mlx4/mlx4_core/icm.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/icm.h head/sys/dev/mlx4/mlx4_core/mlx4.h - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4.h head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/alloc.c head/sys/dev/mlx4/mlx4_core/mlx4_catas.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/catas.c head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cmd.c head/sys/dev/mlx4/mlx4_core/mlx4_cq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cq.c head/sys/dev/mlx4/mlx4_core/mlx4_eq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/eq.c head/sys/dev/mlx4/mlx4_core/mlx4_fw.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/fw.c head/sys/dev/mlx4/mlx4_core/mlx4_icm.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/icm.c head/sys/dev/mlx4/mlx4_core/mlx4_intf.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/intf.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/main.c head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mcg.c head/sys/dev/mlx4/mlx4_core/mlx4_mr.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mr.c head/sys/dev/mlx4/mlx4_core/mlx4_pd.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/pd.c head/sys/dev/mlx4/mlx4_core/mlx4_port.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/port.c head/sys/dev/mlx4/mlx4_core/mlx4_profile.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/profile.c head/sys/dev/mlx4/mlx4_core/mlx4_qp.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/qp.c head/sys/dev/mlx4/mlx4_core/mlx4_reset.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/reset.c head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/resource_tracker.c head/sys/dev/mlx4/mlx4_core/mlx4_sense.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/sense.c head/sys/dev/mlx4/mlx4_core/mlx4_srq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/srq.c head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/sys_tune.c head/sys/dev/mlx4/mlx4_en/ head/sys/dev/mlx4/mlx4_en/en.h - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_en.h head/sys/dev/mlx4/mlx4_en/en_port.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/en_port.h head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_cq.c head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/dev/mlx4/mlx4_en/mlx4_en_port.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_port.c head/sys/dev/mlx4/mlx4_en/mlx4_en_resources.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_resources.c head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_rx.c head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_tx.c head/sys/dev/mlx4/mlx4_ib/ head/sys/dev/mlx4/mlx4_ib/mlx4_exp.h - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.h head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cm.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cm.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cq.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cq.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/doorbell.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_exp.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mad.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mcg.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mr.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mr.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/qp.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_srq.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/srq.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_wc.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.c head/sys/dev/mlx4/mlx4_ib/user.h - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/user.h head/sys/dev/mlx4/mlx4_ib/wc.h - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.h head/sys/dev/mlx4/qp.h - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/qp.h head/sys/dev/mlx4/srq.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/srq.h head/sys/dev/mlx4/stats.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_stats.h head/sys/modules/mlx4en/ - copied from r306485, head/sys/modules/mlxen/ Deleted: head/sys/modules/mlxen/ head/sys/ofed/drivers/infiniband/hw/mlx4/ head/sys/ofed/drivers/net/ head/sys/ofed/include/linux/ Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/Makefile head/sys/modules/mlx4/Makefile head/sys/modules/mlx4en/Makefile head/sys/modules/mlx4ib/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Sep 30 06:58:45 2016 (r306485) +++ head/share/man/man4/Makefile Fri Sep 30 08:23:06 2016 (r306486) @@ -279,6 +279,7 @@ MAN= aac.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ + mlx4en.4 \ mlx5en.4 \ mly.4 \ mmc.4 \ Added: head/share/man/man4/mlx4en.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/mlx4en.4 Fri Sep 30 08:23:06 2016 (r306486) @@ -0,0 +1,95 @@ +.\" Copyright (c) 2016 Mellanox Technologies +.\" 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 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 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 30, 2016 +.Dt MLX4EN 4 +.Os +.Sh NAME +.Nm mlx4en +.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device mlx4" +.Cd "device mlx4en" +.Ed +.Pp +To load the driver as a module at run-time, +run the following command as root: +.Bd -literal -offset indent +kldload mlx4en +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mlx4en_load="YES" +.Ed +.Sh DESCRIPTION +Mellanox ConnectX adapter cards with Virtual Protocol Interconnect +(VPI) provide the highest performing and most flexible interconnect +solution for Enterprise Data Centers, High-Performance Computing, and +Embedded environments. +Clustered data bases, parallelized applications, transactional +services and high-performance embedded I/O applications will achieve +significant performance improvements resulting in reduced completion +time and lower cost per operation. +.Sh HARDWARE +The +.Nm +driver supports the following network adapters: +.Pp +.Bl -bullet -compact +.It +Mellanox ConnectX-2 (ETH) +.It +Mellanox ConnectX-3 (ETH) +.El +.Sh SUPPORT +For general information and support, +go to the Mellanox support website at: +.Pa http://www.mellanox.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd-drivers@mellanox.com . +.Sh SEE ALSO +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.x . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Mellanox Technologies . Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Sep 30 06:58:45 2016 (r306485) +++ head/sys/amd64/conf/NOTES Fri Sep 30 08:23:06 2016 (r306486) @@ -318,7 +318,7 @@ options DRM_DEBUG # Include debug print # ixl: Intel XL710 40Gbe PCIE Ethernet # ixlv: Intel XL710 40Gbe VF PCIE Ethernet # mlx4ib: Mellanox ConnectX HCA InfiniBand -# mlxen: Mellanox ConnectX HCA Ethernet +# mlx4en: Mellanox ConnectX HCA Ethernet # mthca: Mellanox HCA InfiniBand # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters @@ -336,8 +336,9 @@ device iwi # Intel 2200BG/2225BG/2915A device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel XL710 40Gbe PCIE Ethernet device ixlv # Intel XL710 40Gbe VF PCIE Ethernet +device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand -device mlxen # Mellanox ConnectX HCA Ethernet +device mlx4en # Mellanox ConnectX HCA Ethernet device mthca # Mellanox HCA InfiniBand device nfe # nVidia nForce MCP on-board Ethernet device sfxge # Solarflare SFC9000 10Gb Ethernet Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Sep 30 06:58:45 2016 (r306485) +++ head/sys/conf/files Fri Sep 30 08:23:06 2016 (r306486) @@ -4036,131 +4036,90 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma. ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" -ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" -ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused" -ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \ + compile-with "${OFED_C}" -ofed/drivers/net/mlx4/en_cq.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_main.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_netdev.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_port.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_resources.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_rx.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_tx.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" Copied: head/sys/dev/mlx4/cmd.h (from r306485, head/sys/ofed/include/linux/mlx4/cmd.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx4/cmd.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/cmd.h) @@ -0,0 +1,258 @@ +/* + * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - 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. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef MLX4_CMD_H +#define MLX4_CMD_H + +#include +#include + +enum { + /* initialization and general commands */ + MLX4_CMD_SYS_EN = 0x1, + MLX4_CMD_SYS_DIS = 0x2, + MLX4_CMD_MAP_FA = 0xfff, + MLX4_CMD_UNMAP_FA = 0xffe, + MLX4_CMD_RUN_FW = 0xff6, + MLX4_CMD_MOD_STAT_CFG = 0x34, + MLX4_CMD_QUERY_DEV_CAP = 0x3, + MLX4_CMD_QUERY_FW = 0x4, + MLX4_CMD_ENABLE_LAM = 0xff8, + MLX4_CMD_DISABLE_LAM = 0xff7, + MLX4_CMD_QUERY_DDR = 0x5, + MLX4_CMD_QUERY_ADAPTER = 0x6, + MLX4_CMD_INIT_HCA = 0x7, + MLX4_CMD_CLOSE_HCA = 0x8, + MLX4_CMD_INIT_PORT = 0x9, + MLX4_CMD_CLOSE_PORT = 0xa, + MLX4_CMD_QUERY_HCA = 0xb, + MLX4_CMD_QUERY_PORT = 0x43, + MLX4_CMD_SENSE_PORT = 0x4d, + MLX4_CMD_HW_HEALTH_CHECK = 0x50, + MLX4_CMD_SET_PORT = 0xc, + MLX4_CMD_SET_NODE = 0x5a, + MLX4_CMD_QUERY_FUNC = 0x56, + MLX4_CMD_ACCESS_DDR = 0x2e, + MLX4_CMD_MAP_ICM = 0xffa, + MLX4_CMD_UNMAP_ICM = 0xff9, + MLX4_CMD_MAP_ICM_AUX = 0xffc, + MLX4_CMD_UNMAP_ICM_AUX = 0xffb, + MLX4_CMD_SET_ICM_SIZE = 0xffd, + /*master notify fw on finish for slave's flr*/ + MLX4_CMD_INFORM_FLR_DONE = 0x5b, + MLX4_CMD_GET_OP_REQ = 0x59, + + /* TPT commands */ + MLX4_CMD_SW2HW_MPT = 0xd, + MLX4_CMD_QUERY_MPT = 0xe, + MLX4_CMD_HW2SW_MPT = 0xf, + MLX4_CMD_READ_MTT = 0x10, + MLX4_CMD_WRITE_MTT = 0x11, + MLX4_CMD_SYNC_TPT = 0x2f, + + /* EQ commands */ + MLX4_CMD_MAP_EQ = 0x12, + MLX4_CMD_SW2HW_EQ = 0x13, + MLX4_CMD_HW2SW_EQ = 0x14, + MLX4_CMD_QUERY_EQ = 0x15, + + /* CQ commands */ + MLX4_CMD_SW2HW_CQ = 0x16, + MLX4_CMD_HW2SW_CQ = 0x17, + MLX4_CMD_QUERY_CQ = 0x18, + MLX4_CMD_MODIFY_CQ = 0x2c, + + /* SRQ commands */ + MLX4_CMD_SW2HW_SRQ = 0x35, + MLX4_CMD_HW2SW_SRQ = 0x36, + MLX4_CMD_QUERY_SRQ = 0x37, + MLX4_CMD_ARM_SRQ = 0x40, + + /* QP/EE commands */ + MLX4_CMD_RST2INIT_QP = 0x19, + MLX4_CMD_INIT2RTR_QP = 0x1a, + MLX4_CMD_RTR2RTS_QP = 0x1b, + MLX4_CMD_RTS2RTS_QP = 0x1c, + MLX4_CMD_SQERR2RTS_QP = 0x1d, + MLX4_CMD_2ERR_QP = 0x1e, + MLX4_CMD_RTS2SQD_QP = 0x1f, + MLX4_CMD_SQD2SQD_QP = 0x38, + MLX4_CMD_SQD2RTS_QP = 0x20, + MLX4_CMD_2RST_QP = 0x21, + MLX4_CMD_QUERY_QP = 0x22, + MLX4_CMD_INIT2INIT_QP = 0x2d, + MLX4_CMD_SUSPEND_QP = 0x32, + MLX4_CMD_UNSUSPEND_QP = 0x33, + MLX4_CMD_UPDATE_QP = 0x61, + /* special QP and management commands */ + MLX4_CMD_CONF_SPECIAL_QP = 0x23, + MLX4_CMD_MAD_IFC = 0x24, + + /* multicast commands */ + MLX4_CMD_READ_MCG = 0x25, + MLX4_CMD_WRITE_MCG = 0x26, + MLX4_CMD_MGID_HASH = 0x27, + + /* miscellaneous commands */ + MLX4_CMD_DIAG_RPRT = 0x30, + MLX4_CMD_NOP = 0x31, + MLX4_CMD_ACCESS_MEM = 0x2e, + MLX4_CMD_SET_VEP = 0x52, + + /* Ethernet specific commands */ + MLX4_CMD_SET_VLAN_FLTR = 0x47, + MLX4_CMD_SET_MCAST_FLTR = 0x48, + MLX4_CMD_DUMP_ETH_STATS = 0x49, + + /* Communication channel commands */ + MLX4_CMD_ARM_COMM_CHANNEL = 0x57, + MLX4_CMD_GEN_EQE = 0x58, + + /* virtual commands */ + MLX4_CMD_ALLOC_RES = 0xf00, + MLX4_CMD_FREE_RES = 0xf01, + MLX4_CMD_MCAST_ATTACH = 0xf05, + MLX4_CMD_UCAST_ATTACH = 0xf06, + MLX4_CMD_PROMISC = 0xf08, + MLX4_CMD_QUERY_FUNC_CAP = 0xf0a, + MLX4_CMD_QP_ATTACH = 0xf0b, + + /* debug commands */ + MLX4_CMD_QUERY_DEBUG_MSG = 0x2a, + MLX4_CMD_SET_DEBUG_MSG = 0x2b, + + /* statistics commands */ + MLX4_CMD_QUERY_IF_STAT = 0X54, + MLX4_CMD_SET_IF_STAT = 0X55, + + /* register/delete flow steering network rules */ + MLX4_QP_FLOW_STEERING_ATTACH = 0x65, + MLX4_QP_FLOW_STEERING_DETACH = 0x66, + MLX4_FLOW_STEERING_IB_UC_QP_RANGE = 0x64, +}; + +enum { + MLX4_CMD_TIME_CLASS_A = 60000, + MLX4_CMD_TIME_CLASS_B = 60000, + MLX4_CMD_TIME_CLASS_C = 60000, +}; + +enum { + MLX4_MAILBOX_SIZE = 4096, + MLX4_ACCESS_MEM_ALIGN = 256, +}; + +enum { + /* set port opcode modifiers */ + MLX4_SET_PORT_GENERAL = 0x0, + MLX4_SET_PORT_RQP_CALC = 0x1, + MLX4_SET_PORT_MAC_TABLE = 0x2, + MLX4_SET_PORT_VLAN_TABLE = 0x3, + MLX4_SET_PORT_PRIO_MAP = 0x4, + MLX4_SET_PORT_GID_TABLE = 0x5, + MLX4_SET_PORT_PRIO2TC = 0x8, + MLX4_SET_PORT_SCHEDULER = 0x9 +}; + +enum { + MLX4_CMD_WRAPPED, + MLX4_CMD_NATIVE +}; + +struct mlx4_dev; + +struct mlx4_cmd_mailbox { + void *buf; + dma_addr_t dma; +}; + +int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, + int out_is_imm, u32 in_modifier, u8 op_modifier, + u16 op, unsigned long timeout, int native); + +/* Invoke a command with no output parameter */ +static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier, + u8 op_modifier, u16 op, unsigned long timeout, + int native) +{ + return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier, + op_modifier, op, timeout, native); +} + +/* Invoke a command with an output mailbox */ +static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param, + u32 in_modifier, u8 op_modifier, u16 op, + unsigned long timeout, int native) +{ + return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier, + op_modifier, op, timeout, native); +} + +/* + * Invoke a command with an immediate output parameter (and copy the + * output into the caller's out_param pointer after the command + * executes). + */ +static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param, + u32 in_modifier, u8 op_modifier, u16 op, + unsigned long timeout, int native) +{ + return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier, + op_modifier, op, timeout, native); +} + +struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); +void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); + +u32 mlx4_comm_get_version(void); +int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u8 *mac); +int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); +int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); +int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state); +int mlx4_get_vf_link_state(struct mlx4_dev *dev, int port, int vf); +/* + * mlx4_get_slave_default_vlan - + * retrun true if VST ( default vlan) + * if VST will fill vlan & qos (if not NULL) + */ +bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, u16 *vlan, u8 *qos); + +enum { + IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ + IFLA_VF_LINK_STATE_ENABLE, /* link always up */ + IFLA_VF_LINK_STATE_DISABLE, /* link always down */ + __IFLA_VF_LINK_STATE_MAX, +}; + +#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) + +#endif /* MLX4_CMD_H */ Copied and modified: head/sys/dev/mlx4/cq.h (from r306485, head/sys/ofed/include/linux/mlx4/cq.h) ============================================================================== --- head/sys/ofed/include/linux/mlx4/cq.h Fri Sep 30 06:58:45 2016 (r306485, copy source) +++ head/sys/dev/mlx4/cq.h Fri Sep 30 08:23:06 2016 (r306486) @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include struct mlx4_cqe { __be32 vlan_my_qpn; Copied: head/sys/dev/mlx4/device.h (from r306485, head/sys/ofed/include/linux/mlx4/device.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx4/device.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/device.h) @@ -0,0 +1,1327 @@ +/* + * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - 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. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef MLX4_DEVICE_H +#define MLX4_DEVICE_H + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define MAX_MSIX_P_PORT 17 +#define MAX_MSIX 64 +#define MSIX_LEGACY_SZ 4 +#define MIN_MSIX_P_PORT 5 + +#define MLX4_ROCE_MAX_GIDS 128 +#define MLX4_ROCE_PF_GIDS 16 + +#define MLX4_NUM_UP 8 +#define MLX4_NUM_TC 8 +#define MLX4_MAX_100M_UNITS_VAL 255 /* + * work around: can't set values + * greater then this value when + * using 100 Mbps units. + */ +#define MLX4_RATELIMIT_100M_UNITS 3 /* 100 Mbps */ +#define MLX4_RATELIMIT_1G_UNITS 4 /* 1 Gbps */ +#define MLX4_RATELIMIT_DEFAULT 0x00ff + +#define CORE_CLOCK_MASK 0xffffffffffffULL + +enum { + MLX4_FLAG_MSI_X = 1 << 0, + MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, + MLX4_FLAG_MASTER = 1 << 2, + MLX4_FLAG_SLAVE = 1 << 3, + MLX4_FLAG_SRIOV = 1 << 4, + MLX4_FLAG_DEV_NUM_STR = 1 << 5, + MLX4_FLAG_OLD_REG_MAC = 1 << 6, +}; + +enum { + MLX4_PORT_CAP_IS_SM = 1 << 1, + MLX4_PORT_CAP_DEV_MGMT_SUP = 1 << 19, +}; + +enum { + MLX4_MAX_PORTS = 2, + MLX4_MAX_PORT_PKEYS = 128 +}; + +/* base qkey for use in sriov tunnel-qp/proxy-qp communication. + * These qkeys must not be allowed for general use. This is a 64k range, + * and to test for violation, we use the mask (protect against future chg). + */ +#define MLX4_RESERVED_QKEY_BASE (0xFFFF0000) +#define MLX4_RESERVED_QKEY_MASK (0xFFFF0000) + +enum { + MLX4_BOARD_ID_LEN = 64, + MLX4_VSD_LEN = 208 +}; + +enum { + MLX4_MAX_NUM_PF = 16, + MLX4_MAX_NUM_VF = 64, + MLX4_MFUNC_MAX = 80, + MLX4_MAX_EQ_NUM = 1024, + MLX4_MFUNC_EQ_NUM = 4, + MLX4_MFUNC_MAX_EQES = 8, + MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) +}; + +/* Driver supports 3 different device methods to manage traffic steering: + * -device managed - High level API for ib and eth flow steering. FW is + * managing flow steering tables. + * - B0 steering mode - Common low level API for ib and (if supported) eth. + * - A0 steering mode - Limited low level API for eth. In case of IB, + * B0 mode is in use. + */ +enum { + MLX4_STEERING_MODE_A0, + MLX4_STEERING_MODE_B0, + MLX4_STEERING_MODE_DEVICE_MANAGED +}; + +static inline const char *mlx4_steering_mode_str(int steering_mode) +{ + switch (steering_mode) { + case MLX4_STEERING_MODE_A0: + return "A0 steering"; + + case MLX4_STEERING_MODE_B0: + return "B0 steering"; + + case MLX4_STEERING_MODE_DEVICE_MANAGED: + return "Device managed flow steering"; + + default: + return "Unrecognize steering mode"; + } +} + +enum { + MLX4_DEV_CAP_FLAG_RC = 1LL << 0, + MLX4_DEV_CAP_FLAG_UC = 1LL << 1, + MLX4_DEV_CAP_FLAG_UD = 1LL << 2, + MLX4_DEV_CAP_FLAG_XRC = 1LL << 3, + MLX4_DEV_CAP_FLAG_SRQ = 1LL << 6, + MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1LL << 7, + MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8, + MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, + MLX4_DEV_CAP_FLAG_DPDP = 1LL << 12, + MLX4_DEV_CAP_FLAG_BLH = 1LL << 15, + MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1LL << 16, + MLX4_DEV_CAP_FLAG_APM = 1LL << 17, + MLX4_DEV_CAP_FLAG_ATOMIC = 1LL << 18, + MLX4_DEV_CAP_FLAG_RAW_MCAST = 1LL << 19, + MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1LL << 20, + MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21, + MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30, + MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32, + MLX4_DEV_CAP_FLAG_FCS_KEEP = 1LL << 34, + MLX4_DEV_CAP_FLAG_WOL_PORT1 = 1LL << 37, + MLX4_DEV_CAP_FLAG_WOL_PORT2 = 1LL << 38, + MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, + MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, + MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, + MLX4_DEV_CAP_FLAG_CROSS_CHANNEL = 1LL << 44, + MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, + MLX4_DEV_CAP_FLAG_COUNTERS_EXT = 1LL << 49, + MLX4_DEV_CAP_FLAG_SET_PORT_ETH_SCHED = 1LL << 53, + MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, + MLX4_DEV_CAP_FLAG_FAST_DROP = 1LL << 57, + MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, + MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61, + MLX4_DEV_CAP_FLAG_64B_CQE = 1LL << 62 +}; + +enum { + MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, + MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, + MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, + MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3, + MLX4_DEV_CAP_FLAG2_FSM = 1LL << 4, + MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 5, + MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 6, + MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1LL << 7, + MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 8, + MLX4_DEV_CAP_FLAG2_ETS_CFG = 1LL << 9, + MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, + MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, + MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, + MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, + MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, + MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, + MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, + MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, + MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, + MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_BF_QP = 1 << 7, +}; + +enum { + MLX4_DEV_CAP_CQ_FLAG_IO = 1 << 0 +}; + +enum { + MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, + MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 +}; + +enum { + MLX4_USER_DEV_CAP_64B_CQE = 1L << 0 +}; + +enum { + MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0 +}; + + +#define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) + +enum { + MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, + MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, + MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, + MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, + MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, + MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, +}; + +enum mlx4_event { + MLX4_EVENT_TYPE_COMP = 0x00, + MLX4_EVENT_TYPE_PATH_MIG = 0x01, + MLX4_EVENT_TYPE_COMM_EST = 0x02, + MLX4_EVENT_TYPE_SQ_DRAINED = 0x03, + MLX4_EVENT_TYPE_SRQ_QP_LAST_WQE = 0x13, + MLX4_EVENT_TYPE_SRQ_LIMIT = 0x14, + MLX4_EVENT_TYPE_CQ_ERROR = 0x04, + MLX4_EVENT_TYPE_WQ_CATAS_ERROR = 0x05, + MLX4_EVENT_TYPE_EEC_CATAS_ERROR = 0x06, + MLX4_EVENT_TYPE_PATH_MIG_FAILED = 0x07, + MLX4_EVENT_TYPE_WQ_INVAL_REQ_ERROR = 0x10, + MLX4_EVENT_TYPE_WQ_ACCESS_ERROR = 0x11, + MLX4_EVENT_TYPE_SRQ_CATAS_ERROR = 0x12, + MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR = 0x08, + MLX4_EVENT_TYPE_PORT_CHANGE = 0x09, + MLX4_EVENT_TYPE_EQ_OVERFLOW = 0x0f, + MLX4_EVENT_TYPE_ECC_DETECT = 0x0e, + MLX4_EVENT_TYPE_CMD = 0x0a, + MLX4_EVENT_TYPE_VEP_UPDATE = 0x19, + MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18, + MLX4_EVENT_TYPE_OP_REQUIRED = 0x1a, + MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b, + MLX4_EVENT_TYPE_FLR_EVENT = 0x1c, + MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT = 0x1d, + MLX4_EVENT_TYPE_RECOVERABLE_ERROR_EVENT = 0x3e, + MLX4_EVENT_TYPE_NONE = 0xff, +}; + +enum { + MLX4_PORT_CHANGE_SUBTYPE_DOWN = 1, + MLX4_PORT_CHANGE_SUBTYPE_ACTIVE = 4 +}; + +enum { + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_BAD_CABLE = 1, + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_UNSUPPORTED_CABLE = 2, +}; + +enum { + MLX4_FATAL_WARNING_SUBTYPE_WARMING = 0, +}; + +enum slave_port_state { + SLAVE_PORT_DOWN = 0, + SLAVE_PENDING_UP, + SLAVE_PORT_UP, +}; + +enum slave_port_gen_event { + SLAVE_PORT_GEN_EVENT_DOWN = 0, + SLAVE_PORT_GEN_EVENT_UP, + SLAVE_PORT_GEN_EVENT_NONE, +}; + +enum slave_port_state_event { + MLX4_PORT_STATE_DEV_EVENT_PORT_DOWN, + MLX4_PORT_STATE_DEV_EVENT_PORT_UP, + MLX4_PORT_STATE_IB_PORT_STATE_EVENT_GID_VALID, + MLX4_PORT_STATE_IB_EVENT_GID_INVALID, +}; + +enum { + MLX4_PERM_LOCAL_READ = 1 << 10, + MLX4_PERM_LOCAL_WRITE = 1 << 11, + MLX4_PERM_REMOTE_READ = 1 << 12, + MLX4_PERM_REMOTE_WRITE = 1 << 13, + MLX4_PERM_ATOMIC = 1 << 14, + MLX4_PERM_BIND_MW = 1 << 15, +}; + +enum { + MLX4_OPCODE_NOP = 0x00, + MLX4_OPCODE_SEND_INVAL = 0x01, + MLX4_OPCODE_RDMA_WRITE = 0x08, + MLX4_OPCODE_RDMA_WRITE_IMM = 0x09, + MLX4_OPCODE_SEND = 0x0a, + MLX4_OPCODE_SEND_IMM = 0x0b, + MLX4_OPCODE_LSO = 0x0e, + MLX4_OPCODE_RDMA_READ = 0x10, + MLX4_OPCODE_ATOMIC_CS = 0x11, + MLX4_OPCODE_ATOMIC_FA = 0x12, + MLX4_OPCODE_MASKED_ATOMIC_CS = 0x14, + MLX4_OPCODE_MASKED_ATOMIC_FA = 0x15, + MLX4_OPCODE_BIND_MW = 0x18, + MLX4_OPCODE_FMR = 0x19, + MLX4_OPCODE_LOCAL_INVAL = 0x1b, + MLX4_OPCODE_CONFIG_CMD = 0x1f, + + MLX4_RECV_OPCODE_RDMA_WRITE_IMM = 0x00, + MLX4_RECV_OPCODE_SEND = 0x01, + MLX4_RECV_OPCODE_SEND_IMM = 0x02, + MLX4_RECV_OPCODE_SEND_INVAL = 0x03, + + MLX4_CQE_OPCODE_ERROR = 0x1e, + MLX4_CQE_OPCODE_RESIZE = 0x16, +}; + +enum { + MLX4_STAT_RATE_OFFSET = 5 +}; + +enum mlx4_protocol { + MLX4_PROT_IB_IPV6 = 0, + MLX4_PROT_ETH, + MLX4_PROT_IB_IPV4, + MLX4_PROT_FCOE +}; + +enum { + MLX4_MTT_FLAG_PRESENT = 1 +}; + +enum { + MLX4_MAX_MTT_SHIFT = 31 +}; + +enum mlx4_qp_region { + MLX4_QP_REGION_FW = 0, + MLX4_QP_REGION_ETH_ADDR, + MLX4_QP_REGION_FC_ADDR, + MLX4_QP_REGION_FC_EXCH, + MLX4_NUM_QP_REGION +}; + +enum mlx4_port_type { + MLX4_PORT_TYPE_NONE = 0, + MLX4_PORT_TYPE_IB = 1, + MLX4_PORT_TYPE_ETH = 2, + MLX4_PORT_TYPE_AUTO = 3, + MLX4_PORT_TYPE_NA = 4 +}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 30 08:24: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 A5EB1C0298F; Fri, 30 Sep 2016 08:24:19 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com [IPv6:2607:f8b0:400c:c08::232]) (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 52AA61CB; Fri, 30 Sep 2016 08:24:19 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-ua0-x232.google.com with SMTP id n13so87923688uaa.3; Fri, 30 Sep 2016 01:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zNuOb9GPAyuaPN0B7Ic7omR4Aa+zrih0V2B0NAXPzw4=; b=EDLzGxnMU6Y44RONZLNPNnS+NOJMtzzgh6geZTRjiwUuBKzg8XeI9E0aDEV6sYWWBH GUB1i+OYL6JX7dFa/zAvkX3NAk4GOCPKLlQIN4Kxi/badVovbEOPiK9fNV+5fiO53KSF hngGZgr7cYzEWeMoDZNAtfd6NTsKsiV5KIhS0Wdq6qVz+fnKQ2caK1v9LSxPTYAPQX5B e8RoTOd2q4QIT6J7gvvhAtDuLTvqY+K6djtjny77hG0QkRYL9j2m4F+kNAqYT4TY4rVe 6VW6/FLMWXETYOTcngJg57L7N2O8skPqfvSfoDb/2fq95o2JcCrPEG+OsqfGYOC6Zw6O Nolw== 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:from:date :message-id:subject:to:cc; bh=zNuOb9GPAyuaPN0B7Ic7omR4Aa+zrih0V2B0NAXPzw4=; b=I6XKULc2mYlMtBH5VHwH5/ZWJ4nAzFiXReF56p3hWx75FwOB1WmnVxe4iirdCoNax7 nCh5e0YrNgiYQf9LWfoOdddio/ZK2zTL24Nr4zwGI5YNREiVNe2MG0abW8PutbLxyRUb QcbAYfraY333ZSG7zJFWSXOvnxt2SCX/3XUAAW8lncx0Z/5GaJ/XlpBBoKD+NWCCU8bJ 7qzM18ytxDpkbhyNZ5zQ+r59pS6pEX2vcHOTI4dEchbBwG8IZJsto5WG2/nBOpkpZQdO QFs64xt7uOqvo8pneJgrnqyDfoKjhI0ZmVdF/K/2RBJXwU9EGxClSmwtO2SM+XmH4grB hEIg== X-Gm-Message-State: AA6/9Rmum4bpsfUHC7xzsx7AJrsHrbPfe5iSWLimFi5OiibClGC5KMAJP9arNuqcZkc86eiGXWvazMR1p/+Wlg== X-Received: by 10.176.69.238 with SMTP id u101mr1904148uau.175.1475223857991; Fri, 30 Sep 2016 01:24:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.81.121 with HTTP; Fri, 30 Sep 2016 01:24:17 -0700 (PDT) In-Reply-To: <201609300823.u8U8N7ff043558@repo.freebsd.org> References: <201609300823.u8U8N7ff043558@repo.freebsd.org> From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 16:24:17 +0800 Message-ID: Subject: Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... To: Hans Petter Selasky 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.23 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: Fri, 30 Sep 2016 08:24:19 -0000 Nice! :) On Fri, Sep 30, 2016 at 4:23 PM, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Sep 30 08:23:06 2016 > New Revision: 306486 > URL: https://svnweb.freebsd.org/changeset/base/306486 > > Log: > Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 > like other PCI network drivers. The sys/ofed directory is now mainly > reserved for generic infiniband code, with exception of the mthca driver. > > - Add new manual page, mlx4en(4), describing how to configure and load > mlx4en. > > - All relevant driver C-files are now prefixed mlx4, mlx4_en and > mlx4_ib respectivly to avoid object filename collisions when compiling > the kernel. This also fixes an issue with proper dependency file > generation for the C-files in question. > > - Device mlxen is now device mlx4en and depends on device mlx4, see > mlx4en(4). Only the network device name remains unchanged. > > - The mlx4 and mlx4en modules are now built by default on i386 and > amd64 targets. Only building the mlx4ib module depends on > WITH_OFED=YES . > > Sponsored by: Mellanox Technologies > > Added: > head/share/man/man4/mlx4en.4 (contents, props changed) > head/sys/dev/mlx4/ > head/sys/dev/mlx4/cmd.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/cmd.h > head/sys/dev/mlx4/cq.h > - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/cq.h > head/sys/dev/mlx4/device.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/device.h > head/sys/dev/mlx4/doorbell.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/doorbell.h > head/sys/dev/mlx4/driver.h > - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/driver.h > head/sys/dev/mlx4/mlx4_core/ > head/sys/dev/mlx4/mlx4_core/fw.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/fw.h > head/sys/dev/mlx4/mlx4_core/icm.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/icm.h > head/sys/dev/mlx4/mlx4_core/mlx4.h > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4.h > head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/alloc.c > head/sys/dev/mlx4/mlx4_core/mlx4_catas.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/catas.c > head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cmd.c > head/sys/dev/mlx4/mlx4_core/mlx4_cq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cq.c > head/sys/dev/mlx4/mlx4_core/mlx4_eq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/eq.c > head/sys/dev/mlx4/mlx4_core/mlx4_fw.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/fw.c > head/sys/dev/mlx4/mlx4_core/mlx4_icm.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/icm.c > head/sys/dev/mlx4/mlx4_core/mlx4_intf.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/intf.c > head/sys/dev/mlx4/mlx4_core/mlx4_main.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/main.c > head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mcg.c > head/sys/dev/mlx4/mlx4_core/mlx4_mr.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mr.c > head/sys/dev/mlx4/mlx4_core/mlx4_pd.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/pd.c > head/sys/dev/mlx4/mlx4_core/mlx4_port.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/port.c > head/sys/dev/mlx4/mlx4_core/mlx4_profile.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/profile.c > head/sys/dev/mlx4/mlx4_core/mlx4_qp.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/qp.c > head/sys/dev/mlx4/mlx4_core/mlx4_reset.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/reset.c > head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/resource_tracker.c > head/sys/dev/mlx4/mlx4_core/mlx4_sense.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/sense.c > head/sys/dev/mlx4/mlx4_core/mlx4_srq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/srq.c > head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/sys_tune.c > head/sys/dev/mlx4/mlx4_en/ > head/sys/dev/mlx4/mlx4_en/en.h > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_en.h > head/sys/dev/mlx4/mlx4_en/en_port.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/en_port.h > head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_cq.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_main.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_port.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_port.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_resources.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_resources.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_rx.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_tx.c > head/sys/dev/mlx4/mlx4_ib/ > head/sys/dev/mlx4/mlx4_ib/mlx4_exp.h > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.h > head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cm.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cm.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cq.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cq.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/doorbell.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_exp.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mad.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/main.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mcg.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mr.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mr.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/qp.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_srq.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/srq.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_wc.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.c > head/sys/dev/mlx4/mlx4_ib/user.h > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/user.h > head/sys/dev/mlx4/mlx4_ib/wc.h > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.h > head/sys/dev/mlx4/qp.h > - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/qp.h > head/sys/dev/mlx4/srq.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/srq.h > head/sys/dev/mlx4/stats.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_stats.h > head/sys/modules/mlx4en/ > - copied from r306485, head/sys/modules/mlxen/ > Deleted: > head/sys/modules/mlxen/ > head/sys/ofed/drivers/infiniband/hw/mlx4/ > head/sys/ofed/drivers/net/ > head/sys/ofed/include/linux/ > Modified: > head/share/man/man4/Makefile > head/sys/amd64/conf/NOTES > head/sys/conf/files > head/sys/i386/conf/NOTES > head/sys/modules/Makefile > head/sys/modules/mlx4/Makefile > head/sys/modules/mlx4en/Makefile > head/sys/modules/mlx4ib/Makefile > > Modified: head/share/man/man4/Makefile > ============================================================================== > --- head/share/man/man4/Makefile Fri Sep 30 06:58:45 2016 (r306485) > +++ head/share/man/man4/Makefile Fri Sep 30 08:23:06 2016 (r306486) > @@ -279,6 +279,7 @@ MAN= aac.4 \ > mk48txx.4 \ > mld.4 \ > mlx.4 \ > + mlx4en.4 \ > mlx5en.4 \ > mly.4 \ > mmc.4 \ > > Added: head/share/man/man4/mlx4en.4 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/mlx4en.4 Fri Sep 30 08:23:06 2016 (r306486) > @@ -0,0 +1,95 @@ > +.\" Copyright (c) 2016 Mellanox Technologies > +.\" 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 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 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. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd September 30, 2016 > +.Dt MLX4EN 4 > +.Os > +.Sh NAME > +.Nm mlx4en > +.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" > +.Sh SYNOPSIS > +To compile this driver into the kernel, > +place the following lines in your > +kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "options COMPAT_LINUXKPI" > +.Cd "device mlx4" > +.Cd "device mlx4en" > +.Ed > +.Pp > +To load the driver as a module at run-time, > +run the following command as root: > +.Bd -literal -offset indent > +kldload mlx4en > +.Ed > +.Pp > +To load the driver as a > +module at boot time, place the following lines in > +.Xr loader.conf 5 : > +.Bd -literal -offset indent > +mlx4en_load="YES" > +.Ed > +.Sh DESCRIPTION > +Mellanox ConnectX adapter cards with Virtual Protocol Interconnect > +(VPI) provide the highest performing and most flexible interconnect > +solution for Enterprise Data Centers, High-Performance Computing, and > +Embedded environments. > +Clustered data bases, parallelized applications, transactional > +services and high-performance embedded I/O applications will achieve > +significant performance improvements resulting in reduced completion > +time and lower cost per operation. > +.Sh HARDWARE > +The > +.Nm > +driver supports the following network adapters: > +.Pp > +.Bl -bullet -compact > +.It > +Mellanox ConnectX-2 (ETH) > +.It > +Mellanox ConnectX-3 (ETH) > +.El > +.Sh SUPPORT > +For general information and support, > +go to the Mellanox support website at: > +.Pa http://www.mellanox.com/ . > +.Pp > +If an issue is identified with this driver with a supported adapter, > +email all the specific information related to the issue to > +.Aq Mt freebsd-drivers@mellanox.com . > +.Sh SEE ALSO > +.Xr ifconfig 8 > +.Sh HISTORY > +The > +.Nm > +device driver first appeared in > +.Fx 9.x . > +.Sh AUTHORS > +.An -nosplit > +The > +.Nm > +driver was written by > +.An Mellanox Technologies . > > Modified: head/sys/amd64/conf/NOTES > ============================================================================== > --- head/sys/amd64/conf/NOTES Fri Sep 30 06:58:45 2016 (r306485) > +++ head/sys/amd64/conf/NOTES Fri Sep 30 08:23:06 2016 (r306486) > @@ -318,7 +318,7 @@ options DRM_DEBUG # Include debug print > # ixl: Intel XL710 40Gbe PCIE Ethernet > # ixlv: Intel XL710 40Gbe VF PCIE Ethernet > # mlx4ib: Mellanox ConnectX HCA InfiniBand > -# mlxen: Mellanox ConnectX HCA Ethernet > +# mlx4en: Mellanox ConnectX HCA Ethernet > # mthca: Mellanox HCA InfiniBand > # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) > # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters > @@ -336,8 +336,9 @@ device iwi # Intel 2200BG/2225BG/2915A > device iwn # Intel 4965/1000/5000/6000 wireless NICs. > device ixl # Intel XL710 40Gbe PCIE Ethernet > device ixlv # Intel XL710 40Gbe VF PCIE Ethernet > +device mlx4 # Shared code module between IB and Ethernet > device mlx4ib # Mellanox ConnectX HCA InfiniBand > -device mlxen # Mellanox ConnectX HCA Ethernet > +device mlx4en # Mellanox ConnectX HCA Ethernet > device mthca # Mellanox HCA InfiniBand > device nfe # nVidia nForce MCP on-board Ethernet > device sfxge # Solarflare SFC9000 10Gb Ethernet > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Fri Sep 30 06:58:45 2016 (r306485) > +++ head/sys/conf/files Fri Sep 30 08:23:06 2016 (r306486) > @@ -4036,131 +4036,90 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma. > ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ > compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" > > -ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > +dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > > -ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused" > -ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > +dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \ > + compile-with "${OFED_C}" > > -ofed/drivers/net/mlx4/en_cq.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_main.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_netdev.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_port.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_resources.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_rx.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_tx.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > +dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > > dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ > compile-with "${OFED_C}" > > Copied: head/sys/dev/mlx4/cmd.h (from r306485, head/sys/ofed/include/linux/mlx4/cmd.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/mlx4/cmd.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/cmd.h) > @@ -0,0 +1,258 @@ > +/* > + * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. > + * > + * This software is available to you under a choice of one of two > + * licenses. You may choose to be licensed under the terms of the GNU > + * General Public License (GPL) Version 2, available from the file > + * COPYING in the main directory of this source tree, or the > + * OpenIB.org BSD license below: > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * - Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the following > + * disclaimer. > + * > + * - 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. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > + * SOFTWARE. > + */ > + > +#ifndef MLX4_CMD_H > +#define MLX4_CMD_H > + > +#include > +#include > + > +enum { > + /* initialization and general commands */ > + MLX4_CMD_SYS_EN = 0x1, > + MLX4_CMD_SYS_DIS = 0x2, > + MLX4_CMD_MAP_FA = 0xfff, > + MLX4_CMD_UNMAP_FA = 0xffe, > + MLX4_CMD_RUN_FW = 0xff6, > + MLX4_CMD_MOD_STAT_CFG = 0x34, > + MLX4_CMD_QUERY_DEV_CAP = 0x3, > + MLX4_CMD_QUERY_FW = 0x4, > + MLX4_CMD_ENABLE_LAM = 0xff8, > + MLX4_CMD_DISABLE_LAM = 0xff7, > + MLX4_CMD_QUERY_DDR = 0x5, > + MLX4_CMD_QUERY_ADAPTER = 0x6, > + MLX4_CMD_INIT_HCA = 0x7, > + MLX4_CMD_CLOSE_HCA = 0x8, > + MLX4_CMD_INIT_PORT = 0x9, > + MLX4_CMD_CLOSE_PORT = 0xa, > + MLX4_CMD_QUERY_HCA = 0xb, > + MLX4_CMD_QUERY_PORT = 0x43, > + MLX4_CMD_SENSE_PORT = 0x4d, > + MLX4_CMD_HW_HEALTH_CHECK = 0x50, > + MLX4_CMD_SET_PORT = 0xc, > + MLX4_CMD_SET_NODE = 0x5a, > + MLX4_CMD_QUERY_FUNC = 0x56, > + MLX4_CMD_ACCESS_DDR = 0x2e, > + MLX4_CMD_MAP_ICM = 0xffa, > + MLX4_CMD_UNMAP_ICM = 0xff9, > + MLX4_CMD_MAP_ICM_AUX = 0xffc, > + MLX4_CMD_UNMAP_ICM_AUX = 0xffb, > + MLX4_CMD_SET_ICM_SIZE = 0xffd, > + /*master notify fw on finish for slave's flr*/ > + MLX4_CMD_INFORM_FLR_DONE = 0x5b, > + MLX4_CMD_GET_OP_REQ = 0x59, > + > + /* TPT commands */ > + MLX4_CMD_SW2HW_MPT = 0xd, > + MLX4_CMD_QUERY_MPT = 0xe, > + MLX4_CMD_HW2SW_MPT = 0xf, > + MLX4_CMD_READ_MTT = 0x10, > + MLX4_CMD_WRITE_MTT = 0x11, > + MLX4_CMD_SYNC_TPT = 0x2f, > + > + /* EQ commands */ > + MLX4_CMD_MAP_EQ = 0x12, > + MLX4_CMD_SW2HW_EQ = 0x13, > + MLX4_CMD_HW2SW_EQ = 0x14, > + MLX4_CMD_QUERY_EQ = 0x15, > + > + /* CQ commands */ > + MLX4_CMD_SW2HW_CQ = 0x16, > + MLX4_CMD_HW2SW_CQ = 0x17, > + MLX4_CMD_QUERY_CQ = 0x18, > + MLX4_CMD_MODIFY_CQ = 0x2c, > + > + /* SRQ commands */ > + MLX4_CMD_SW2HW_SRQ = 0x35, > + MLX4_CMD_HW2SW_SRQ = 0x36, > + MLX4_CMD_QUERY_SRQ = 0x37, > + MLX4_CMD_ARM_SRQ = 0x40, > + > + /* QP/EE commands */ > + MLX4_CMD_RST2INIT_QP = 0x19, > + MLX4_CMD_INIT2RTR_QP = 0x1a, > + MLX4_CMD_RTR2RTS_QP = 0x1b, > + MLX4_CMD_RTS2RTS_QP = 0x1c, > + MLX4_CMD_SQERR2RTS_QP = 0x1d, > + MLX4_CMD_2ERR_QP = 0x1e, > + MLX4_CMD_RTS2SQD_QP = 0x1f, > + MLX4_CMD_SQD2SQD_QP = 0x38, > + MLX4_CMD_SQD2RTS_QP = 0x20, > + MLX4_CMD_2RST_QP = 0x21, > + MLX4_CMD_QUERY_QP = 0x22, > + MLX4_CMD_INIT2INIT_QP = 0x2d, > + MLX4_CMD_SUSPEND_QP = 0x32, > + MLX4_CMD_UNSUSPEND_QP = 0x33, > + MLX4_CMD_UPDATE_QP = 0x61, > + /* special QP and management commands */ > + MLX4_CMD_CONF_SPECIAL_QP = 0x23, > + MLX4_CMD_MAD_IFC = 0x24, > + > + /* multicast commands */ > + MLX4_CMD_READ_MCG = 0x25, > + MLX4_CMD_WRITE_MCG = 0x26, > + MLX4_CMD_MGID_HASH = 0x27, > + > + /* miscellaneous commands */ > + MLX4_CMD_DIAG_RPRT = 0x30, > + MLX4_CMD_NOP = 0x31, > + MLX4_CMD_ACCESS_MEM = 0x2e, > + MLX4_CMD_SET_VEP = 0x52, > + > + /* Ethernet specific commands */ > + MLX4_CMD_SET_VLAN_FLTR = 0x47, > + MLX4_CMD_SET_MCAST_FLTR = 0x48, > + MLX4_CMD_DUMP_ETH_STATS = 0x49, > + > + /* Communication channel commands */ > + MLX4_CMD_ARM_COMM_CHANNEL = 0x57, > + MLX4_CMD_GEN_EQE = 0x58, > + > + /* virtual commands */ > + MLX4_CMD_ALLOC_RES = 0xf00, > + MLX4_CMD_FREE_RES = 0xf01, > + MLX4_CMD_MCAST_ATTACH = 0xf05, > + MLX4_CMD_UCAST_ATTACH = 0xf06, > + MLX4_CMD_PROMISC = 0xf08, > + MLX4_CMD_QUERY_FUNC_CAP = 0xf0a, > + MLX4_CMD_QP_ATTACH = 0xf0b, > + > + /* debug commands */ > + MLX4_CMD_QUERY_DEBUG_MSG = 0x2a, > + MLX4_CMD_SET_DEBUG_MSG = 0x2b, > + > + /* statistics commands */ > + MLX4_CMD_QUERY_IF_STAT = 0X54, > + MLX4_CMD_SET_IF_STAT = 0X55, > + > + /* register/delete flow steering network rules */ > + MLX4_QP_FLOW_STEERING_ATTACH = 0x65, > + MLX4_QP_FLOW_STEERING_DETACH = 0x66, > + MLX4_FLOW_STEERING_IB_UC_QP_RANGE = 0x64, > +}; > + > +enum { > + MLX4_CMD_TIME_CLASS_A = 60000, > + MLX4_CMD_TIME_CLASS_B = 60000, > + MLX4_CMD_TIME_CLASS_C = 60000, > +}; > + > +enum { > + MLX4_MAILBOX_SIZE = 4096, > + MLX4_ACCESS_MEM_ALIGN = 256, > +}; > + > +enum { > + /* set port opcode modifiers */ > + MLX4_SET_PORT_GENERAL = 0x0, > + MLX4_SET_PORT_RQP_CALC = 0x1, > + MLX4_SET_PORT_MAC_TABLE = 0x2, > + MLX4_SET_PORT_VLAN_TABLE = 0x3, > + MLX4_SET_PORT_PRIO_MAP = 0x4, > + MLX4_SET_PORT_GID_TABLE = 0x5, > + MLX4_SET_PORT_PRIO2TC = 0x8, > + MLX4_SET_PORT_SCHEDULER = 0x9 > +}; > + > +enum { > + MLX4_CMD_WRAPPED, > + MLX4_CMD_NATIVE > +}; > + > +struct mlx4_dev; > + > +struct mlx4_cmd_mailbox { > + void *buf; > + dma_addr_t dma; > +}; > + > +int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, > + int out_is_imm, u32 in_modifier, u8 op_modifier, > + u16 op, unsigned long timeout, int native); > + > +/* Invoke a command with no output parameter */ > +static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier, > + u8 op_modifier, u16 op, unsigned long timeout, > + int native) > +{ > + return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier, > + op_modifier, op, timeout, native); > +} > + > +/* Invoke a command with an output mailbox */ > +static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param, > + u32 in_modifier, u8 op_modifier, u16 op, > + unsigned long timeout, int native) > +{ > + return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier, > + op_modifier, op, timeout, native); > +} > + > +/* > + * Invoke a command with an immediate output parameter (and copy the > + * output into the caller's out_param pointer after the command > + * executes). > + */ > +static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param, > + u32 in_modifier, u8 op_modifier, u16 op, > + unsigned long timeout, int native) > +{ > + return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier, > + op_modifier, op, timeout, native); > +} > + > +struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); > +void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); > + > +u32 mlx4_comm_get_version(void); > +int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u8 *mac); > +int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); > +int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); > +int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state); > +int mlx4_get_vf_link_state(struct mlx4_dev *dev, int port, int vf); > +/* > + * mlx4_get_slave_default_vlan - > + * retrun true if VST ( default vlan) > + * if VST will fill vlan & qos (if not NULL) > + */ > +bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, u16 *vlan, u8 *qos); > + > +enum { > + IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ > + IFLA_VF_LINK_STATE_ENABLE, /* link always up */ > + IFLA_VF_LINK_STATE_DISABLE, /* link always down */ > + __IFLA_VF_LINK_STATE_MAX, > +}; > + > +#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) > + > +#endif /* MLX4_CMD_H */ > > Copied and modified: head/sys/dev/mlx4/cq.h (from r306485, head/sys/ofed/include/linux/mlx4/cq.h) > ============================================================================== > --- head/sys/ofed/include/linux/mlx4/cq.h Fri Sep 30 06:58:45 2016 (r306485, copy source) > +++ head/sys/dev/mlx4/cq.h Fri Sep 30 08:23:06 2016 (r306486) > @@ -35,8 +35,8 @@ > > #include > > -#include > -#include > +#include > +#include > > struct mlx4_cqe { > __be32 vlan_my_qpn; > > Copied: head/sys/dev/mlx4/device.h (from r306485, head/sys/ofed/include/linux/mlx4/device.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/mlx4/device.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/device.h) > @@ -0,0 +1,1327 @@ > +/* > + * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. > + * > + * This software is available to you under a choice of one of two > + * licenses. You may choose to be licensed under the terms of the GNU > + * General Public License (GPL) Version 2, available from the file > + * COPYING in the main directory of this source tree, or the > + * OpenIB.org BSD license below: > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * - Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the following > + * disclaimer. > + * > + * - 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. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > + * SOFTWARE. > + */ > + > +#ifndef MLX4_DEVICE_H > +#define MLX4_DEVICE_H > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define MAX_MSIX_P_PORT 17 > +#define MAX_MSIX 64 > +#define MSIX_LEGACY_SZ 4 > +#define MIN_MSIX_P_PORT 5 > + > +#define MLX4_ROCE_MAX_GIDS 128 > +#define MLX4_ROCE_PF_GIDS 16 > + > +#define MLX4_NUM_UP 8 > +#define MLX4_NUM_TC 8 > +#define MLX4_MAX_100M_UNITS_VAL 255 /* > + * work around: can't set values > + * greater then this value when > + * using 100 Mbps units. > + */ > +#define MLX4_RATELIMIT_100M_UNITS 3 /* 100 Mbps */ > +#define MLX4_RATELIMIT_1G_UNITS 4 /* 1 Gbps */ > +#define MLX4_RATELIMIT_DEFAULT 0x00ff > + > +#define CORE_CLOCK_MASK 0xffffffffffffULL > + > +enum { > + MLX4_FLAG_MSI_X = 1 << 0, > + MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, > + MLX4_FLAG_MASTER = 1 << 2, > + MLX4_FLAG_SLAVE = 1 << 3, > + MLX4_FLAG_SRIOV = 1 << 4, > + MLX4_FLAG_DEV_NUM_STR = 1 << 5, > + MLX4_FLAG_OLD_REG_MAC = 1 << 6, > +}; > + > +enum { > + MLX4_PORT_CAP_IS_SM = 1 << 1, > + MLX4_PORT_CAP_DEV_MGMT_SUP = 1 << 19, > +}; > + > +enum { > + MLX4_MAX_PORTS = 2, > + MLX4_MAX_PORT_PKEYS = 128 > +}; > + > +/* base qkey for use in sriov tunnel-qp/proxy-qp communication. > + * These qkeys must not be allowed for general use. This is a 64k range, > + * and to test for violation, we use the mask (protect against future chg). > + */ > +#define MLX4_RESERVED_QKEY_BASE (0xFFFF0000) > +#define MLX4_RESERVED_QKEY_MASK (0xFFFF0000) > + > +enum { > + MLX4_BOARD_ID_LEN = 64, > + MLX4_VSD_LEN = 208 > +}; > + > +enum { > + MLX4_MAX_NUM_PF = 16, > + MLX4_MAX_NUM_VF = 64, > + MLX4_MFUNC_MAX = 80, > + MLX4_MAX_EQ_NUM = 1024, > + MLX4_MFUNC_EQ_NUM = 4, > + MLX4_MFUNC_MAX_EQES = 8, > + MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) > +}; > + > +/* Driver supports 3 different device methods to manage traffic steering: > + * -device managed - High level API for ib and eth flow steering. FW is > + * managing flow steering tables. > + * - B0 steering mode - Common low level API for ib and (if supported) eth. > + * - A0 steering mode - Limited low level API for eth. In case of IB, > + * B0 mode is in use. > + */ > +enum { > + MLX4_STEERING_MODE_A0, > + MLX4_STEERING_MODE_B0, > + MLX4_STEERING_MODE_DEVICE_MANAGED > +}; > + > +static inline const char *mlx4_steering_mode_str(int steering_mode) > +{ > + switch (steering_mode) { > + case MLX4_STEERING_MODE_A0: > + return "A0 steering"; > + > + case MLX4_STEERING_MODE_B0: > + return "B0 steering"; > + > + case MLX4_STEERING_MODE_DEVICE_MANAGED: > + return "Device managed flow steering"; > + > + default: > + return "Unrecognize steering mode"; > + } > +} > + > +enum { > + MLX4_DEV_CAP_FLAG_RC = 1LL << 0, > + MLX4_DEV_CAP_FLAG_UC = 1LL << 1, > + MLX4_DEV_CAP_FLAG_UD = 1LL << 2, > + MLX4_DEV_CAP_FLAG_XRC = 1LL << 3, > + MLX4_DEV_CAP_FLAG_SRQ = 1LL << 6, > + MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1LL << 7, > + MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8, > + MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, > + MLX4_DEV_CAP_FLAG_DPDP = 1LL << 12, > + MLX4_DEV_CAP_FLAG_BLH = 1LL << 15, > + MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1LL << 16, > + MLX4_DEV_CAP_FLAG_APM = 1LL << 17, > + MLX4_DEV_CAP_FLAG_ATOMIC = 1LL << 18, > + MLX4_DEV_CAP_FLAG_RAW_MCAST = 1LL << 19, > + MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1LL << 20, > + MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21, > + MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30, > + MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32, > + MLX4_DEV_CAP_FLAG_FCS_KEEP = 1LL << 34, > + MLX4_DEV_CAP_FLAG_WOL_PORT1 = 1LL << 37, > + MLX4_DEV_CAP_FLAG_WOL_PORT2 = 1LL << 38, > + MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, > + MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, > + MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, > + MLX4_DEV_CAP_FLAG_CROSS_CHANNEL = 1LL << 44, > + MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, > + MLX4_DEV_CAP_FLAG_COUNTERS_EXT = 1LL << 49, > + MLX4_DEV_CAP_FLAG_SET_PORT_ETH_SCHED = 1LL << 53, > + MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, > + MLX4_DEV_CAP_FLAG_FAST_DROP = 1LL << 57, > + MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, > + MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61, > + MLX4_DEV_CAP_FLAG_64B_CQE = 1LL << 62 > +}; > + > +enum { > + MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, > + MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, > + MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, > + MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3, > + MLX4_DEV_CAP_FLAG2_FSM = 1LL << 4, > + MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 5, > + MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 6, > + MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1LL << 7, > + MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 8, > + MLX4_DEV_CAP_FLAG2_ETS_CFG = 1LL << 9, > + MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, > + MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, > + MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, > + MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, > + MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, > + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, > + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, > + MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, > + MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, > + MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, > + MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, > + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, > + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, > + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, > + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, > + MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, > +}; > + > +/* bit enums for an 8-bit flags field indicating special use > + * QPs which require special handling in qp_reserve_range. > + * Currently, this only includes QPs used by the ETH interface, > + * where we expect to use blueflame. These QPs must not have > + * bits 6 and 7 set in their qp number. > + * > + * This enum may use only bits 0..7. > + */ > +enum { > + MLX4_RESERVE_BF_QP = 1 << 7, > +}; > + > +enum { > + MLX4_DEV_CAP_CQ_FLAG_IO = 1 << 0 > +}; > + > +enum { > + MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, > + MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 > +}; > + > +enum { > + MLX4_USER_DEV_CAP_64B_CQE = 1L << 0 > +}; > + > +enum { > + MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0 > +}; > + > + > +#define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) > + > +enum { > + MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, > + MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, > + MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, > + MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, > + MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, > + MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, > +}; > + > +enum mlx4_event { > + MLX4_EVENT_TYPE_COMP = 0x00, > + MLX4_EVENT_TYPE_PATH_MIG = 0x01, > + MLX4_EVENT_TYPE_COMM_EST = 0x02, > + MLX4_EVENT_TYPE_SQ_DRAINED = 0x03, > + MLX4_EVENT_TYPE_SRQ_QP_LAST_WQE = 0x13, > + MLX4_EVENT_TYPE_SRQ_LIMIT = 0x14, > + MLX4_EVENT_TYPE_CQ_ERROR = 0x04, > + MLX4_EVENT_TYPE_WQ_CATAS_ERROR = 0x05, > + MLX4_EVENT_TYPE_EEC_CATAS_ERROR = 0x06, > + MLX4_EVENT_TYPE_PATH_MIG_FAILED = 0x07, > + MLX4_EVENT_TYPE_WQ_INVAL_REQ_ERROR = 0x10, > + MLX4_EVENT_TYPE_WQ_ACCESS_ERROR = 0x11, > + MLX4_EVENT_TYPE_SRQ_CATAS_ERROR = 0x12, > + MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR = 0x08, > + MLX4_EVENT_TYPE_PORT_CHANGE = 0x09, > + MLX4_EVENT_TYPE_EQ_OVERFLOW = 0x0f, > + MLX4_EVENT_TYPE_ECC_DETECT = 0x0e, > + MLX4_EVENT_TYPE_CMD = 0x0a, > + MLX4_EVENT_TYPE_VEP_UPDATE = 0x19, > + MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18, > + MLX4_EVENT_TYPE_OP_REQUIRED = 0x1a, > + MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b, > + MLX4_EVENT_TYPE_FLR_EVENT = 0x1c, > + MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT = 0x1d, > + MLX4_EVENT_TYPE_RECOVERABLE_ERROR_EVENT = 0x3e, > + MLX4_EVENT_TYPE_NONE = 0xff, > +}; > + > +enum { > + MLX4_PORT_CHANGE_SUBTYPE_DOWN = 1, > + MLX4_PORT_CHANGE_SUBTYPE_ACTIVE = 4 > +}; > + > +enum { > + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_BAD_CABLE = 1, > + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_UNSUPPORTED_CABLE = 2, > +}; > + > +enum { > + MLX4_FATAL_WARNING_SUBTYPE_WARMING = 0, > +}; > + > +enum slave_port_state { > + SLAVE_PORT_DOWN = 0, > + SLAVE_PENDING_UP, > + SLAVE_PORT_UP, > +}; > + > +enum slave_port_gen_event { > + SLAVE_PORT_GEN_EVENT_DOWN = 0, > + SLAVE_PORT_GEN_EVENT_UP, > + SLAVE_PORT_GEN_EVENT_NONE, > +}; > + > +enum slave_port_state_event { > + MLX4_PORT_STATE_DEV_EVENT_PORT_DOWN, > + MLX4_PORT_STATE_DEV_EVENT_PORT_UP, > + MLX4_PORT_STATE_IB_PORT_STATE_EVENT_GID_VALID, > + MLX4_PORT_STATE_IB_EVENT_GID_INVALID, > +}; > + > +enum { > + MLX4_PERM_LOCAL_READ = 1 << 10, > + MLX4_PERM_LOCAL_WRITE = 1 << 11, > + MLX4_PERM_REMOTE_READ = 1 << 12, > + MLX4_PERM_REMOTE_WRITE = 1 << 13, > + MLX4_PERM_ATOMIC = 1 << 14, > + MLX4_PERM_BIND_MW = 1 << 15, > +}; > + > +enum { > + MLX4_OPCODE_NOP = 0x00, > + MLX4_OPCODE_SEND_INVAL = 0x01, > + MLX4_OPCODE_RDMA_WRITE = 0x08, > + MLX4_OPCODE_RDMA_WRITE_IMM = 0x09, > + MLX4_OPCODE_SEND = 0x0a, > + MLX4_OPCODE_SEND_IMM = 0x0b, > + MLX4_OPCODE_LSO = 0x0e, > + MLX4_OPCODE_RDMA_READ = 0x10, > + MLX4_OPCODE_ATOMIC_CS = 0x11, > + MLX4_OPCODE_ATOMIC_FA = 0x12, > + MLX4_OPCODE_MASKED_ATOMIC_CS = 0x14, > + MLX4_OPCODE_MASKED_ATOMIC_FA = 0x15, > + MLX4_OPCODE_BIND_MW = 0x18, > + MLX4_OPCODE_FMR = 0x19, > + MLX4_OPCODE_LOCAL_INVAL = 0x1b, > + MLX4_OPCODE_CONFIG_CMD = 0x1f, > + > + MLX4_RECV_OPCODE_RDMA_WRITE_IMM = 0x00, > + MLX4_RECV_OPCODE_SEND = 0x01, > + MLX4_RECV_OPCODE_SEND_IMM = 0x02, > + MLX4_RECV_OPCODE_SEND_INVAL = 0x03, > + > + MLX4_CQE_OPCODE_ERROR = 0x1e, > + MLX4_CQE_OPCODE_RESIZE = 0x16, > +}; > + > +enum { > + MLX4_STAT_RATE_OFFSET = 5 > +}; > + > +enum mlx4_protocol { > + MLX4_PROT_IB_IPV6 = 0, > + MLX4_PROT_ETH, > + MLX4_PROT_IB_IPV4, > + MLX4_PROT_FCOE > +}; > + > +enum { > + MLX4_MTT_FLAG_PRESENT = 1 > +}; > + > +enum { > + MLX4_MAX_MTT_SHIFT = 31 > +}; > + > +enum mlx4_qp_region { > + MLX4_QP_REGION_FW = 0, > + MLX4_QP_REGION_ETH_ADDR, > + MLX4_QP_REGION_FC_ADDR, > + MLX4_QP_REGION_FC_EXCH, > + MLX4_NUM_QP_REGION > +}; > + > +enum mlx4_port_type { > + MLX4_PORT_TYPE_NONE = 0, > + MLX4_PORT_TYPE_IB = 1, > + MLX4_PORT_TYPE_ETH = 2, > + MLX4_PORT_TYPE_AUTO = 3, > + MLX4_PORT_TYPE_NA = 4 > +}; > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > -- Tomorrow Will Never Die From owner-svn-src-all@freebsd.org Fri Sep 30 09:20:45 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 9005AC03A24; Fri, 30 Sep 2016 09:20:45 +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 45A0411B; Fri, 30 Sep 2016 09:20:45 +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 u8U9KiAg064532; Fri, 30 Sep 2016 09:20:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U9Ki3u064529; Fri, 30 Sep 2016 09:20:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609300920.u8U9Ki3u064529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Sep 2016 09:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306487 - in stable/11: targets/pseudo/userland usr.bin usr.bin/proccontrol X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 09:20:45 -0000 Author: kib Date: Fri Sep 30 09:20:44 2016 New Revision: 306487 URL: https://svnweb.freebsd.org/changeset/base/306487 Log: MFC r306261: Add proccontrol(1). MFC r306281 (by bdrewery): DIRDEPS_BUILD: Connect new directories. Added: stable/11/usr.bin/proccontrol/ - copied from r306261, head/usr.bin/proccontrol/ stable/11/usr.bin/proccontrol/Makefile.depend - copied unchanged from r306281, head/usr.bin/proccontrol/Makefile.depend Modified: stable/11/targets/pseudo/userland/Makefile.depend stable/11/usr.bin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/targets/pseudo/userland/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/userland/Makefile.depend Fri Sep 30 08:23:06 2016 (r306486) +++ stable/11/targets/pseudo/userland/Makefile.depend Fri Sep 30 09:20:44 2016 (r306487) @@ -325,6 +325,7 @@ DIRDEPS+= \ usr.bin/pr \ usr.bin/printenv \ usr.bin/printf \ + usr.bin/proccontrol \ usr.bin/procstat \ usr.bin/protect \ usr.bin/quota \ Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Fri Sep 30 08:23:06 2016 (r306486) +++ stable/11/usr.bin/Makefile Fri Sep 30 09:20:44 2016 (r306487) @@ -122,6 +122,7 @@ SUBDIR= alias \ pr \ printenv \ printf \ + proccontrol \ procstat \ protect \ rctl \ Copied: stable/11/usr.bin/proccontrol/Makefile.depend (from r306281, head/usr.bin/proccontrol/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/proccontrol/Makefile.depend Fri Sep 30 09:20:44 2016 (r306487, copy of r306281, head/usr.bin/proccontrol/Makefile.depend) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-all@freebsd.org Fri Sep 30 09:23:30 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 554FCC03B8E; Fri, 30 Sep 2016 09:23:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1DB6CA; Fri, 30 Sep 2016 09:23:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U9NT8q067479; Fri, 30 Sep 2016 09:23:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U9NTP6067478; Fri, 30 Sep 2016 09:23:29 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609300923.u8U9NTP6067478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 09:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306488 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 09:23:30 -0000 Author: des Date: Fri Sep 30 09:23:29 2016 New Revision: 306488 URL: https://svnweb.freebsd.org/changeset/base/306488 Log: Format the table correctly, using cell separators instead of relying on *roff or mandoc to guess where one cell ends and the next begins. MFC after: 1 week Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 30 09:20:44 2016 (r306487) +++ head/lib/libc/sys/sigaction.2 Fri Sep 30 09:23:29 2016 (r306488) @@ -307,46 +307,109 @@ The following is a list of all signals with names as in the include file .In signal.h : .Bl -column SIGVTALARMXX "create core imagexxx" -.It Sy "NAME Default Action Description" -.It Dv SIGHUP No " terminate process" " terminal line hangup" -.It Dv SIGINT No " terminate process" " interrupt program" -.It Dv SIGQUIT No " create core image" " quit program" -.It Dv SIGILL No " create core image" " illegal instruction" -.It Dv SIGTRAP No " create core image" " trace trap" -.It Dv SIGABRT No " create core image" Ta Xr abort 3 +.It Sy NAME +.Ta Sy Default Action +.Ta Sy Description +.It Dv SIGHUP +.Ta terminate process +.Ta terminal line hangup +.It Dv SIGINT +.Ta terminate process +.Ta interrupt program +.It Dv SIGQUIT +.Ta create core image +.Ta quit program +.It Dv SIGILL +.Ta create core image +.Ta illegal instruction +.It Dv SIGTRAP +.Ta create core image +.Ta trace trap +.It Dv SIGABRT +.Ta create core image +.Ta Xr abort 3 call (formerly .Dv SIGIOT ) -.It Dv SIGEMT No " create core image" " emulate instruction executed" -.It Dv SIGFPE No " create core image" " floating-point exception" -.It Dv SIGKILL No " terminate process" " kill program" -.It Dv SIGBUS No " create core image" " bus error" -.It Dv SIGSEGV No " create core image" " segmentation violation" -.It Dv SIGSYS No " create core image" " non-existent system call invoked" -.It Dv SIGPIPE No " terminate process" " write on a pipe with no reader" -.It Dv SIGALRM No " terminate process" " real-time timer expired" -.It Dv SIGTERM No " terminate process" " software termination signal" -.It Dv SIGURG No " discard signal" " urgent condition present on socket" -.It Dv SIGSTOP No " stop process" " stop (cannot be caught or ignored)" -.It Dv SIGTSTP No " stop process" " stop signal generated from keyboard" -.It Dv SIGCONT No " discard signal" " continue after stop" -.It Dv SIGCHLD No " discard signal" " child status has changed" -.It Dv SIGTTIN No " stop process" " background read attempted from control terminal" -.It Dv SIGTTOU No " stop process" " background write attempted to control terminal" -.It Dv SIGIO No " discard signal" Tn " I/O" -is possible on a descriptor (see +.It Dv SIGEMT +.Ta create core image +.Ta emulate instruction executed +.It Dv SIGFPE +.Ta create core image +.Ta floating-point exception +.It Dv SIGKILL +.Ta terminate process +.Ta kill program +.It Dv SIGBUS +.Ta create core image +.Ta bus error +.It Dv SIGSEGV +.Ta create core image +.Ta segmentation violation +.It Dv SIGSYS +.Ta create core image +.Ta non-existent system call invoked +.It Dv SIGPIPE +.Ta terminate process +.Ta write on a pipe with no reader +.It Dv SIGALRM +.Ta terminate process +.Ta real-time timer expired +.It Dv SIGTERM +.Ta terminate process +.Ta software termination signal +.It Dv SIGURG +.Ta discard signal +.Ta urgent condition present on socket +.It Dv SIGSTOP +.Ta stop process +.Ta stop (cannot be caught or ignored) +.It Dv SIGTSTP +.Ta stop process +.Ta stop signal generated from keyboard +.It Dv SIGCONT +.Ta discard signal +.Ta continue after stop +.It Dv SIGCHLD +.Ta discard signal +.Ta child status has changed +.It Dv SIGTTIN +.Ta stop process +.Ta background read attempted from control terminal +.It Dv SIGTTOU +.Ta stop process +.Ta background write attempted to control terminal +.It Dv SIGIO +.Ta discard signal +.Ta I/O is possible on a descriptor (see .Xr fcntl 2 ) -.It Dv SIGXCPU No " terminate process" " cpu time limit exceeded (see" +.It Dv SIGXCPU +.Ta terminate process +.Ta cpu time limit exceeded (see .Xr setrlimit 2 ) -.It Dv SIGXFSZ No " terminate process" " file size limit exceeded (see" +.It Dv SIGXFSZ +.Ta terminate process +.Ta file size limit exceeded (see .Xr setrlimit 2 ) -.It Dv SIGVTALRM No " terminate process" " virtual time alarm (see" +.It Dv SIGVTALRM +.Ta terminate process +.Ta virtual time alarm (see .Xr setitimer 2 ) -.It Dv SIGPROF No " terminate process" " profiling timer alarm (see" +.It Dv SIGPROF +.Ta terminate process +.Ta profiling timer alarm (see .Xr setitimer 2 ) -.It Dv SIGWINCH No " discard signal" " Window size change" -.It Dv SIGINFO No " discard signal" " status request from keyboard" -.It Dv SIGUSR1 No " terminate process" " User defined signal 1" -.It Dv SIGUSR2 No " terminate process" " User defined signal 2" +.It Dv SIGWINCH +.Ta discard signal +.Ta Window size change +.It Dv SIGINFO +.Ta discard signal +.Ta status request from keyboard +.It Dv SIGUSR1 +.Ta terminate process +.Ta User defined signal 1 +.It Dv SIGUSR2 +.Ta terminate process +.Ta User defined signal 2 .El .Sh NOTE The From owner-svn-src-all@freebsd.org Fri Sep 30 10:00:59 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 08C05C015FF; Fri, 30 Sep 2016 10:00:59 +0000 (UTC) (envelope-from manu@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 CB8501C27; Fri, 30 Sep 2016 10:00:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UA0wEi081972; Fri, 30 Sep 2016 10:00:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UA0wSN081971; Fri, 30 Sep 2016 10:00:58 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609301000.u8UA0wSN081971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 30 Sep 2016 10:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306489 - head/sys/arm/broadcom/bcm2835 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.23 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: Fri, 30 Sep 2016 10:00:59 -0000 Author: manu Date: Fri Sep 30 10:00:57 2016 New Revision: 306489 URL: https://svnweb.freebsd.org/changeset/base/306489 Log: bcm2835_cpufreq: Only attach driver if we correcly match on the machine compatible string. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Fri Sep 30 09:23:29 2016 (r306488) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Fri Sep 30 10:00:57 2016 (r306489) @@ -44,6 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include +#include + #include #include #include @@ -119,6 +124,13 @@ struct bcm2835_cpufreq_softc { struct intr_config_hook init_hook; }; +static struct ofw_compat_data compat_data[] = { + { "broadcom,bcm2835-vc", 1 }, + { "broadcom,bcm2708-vc", 1 }, + { "brcm,bcm2709", 1 }, + { NULL, 0 } +}; + static int cpufreq_verbose = 0; TUNABLE_INT("hw.bcm2835.cpufreq.verbose", &cpufreq_verbose); static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; @@ -1244,6 +1256,16 @@ bcm2835_cpufreq_init(void *arg) static void bcm2835_cpufreq_identify(driver_t *driver, device_t parent) { + const struct ofw_compat_data *compat; + phandle_t root; + + root = OF_finddevice("/"); + for (compat = compat_data; compat->ocd_str != NULL; compat++) + if (fdt_is_compatible(root, compat->ocd_str)) + break; + + if (compat->ocd_data == 0) + return; DPRINTF("driver=%p, parent=%p\n", driver, parent); if (device_find_child(parent, "bcm2835_cpufreq", -1) != NULL) From owner-svn-src-all@freebsd.org Fri Sep 30 10:20: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 3DC93C01F01; Fri, 30 Sep 2016 10:20:54 +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 ECA33A7D; Fri, 30 Sep 2016 10:20:53 +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 u8UAKrM4087719; Fri, 30 Sep 2016 10:20:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAKriZ087716; Fri, 30 Sep 2016 10:20:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301020.u8UAKriZ087716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 10:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306490 - head/sys/arm/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.23 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: Fri, 30 Sep 2016 10:20:54 -0000 Author: andrew Date: Fri Sep 30 10:20:53 2016 New Revision: 306490 URL: https://svnweb.freebsd.org/changeset/base/306490 Log: Add support for Tegra to the armv6 GENERIC kernel. Reviewed by: imp, mmel Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8084 Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Sep 30 10:00:57 2016 (r306489) +++ head/sys/arm/conf/GENERIC Fri Sep 30 10:20:53 2016 (r306490) @@ -33,6 +33,7 @@ files "../allwinner/a20/files.a20" files "../allwinner/a31/files.a31" files "../allwinner/a83t/files.a83t" files "../allwinner/h3/files.h3" +files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" options SOC_ALLWINNER_A20 @@ -46,6 +47,7 @@ options SMP # Enable multiple cores options PLATFORM options PLATFORM_SMP options MULTIDELAY +options LINUX_BOOT_ABI # EXT_RESOURCES pseudo devices options EXT_RESOURCES @@ -62,6 +64,7 @@ device gic device generic_timer # MMC/SD/SDIO Card slot support +device sdhci # SD controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -69,6 +72,13 @@ device mmcsd # mmc/sd flash cards device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers +# PCI +options NEW_PCIB +device pci + +# PCI NICs +device re # RealTek 8139C+/8169/8169S/8110S + # VirtIO device virtio device virtio_mmio @@ -77,11 +87,12 @@ device vtnet # Console and misc device uart +device uart_ns8250 device uart_snps device pl011 device pty device snp -device md +device md # Memory "disks" device random # Entropy device device psci @@ -92,6 +103,7 @@ device twsi device rsb device axp209 # AXP209 Power Management Unit device axp81x # AXP813/818 Power Management Unit +device icee # GPIO device gpio @@ -99,6 +111,7 @@ device gpioled device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +device cd # CD device pass # Passthrough device (direct ATA/SCSI access) # USB support @@ -108,11 +121,14 @@ device usb device ohci device ehci -device umass +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +device ukbd # Allow keyboard like HIDs to control console # Ethernet device loop device ether +device vlan # 802.1Q VLAN support device mii device bpf From owner-svn-src-all@freebsd.org Fri Sep 30 10:21: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 71732C01F33; Fri, 30 Sep 2016 10:21:05 +0000 (UTC) (envelope-from manu@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 447BAC15; Fri, 30 Sep 2016 10:21:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UAL4RF089785; Fri, 30 Sep 2016 10:21:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAL4QP089783; Fri, 30 Sep 2016 10:21:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609301021.u8UAL4QP089783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 30 Sep 2016 10:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306491 - in head/sys/arm: broadcom/bcm2835 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.23 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: Fri, 30 Sep 2016 10:21:05 -0000 Author: manu Date: Fri Sep 30 10:21:04 2016 New Revision: 306491 URL: https://svnweb.freebsd.org/changeset/base/306491 Log: RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/conf/RPI2 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 30 10:20:53 2016 (r306490) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 30 10:21:04 2016 (r306491) @@ -147,5 +147,5 @@ static platform_method_t bcm2836_methods PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0); +FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 100); #endif Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Fri Sep 30 10:20:53 2016 (r306490) +++ head/sys/arm/conf/RPI2 Fri Sep 30 10:21:04 2016 (r306491) @@ -30,6 +30,7 @@ options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM options PLATFORM_SMP +options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP From owner-svn-src-all@freebsd.org Fri Sep 30 10:22: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 30F67C02134; Fri, 30 Sep 2016 10:22:52 +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 F0F45F76; Fri, 30 Sep 2016 10:22:51 +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 u8UAMpLS090490; Fri, 30 Sep 2016 10:22:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAMpJm090489; Fri, 30 Sep 2016 10:22:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301022.u8UAMpJm090489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 10:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306492 - head/sys/arm/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.23 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: Fri, 30 Sep 2016 10:22:52 -0000 Author: andrew Date: Fri Sep 30 10:22:50 2016 New Revision: 306492 URL: https://svnweb.freebsd.org/changeset/base/306492 Log: Remove the duplicate ukbd device from the armv6 GENERIC Sponsored by: ABT Systems Ltd Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Sep 30 10:21:04 2016 (r306491) +++ head/sys/arm/conf/GENERIC Fri Sep 30 10:22:50 2016 (r306492) @@ -146,7 +146,6 @@ device sound device vt device kbdmux device ums -device ukbd device videomode device hdmi From owner-svn-src-all@freebsd.org Fri Sep 30 10:46:28 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 75CBDC0254E; Fri, 30 Sep 2016 10:46:28 +0000 (UTC) (envelope-from manu@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 1470B1877; Fri, 30 Sep 2016 10:46:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UAkRh7098221; Fri, 30 Sep 2016 10:46:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAkR4Q098220; Fri, 30 Sep 2016 10:46:27 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609301046.u8UAkR4Q098220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 30 Sep 2016 10:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306493 - head/sys/arm/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.23 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: Fri, 30 Sep 2016 10:46:28 -0000 Author: manu Date: Fri Sep 30 10:46:27 2016 New Revision: 306493 URL: https://svnweb.freebsd.org/changeset/base/306493 Log: Add support for RPI2 to the armv6 GENERIC kernel. Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Sep 30 10:22:50 2016 (r306492) +++ head/sys/arm/conf/GENERIC Fri Sep 30 10:46:27 2016 (r306493) @@ -33,6 +33,8 @@ files "../allwinner/a20/files.a20" files "../allwinner/a31/files.a31" files "../allwinner/a83t/files.a83t" files "../allwinner/h3/files.h3" +files "../broadcom/bcm2835/files.bcm2836" +files "../broadcom/bcm2835/files.bcm283x" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" @@ -41,6 +43,7 @@ options SOC_ALLWINNER_A31 options SOC_ALLWINNER_A31S options SOC_ALLWINNER_A83T options SOC_ALLWINNER_H3 +options SOC_BCM2836 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores @@ -103,12 +106,17 @@ device twsi device rsb device axp209 # AXP209 Power Management Unit device axp81x # AXP813/818 Power Management Unit +device bcm2835_bsc device icee # GPIO device gpio device gpioled +# SPI +device spibus +device bcm2835_spi + device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD @@ -120,6 +128,7 @@ device usb #device uhci device ohci device ehci +device dwcotg # DWC OTG controller device umass # Disks/Mass storage - Requires scbus and da device uhid # "Human Interface Devices" @@ -137,6 +146,8 @@ device dwc # 10/100/1000 integrated G device awg # 10/100/1000 integrated EMAC controller # USB ethernet support, requires miibus +device smcphy +device smsc device miibus # Sound support @@ -148,6 +159,7 @@ device kbdmux device ums device videomode device hdmi +device vchiq # Pinmux device fdt_pinctrl @@ -157,4 +169,4 @@ options EFI # Flattened Device Tree options FDT # Configure using FDT/DTB data -makeoptions MODULES_EXTRA=dtb/allwinner +makeoptions MODULES_EXTRA="dtb/allwinner dtb/rpi" From owner-svn-src-all@freebsd.org Fri Sep 30 10:48:59 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 4D706C02606; Fri, 30 Sep 2016 10:48:59 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 18DB61A1D; Fri, 30 Sep 2016 10:48:58 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id C12B5473E; Fri, 30 Sep 2016 10:48:51 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id D29C3445E3; Fri, 30 Sep 2016 12:48:50 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306488 - head/lib/libc/sys References: <201609300923.u8U9NTP6067478@repo.freebsd.org> Date: Fri, 30 Sep 2016 12:48:50 +0200 In-Reply-To: <201609300923.u8U9NTP6067478@repo.freebsd.org> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav=22's?= message of "Fri, 30 Sep 2016 09:23:29 +0000 (UTC)") Message-ID: <86k2dtr7cd.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 10:48:59 -0000 Dag-Erling Sm=C3=B8rgrav writes: > Log: > Format the table correctly, using cell separators instead of relying > on *roff or mandoc to guess where one cell ends and the next begins. So apparently, the old version works with *roff but not with mandoc, while the new version works with mandoc but not *roff. Since mandoc is the default in 11+, I'll leave this in while I consult with the authors of mandoc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Fri Sep 30 11:05:30 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 62295C02A40; Fri, 30 Sep 2016 11:05:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 244AE1D0; Fri, 30 Sep 2016 11:05:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UB5Tkm005884; Fri, 30 Sep 2016 11:05:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UB5Tng005883; Fri, 30 Sep 2016 11:05:29 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609301105.u8UB5Tng005883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 11:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306494 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 11:05:30 -0000 Author: des Date: Fri Sep 30 11:05:29 2016 New Revision: 306494 URL: https://svnweb.freebsd.org/changeset/base/306494 Log: After perusal of the documentation and some experimentation, I found a version that works with both groff and mandoc. Hat tip to: kib MFC after: 1 week Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 30 10:46:27 2016 (r306493) +++ head/lib/libc/sys/sigaction.2 Fri Sep 30 11:05:29 2016 (r306494) @@ -307,109 +307,38 @@ The following is a list of all signals with names as in the include file .In signal.h : .Bl -column SIGVTALARMXX "create core imagexxx" -.It Sy NAME -.Ta Sy Default Action -.Ta Sy Description -.It Dv SIGHUP -.Ta terminate process -.Ta terminal line hangup -.It Dv SIGINT -.Ta terminate process -.Ta interrupt program -.It Dv SIGQUIT -.Ta create core image -.Ta quit program -.It Dv SIGILL -.Ta create core image -.Ta illegal instruction -.It Dv SIGTRAP -.Ta create core image -.Ta trace trap -.It Dv SIGABRT -.Ta create core image -.Ta Xr abort 3 -call (formerly -.Dv SIGIOT ) -.It Dv SIGEMT -.Ta create core image -.Ta emulate instruction executed -.It Dv SIGFPE -.Ta create core image -.Ta floating-point exception -.It Dv SIGKILL -.Ta terminate process -.Ta kill program -.It Dv SIGBUS -.Ta create core image -.Ta bus error -.It Dv SIGSEGV -.Ta create core image -.Ta segmentation violation -.It Dv SIGSYS -.Ta create core image -.Ta non-existent system call invoked -.It Dv SIGPIPE -.Ta terminate process -.Ta write on a pipe with no reader -.It Dv SIGALRM -.Ta terminate process -.Ta real-time timer expired -.It Dv SIGTERM -.Ta terminate process -.Ta software termination signal -.It Dv SIGURG -.Ta discard signal -.Ta urgent condition present on socket -.It Dv SIGSTOP -.Ta stop process -.Ta stop (cannot be caught or ignored) -.It Dv SIGTSTP -.Ta stop process -.Ta stop signal generated from keyboard -.It Dv SIGCONT -.Ta discard signal -.Ta continue after stop -.It Dv SIGCHLD -.Ta discard signal -.Ta child status has changed -.It Dv SIGTTIN -.Ta stop process -.Ta background read attempted from control terminal -.It Dv SIGTTOU -.Ta stop process -.Ta background write attempted to control terminal -.It Dv SIGIO -.Ta discard signal -.Ta I/O is possible on a descriptor (see -.Xr fcntl 2 ) -.It Dv SIGXCPU -.Ta terminate process -.Ta cpu time limit exceeded (see -.Xr setrlimit 2 ) -.It Dv SIGXFSZ -.Ta terminate process -.Ta file size limit exceeded (see -.Xr setrlimit 2 ) -.It Dv SIGVTALRM -.Ta terminate process -.Ta virtual time alarm (see -.Xr setitimer 2 ) -.It Dv SIGPROF -.Ta terminate process -.Ta profiling timer alarm (see -.Xr setitimer 2 ) -.It Dv SIGWINCH -.Ta discard signal -.Ta Window size change -.It Dv SIGINFO -.Ta discard signal -.Ta status request from keyboard -.It Dv SIGUSR1 -.Ta terminate process -.Ta User defined signal 1 -.It Dv SIGUSR2 -.Ta terminate process -.Ta User defined signal 2 +.It Sy NAME Ta Sy Default Action Ta Sy Description +.It Dv SIGHUP Ta terminate process Ta terminal line hangup +.It Dv SIGINT Ta terminate process Ta interrupt program +.It Dv SIGQUIT Ta create core image Ta quit program +.It Dv SIGILL Ta create core image Ta illegal instruction +.It Dv SIGTRAP Ta create core image Ta trace trap +.It Dv SIGABRT Ta create core image Ta Xr abort 3 call (formerly Dv SIGIOT ) +.It Dv SIGEMT Ta create core image Ta emulate instruction executed +.It Dv SIGFPE Ta create core image Ta floating-point exception +.It Dv SIGKILL Ta terminate process Ta kill program +.It Dv SIGBUS Ta create core image Ta bus error +.It Dv SIGSEGV Ta create core image Ta segmentation violation +.It Dv SIGSYS Ta create core image Ta non-existent system call invoked +.It Dv SIGPIPE Ta terminate process Ta write on a pipe with no reader +.It Dv SIGALRM Ta terminate process Ta real-time timer expired +.It Dv SIGTERM Ta terminate process Ta software termination signal +.It Dv SIGURG Ta discard signal Ta urgent condition present on socket +.It Dv SIGSTOP Ta stop process Ta stop (cannot be caught or ignored) +.It Dv SIGTSTP Ta stop process Ta stop signal generated from keyboard +.It Dv SIGCONT Ta discard signal Ta continue after stop +.It Dv SIGCHLD Ta discard signal Ta child status has changed +.It Dv SIGTTIN Ta stop process Ta background read attempted from control terminal +.It Dv SIGTTOU Ta stop process Ta background write attempted to control terminal +.It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr fcntl 2 ) +.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see setrlimit 2 ) +.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see setrlimit 2 ) +.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see setitimer 2 ) +.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see setitimer 2 ) +.It Dv SIGWINCH Ta discard signal Ta window size change +.It Dv SIGINFO Ta discard signal Ta status request from keyboard +.It Dv SIGUSR1 Ta terminate process Ta user defined signal 1 +.It Dv SIGUSR2 Ta terminate process Ta user defined signal 2 .El .Sh NOTE The From owner-svn-src-all@freebsd.org Fri Sep 30 13:04: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 C2416C0263E; Fri, 30 Sep 2016 13:04:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 850501803; Fri, 30 Sep 2016 13:04:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UD4I0L050802; Fri, 30 Sep 2016 13:04:18 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UD4IT9050801; Fri, 30 Sep 2016 13:04:18 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609301304.u8UD4IT9050801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 13:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306495 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 13:04:19 -0000 Author: des Date: Fri Sep 30 13:04:18 2016 New Revision: 306495 URL: https://svnweb.freebsd.org/changeset/base/306495 Log: Minor markup and wording fixes. MFC after: 1 week Modified: head/lib/libc/sys/getrlimit.2 Modified: head/lib/libc/sys/getrlimit.2 ============================================================================== --- head/lib/libc/sys/getrlimit.2 Fri Sep 30 11:05:29 2016 (r306494) +++ head/lib/libc/sys/getrlimit.2 Fri Sep 30 13:04:18 2016 (r306495) @@ -28,7 +28,7 @@ .\" @(#)getrlimit.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 19, 2015 +.Dd September 30, 2016 .Dt GETRLIMIT 2 .Os .Sh NAME @@ -137,7 +137,7 @@ For example, if the RSS hard limit is ex .Pp The .Vt rlimit -structure is used to specify the hard and soft limits on a resource, +structure is used to specify the hard and soft limits on a resource. .Bd -literal -offset indent struct rlimit { rlim_t rlim_cur; /* current (soft) limit */ @@ -183,9 +183,9 @@ soft limit will cause the write to fail to be generated; this normally terminates the process, but may be caught. When -the soft cpu time limit is exceeded, a signal +the soft cpu time limit is exceeded, a .Dv SIGXCPU -is sent to the +signal is sent to the offending process. .Pp When most operations would allocate more virtual memory than allowed by the @@ -198,7 +198,9 @@ A notable exception is stack extension, If stack extension would allocate more virtual memory than allowed by the soft limit of .Dv RLIMIT_AS , -the signal SIGSEGV will be delivered. +a +.Dv SIGSEGV +signal will be delivered. The caller is free to raise the soft address space limit up to the hard limit and retry the allocation. .Sh RETURN VALUES From owner-svn-src-all@freebsd.org Fri Sep 30 13:05:34 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 40433C026AD; Fri, 30 Sep 2016 13:05:34 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E59E5197A; Fri, 30 Sep 2016 13:05:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UD5XMi050891; Fri, 30 Sep 2016 13:05:33 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UD5XdK050890; Fri, 30 Sep 2016 13:05:33 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609301305.u8UD5XdK050890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 13:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306496 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 13:05:34 -0000 Author: des Date: Fri Sep 30 13:05:32 2016 New Revision: 306496 URL: https://svnweb.freebsd.org/changeset/base/306496 Log: Reinstate Xr macros that were accidentally removed in a previous commit. Add some missing cross-references to the SEE ALSO section. Bump date now that there are content changes. MFC after: 1 week Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 30 13:04:18 2016 (r306495) +++ head/lib/libc/sys/sigaction.2 Fri Sep 30 13:05:32 2016 (r306496) @@ -28,7 +28,7 @@ .\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd September 6, 2013 +.Dd September 30, 2016 .Dt SIGACTION 2 .Os .Sh NAME @@ -331,10 +331,10 @@ with names as in the include file .It Dv SIGTTIN Ta stop process Ta background read attempted from control terminal .It Dv SIGTTOU Ta stop process Ta background write attempted to control terminal .It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr fcntl 2 ) -.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see setrlimit 2 ) -.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see setrlimit 2 ) -.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see setitimer 2 ) -.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see setitimer 2 ) +.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see Xr setrlimit 2 ) +.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see Xr setrlimit 2 ) +.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see Xr setitimer 2 ) +.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see Xr setitimer 2 ) .It Dv SIGWINCH Ta discard signal Ta window size change .It Dv SIGINFO Ta discard signal Ta status request from keyboard .It Dv SIGUSR1 Ta terminate process Ta user defined signal 1 @@ -731,6 +731,8 @@ or .Xr kill 1 , .Xr kill 2 , .Xr ptrace 2 , +.Xr setitimer 2 , +.Xr setrlimit 2 , .Xr sigaltstack 2 , .Xr sigpending 2 , .Xr sigprocmask 2 , From owner-svn-src-all@freebsd.org Fri Sep 30 13:16: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 3C393C028DD; Fri, 30 Sep 2016 13:16:05 +0000 (UTC) (envelope-from emaste@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 0C2781DE6; Fri, 30 Sep 2016 13:16:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDG4gt054571; Fri, 30 Sep 2016 13:16:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDG4WA054570; Fri, 30 Sep 2016 13:16:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609301316.u8UDG4WA054570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Sep 2016 13:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306497 - head/usr.sbin/crunch/crunchgen 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.23 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: Fri, 30 Sep 2016 13:16:05 -0000 Author: emaste Date: Fri Sep 30 13:16:04 2016 New Revision: 306497 URL: https://svnweb.freebsd.org/changeset/base/306497 Log: crunchgen: do not strip crunched binary (it will be done by install) Reviewed by: adrian, imp (earlier) Differential Revision: https://reviews.freebsd.org/D2003 Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.c Fri Sep 30 13:05:32 2016 (r306496) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Fri Sep 30 13:16:04 2016 (r306497) @@ -985,7 +985,6 @@ top_makefile_rules(FILE *outmk) prog_t *p; fprintf(outmk, "LD?= ld\n"); - fprintf(outmk, "STRIPBIN?= strip\n"); if ( subtract_strlst(&libs, &libs_so) ) fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by LIBS_SO\n"); @@ -1033,7 +1032,6 @@ top_makefile_rules(FILE *outmk) fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n", execfname, execfname); fprintf(outmk, ".endif\n"); - fprintf(outmk, "\t$(STRIPBIN) %s\n", execfname); fprintf(outmk, "realclean: clean subclean\n"); fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname); fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n"); From owner-svn-src-all@freebsd.org Fri Sep 30 13:37: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 77565C02E4C; Fri, 30 Sep 2016 13:37:51 +0000 (UTC) (envelope-from avos@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 445D0C4E; Fri, 30 Sep 2016 13:37:51 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDboeb062208; Fri, 30 Sep 2016 13:37:50 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDboeL062207; Fri, 30 Sep 2016 13:37:50 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609301337.u8UDboeL062207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 30 Sep 2016 13:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306498 - head/sys/dev/ral 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.23 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: Fri, 30 Sep 2016 13:37:51 -0000 Author: avos Date: Fri Sep 30 13:37:50 2016 New Revision: 306498 URL: https://svnweb.freebsd.org/changeset/base/306498 Log: ral (rt2860): eliminate duplicate ieee80211_process_callback() call (left after r287197) MFC after: 1 week Modified: head/sys/dev/ral/rt2860.c Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Fri Sep 30 13:16:04 2016 (r306497) +++ head/sys/dev/ral/rt2860.c Fri Sep 30 13:37:50 2016 (r306498) @@ -1140,10 +1140,6 @@ rt2860_tx_intr(struct rt2860_softc *sc, bus_dmamap_sync(sc->txwi_dmat, data->map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->txwi_dmat, data->map); - if (data->m->m_flags & M_TXCB) { - ieee80211_process_callback(data->ni, data->m, - 0); - } ieee80211_tx_complete(data->ni, data->m, 0); data->ni = NULL; data->m = NULL; From owner-svn-src-all@freebsd.org Fri Sep 30 13:41:26 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 36352C02F7A; Fri, 30 Sep 2016 13:41:26 +0000 (UTC) (envelope-from royger@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 E073AC4; Fri, 30 Sep 2016 13:41:25 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDfPt9065475; Fri, 30 Sep 2016 13:41:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDfPnM065474; Fri, 30 Sep 2016 13:41:25 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201609301341.u8UDfPnM065474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 30 Sep 2016 13:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306499 - head/sys/xen/interface/io 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.23 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: Fri, 30 Sep 2016 13:41:26 -0000 Author: royger Date: Fri Sep 30 13:41:24 2016 New Revision: 306499 URL: https://svnweb.freebsd.org/changeset/base/306499 Log: xen/vchan: change license of header from Lesser GPL v2.1 to BSD This is a license change only commit, which can be found upstream in the Xen tree as 937324f032f4f77866e80e39de0d697fa5131df1. Sponsored by: Citrix Systems R&D Modified: head/sys/xen/interface/io/libxenvchan.h Modified: head/sys/xen/interface/io/libxenvchan.h ============================================================================== --- head/sys/xen/interface/io/libxenvchan.h Fri Sep 30 13:37:50 2016 (r306498) +++ head/sys/xen/interface/io/libxenvchan.h Fri Sep 30 13:41:24 2016 (r306499) @@ -10,18 +10,23 @@ * * @section LICENSE * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; If not, see . + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * @section DESCRIPTION * From owner-svn-src-all@freebsd.org Fri Sep 30 13:47: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 8DAB6C023D7; Fri, 30 Sep 2016 13:47:53 +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 69E1F979; Fri, 30 Sep 2016 13:47:53 +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 u8UDlqF3066594; Fri, 30 Sep 2016 13:47:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDlqPH066592; Fri, 30 Sep 2016 13:47:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301347.u8UDlqPH066592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 13:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306500 - head/sys/arm/include 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.23 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: Fri, 30 Sep 2016 13:47:53 -0000 Author: andrew Date: Fri Sep 30 13:47:52 2016 New Revision: 306500 URL: https://svnweb.freebsd.org/changeset/base/306500 Log: Fix the spelling of Cortex. Modified: head/sys/arm/include/armreg.h head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Fri Sep 30 13:41:24 2016 (r306499) +++ head/sys/arm/include/armreg.h Fri Sep 30 13:47:52 2016 (r306500) @@ -144,7 +144,7 @@ #define CPU_ID_CORTEXA9R2 (CPU_ID_CORTEXA9 | (2 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA9R3 (CPU_ID_CORTEXA9 | (3 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA9R4 (CPU_ID_CORTEXA9 | (4 << CPU_ID_VARIANT_SHIFT)) -/* XXX: Cortx-A12 is the old name for this part, it has been renamed the A17 */ +/* XXX: Cortex-A12 is the old name for this part, it has been renamed the A17 */ #define CPU_ID_CORTEXA12 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xc0d0) #define CPU_ID_CORTEXA12R0 (CPU_ID_CORTEXA12 | (0 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA15 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xc0f0) Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Sep 30 13:41:24 2016 (r306499) +++ head/sys/arm/include/cpu-v6.h Fri Sep 30 13:47:52 2016 (r306500) @@ -345,12 +345,18 @@ tlb_flush_range_local(vm_offset_t va, vm /* Broadcasting operations. */ #if __ARM_ARCH >= 7 && defined SMP +/* Used to detect SMP */ +extern int mp_ncpus; + static __inline void tlb_flush_all(void) { dsb(); - _CP15_TLBIALLIS(); + if (mp_ncpus == 1) + _CP15_TLBIALL(); + else + _CP15_TLBIALLIS(); dsb(); } @@ -359,7 +365,10 @@ tlb_flush_all_ng(void) { dsb(); - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + if (mp_ncpus == 1) + _CP15_TLBIASID(CPU_ASID_KERNEL); + else + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); dsb(); } @@ -370,7 +379,10 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - _CP15_TLBIMVAAIS(va); + if (mp_ncpus == 1) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + else + _CP15_TLBIMVAAIS(va); dsb(); } @@ -384,8 +396,13 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); + if (mp_ncpus == 1) { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + } else { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + } dsb(); } #else /* SMP */ @@ -411,17 +428,19 @@ icache_sync(vm_offset_t va, vm_size_t si va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (mp_ncpus > 1) + _CP15_DCCMVAU(va); + else #endif + _CP15_DCCMVAC(va); } dsb(); #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (mp_ncpus > 1) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -431,10 +450,11 @@ static __inline void icache_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (mp_ncpus > 1) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -444,10 +464,11 @@ static __inline void bpb_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_BPIALLIS(); -#else - _CP15_BPIALL(); + if (mp_ncpus > 1) + _CP15_BPIALLIS(); + else #endif + _CP15_BPIALL(); dsb(); isb(); } @@ -462,10 +483,11 @@ dcache_wb_pou(vm_offset_t va, vm_size_t va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (mp_ncpus > 1) + _CP15_DCCMVAU(va); + else #endif + _CP15_DCCMVAC(va); } dsb(); } From owner-svn-src-all@freebsd.org Fri Sep 30 13:49: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 B377EC0258D; Fri, 30 Sep 2016 13:49:51 +0000 (UTC) (envelope-from royger@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 83DDDC03; Fri, 30 Sep 2016 13:49:51 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDnomm066705; Fri, 30 Sep 2016 13:49:50 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDnovN066704; Fri, 30 Sep 2016 13:49:50 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201609301349.u8UDnovN066704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 30 Sep 2016 13:49:50 +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: r306501 - stable/10/sys/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.23 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: Fri, 30 Sep 2016 13:49:51 -0000 Author: royger Date: Fri Sep 30 13:49:50 2016 New Revision: 306501 URL: https://svnweb.freebsd.org/changeset/base/306501 Log: MFC r299064 rtc: fix inverted resolution check Modified: stable/10/sys/kern/subr_rtc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_rtc.c ============================================================================== --- stable/10/sys/kern/subr_rtc.c Fri Sep 30 13:47:52 2016 (r306500) +++ stable/10/sys/kern/subr_rtc.c Fri Sep 30 13:49:50 2016 (r306501) @@ -84,7 +84,7 @@ clock_register(device_t dev, long res) / { if (clock_dev != NULL) { - if (clock_res > res) { + if (clock_res <= res) { if (bootverbose) device_printf(dev, "not installed as " "time-of-day clock: clock %s has higher " From owner-svn-src-all@freebsd.org Fri Sep 30 13:50:31 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 AE73FC025FF; Fri, 30 Sep 2016 13:50:31 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (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 54261D6D; Fri, 30 Sep 2016 13:50:31 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id b4so48702606wmb.0; Fri, 30 Sep 2016 06:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fjFqY53vHLKTbclCohjzsDd1A1yZ6OXvdZy2CPGu1p4=; b=mO+Xcowhgm0dtHpMtDCnwSdYgnE/Sstza2zFPIfyLDkWae3q4u7MtQ8ZT5RMLNyw7f XhU7bdkogcUzMGEpY+VrwltaEtc1W46jfCZzfGudcLAun8Ic0cpYLoWKEcSP+gItiYqH 38UdAMZCo9PmDILwbKbLp+wZaLmZaHT8L5EKDOYr9NSSu95kxuyUzGtX2ZsNTV1/jSHE ePhmpBSS5OMpCbxK+AeBEhZLuWv7uvBwD374z/Hqvqlx2oYj7wcklgmXnCpuGHzT61yM r6P3X9Dn5c8VEwK448KtoINUI0VpmsxxunPC+MuFqq0fPUH4gDt+1eqC4pBewro7sPxC VkiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=fjFqY53vHLKTbclCohjzsDd1A1yZ6OXvdZy2CPGu1p4=; b=ODgoNK1Mo8II3wQgrwg+unw6U/vNMUINrU9nu+fCmlueOO6o7Fcy4sqa1xaRfSR/hW ODWT/uuM6CEe75ssqyrD9dBtvY8xakXJJqsoaJ3hViQU4bkA1LRZJbVm8XjY3sdw0y8M wZcWpnkD77JpIIi11Va8h8dRDq9W0yTaWqXpf8CekkubjiD393xZgPPdRWoVooyYiS69 jjwSHPA6cckKIOW9FnluSRlgRsrErY8/hOttt353NyQHKKABzQ2O4Dq7EoUR6w8Wz5xY lPb/BzFNAnA7ei+7I33P/pXpQR3DJVig6L+YpnP+/FrTyiImp5qgorjp3xt3s5PzxGZ3 mEOg== X-Gm-Message-State: AA6/9Rk+1t0fjGd4WDBf8CAKM+AXCw2JQP0bc2pojH1eK7u+eE5tQiGkq9EQwzVCL279FQ== X-Received: by 10.194.173.168 with SMTP id bl8mr7038087wjc.105.1475243429541; Fri, 30 Sep 2016 06:50:29 -0700 (PDT) Received: from localhost (61.red-79-152-18.dynamicip.rima-tde.net. [79.152.18.61]) by smtp.gmail.com with ESMTPSA id n7sm4257224wmf.18.2016.09.30.06.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 06:50:28 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Fri, 30 Sep 2016 15:50:25 +0200 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r299064 - head/sys/kern Message-ID: <20160930135025.mvy5k5bbdatn4ccx@mac> References: <201605041348.u44Dmxd0092688@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20160916 (1.7.0) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 13:50:31 -0000 On Sat, Sep 03, 2016 at 01:29:45AM +0200, Oliver Pinter wrote: > Hi! > > This commit never gets MFCd back to 10-STABLE. Do you still plan to do it? Ops, sorry for the delay, should be MFC'ed now. Thanks, Roger. From owner-svn-src-all@freebsd.org Fri Sep 30 13:51:00 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 B2497C02649; Fri, 30 Sep 2016 13:51:00 +0000 (UTC) (envelope-from emaste@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 81341F12; Fri, 30 Sep 2016 13:51:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDoxDa066805; Fri, 30 Sep 2016 13:50:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDoxZx066804; Fri, 30 Sep 2016 13:50:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609301350.u8UDoxZx066804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Sep 2016 13:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306502 - head/usr.bin/primes 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.23 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: Fri, 30 Sep 2016 13:51:00 -0000 Author: emaste Date: Fri Sep 30 13:50:59 2016 New Revision: 306502 URL: https://svnweb.freebsd.org/changeset/base/306502 Log: primes: trivially capsicumize Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7982 Modified: head/usr.bin/primes/primes.c Modified: head/usr.bin/primes/primes.c ============================================================================== --- head/usr.bin/primes/primes.c Fri Sep 30 13:49:50 2016 (r306501) +++ head/usr.bin/primes/primes.c Fri Sep 30 13:50:59 2016 (r306502) @@ -61,6 +61,7 @@ static const char rcsid[] = * validation check: there are 664579 primes between 0 and 10^7 */ +#include #include #include #include @@ -70,6 +71,7 @@ static const char rcsid[] = #include #include #include +#include #include #include "primes.h" @@ -99,6 +101,12 @@ main(int argc, char *argv[]) int ch; char *p; + /* Cache NLS data, for strerror, for err(3), before cap_enter. */ + (void)catopen("libc", NL_CAT_LOCALE); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "cap_enter"); + while ((ch = getopt(argc, argv, "h")) != -1) switch (ch) { case 'h': From owner-svn-src-all@freebsd.org Fri Sep 30 14:00:24 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 F1798C02937; Fri, 30 Sep 2016 14:00:24 +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 B043B1568; Fri, 30 Sep 2016 14:00:24 +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 u8UE0NJE070842; Fri, 30 Sep 2016 14:00:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UE0NgG070841; Fri, 30 Sep 2016 14:00:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301400.u8UE0NgG070841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 14:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306503 - head/sys/arm/include 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.23 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: Fri, 30 Sep 2016 14:00:25 -0000 Author: andrew Date: Fri Sep 30 14:00:23 2016 New Revision: 306503 URL: https://svnweb.freebsd.org/changeset/base/306503 Log: Revert an accedintal commit. Modified: head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Sep 30 13:50:59 2016 (r306502) +++ head/sys/arm/include/cpu-v6.h Fri Sep 30 14:00:23 2016 (r306503) @@ -345,18 +345,12 @@ tlb_flush_range_local(vm_offset_t va, vm /* Broadcasting operations. */ #if __ARM_ARCH >= 7 && defined SMP -/* Used to detect SMP */ -extern int mp_ncpus; - static __inline void tlb_flush_all(void) { dsb(); - if (mp_ncpus == 1) - _CP15_TLBIALL(); - else - _CP15_TLBIALLIS(); + _CP15_TLBIALLIS(); dsb(); } @@ -365,10 +359,7 @@ tlb_flush_all_ng(void) { dsb(); - if (mp_ncpus == 1) - _CP15_TLBIASID(CPU_ASID_KERNEL); - else - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); dsb(); } @@ -379,10 +370,7 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - if (mp_ncpus == 1) - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - else - _CP15_TLBIMVAAIS(va); + _CP15_TLBIMVAAIS(va); dsb(); } @@ -396,13 +384,8 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - if (mp_ncpus == 1) { - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - } else { - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); - } + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); dsb(); } #else /* SMP */ @@ -428,19 +411,17 @@ icache_sync(vm_offset_t va, vm_size_t si va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_DCCMVAU(va); - else + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); #endif - _CP15_DCCMVAC(va); } dsb(); #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_ICIALLUIS(); - else + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); #endif - _CP15_ICIALLU(); dsb(); isb(); } @@ -450,11 +431,10 @@ static __inline void icache_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_ICIALLUIS(); - else + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); #endif - _CP15_ICIALLU(); dsb(); isb(); } @@ -464,11 +444,10 @@ static __inline void bpb_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_BPIALLIS(); - else + _CP15_BPIALLIS(); +#else + _CP15_BPIALL(); #endif - _CP15_BPIALL(); dsb(); isb(); } @@ -483,11 +462,10 @@ dcache_wb_pou(vm_offset_t va, vm_size_t va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_DCCMVAU(va); - else + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); #endif - _CP15_DCCMVAC(va); } dsb(); } From owner-svn-src-all@freebsd.org Fri Sep 30 14:01: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 3257BC02ACF; Fri, 30 Sep 2016 14:01:33 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (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 A6B16178B; Fri, 30 Sep 2016 14:01:32 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id l131so6092693lfl.0; Fri, 30 Sep 2016 07:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5tox44vjpVBT7uh6CR2P0m8VRXA/0DpcHJB0U7J45hw=; b=VCdhyDpZkLbyJzW0GnUUmIYHRqtVLEYc9PN0lwn2j8jqtn30mutuwZR23zRzWmA4ZC MphCVvijRKetjFyUhJt/YvUR2Ol7AniAcdu8rDJeBcEU8KLwn1X8zfByc/xWTSMfSlD6 FC8o9gRXg5toHxYL9Y/y+KCKEeJw5Ubb2MdqsG6NuWnuJlydJblro/eld5nZA2R721WS 1bTzW3pzfKKYfAYqEsfzU/7YCSTdo2fjwTfHdcZENqF5DUMvDJo1h6CGp/zpCMvFETqO IS8/6qBLUltHG1nK8hsHvBRebeNSBmpvgaFjQBN6n1HBM++0VfbZ1a4MrjzIw49iYDiD zSaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=5tox44vjpVBT7uh6CR2P0m8VRXA/0DpcHJB0U7J45hw=; b=ftCSpFJ3tQsVOiB2OHMwTJYsD1vnaBahhLcmRBtwaYsJ06b/Un0eNFHXrM+H8JtFIg Ir4N2q3K36sy9Ml9rrC0mVJ7OPpoCu8WsTqpHjqiO8SRKv/4WahtrB8BgBa+lSI13hup 6p02Y1Z/kJZVrHSLZOYzAQ6cyjI1O3ZU5hm3jpbYopMA5Ssdtcb7jr7pVEIyoq0rpcfa VzncBkQz2cTHcwPgKEtT3KK7nzuB2EVDku5jZ0WpS7xXylarsT+SyVUBnOcz7aOcaAEM NTjP6fbXIwUkriggcdT+9FXb1vI9P2VdYsTFTHQPWGKPRtE84gLilMjUolnnJfK1Z6Pr MOkg== X-Gm-Message-State: AA6/9RkWKXSVRgXaSt3SA6B/ZkXwzm3zd+ChioxCAgk7Ds6Addw+ly5wLaicqjcJzFrvEQ== X-Received: by 10.25.18.157 with SMTP id 29mr2772018lfs.10.1475244089573; Fri, 30 Sep 2016 07:01:29 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id h78sm3026767ljh.45.2016.09.30.07.01.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 07:01:28 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 30 Sep 2016 16:01:27 +0200 From: Baptiste Daroussin To: David C Somayajulu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306284 - head/sys/dev/bxe Message-ID: <20160930140127.ou5a6pjzrfc2ovew@ivaldir.etoilebsd.net> References: <201609232318.u8NNIsxj072044@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wkdvbas7v7hkqeak" Content-Disposition: inline In-Reply-To: <201609232318.u8NNIsxj072044@repo.freebsd.org> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 14:01:33 -0000 --wkdvbas7v7hkqeak Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 23, 2016 at 11:18:54PM +0000, David C Somayajulu wrote: > Author: davidcs > Date: Fri Sep 23 23:18:54 2016 > New Revision: 306284 > URL: https://svnweb.freebsd.org/changeset/base/306284 >=20 > Log: > Fixes for issues under high workloads > =20 > MFC after:5 days Please do not MFC as this change makes the kernel panic as soon as one setu= p the network: I had to revert the patch to get my machine running again bxe0@pci0:1:0:0: class=3D0x020000 card=3D0x06361028 chip=3D0x168e14e= 4 rev=3D0x10 hdr=3D0x00 vendor =3D 'Broadcom Corporation' device =3D 'NetXtreme II BCM57810 10 Gigabit Ethernet' class =3D network subclass =3D ethernet bxe1@pci0:1:0:1: class=3D0x020000 card=3D0x06361028 chip=3D0x168e14e= 4 rev=3D0x10 hdr=3D0x00 vendor =3D 'Broadcom Corporation' device =3D 'NetXtreme II BCM57810 10 Gigabit Ethernet' class =3D network subclass =3D ethernet With the following trace: _callout_init_lock() at _callout_init_lock+0xa8/frame 0xfffffe201bde8370 _timeout_task_init() at _timeout_task_init+0x31/frame 0xfffffe201bde8390 bxe_nic_load() at bxe_nic_load+0x128a/frame 0xfffffe201bde8610 bxe_init_locked() at bxe_init_locked+0xd16/frame 0xfffffe201bde8690 bxe_init() at bxe_init+0x2f/frame 0xfffffe201bde86b0 ether_ioctl() at ether_ioctl+0x4c/frame 0xfffffe201bde86e0 in_control() at in_control+0x882/frame 0xfffffe201bde8760 ifioctl() at ifioctl+0xdc1/frame 0xfffffe201bde87f0 kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe201bde8850 Best regards, Bapt --wkdvbas7v7hkqeak Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7nAyAAoJEGOJi9zxtz5a0hsQAN7dyFZBlFjltGqhEnr+yDFx 3k68A01TpTp+Ee2FeVl/X4ed/0Au58Ollis3NjuvLdEeJqhutxGIeCVpEozoqCWF 0/FImTEs8dyR3aPDwIIOLlEmoF3UBReyZIde9XtmBM0CTCmaUNbuMKYjKvgEjF5J xt9lAEzZz/ovfxq+5RCN8fANGPkfXcX9/ZWwbvA5vyRggLaYqn2aNM6bsAHSJCyf R4NojmcK/GBe1O1WF8Y6NcTkejtySv7O+vPsd1f0Cc1GKOH8geYhpuPkE6uPigv/ faGW3BuCjjkS7PqULV0YK1PwW+Pr4YNfVs/HNBiXeOxOb+oPYQCvQjC9HdWTBeEP 1QBxRQM/fD0C4YUqgXEE7JgBJKDmcp4ELVMiQ3sMCHEKvEEPnfTArtjSW6SIxPW3 iMk0XgVKoNWvJf0jtpo2fWgTXm7qaimHXdIviKOAAa4h3EuG+QCs+gAoJP6W83Er GD+ZUC5UaZSjWA59U8R8Lafu3WhnCV3X50ZdX8w6F9hkMjp6BE40zUYRB/HtGMtq 5GvYLy2/OWTumtr2u7A3bMsZm9/D2L7n3Jk6yFHv4qRoVEa9vksDKOSQPblo3aAK 1io2jf21AabEPEwYLDdWLN5LCPKz8JaWA0eJyMcZur44SqDEqOHODmUQ407niROY W1+Iq19UY4k9s5X7VEiO =xUoF -----END PGP SIGNATURE----- --wkdvbas7v7hkqeak-- From owner-svn-src-all@freebsd.org Fri Sep 30 14:13: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 337F4C02F86; Fri, 30 Sep 2016 14:13:58 +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 A515D131; Fri, 30 Sep 2016 14:13:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8UEDqOW019614 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 30 Sep 2016 17:13:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8UEDqOW019614 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8UEDqpm019613; Fri, 30 Sep 2016 17:13:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Sep 2016 17:13:52 +0300 From: Konstantin Belousov To: Baptiste Daroussin Cc: David C Somayajulu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306284 - head/sys/dev/bxe Message-ID: <20160930141352.GR38409@kib.kiev.ua> References: <201609232318.u8NNIsxj072044@repo.freebsd.org> <20160930140127.ou5a6pjzrfc2ovew@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160930140127.ou5a6pjzrfc2ovew@ivaldir.etoilebsd.net> User-Agent: Mutt/1.6.1 (2016-04-27) 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.23 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: Fri, 30 Sep 2016 14:13:58 -0000 On Fri, Sep 30, 2016 at 04:01:27PM +0200, Baptiste Daroussin wrote: > On Fri, Sep 23, 2016 at 11:18:54PM +0000, David C Somayajulu wrote: > > Author: davidcs > > Date: Fri Sep 23 23:18:54 2016 > > New Revision: 306284 > > URL: https://svnweb.freebsd.org/changeset/base/306284 > > > > Log: > > Fixes for issues under high workloads > > > > MFC after:5 days > > Please do not MFC as this change makes the kernel panic as soon as one setup the > network: > > I had to revert the patch to get my machine running again > > bxe0@pci0:1:0:0: class=0x020000 card=0x06361028 chip=0x168e14e4 rev=0x10 hdr=0x00 > vendor = 'Broadcom Corporation' > device = 'NetXtreme II BCM57810 10 Gigabit Ethernet' > class = network > subclass = ethernet > bxe1@pci0:1:0:1: class=0x020000 card=0x06361028 chip=0x168e14e4 rev=0x10 hdr=0x00 > vendor = 'Broadcom Corporation' > device = 'NetXtreme II BCM57810 10 Gigabit Ethernet' > class = network > subclass = ethernet > > With the following trace: > _callout_init_lock() at _callout_init_lock+0xa8/frame 0xfffffe201bde8370 > _timeout_task_init() at _timeout_task_init+0x31/frame 0xfffffe201bde8390 > bxe_nic_load() at bxe_nic_load+0x128a/frame 0xfffffe201bde8610 > bxe_init_locked() at bxe_init_locked+0xd16/frame 0xfffffe201bde8690 > bxe_init() at bxe_init+0x2f/frame 0xfffffe201bde86b0 > ether_ioctl() at ether_ioctl+0x4c/frame 0xfffffe201bde86e0 > in_control() at in_control+0x882/frame 0xfffffe201bde8760 > ifioctl() at ifioctl+0xdc1/frame 0xfffffe201bde87f0 > kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe201bde8850 > The issue seems to be that the bxe_interrupt_attach() creates fast taskqueue, i.e. the taskqueue lock is spinlock. Then the queue is passed to TIMEOUT_TASK_INIT(), which can only operate with the sleepable mutex locks. From owner-svn-src-all@freebsd.org Fri Sep 30 15:41:13 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 92E80C031E9; Fri, 30 Sep 2016 15:41:13 +0000 (UTC) (envelope-from imp@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 4BF5511E8; Fri, 30 Sep 2016 15:41:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UFfCI8010944; Fri, 30 Sep 2016 15:41:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UFfCIF010943; Fri, 30 Sep 2016 15:41:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609301541.u8UFfCIF010943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 30 Sep 2016 15:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306504 - head/sys/boot/efi/loader 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.23 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: Fri, 30 Sep 2016 15:41:13 -0000 Author: imp Date: Fri Sep 30 15:41:12 2016 New Revision: 306504 URL: https://svnweb.freebsd.org/changeset/base/306504 Log: Fix a cluster of bugs in list EFI environment variables: 1. Size returned for variable name is in bytes, not CHAR16 (the UEFI standard is unclear on this, where it is clear on the size of the variable). 2. Dynamically allocate the buffers so we can grow them if someone defines a super-long variable name. These two fixes allow me to examine all the variables in my BIOS and also removes the repeated printing of variables. Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Fri Sep 30 14:00:23 2016 (r306503) +++ head/sys/boot/efi/loader/main.c Fri Sep 30 15:41:12 2016 (r306504) @@ -814,8 +814,10 @@ command_efi_show(int argc, char *argv[]) EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; EFI_GUID matchguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; uint32_t uuid_status; - CHAR16 varname[128]; + CHAR16 *varname; + CHAR16 *newnm; CHAR16 varnamearg[128]; + UINTN varalloc; UINTN varsz; while ((ch = getopt(argc, argv, "ag:lv:")) != -1) { @@ -910,10 +912,33 @@ command_efi_show(int argc, char *argv[]) * to specify the initial call must be a poiner to a NULL * character. */ - varsz = nitems(varname); + varalloc = 1024; + varname = malloc(varalloc); + if (varname == NULL) { + printf("Can't allocate memory to get variables\n"); + pager_close(); + return (CMD_ERROR); + } varname[0] = 0; - while ((status = RS->GetNextVariableName(&varsz, varname, &varguid)) != - EFI_NOT_FOUND) { + while (1) { + varsz = varalloc; + status = RS->GetNextVariableName(&varsz, varname, &varguid); + if (status == EFI_BUFFER_TOO_SMALL) { + varalloc = varsz; + newnm = malloc(varalloc); + if (newnm == NULL) { + printf("Can't allocate memory to get variables\n"); + free(varname); + pager_close(); + return (CMD_ERROR); + } + memcpy(newnm, varname, varsz); + free(varname); + varname = newnm; + continue; /* Try again with bigger buffer */ + } + if (status != EFI_SUCCESS) + break; if (aflag) { if (efi_print_var(varname, &varguid, lflag) != CMD_OK) break; @@ -934,6 +959,7 @@ command_efi_show(int argc, char *argv[]) } } } + free(varname); pager_close(); return (CMD_OK); From owner-svn-src-all@freebsd.org Fri Sep 30 15:47: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 289BEC0331B; Fri, 30 Sep 2016 15:47:15 +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 EA8341689; Fri, 30 Sep 2016 15:47:14 +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 u8UFlErp012166; Fri, 30 Sep 2016 15:47:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UFlEV3012165; Fri, 30 Sep 2016 15:47:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609301547.u8UFlEV3012165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Sep 2016 15:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306505 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 15:47:15 -0000 Author: kib Date: Fri Sep 30 15:47:13 2016 New Revision: 306505 URL: https://svnweb.freebsd.org/changeset/base/306505 Log: Add an article. Submitted by: wblock MFC after: 3 days Modified: head/lib/libc/sys/cap_enter.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Fri Sep 30 15:41:12 2016 (r306504) +++ head/lib/libc/sys/cap_enter.2 Fri Sep 30 15:47:13 2016 (r306505) @@ -73,7 +73,7 @@ sandbox. If the .Dv kern.trap_enocap sysctl MIB is set to a non-zero value, then for any process executing in a -capability mode sandbox, any syscall which results in either +capability mode sandbox, any syscall which results in either an .Er ENOTCAPABLE or .Er ECAPMODE From owner-svn-src-all@freebsd.org Fri Sep 30 16:02:26 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 5C373C03841; Fri, 30 Sep 2016 16:02:26 +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 2F37C1DB; Fri, 30 Sep 2016 16:02:26 +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 u8UG2P3l019789; Fri, 30 Sep 2016 16:02:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UG2PtJ019788; Fri, 30 Sep 2016 16:02:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609301602.u8UG2PtJ019788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Sep 2016 16:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306506 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 16:02:26 -0000 Author: kib Date: Fri Sep 30 16:02:25 2016 New Revision: 306506 URL: https://svnweb.freebsd.org/changeset/base/306506 Log: Reword the statement. Submitted by: wblock MFC after: 3 days Modified: head/lib/libc/sys/thr_suspend.2 Modified: head/lib/libc/sys/thr_suspend.2 ============================================================================== --- head/lib/libc/sys/thr_suspend.2 Fri Sep 30 15:47:13 2016 (r306505) +++ head/lib/libc/sys/thr_suspend.2 Fri Sep 30 16:02:25 2016 (r306506) @@ -61,9 +61,9 @@ system call puts the calling thread in a not eligible for CPU time. This state is exited by another thread calling .Xr thr_wake 2 , -by expiration of the timeout specified in the +when the time interval specified by .Fa timeout -argument, +has elapsed, or by the delivery of a signal to the suspended thread. .Pp If the From owner-svn-src-all@freebsd.org Fri Sep 30 16:31:13 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 E2C51C03485; Fri, 30 Sep 2016 16:31:13 +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 B5CFC1A0F; Fri, 30 Sep 2016 16:31:13 +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 u8UGVC8Z029050; Fri, 30 Sep 2016 16:31:12 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UGVCLc029049; Fri, 30 Sep 2016 16:31:12 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201609301631.u8UGVCLc029049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 30 Sep 2016 16:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306507 - head/contrib/blacklist/bin 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.23 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: Fri, 30 Sep 2016 16:31:14 -0000 Author: lidl Date: Fri Sep 30 16:31:12 2016 New Revision: 306507 URL: https://svnweb.freebsd.org/changeset/base/306507 Log: Update blacklistd.8 with changes from NetBSD Obtained from: NetBSD MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8079 Modified: head/contrib/blacklist/bin/blacklistd.8 Modified: head/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- head/contrib/blacklist/bin/blacklistd.8 Fri Sep 30 16:02:25 2016 (r306506) +++ head/contrib/blacklist/bin/blacklistd.8 Fri Sep 30 16:31:12 2016 (r306507) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.15 2016/03/11 17:16:40 christos Exp $ +.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -47,7 +47,7 @@ .Nm is a daemon similar to .Xr syslogd 8 -that listens to a sockets at paths specified in the +that listens to sockets at paths specified in the .Ar sockpathsfile for notifications from other daemons about successful or failed connection attempts. @@ -218,7 +218,8 @@ Socket to receive connection notificatio .Nm first appeared in .Nx 7 . -.Fx support for +.Fx +support for .Nm was implemented in .Fx 11 . From owner-svn-src-all@freebsd.org Fri Sep 30 16:35:31 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 AD0E1C03703; Fri, 30 Sep 2016 16:35:31 +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 711811F4B; Fri, 30 Sep 2016 16:35:31 +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 u8UGZUpO031960; Fri, 30 Sep 2016 16:35:30 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UGZU8u031958; Fri, 30 Sep 2016 16:35:30 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201609301635.u8UGZU8u031958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 30 Sep 2016 16:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306508 - head/contrib/blacklist/bin 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.23 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: Fri, 30 Sep 2016 16:35:31 -0000 Author: lidl Date: Fri Sep 30 16:35:30 2016 New Revision: 306508 URL: https://svnweb.freebsd.org/changeset/base/306508 Log: Fix blacklistd's state restoral at startup The blacklistd daemon attempted to restore the filtering rules before the database of blocked addresses was opened, so no rules were being reloaded. Now the rules are properly recreated when the daemon is started with '-r'. This bug was fixed locally, and then sent upstream to NetBSD. This changeset is the import the NetBSD version of the change, which added debugging output to alert about a null database. Reviewed by: emaste Obtained from: NetBSD MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/blacklist/bin/blacklistd.c head/contrib/blacklist/bin/state.c Modified: head/contrib/blacklist/bin/blacklistd.c ============================================================================== --- head/contrib/blacklist/bin/blacklistd.c Fri Sep 30 16:31:12 2016 (r306507) +++ head/contrib/blacklist/bin/blacklistd.c Fri Sep 30 16:35:30 2016 (r306508) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -473,9 +473,6 @@ main(int argc, char *argv[]) flags |= O_TRUNC; } - if (restore) - rules_restore(); - struct pollfd *pfd = NULL; bl_t *bl = NULL; size_t nfd = 0; @@ -500,6 +497,9 @@ main(int argc, char *argv[]) if (state == NULL) return EXIT_FAILURE; + if (restore) + rules_restore(); + if (!debug) { if (daemon(0, 0) == -1) err(EXIT_FAILURE, "daemon failed"); Modified: head/contrib/blacklist/bin/state.c ============================================================================== --- head/contrib/blacklist/bin/state.c Fri Sep 30 16:31:12 2016 (r306507) +++ head/contrib/blacklist/bin/state.c Fri Sep 30 16:35:30 2016 (r306508) @@ -1,4 +1,4 @@ -/* $NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -200,8 +200,10 @@ state_iterate(DB *db, struct conf *c, st int rv; DBT k, v; - if (db == NULL) + if (db == NULL) { + (*lfun)(LOG_ERR, "%s: called with no database file", __func__); return -1; + } first = first ? R_FIRST : R_NEXT; From owner-svn-src-all@freebsd.org Fri Sep 30 17:11: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 5FF5AC0327F; Fri, 30 Sep 2016 17:11:05 +0000 (UTC) (envelope-from mjg@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 3B400180B; Fri, 30 Sep 2016 17:11:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHB4kX046398; Fri, 30 Sep 2016 17:11:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHB35d046389; Fri, 30 Sep 2016 17:11:03 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609301711.u8UHB35d046389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Sep 2016 17:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs 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.23 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: Fri, 30 Sep 2016 17:11:05 -0000 Author: mjg Date: Fri Sep 30 17:11:03 2016 New Revision: 306509 URL: https://svnweb.freebsd.org/changeset/base/306509 Log: vfs: remove the __bo_vnode field from struct vnode The pointer can be obtained using __containerof instead. Reviewed by: kib Modified: head/sys/fs/nandfs/nandfs_subr.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_subr.c head/sys/sys/bufobj.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/fs/nandfs/nandfs_subr.c ============================================================================== --- head/sys/fs/nandfs/nandfs_subr.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/fs/nandfs/nandfs_subr.c Fri Sep 30 17:11:03 2016 (r306509) @@ -80,7 +80,7 @@ nandfs_bufsync(struct bufobj *bo, int wa struct vnode *vp; int error = 0; - vp = bo->__bo_vnode; + vp = bo2vnode(bo); ASSERT_VOP_LOCKED(vp, __func__); error = nandfs_sync_file(vp); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/kern/vfs_bio.c Fri Sep 30 17:11:03 2016 (r306509) @@ -4544,7 +4544,7 @@ int bufsync(struct bufobj *bo, int waitfor) { - return (VOP_FSYNC(bo->__bo_vnode, waitfor, curthread)); + return (VOP_FSYNC(bo2vnode(bo), waitfor, curthread)); } void Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/kern/vfs_subr.c Fri Sep 30 17:11:03 2016 (r306509) @@ -372,7 +372,6 @@ vnode_init(void *mem, int size, int flag * Initialize bufobj. */ bo = &vp->v_bufobj; - bo->__bo_vnode = vp; rw_init(BO_LOCKPTR(bo), "bufobj interlock"); bo->bo_private = vp; TAILQ_INIT(&bo->bo_clean.bv_hd); @@ -2052,7 +2051,7 @@ sync_vnode(struct synclist *slp, struct *bo = LIST_FIRST(slp); if (*bo == NULL) return (0); - vp = (*bo)->__bo_vnode; /* XXX */ + vp = bo2vnode(*bo); if (VOP_ISLOCKED(vp) != 0 || VI_TRYLOCK(vp) == 0) return (1); /* Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/sys/bufobj.h Fri Sep 30 17:11:03 2016 (r306509) @@ -94,11 +94,6 @@ struct bufobj { struct vm_object *bo_object; /* v Place to store VM object */ LIST_ENTRY(bufobj) bo_synclist; /* S dirty vnode list */ void *bo_private; /* private pointer */ - struct vnode *__bo_vnode; /* - * XXX: This vnode pointer is here - * XXX: only to keep the syncer working - * XXX: for now. - */ struct bufv bo_clean; /* i Clean buffers */ struct bufv bo_dirty; /* i Dirty buffers */ long bo_numoutput; /* i Writes in progress */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/sys/vnode.h Fri Sep 30 17:11:03 2016 (r306509) @@ -179,6 +179,8 @@ struct vnode { #define v_rdev v_un.vu_cdev #define v_fifoinfo v_un.vu_fifoinfo +#define bo2vnode(bo) __containerof((bo), struct vnode, v_bufobj) + /* XXX: These are temporary to avoid a source sweep at this time */ #define v_object v_bufobj.bo_object Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 30 17:11:03 2016 (r306509) @@ -2170,7 +2170,7 @@ ffs_bdflush(bo, bp) td = curthread; vp = bp->b_vp; - devvp = bo->__bo_vnode; + devvp = bo2vnode(bo); KASSERT(vp == devvp, ("devvp != vp %p %p", bo, bp)); VI_LOCK(devvp); Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 30 17:11:03 2016 (r306509) @@ -2177,7 +2177,7 @@ ffs_geom_strategy(struct bufobj *bo, str struct buf *tbp; int nocopy; - vp = bo->__bo_vnode; + vp = bo2vnode(bo); if (bp->b_iocmd == BIO_WRITE) { if ((bp->b_flags & B_VALIDSUSPWRT) == 0 && bp->b_vp != NULL && bp->b_vp->v_mount != NULL && From owner-svn-src-all@freebsd.org Fri Sep 30 17:16: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 35509C0377E; Fri, 30 Sep 2016 17:16:03 +0000 (UTC) (envelope-from loos@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 05A071F18; Fri, 30 Sep 2016 17:16:02 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHG2Zm047217; Fri, 30 Sep 2016 17:16:02 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHG2WQ047216; Fri, 30 Sep 2016 17:16:02 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609301716.u8UHG2WQ047216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Sep 2016 17:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306510 - head/sys/arm/ti/cpsw 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.23 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: Fri, 30 Sep 2016 17:16:03 -0000 Author: loos Date: Fri Sep 30 17:16:02 2016 New Revision: 306510 URL: https://svnweb.freebsd.org/changeset/base/306510 Log: Sort and remove unnecessary includes. No functional changes. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:11:03 2016 (r306509) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:16:02 2016 (r306510) @@ -48,35 +48,27 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include -#include +#include #include +#include +#include #include +#include +#include #include +#include #include +#include +#include +#include + #include #include #include -#include #include #include #include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include #include #include @@ -273,7 +265,6 @@ cpsw_debugf_head(const char *funcname) printf("%02d:%02d:%02d %s ", t / (60 * 60), (t / 60) % 60, t % 60, funcname); } -#include static void cpsw_debugf(const char *fmt, ...) { From owner-svn-src-all@freebsd.org Fri Sep 30 17:18: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 71714C037F3 for ; Fri, 30 Sep 2016 17:18:49 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yb0-x232.google.com (mail-yb0-x232.google.com [IPv6:2607:f8b0:4002:c09::232]) (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 2A24D14F for ; Fri, 30 Sep 2016 17:18:49 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yb0-x232.google.com with SMTP id z8so30509782ybh.3 for ; Fri, 30 Sep 2016 10:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mTgAFN4AOWgSIjbkNTlEeXAA5J15ByXimsPqjFG6AJc=; b=EQig7EzvFjRNGv+SaNXODNe7c7Cu4ErAvdVbMj6lH7hm8JObVTWGf4+At8zS97G0RB ctpJAQsCvPb6/qcsoW450SwWwPCqM9pUTYxys0HfV9P+/Vudh1aiwcEW7QYKUMDn+wcf 4xw+lRvWWUHMB53LFUO+DGFQxMi5Dh7qR951BaChzf7oSO3oseUx96rIGehZxoC+gmov HF9LZvujuwA74uteV41Fov2zZo4brDp80ngl0UDNp3VOyi57IRL8QYoe4UK0SdbE8fa9 9x7c0S4UqwUUZmKkGaUFiGuAtFjVD9zBmKQHS22kyOXMlms14z9IlpDvD69kQh9YfxBZ 6lqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mTgAFN4AOWgSIjbkNTlEeXAA5J15ByXimsPqjFG6AJc=; b=YOIlGlCvb4g9K3wQRi8HxkFD50wrRkVLm4/BzzTXY56D6N0gLx7kBLzOfQl96l4FVg Nnlo74B/NO+gaXAjAiMezwkb84O0CK59p1WIRri9jHkAV57KcvSo4Fe3UxmuDmSGc/nH ueJE8YwhHYaGznAd5OR02nDaEGtJxvP5aoPwOLDxn6OtZ3B0TogYlJStlIuv8dDfX3G0 i5C3BWvB+rYwep5tfI7ocXnsifc6sVdEJ6GU5aKXV1ZwcF7qmJO6FASfqpXYWudZAJ+O dLH5dRBLVTW4vFnnKMHjzp0Qt2Hr+BF3jHHbjOQPX85SL+vFXpMRygTgIvfJyYgY+mZ9 LDFQ== X-Gm-Message-State: AA6/9Rl55b+ORISUtzqYi6xOiTaSuMsioKjBrokTYm+e+ylFB9/pvlA4bVWebQnA7bvP4jLo X-Received: by 10.37.209.80 with SMTP id i77mr2390942ybg.165.1475255928113; Fri, 30 Sep 2016 10:18:48 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-218-231.bltmmd.fios.verizon.net. [100.16.218.231]) by smtp.gmail.com with ESMTPSA id x68sm9306875ywx.10.2016.09.30.10.18.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Sep 2016 10:18:47 -0700 (PDT) Date: Fri, 30 Sep 2016 13:18:45 -0400 From: Shawn Webb To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930171845.GA62393@mutt-hardenedbsd> References: <201609301711.u8UHB35d046389@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <201609301711.u8UHB35d046389@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:18:49 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Fri Sep 30 17:11:03 2016 > New Revision: 306509 > URL: https://svnweb.freebsd.org/changeset/base/306509 >=20 > Log: > vfs: remove the __bo_vnode field from struct vnode > =20 > The pointer can be obtained using __containerof instead. > =20 > Reviewed by: kib Should __FreeBSD_Version be bumped? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --0F1p//8PRICkK4MW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7p5yAAoJEGqEZY9SRW7uM7EP/jNjKMq1uitom1MVaW5Sgqr/ IlFamaCi2kWUX7aZ2/j1Li+cR/PJLbuuSc9dPAtI1PYuAAJdalXUWoTdinhfN/ei jqBry4nIri4uXvE4Lh3KWfC4zyfHjh1ByJmiudiIwYmXLDw6oupJyJ6vfprBk/yk hodFjOFp00wrffdSq2yfAivZhevNIZlTsXByKJK1pOtjL2giNOx6hnq3lW5QHY7P QB6JUCQkT5efXA8w0XY2lwQYec54Alj7vjHUr0aFyHQPNL+A2l3LtkdF69IHEupi SAdCnj5RzCUJ2o4z2MzaDl1Cwm/h35NhO0AEULHY37Knt6kShSwvZKjq1c8rsUPS mLxUVPnuO4bRN6vtsdabIQx1XmRugO/DjEO/zztbGtZpCel5CZTWhwf6XIEC12TX yg0/p6XMZOr8pXzRhODRpoJVVTuD+VdCkKpx6xNqszO7hBjrimNDDuz3VruggwOA cmINxzI4Rh+inQ/+g7bqR7MGK7ZHHyXuFZm3YEAjtDHMC02tmmPUll/Y7ValeORu x9AddFt1qF0hrovTp9/bxnDuKq8n9lrbGWWgAWIX3eEShgexLi5fti/KwmGwIXat ZFuv+/yG0ou51FP+BK2A1AHSUiPhrl54ovL07SPe7SBhabpIuKX2sA2VellJQ83j zza37ASpKaGpSwlt5yRd =nti/ -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW-- From owner-svn-src-all@freebsd.org Fri Sep 30 17:19: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 386D9C0385E; Fri, 30 Sep 2016 17:19:44 +0000 (UTC) (envelope-from loos@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 1659A303; Fri, 30 Sep 2016 17:19:44 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHJhn8047382; Fri, 30 Sep 2016 17:19:43 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHJhdv047381; Fri, 30 Sep 2016 17:19:43 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609301719.u8UHJhdv047381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Sep 2016 17:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306511 - head/sys/arm/ti/cpsw 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.23 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: Fri, 30 Sep 2016 17:19:44 -0000 Author: loos Date: Fri Sep 30 17:19:43 2016 New Revision: 306511 URL: https://svnweb.freebsd.org/changeset/base/306511 Log: Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls with CPSW_DEBUG(). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:16:02 2016 (r306510) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:19:43 2016 (r306511) @@ -255,8 +255,6 @@ static struct cpsw_stat { * Basic debug support. */ -#define IF_DEBUG(_sc) if ((_sc)->if_flags & IFF_DEBUG) - static void cpsw_debugf_head(const char *funcname) { @@ -278,20 +276,12 @@ cpsw_debugf(const char *fmt, ...) } #define CPSW_DEBUGF(_sc, a) do { \ - if (sc->debug) { \ + if ((_sc)->debug) { \ cpsw_debugf_head(__func__); \ cpsw_debugf a; \ } \ } while (0) -#define CPSWP_DEBUGF(_sc, a) do { \ - IF_DEBUG((_sc)) { \ - cpsw_debugf_head(__func__); \ - cpsw_debugf a; \ - } \ -} while (0) - - /* * Locking macros */ @@ -1052,7 +1042,7 @@ cpswp_detach(device_t dev) struct cpswp_softc *sc; sc = device_get_softc(dev); - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); if (device_is_attached(dev)) { ether_ifdetach(sc->ifp); CPSW_PORT_LOCK(sc); @@ -1098,7 +1088,7 @@ cpswp_init(void *arg) { struct cpswp_softc *sc = arg; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK(sc); cpswp_init_locked(arg); CPSW_PORT_UNLOCK(sc); @@ -1111,7 +1101,7 @@ cpswp_init_locked(void *arg) struct ifnet *ifp; uint32_t reg; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK_ASSERT(sc); ifp = sc->ifp; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) @@ -1240,7 +1230,7 @@ cpswp_stop_locked(struct cpswp_softc *sc uint32_t reg; ifp = sc->ifp; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK_ASSERT(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -1362,7 +1352,7 @@ cpswp_ioctl(struct ifnet *ifp, u_long co if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { changed = ifp->if_flags ^ sc->if_flags; - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: UP & RUNNING (changed=0x%x)", changed)); if (changed & IFF_PROMISC) @@ -1372,12 +1362,12 @@ cpswp_ioctl(struct ifnet *ifp, u_long co cpsw_set_allmulti(sc, ifp->if_flags & IFF_ALLMULTI); } else { - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: UP but not RUNNING; starting up")); cpswp_init_locked(sc); } } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: not UP but RUNNING; shutting down")); cpswp_stop_locked(sc); } @@ -1488,7 +1478,7 @@ cpswp_miibus_statchg(device_t dev) uint32_t mac_control, reg; sc = device_get_softc(dev); - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); reg = CPSW_SL_MACCONTROL(sc->unit); mac_control = cpsw_read_4(sc->swsc, reg); @@ -1766,7 +1756,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) "Can't defragment packet; dropping\n"); m_freem(slot->mbuf); } else { - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("Requeueing defragmented packet")); IF_PREPEND(&sc->ifp->if_snd, m0); } @@ -1786,7 +1776,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bus_dmamap_sync(sc->swsc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_PREWRITE); - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("Queueing TX packet: %d segments + %d pad bytes", nsegs, padlen)); @@ -2115,7 +2105,7 @@ cpswp_ifmedia_sts(struct ifnet *ifp, str struct mii_data *mii; sc = ifp->if_softc; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK(sc); mii = sc->mii; @@ -2132,7 +2122,7 @@ cpswp_ifmedia_upd(struct ifnet *ifp) struct cpswp_softc *sc; sc = ifp->if_softc; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK(sc); mii_mediachg(sc->mii); sc->media_status = sc->mii->mii_media.ifm_media; From owner-svn-src-all@freebsd.org Fri Sep 30 17:27: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 6BD73C03BA5; Fri, 30 Sep 2016 17:27:19 +0000 (UTC) (envelope-from mjg@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 31123B9F; Fri, 30 Sep 2016 17:27:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHRIWh051377; Fri, 30 Sep 2016 17:27:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHRIgD051373; Fri, 30 Sep 2016 17:27:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609301727.u8UHRIgD051373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Sep 2016 17:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306512 - in head/sys: kern sys 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.23 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: Fri, 30 Sep 2016 17:27:19 -0000 Author: mjg Date: Fri Sep 30 17:27:17 2016 New Revision: 306512 URL: https://svnweb.freebsd.org/changeset/base/306512 Log: vfs: batch free vnodes in per-mnt lists Previously free vnodes would always by directly returned to the global LRU list. With this change up to mnt_free_list_batch vnodes are collected first. syncer runs always return the batch regardless of its size. While vnodes on per-mnt lists are not counted as free, they can be returned in case of vnode shortage. Reviewed by: kib Tested by: pho Modified: head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/sys/mount.h head/sys/sys/vnode.h Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/kern/vfs_mount.c Fri Sep 30 17:27:17 2016 (r306512) @@ -109,6 +109,7 @@ mount_init(void *mem, int size, int flag mp = (struct mount *)mem; mtx_init(&mp->mnt_mtx, "struct mount mtx", NULL, MTX_DEF); + mtx_init(&mp->mnt_listmtx, "struct mount vlist mtx", NULL, MTX_DEF); lockinit(&mp->mnt_explock, PVFS, "explock", 0, 0); return (0); } @@ -120,6 +121,7 @@ mount_fini(void *mem, int size) mp = (struct mount *)mem; lockdestroy(&mp->mnt_explock); + mtx_destroy(&mp->mnt_listmtx); mtx_destroy(&mp->mnt_mtx); } @@ -461,6 +463,8 @@ vfs_mount_alloc(struct vnode *vp, struct mp->mnt_nvnodelistsize = 0; TAILQ_INIT(&mp->mnt_activevnodelist); mp->mnt_activevnodelistsize = 0; + TAILQ_INIT(&mp->mnt_tmpfreevnodelist); + mp->mnt_tmpfreevnodelistsize = 0; mp->mnt_ref = 0; (void) vfs_busy(mp, MBF_NOWAIT); atomic_add_acq_int(&vfsp->vfc_refcount, 1); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/kern/vfs_subr.c Fri Sep 30 17:27:17 2016 (r306512) @@ -112,6 +112,7 @@ static void vfs_knllock(void *arg); static void vfs_knlunlock(void *arg); static void vfs_knl_assert_locked(void *arg); static void vfs_knl_assert_unlocked(void *arg); +static void vnlru_return_batches(struct vfsops *mnt_op); static void destroy_vpollinfo(struct vpollinfo *vi); /* @@ -127,6 +128,10 @@ static u_long vnodes_created; SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, 0, "Number of vnodes created by getnewvnode"); +static u_long mnt_free_list_batch = 128; +SYSCTL_ULONG(_vfs, OID_AUTO, mnt_free_list_batch, CTLFLAG_RW, + &mnt_free_list_batch, 0, "Limit of vnodes held on mnt's free list"); + /* * Conversion tables for conversion from vnode types to inode formats * and back. @@ -953,7 +958,9 @@ vnlru_free_locked(int count, struct vfso { struct vnode *vp; struct mount *mp; + bool tried_batches; + tried_batches = false; mtx_assert(&vnode_free_list_mtx, MA_OWNED); if (count > max_vnlru_free) count = max_vnlru_free; @@ -963,8 +970,16 @@ vnlru_free_locked(int count, struct vfso * The list can be modified while the free_list_mtx * has been dropped and vp could be NULL here. */ - if (!vp) - break; + if (vp == NULL) { + if (tried_batches) + break; + mtx_unlock(&vnode_free_list_mtx); + vnlru_return_batches(mnt_op); + tried_batches = true; + mtx_lock(&vnode_free_list_mtx); + continue; + } + VNASSERT(vp->v_op != NULL, vp, ("vnlru_free: vnode already reclaimed.")); KASSERT((vp->v_iflag & VI_FREE) != 0, @@ -1041,6 +1056,63 @@ vspace(void) return (space); } +static void +vnlru_return_batch_locked(struct mount *mp) +{ + struct vnode *vp; + + mtx_assert(&mp->mnt_listmtx, MA_OWNED); + + if (mp->mnt_tmpfreevnodelistsize == 0) + return; + + mtx_lock(&vnode_free_list_mtx); + TAILQ_FOREACH(vp, &mp->mnt_tmpfreevnodelist, v_actfreelist) { + VNASSERT((vp->v_mflag & VMP_TMPMNTFREELIST) != 0, vp, + ("vnode without VMP_TMPMNTFREELIST on mnt_tmpfreevnodelist")); + vp->v_mflag &= ~VMP_TMPMNTFREELIST; + } + TAILQ_CONCAT(&vnode_free_list, &mp->mnt_tmpfreevnodelist, v_actfreelist); + freevnodes += mp->mnt_tmpfreevnodelistsize; + mp->mnt_tmpfreevnodelistsize = 0; + mtx_unlock(&vnode_free_list_mtx); +} + +static void +vnlru_return_batch(struct mount *mp) +{ + + mtx_lock(&mp->mnt_listmtx); + vnlru_return_batch_locked(mp); + mtx_unlock(&mp->mnt_listmtx); +} + +static void +vnlru_return_batches(struct vfsops *mnt_op) +{ + struct mount *mp, *nmp; + bool need_unbusy; + + mtx_lock(&mountlist_mtx); + for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { + need_unbusy = false; + if (mnt_op != NULL && mp->mnt_op != mnt_op) + goto next; + if (mp->mnt_tmpfreevnodelistsize == 0) + goto next; + if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK) == 0) { + vnlru_return_batch(mp); + need_unbusy = true; + mtx_lock(&mountlist_mtx); + } +next: + nmp = TAILQ_NEXT(mp, mnt_list); + if (need_unbusy) + vfs_unbusy(mp); + } + mtx_unlock(&mountlist_mtx); +} + /* * Attempt to recycle vnodes in a context that is always safe to block. * Calling vlrurecycle() from the bowels of filesystem code has some @@ -1068,9 +1140,8 @@ vnlru_proc(void) * adjusted using its sysctl, or emergency growth), first * try to reduce it by discarding from the free list. */ - if (numvnodes > desiredvnodes && freevnodes > 0) - vnlru_free_locked(ulmin(numvnodes - desiredvnodes, - freevnodes), NULL); + if (numvnodes > desiredvnodes) + vnlru_free_locked(numvnodes - desiredvnodes, NULL); /* * Sleep if the vnode cache is in a good state. This is * when it is not over-full and has space for about a 4% @@ -1457,10 +1528,10 @@ delmntque(struct vnode *vp) active = vp->v_iflag & VI_ACTIVE; vp->v_iflag &= ~VI_ACTIVE; if (active) { - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); TAILQ_REMOVE(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize--; - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); } vp->v_mount = NULL; VI_UNLOCK(vp); @@ -1525,10 +1596,10 @@ insmntque1(struct vnode *vp, struct moun KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Activating already active vnode")); vp->v_iflag |= VI_ACTIVE; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize++; - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); VI_UNLOCK(vp); MNT_IUNLOCK(mp); return (0); @@ -2753,17 +2824,25 @@ _vhold(struct vnode *vp, bool locked) * Remove a vnode from the free list, mark it as in use, * and put it on the active list. */ - mtx_lock(&vnode_free_list_mtx); - TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); - freevnodes--; - vp->v_iflag &= ~VI_FREE; + mp = vp->v_mount; + mtx_lock(&mp->mnt_listmtx); + if ((vp->v_mflag & VMP_TMPMNTFREELIST) != 0) { + TAILQ_REMOVE(&mp->mnt_tmpfreevnodelist, vp, v_actfreelist); + mp->mnt_tmpfreevnodelistsize--; + vp->v_mflag &= ~VMP_TMPMNTFREELIST; + } else { + mtx_lock(&vnode_free_list_mtx); + TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); + freevnodes--; + mtx_unlock(&vnode_free_list_mtx); + } KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Activating already active vnode")); + vp->v_iflag &= ~VI_FREE; vp->v_iflag |= VI_ACTIVE; - mp = vp->v_mount; TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize++; - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); refcount_acquire(&vp->v_holdcnt); if (!locked) VI_UNLOCK(vp); @@ -2819,21 +2898,25 @@ _vdrop(struct vnode *vp, bool locked) if ((vp->v_iflag & VI_OWEINACT) == 0) { vp->v_iflag &= ~VI_ACTIVE; mp = vp->v_mount; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); if (active) { TAILQ_REMOVE(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize--; } - TAILQ_INSERT_TAIL(&vnode_free_list, vp, + TAILQ_INSERT_TAIL(&mp->mnt_tmpfreevnodelist, vp, v_actfreelist); - freevnodes++; + mp->mnt_tmpfreevnodelistsize++; vp->v_iflag |= VI_FREE; - mtx_unlock(&vnode_free_list_mtx); + vp->v_mflag |= VMP_TMPMNTFREELIST; + VI_UNLOCK(vp); + if (mp->mnt_tmpfreevnodelistsize >= mnt_free_list_batch) + vnlru_return_batch_locked(mp); + mtx_unlock(&mp->mnt_listmtx); } else { + VI_UNLOCK(vp); atomic_add_long(&free_owe_inact, 1); } - VI_UNLOCK(vp); return; } /* @@ -3926,6 +4009,9 @@ vfs_msync(struct mount *mp, int flags) struct vm_object *obj; CTR2(KTR_VFS, "%s: mp %p", __func__, mp); + + vnlru_return_batch(mp); + MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) { obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0 && @@ -5236,7 +5322,7 @@ mnt_vnode_next_active(struct vnode **mvp { struct vnode *vp, *nvp; - mtx_assert(&vnode_free_list_mtx, MA_OWNED); + mtx_assert(&mp->mnt_listmtx, MA_OWNED); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); restart: vp = TAILQ_NEXT(*mvp, v_actfreelist); @@ -5249,9 +5335,9 @@ restart: if (!VI_TRYLOCK(vp)) { if (mp_ncpus == 1 || should_yield()) { TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); pause("vnacti", 1); - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); goto restart; } continue; @@ -5268,12 +5354,12 @@ restart: /* Check if we are done */ if (vp == NULL) { - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); return (NULL); } TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); ASSERT_VI_LOCKED(vp, "active iter"); KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp)); return (vp); @@ -5285,7 +5371,7 @@ __mnt_vnode_next_active(struct vnode **m if (should_yield()) kern_yield(PRI_USER); - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); return (mnt_vnode_next_active(mvp, mp)); } @@ -5301,10 +5387,10 @@ __mnt_vnode_first_active(struct vnode ** (*mvp)->v_type = VMARKER; (*mvp)->v_mount = mp; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); vp = TAILQ_FIRST(&mp->mnt_activevnodelist); if (vp == NULL) { - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); return (NULL); } @@ -5319,8 +5405,8 @@ __mnt_vnode_markerfree_active(struct vno if (*mvp == NULL) return; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); } Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/sys/mount.h Fri Sep 30 17:27:17 2016 (r306512) @@ -147,6 +147,7 @@ struct vfsopt { * put on a doubly linked list. * * Lock reference: + * l - mnt_listmtx * m - mountlist_mtx * i - interlock * v - vnode freelist mutex @@ -166,8 +167,6 @@ struct mount { int mnt_ref; /* (i) Reference count */ struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */ int mnt_nvnodelistsize; /* (i) # of vnodes */ - struct vnodelst mnt_activevnodelist; /* (v) list of active vnodes */ - int mnt_activevnodelistsize;/* (v) # of active vnodes */ int mnt_writeopcount; /* (i) write syscalls pending */ int mnt_kern_flag; /* (i) kernel only flags */ uint64_t mnt_flag; /* (i) flags shared with user */ @@ -188,6 +187,11 @@ struct mount { struct thread *mnt_susp_owner; /* (i) thread owning suspension */ #define mnt_endzero mnt_gjprovider char *mnt_gjprovider; /* gjournal provider name */ + struct mtx mnt_listmtx; + struct vnodelst mnt_activevnodelist; /* (l) list of active vnodes */ + int mnt_activevnodelistsize;/* (l) # of active vnodes */ + struct vnodelst mnt_tmpfreevnodelist; /* (l) list of free vnodes */ + int mnt_tmpfreevnodelistsize;/* (l) # of free vnodes */ struct lock mnt_explock; /* vfs_export walkers lock */ TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */ TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/sys/vnode.h Fri Sep 30 17:27:17 2016 (r306512) @@ -75,8 +75,8 @@ struct vpollinfo { * * Lock reference: * c - namecache mutex - * f - freelist mutex * i - interlock + * l - mp mnt_listmtx or freelist mutex * I - updated with atomics, 0->1 and 1->0 transitions with interlock held * m - mount point interlock * p - pollinfo lock @@ -144,7 +144,7 @@ struct vnode { /* * The machinery of being a vnode */ - TAILQ_ENTRY(vnode) v_actfreelist; /* f vnode active/free lists */ + TAILQ_ENTRY(vnode) v_actfreelist; /* l vnode active/free lists */ struct bufobj v_bufobj; /* * Buffer cache object */ /* @@ -167,6 +167,7 @@ struct vnode { u_int v_usecount; /* I ref count of users */ u_int v_iflag; /* i vnode flags (see below) */ u_int v_vflag; /* v vnode flags */ + u_int v_mflag; /* l mnt-specific vnode flags */ int v_writecount; /* v ref count of writers */ u_int v_hash; enum vtype v_type; /* u vnode type */ @@ -256,6 +257,8 @@ struct xvnode { #define VV_MD 0x0800 /* vnode backs the md device */ #define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ +#define VMP_TMPMNTFREELIST 0x0001 /* Vnode is on mnt's tmp free list */ + /* * Vnode attributes. A field value of VNOVAL represents a field whose value * is unavailable (getattr) or which is not to be changed (setattr). From owner-svn-src-all@freebsd.org Fri Sep 30 17:28: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 918F6C03CB5; Fri, 30 Sep 2016 17:28:50 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::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 36B64D41; Fri, 30 Sep 2016 17:28:50 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id b4so59938445wmb.0; Fri, 30 Sep 2016 10:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Rbjn8T4Dl35ZL8CDfZ31Au5IvCuOyhZH/r0XUwTqiwA=; b=Zgflm3GsjDhCyVi5iF1Z/nTsnmwEV2AnVpxKtvZhz8CNo25WA6EJRpJq5m2DnpeAbX CB9N4Dhh8CEFinxYYZLNXNOx2p/rOibrmKlg548GDdQD9LukIAYZYxQivQVEY+mgXNs9 dMPJb5+Tm779cRtmXkCZq9+gDVLqFaGxpJ8b7JNbrfacbPlmPU5AFJ1ythQgu4UASwy7 rYIPbUyxdgLfMSFhnEF5FZN7Du6r7f9W+yuOvkw7xKlNJnPBq9jKuq68WeZWlTCt727x 5AYUoWgvwO70+4tnk2farzFLoOWRdHUjEnrG7Prt0lRgOokuf2gzjIprRC0K7TYfiIzF L5DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Rbjn8T4Dl35ZL8CDfZ31Au5IvCuOyhZH/r0XUwTqiwA=; b=V3zXqOxCiABG9dJGSZF22fjDIdP9F/hrxoDdoZWy34aQnnzKjJK2r//3L8XVHqvUO+ Nc00q2q9eAZVKMrgBBCprfnb5TACE1NTBvy+G1NkTlxzEDeEWMog/DRnN9XNiZLr7Rj9 68lDe/o/afQ5FNCRQc8rswDXpXK7xcoCezHMga70jO3lA3T4wBTDe2HLgv0jjBmoykTe oZ+yPSPAYRc4GOYwDEZVN7mBouRxszh3gU7DKzk2tr5BUhtFXSWKOsi/bw6qr6PJz0q7 UmJLC8UpNOtljBhICTTQpiDz+98DV69Grf/2MmBJPnqet3Vk/8hHw35ZT62uQ6gR8FhN vUtQ== X-Gm-Message-State: AA6/9Rm0WCwsmIiLH+a6ZOoHHZgmvsFyTsy9wqkR/HZ7hTK390LSKyxFhUEq65Vd29eAVw== X-Received: by 10.28.222.213 with SMTP id v204mr5301094wmg.55.1475256528454; Fri, 30 Sep 2016 10:28:48 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id us3sm4114092wjb.32.2016.09.30.10.28.47 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 10:28:47 -0700 (PDT) Date: Fri, 30 Sep 2016 19:28:45 +0200 From: Mateusz Guzik To: Shawn Webb Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930172845.GC3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160930171845.GA62393@mutt-hardenedbsd> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:28:50 -0000 On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: > On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Sep 30 17:11:03 2016 > > New Revision: 306509 > > URL: https://svnweb.freebsd.org/changeset/base/306509 > > > > Log: > > vfs: remove the __bo_vnode field from struct vnode > > > > The pointer can be obtained using __containerof instead. > > > > Reviewed by: kib > > Should __FreeBSD_Version be bumped? > Unlikely. It can be in an odd case it turns out there is a module which is using the field. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Sep 30 17:30: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 ED1B8C03D86; Fri, 30 Sep 2016 17:30:40 +0000 (UTC) (envelope-from loos@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 AC149FC1; Fri, 30 Sep 2016 17:30:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHUddD051709; Fri, 30 Sep 2016 17:30:39 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHUdRR051708; Fri, 30 Sep 2016 17:30:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609301730.u8UHUdRR051708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Sep 2016 17:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306513 - head/sys/arm/ti/cpsw 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.23 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: Fri, 30 Sep 2016 17:30:41 -0000 Author: loos Date: Fri Sep 30 17:30:39 2016 New Revision: 306513 URL: https://svnweb.freebsd.org/changeset/base/306513 Log: Remove the GLOBAL queue lock which just adds unnecessary complexity to code (when used together with the individual tx and rx locks). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:27:17 2016 (r306512) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:30:39 2016 (r306513) @@ -301,25 +301,6 @@ cpsw_debugf(const char *fmt, ...) #define CPSW_RX_UNLOCK(sc) mtx_unlock(&(sc)->rx.lock) #define CPSW_RX_LOCK_ASSERT(sc) mtx_assert(&(sc)->rx.lock, MA_OWNED) -#define CPSW_GLOBAL_LOCK(sc) do { \ - if ((mtx_owned(&(sc)->tx.lock) ? 1 : 0) != \ - (mtx_owned(&(sc)->rx.lock) ? 1 : 0)) { \ - panic("cpsw deadlock possibility detection!"); \ - } \ - mtx_lock(&(sc)->tx.lock); \ - mtx_lock(&(sc)->rx.lock); \ -} while (0) - -#define CPSW_GLOBAL_UNLOCK(sc) do { \ - CPSW_RX_UNLOCK(sc); \ - CPSW_TX_UNLOCK(sc); \ -} while (0) - -#define CPSW_GLOBAL_LOCK_ASSERT(sc) do { \ - CPSW_TX_LOCK_ASSERT(sc); \ - CPSW_RX_LOCK_ASSERT(sc); \ -} while (0) - #define CPSW_PORT_LOCK(_sc) do { \ mtx_assert(&(_sc)->lock, MA_NOTOWNED); \ mtx_lock(&(_sc)->lock); \ @@ -1179,7 +1160,7 @@ cpsw_rx_teardown_locked(struct cpsw_soft cpsw_write_4(sc, CPSW_CPDMA_RX_TEARDOWN, 0); for (;;) { received = cpsw_rx_dequeue(sc); - CPSW_GLOBAL_UNLOCK(sc); + CPSW_RX_UNLOCK(sc); while (received != NULL) { next = received->m_nextpkt; received->m_nextpkt = NULL; @@ -1188,7 +1169,7 @@ cpsw_rx_teardown_locked(struct cpsw_soft if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); received = next; } - CPSW_GLOBAL_LOCK(sc); + CPSW_RX_LOCK(sc); if (!sc->rx.running) { CPSW_DEBUGF(sc, ("finished RX teardown (%d retries)", i)); @@ -1245,10 +1226,12 @@ cpswp_stop_locked(struct cpswp_softc *sc /* Tear down the RX/TX queues. */ if (cpsw_ports_down(sc->swsc)) { - CPSW_GLOBAL_LOCK(sc->swsc); + CPSW_RX_LOCK(sc->swsc); cpsw_rx_teardown_locked(sc->swsc); + CPSW_RX_UNLOCK(sc->swsc); + CPSW_TX_LOCK(sc->swsc); cpsw_tx_teardown_locked(sc->swsc); - CPSW_GLOBAL_UNLOCK(sc->swsc); + CPSW_TX_UNLOCK(sc->swsc); } /* Stop MAC RX/TX modules. */ @@ -2155,7 +2138,7 @@ cpsw_tx_watchdog(void *msc) struct cpsw_softc *sc; sc = msc; - CPSW_GLOBAL_LOCK(sc); + CPSW_TX_LOCK(sc); if (sc->tx.active_queue_len == 0 || !sc->tx.running) { sc->watchdog.timer = 0; /* Nothing to do. */ } else if (sc->tx.queue_removes > sc->tx.queue_removes_at_last_tick) { @@ -2172,7 +2155,7 @@ cpsw_tx_watchdog(void *msc) } } sc->tx.queue_removes_at_last_tick = sc->tx.queue_removes; - CPSW_GLOBAL_UNLOCK(sc); + CPSW_TX_UNLOCK(sc); /* Schedule another timeout one second from now */ callout_reset(&sc->watchdog.callout, hz, cpsw_tx_watchdog, sc); From owner-svn-src-all@freebsd.org Fri Sep 30 17:35: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 216B5C03036; Fri, 30 Sep 2016 17:35:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::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 002641533; Fri, 30 Sep 2016 17:35:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B742910AF74; Fri, 30 Sep 2016 13:35:40 -0400 (EDT) From: John Baldwin To: Justin Hibbits Cc: Nathan Whitehorn , src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r306473 - head/sys/dev/fdt Date: Fri, 30 Sep 2016 10:16:15 -0700 Message-ID: <1997344.mDN9V1EHvR@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201609300248.u8U2meEe014568@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 30 Sep 2016 13:35:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:35:42 -0000 On Thursday, September 29, 2016 11:38:13 PM Justin Hibbits wrote: > If I remember correctly, newbus will throw an error if you try to create > two devices with the same number. Applying the logic of using the > cell-index property for all device nodes, if two sub buses from simplebus > have the same set of child nodes, with the same cell-index property values, > one set of children would error and not attach. Of course this change is > only for simplebus, so shouldn't have too big an impact. Yes, new-bus doesn't let you add devices with the same unit. We used to force the unit of PCI bridges/buses but removed all that to better cope with multi-domain systems. I think in general it's best to use wildcard units outside of something like hints. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Sep 30 17:35: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 A5CF6C03057; Fri, 30 Sep 2016 17:35:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::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 861AE1560; Fri, 30 Sep 2016 17:35:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id A27E310AF7D; Fri, 30 Sep 2016 13:35:43 -0400 (EDT) From: John Baldwin To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306474 - head/sys/dev/atkbdc Date: Thu, 29 Sep 2016 22:47:02 -0700 Message-ID: <2470669.D5ILR5p8RK@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609300303.u8U33gk3022487@repo.freebsd.org> References: <201609300303.u8U33gk3022487@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 30 Sep 2016 13:35:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:35:44 -0000 On Friday, September 30, 2016 03:03:42 AM Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Fri Sep 30 03:03:42 2016 > New Revision: 306474 > URL: https://svnweb.freebsd.org/changeset/base/306474 > > Log: > Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN > > - Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support, > and hw.psm.elantech_support with respective sysctls declared with > CTLFLAG_TUN. It simplifies checking them in userland, also makes them > easier to get discovered by user > - Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT > declaration by adding CTLFLAG_TUN to read/write sysctls that were > already declared for these tunables. > > Suggested by: jhb Thanks! -- John Baldwin From owner-svn-src-all@freebsd.org Fri Sep 30 17:36:28 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 E0AE8C0314B; Fri, 30 Sep 2016 17:36:28 +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 BD53B1870; Fri, 30 Sep 2016 17:36:28 +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=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JhFLH4Bmxw/bZIlbanvtvnK9qID8XmvHuokL6fwXhXw=; b=ixjEnibfmuVX1I2493IC2gT8fc 1rLk9s0bFaf/ksIrFzf8BvsS7DDngq8YWpy6fJBEfvU0EYI/j3Jjs9hPfmxG9AuCn5lasQNVxvo12 XmfK+ZbZ6gyqlyI2cbduXI9EOBMRwUkFmT+Ig/u1wjP7bW2vGXOHvfVEI+T+SIuNoDSU=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:60423 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq1jW-0004Xc-Kb; Fri, 30 Sep 2016 12:36:26 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 12:36:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 13:36:26 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930172845.GC3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> Message-ID: <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:36:29 -0000 On 2016-09-30 13:28, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> > Author: mjg >> > Date: Fri Sep 30 17:11:03 2016 >> > New Revision: 306509 >> > URL: https://svnweb.freebsd.org/changeset/base/306509 >> > >> > Log: >> > vfs: remove the __bo_vnode field from struct vnode >> > >> > The pointer can be obtained using __containerof instead. >> > >> > Reviewed by: kib >> >> Should __FreeBSD_Version be bumped? >> > > Unlikely. It can be in an odd case it turns out there is a module which > is using the field. Can someone do me a favor and make sure sysutils/lsof still compiles/works? I'm OOT at the moment, and have a test IPv6 patch on my 12 system. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-all@freebsd.org Fri Sep 30 17:49: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 215D3C03487; Fri, 30 Sep 2016 17:49:06 +0000 (UTC) (envelope-from imp@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 F19821F79; Fri, 30 Sep 2016 17:49:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHn5Kf059230; Fri, 30 Sep 2016 17:49:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHn5Ok059229; Fri, 30 Sep 2016 17:49:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609301749.u8UHn5Ok059229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 30 Sep 2016 17:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306514 - head/sys/cam 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.23 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: Fri, 30 Sep 2016 17:49:06 -0000 Author: imp Date: Fri Sep 30 17:49:04 2016 New Revision: 306514 URL: https://svnweb.freebsd.org/changeset/base/306514 Log: Compute two new metrics. Disk load, the average number of transactions we have queued up normaliazed to the queue size. Also compute buckets of latency to help compute, in userland, estimates of Median, P90, P95 and P99 values. Sponsored by: Netflix, Inc Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Fri Sep 30 17:30:39 2016 (r306513) +++ head/sys/cam/cam_iosched.c Fri Sep 30 17:49:04 2016 (r306514) @@ -42,12 +42,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -73,14 +75,31 @@ SYSCTL_INT(_kern_cam, OID_AUTO, do_dynam &do_dynamic_iosched, 1, "Enable Dynamic I/O scheduler optimizations."); +/* + * For an EMA, with an alpha of alpha, we know + * alpha = 2 / (N + 1) + * or + * N = 1 + (2 / alpha) + * where N is the number of samples that 86% of the current + * EMA is derived from. + * + * So we invent[*] alpha_bits: + * alpha_bits = -log_2(alpha) + * alpha = 2^-alpha_bits + * So + * N = 1 + 2^(alpha_bits + 1) + * + * The default 9 gives a 1025 lookback for 86% of the data. + * For a brief intro: https://en.wikipedia.org/wiki/Moving_average + * + * [*] Steal from the load average code and many other places. + */ static int alpha_bits = 9; TUNABLE_INT("kern.cam.iosched_alpha_bits", &alpha_bits); SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW, &alpha_bits, 1, "Bits in EMA's alpha."); - - struct iop_stats; struct cam_iosched_softc; @@ -208,11 +227,17 @@ struct iop_stats /* * Statistics on different bits of the process. */ - /* Exp Moving Average, alpha = 1 / (1 << alpha_bits) */ + /* Exp Moving Average, see alpha_bits for more details */ sbintime_t ema; sbintime_t emss; /* Exp Moving sum of the squares */ sbintime_t sd; /* Last computed sd */ + uint32_t state_flags; +#define IOP_RATE_LIMITED 1u + +#define LAT_BUCKETS 12 /* < 1ms < 2ms ... 512ms < 1024ms > 1024ms */ + uint64_t latencies[LAT_BUCKETS]; + struct cam_iosched_softc *softc; }; @@ -258,6 +283,7 @@ struct cam_iosched_softc int read_bias; /* Read bias setting */ int current_read_bias; /* Current read bias state */ int total_ticks; + int load; /* EMA of 'load average' of disk / 2^16 */ struct bio_queue_head write_queue; struct iop_stats read_stats, write_stats, trim_stats; @@ -509,6 +535,7 @@ cam_iosched_ticker(void *arg) { struct cam_iosched_softc *isc = arg; sbintime_t now, delta; + int pending; callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); @@ -525,6 +552,36 @@ cam_iosched_ticker(void *arg) cam_iosched_schedule(isc, isc->periph); + /* + * isc->load is an EMA of the pending I/Os at each tick. The number of + * pending I/Os is the sum of the I/Os queued to the hardware, and those + * in the software queue that could be queued to the hardware if there + * were slots. + * + * ios_stats.pending is a count of requests in the SIM right now for + * each of these types of I/O. So the total pending count is the sum of + * these I/Os and the sum of the queued I/Os still in the software queue + * for those operations that aren't being rate limited at the moment. + * + * The reason for the rate limiting bit is because those I/Os + * aren't part of the software queued load (since we could + * give them to hardware, but choose not to). + * + * Note: due to a bug in counting pending TRIM in the device, we + * don't include them in this count. We count each BIO_DELETE in + * the pending count, but the periph drivers collapse them down + * into one TRIM command. That one trim command gets the completion + * so the counts get off. + */ + pending = isc->read_stats.pending + isc->write_stats.pending /* + isc->trim_stats.pending */; + pending += !!(isc->read_stats.state_flags & IOP_RATE_LIMITED) * isc->read_stats.queued + + !!(isc->write_stats.state_flags & IOP_RATE_LIMITED) * isc->write_stats.queued /* + + !!(isc->trim_stats.state_flags & IOP_RATE_LIMITED) * isc->trim_stats.queued */ ; + pending <<= 16; + pending /= isc->periph->path->device->ccbq.total_openings; + + isc->load = (pending + (isc->load << 13) - isc->load) >> 13; /* see above: 13 -> 16139 / 200/s = ~81s ~1 minute */ + isc->total_ticks++; } @@ -610,7 +667,7 @@ cam_iosched_cl_maybe_steer(struct contro if (isc->write_stats.current > isc->write_stats.max) isc->write_stats.current = isc->write_stats.max; if (old != isc->write_stats.current && iosched_debug) - printf("Steering write from %d kBps to %d kBps due to latency of %jdms\n", + printf("Steering write from %d kBps to %d kBps due to latency of %jdus\n", old, isc->write_stats.current, (uintmax_t)((uint64_t)1000000 * (uint32_t)lat) >> 32); break; @@ -714,7 +771,7 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLE char buf[16]; struct iop_stats *ios; struct cam_iosched_softc *isc; - int value, i, error, cantick; + int value, i, error; const char *p; ios = arg1; @@ -742,21 +799,9 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLE cam_periph_unlock(isc->periph); return error; } - cantick = !!limsw[isc->read_stats.limiter].l_tick + - !!limsw[isc->write_stats.limiter].l_tick + - !!limsw[isc->trim_stats.limiter].l_tick + - 1; /* Control loop requires it */ - if (isc->flags & CAM_IOSCHED_FLAG_CALLOUT_ACTIVE) { - if (cantick == 0) { - callout_stop(&isc->ticker); - isc->flags &= ~CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; - } - } else { - if (cantick != 0) { - callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); - isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; - } - } + /* Note: disk load averate requires ticker to be always running */ + callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); + isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; cam_periph_unlock(isc->periph); return 0; @@ -821,6 +866,25 @@ cam_iosched_sbintime_sysctl(SYSCTL_HANDL return 0; } +static int +cam_iosched_sysctl_latencies(SYSCTL_HANDLER_ARGS) +{ + int i, error; + struct sbuf sb; + uint64_t *latencies; + + latencies = arg1; + sbuf_new_for_sysctl(&sb, NULL, LAT_BUCKETS * 16, req); + + for (i = 0; i < LAT_BUCKETS - 1; i++) + sbuf_printf(&sb, "%jd,", (intmax_t)latencies[i]); + sbuf_printf(&sb, "%jd", (intmax_t)latencies[LAT_BUCKETS - 1]); + error = sbuf_finish(&sb); + sbuf_delete(&sb); + + return (error); +} + static void cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stats *ios, char *name) { @@ -884,6 +948,11 @@ cam_iosched_iop_stats_sysctl_init(struct &ios->current, 0, "current resource"); + SYSCTL_ADD_PROC(ctx, n, + OID_AUTO, "latencies", CTLTYPE_STRING | CTLFLAG_RD, + &ios->latencies, 0, + cam_iosched_sysctl_latencies, "A", + "Array of power of 2 latency from 1ms to 1.024s"); } static void @@ -1051,6 +1120,11 @@ void cam_iosched_sysctl_init(struct cam_ OID_AUTO, "total_ticks", CTLFLAG_RD, &isc->total_ticks, 0, "Total number of ticks we've done"); + + SYSCTL_ADD_INT(ctx, n, + OID_AUTO, "load", CTLFLAG_RD, + &isc->load, 0, + "scaled load average / 100"); #endif } @@ -1100,6 +1174,7 @@ cam_iosched_get_write(struct cam_iosched if (iosched_debug) printf("Reads present and current_read_bias is %d queued writes %d queued reads %d\n", isc->current_read_bias, isc->write_stats.queued, isc->read_stats.queued); isc->current_read_bias--; + /* We're not limiting writes, per se, just doing reads first */ return NULL; } @@ -1109,6 +1184,7 @@ cam_iosched_get_write(struct cam_iosched if (cam_iosched_limiter_iop(&isc->write_stats, bp) != 0) { if (iosched_debug) printf("Can't write because limiter says no.\n"); + isc->write_stats.state_flags |= IOP_RATE_LIMITED; return NULL; } @@ -1125,6 +1201,7 @@ cam_iosched_get_write(struct cam_iosched } if (iosched_debug > 9) printf("HWQ : %p %#x\n", bp, bp->bio_cmd); + isc->write_stats.state_flags &= ~IOP_RATE_LIMITED; return bp; } #endif @@ -1224,14 +1301,17 @@ cam_iosched_next_bio(struct cam_iosched_ #ifdef CAM_IOSCHED_DYNAMIC /* - * For the netflix scheduler, bio_queue is only for reads, so enforce + * For the dynamic scheduler, bio_queue is only for reads, so enforce * the limits here. Enforce only for reads. */ if (do_dynamic_iosched) { if (bp->bio_cmd == BIO_READ && - cam_iosched_limiter_iop(&isc->read_stats, bp) != 0) + cam_iosched_limiter_iop(&isc->read_stats, bp) != 0) { + isc->read_stats.state_flags |= IOP_RATE_LIMITED; return NULL; + } } + isc->read_stats.state_flags &= ~IOP_RATE_LIMITED; #endif bioq_remove(&isc->bio_queue, bp); #ifdef CAM_IOSCHED_DYNAMIC @@ -1478,13 +1558,41 @@ mul(uint64_t a, uint64_t b) return ((ah * bh) << 32) + al * bh + ah * bl + ((al * bl) >> 32); } +static sbintime_t latencies[] = { + SBT_1MS << 0, + SBT_1MS << 1, + SBT_1MS << 2, + SBT_1MS << 3, + SBT_1MS << 4, + SBT_1MS << 5, + SBT_1MS << 6, + SBT_1MS << 7, + SBT_1MS << 8, + SBT_1MS << 9, + SBT_1MS << 10 +}; + static void cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) { sbintime_t y, yy; uint64_t var; + int i; + + /* + * Keep counts for latency. We do it by power of two buckets. + * This helps us spot outlier behavior obscured by averages. + */ + for (i = 0; i < LAT_BUCKETS - 1; i++) { + if (sim_latency < latencies[i]) { + iop->latencies[i]++; + break; + } + } + if (i == LAT_BUCKETS - 1) + iop->latencies[i]++; /* Put all > 1024ms values into the last bucket. */ - /* + /* * Classic expoentially decaying average with a tiny alpha * (2 ^ -alpha_bits). For more info see the NIST statistical * handbook. From owner-svn-src-all@freebsd.org Fri Sep 30 17:55:45 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 53F7DC0362A; Fri, 30 Sep 2016 17:55:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 E0AB466B; Fri, 30 Sep 2016 17:55:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id k125so39446135wma.1; Fri, 30 Sep 2016 10:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vWK13XDppviuhYv7qV+qfPpy3+J/FIe3D/LnlQRzSec=; b=RJdqm9c784AaVG2IzIg82xTSq6TUthT22NDxt08sun3B7JskZCit0MLI0cHnISAJ7W llc8XqWjU2nvHd6QgdQAbcodcAK0IZJ0MRpaHa7UWXC+zEbSDSgs3+YEwd5LiiWG2lQ6 vxF53VFEUZUPvRVJlwTbeIUEXTa+9/CKzwiIpOldjMuplmPjRKn6Cr62wdFxgaxlX3+4 qQVePj+dlehMRRkrtD0Ai8b0beI+5M/KoI4stTNCuu/PavXzmaH8r0k5Kyr31HT9flcm QwPpT5rDkU6OTyzh6JzBNMekOkhsfGXAvv7HxmVLksMqSY9eAOFcURqKxLI4ryN9+Yhw QvZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vWK13XDppviuhYv7qV+qfPpy3+J/FIe3D/LnlQRzSec=; b=makHkS/Slsd3Rj+tVfNasa2HSSjsPO6p7DE0t+UCLerh5nQ2jPL5TROOK05GSfal3l qhYiTsXEc2d+reNRtgYNmN8Xb2Xh+WTU5lNYA06CApZXyk424213G3ajtezjdnOZK7Rq w5IU3mQRVxC9l9wTavyBqD9lAW607qiuw+T3kqlgdQPdf4U0C/wNTDcdSX/OlxhjeLUN IpPQUMENGzI34s5DdpT9n5PidoUINN1J6Vh1bX7JdReyhsYlcCASUgRvUHGrcYlKkqQd yskkDdidt3WaF3gq5bkXrE5B+8047ot0WJYxbSXZ+4ThZF1Un+h7DmBoykABW5I5Uvhu 8SIw== X-Gm-Message-State: AA6/9Rn86zqtlPZISrqbu3BxwNldiX80Tg/y3Ir0eUSwMvH7BJsqyYCM4GAJv5yhS6JV9A== X-Received: by 10.194.84.134 with SMTP id z6mr7314716wjy.204.1475258143402; Fri, 30 Sep 2016 10:55:43 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id uw3sm20775042wjb.21.2016.09.30.10.55.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 10:55:42 -0700 (PDT) Date: Fri, 30 Sep 2016 19:55:40 +0200 From: Mateusz Guzik To: Larry Rosenman Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930175540.GD3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:55:45 -0000 On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: > On 2016-09-30 13:28, Mateusz Guzik wrote: > >On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: > >>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > >>> Author: mjg > >>> Date: Fri Sep 30 17:11:03 2016 > >>> New Revision: 306509 > >>> URL: https://svnweb.freebsd.org/changeset/base/306509 > >>> > >>> Log: > >>> vfs: remove the __bo_vnode field from struct vnode > >>> > >>> The pointer can be obtained using __containerof instead. > >>> > >>> Reviewed by: kib > >> > >>Should __FreeBSD_Version be bumped? > >> > > > >Unlikely. It can be in an odd case it turns out there is a module which > >is using the field. > > Can someone do me a favor and make sure sysutils/lsof still > compiles/works? > > I'm OOT at the moment, and have a test IPv6 patch on my 12 system. I just ran lsof and it worked fine at least for the basic case. Apparently it indeed still goes through kernel memory. Did anyone ask the author what kind of interfaces would they want to NOT have to do this? Also, it looks like it constains some kind of a loop to imitate closefrom. On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: close(3773297) ERR#9 'Bad file descriptor' close(3773298) ERR#9 'Bad file descriptor' close(3773299) ERR#9 'Bad file descriptor' close(3773300) ERR#9 'Bad file descriptor' close(3773301) ERR#9 'Bad file descriptor' close(3773302) ERR#9 'Bad file descriptor' close(3773303) ERR#9 'Bad file descriptor' [snip] At least for freebsd this can be patched with the use of closefrom() on all supported releases. Arguably this may be a side effect of limits set too high, perhaps linux sets them sigifnicanly lower and the problem is not that terrible. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Sep 30 17:58: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 25BE0C036EF; Fri, 30 Sep 2016 17:58:18 +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 017B696F; Fri, 30 Sep 2016 17:58:18 +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=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PgMeWG1Kk0CWm0piFOBe3sgQu/VnikItzdkYkOoxxHw=; b=YsNAcwcWkPQmo4cuFC9Ugb296E 3Dz9eJ8Ov6LXrzL4DtrZQMDAEXRJSrUNjcj6yq2Z44oJEztBixvZgDq/JdBeX2nERlmj2F0hw8ByL r2LVddT3E81mOG2LeMVXsonY6hgx1ttF4uVPXNGSOCJS0Tv3XgdxK+pAHv5/DZdSSXTI=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:36196 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq24e-0005Jc-Nj; Fri, 30 Sep 2016 12:58:16 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 12:58:16 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 13:58:16 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930175540.GD3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> Message-ID: <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 17:58:18 -0000 On 2016-09-30 13:55, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: >> On 2016-09-30 13:28, Mateusz Guzik wrote: >> >On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> >>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> >>> Author: mjg >> >>> Date: Fri Sep 30 17:11:03 2016 >> >>> New Revision: 306509 >> >>> URL: https://svnweb.freebsd.org/changeset/base/306509 >> >>> >> >>> Log: >> >>> vfs: remove the __bo_vnode field from struct vnode >> >>> >> >>> The pointer can be obtained using __containerof instead. >> >>> >> >>> Reviewed by: kib >> >> >> >>Should __FreeBSD_Version be bumped? >> >> >> > >> >Unlikely. It can be in an odd case it turns out there is a module which >> >is using the field. >> >> Can someone do me a favor and make sure sysutils/lsof still >> compiles/works? >> >> I'm OOT at the moment, and have a test IPv6 patch on my 12 system. > > I just ran lsof and it worked fine at least for the basic case. > > Apparently it indeed still goes through kernel memory. Did anyone ask > the author what kind of interfaces would they want to NOT have to do > this? > > Also, it looks like it constains some kind of a loop to imitate > closefrom. > > On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: > close(3773297) ERR#9 'Bad file > descriptor' > close(3773298) ERR#9 'Bad file > descriptor' > close(3773299) ERR#9 'Bad file > descriptor' > close(3773300) ERR#9 'Bad file > descriptor' > close(3773301) ERR#9 'Bad file > descriptor' > close(3773302) ERR#9 'Bad file > descriptor' > close(3773303) ERR#9 'Bad file > descriptor' > [snip] > > At least for freebsd this can be patched with the use of closefrom() on > all supported releases. > > Arguably this may be a side effect of limits set too high, perhaps > linux > sets them sigifnicanly lower and the problem is not that terrible. We've had this discussion before (re: interfaces). I thought the current versions of lsof only close the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-all@freebsd.org Fri Sep 30 18:01: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 42E05C037E6; Fri, 30 Sep 2016 18:01:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) 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 CD79EBE7; Fri, 30 Sep 2016 18:01:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id b80so57436868wme.0; Fri, 30 Sep 2016 11:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PIcS7/d/wdKMVuDtcmaBVCcd92UH9FVPj/h8PF/tukM=; b=QrWH7L0zsVbrQV8qsfTVZGi9loY6WSOO7SOjpo9n+pENHT+mY+DA2p/BokbZv8Stnh 6SktwnZXUZ4N7fGnQ8DWQLC9j4Dp9MBSR/jIYzhRYENGGMCE2e9Fy9jEMQgBX9JTxgxf wQmLzqlqTA96wIbr4cS+nrknhV72b2pvFHyRL1UO9O8+t1Wr9wCizBKMxP30AcsPeKuE HsBKLP5zOQbHRXVzAsciEwIFoI3h/k2S5bMsSBVrZCl8bG9zd65zsFk2DhtWbHDr1nqs XhJ6scTV+mgCrhpXZuHJKvwfAZ5NXzPY/6SU5yyc9HrE4qcdFPFUXoz5Hkx0deHhDfMm MmQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PIcS7/d/wdKMVuDtcmaBVCcd92UH9FVPj/h8PF/tukM=; b=fR1/aYCagUC6wpC0sz4VNZTUgfzsraCvCtE9pGR7MbNHqQEQ+odNlmbkSg+W0DKAK4 tO5DuaOYD4qEuL9SiKxyOaNg5XSvczs7bpPHD+58H6B4KtZmPCYbpAC70R3GxK07eaz1 YC3KPJVlb+8UZylpKaVkmbovIhVpTPA11+XRsMgqH4yKyoQQEIZuOGoKfk0g/FSSpeti 22PVY8FKmvgV8AWwwgG3UkulB1SzOlJaDel6NrmCaw5FoAALhLhBkx/hpv0Zgk9Ea/D1 JqdAaE/+JIa/sKl1qLYgkEfZO7spYNzYLk43px/91Emf3jkivZBy60Y2ILuigFFh0/kX oleg== X-Gm-Message-State: AA6/9RktrZqldgzIrSKysrwyMnlFj/P5rNGecQLTLdjaUug7FGOekR8y5Dk/gIIavqtR0g== X-Received: by 10.28.130.197 with SMTP id e188mr5482994wmd.131.1475258470344; Fri, 30 Sep 2016 11:01:10 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id k206sm5284144wmf.19.2016.09.30.11.01.09 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 11:01:09 -0700 (PDT) Date: Fri, 30 Sep 2016 20:01:07 +0200 From: Mateusz Guzik To: Larry Rosenman Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930180107.GE3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 18:01:12 -0000 On Fri, Sep 30, 2016 at 01:58:16PM -0400, Larry Rosenman wrote: > On 2016-09-30 13:55, Mateusz Guzik wrote: > >On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: > >>On 2016-09-30 13:28, Mateusz Guzik wrote: > >>>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: > >>>>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > >>>>> Author: mjg > >>>>> Date: Fri Sep 30 17:11:03 2016 > >>>>> New Revision: 306509 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/306509 > >>>>> > >>>>> Log: > >>>>> vfs: remove the __bo_vnode field from struct vnode > >>>>> > >>>>> The pointer can be obtained using __containerof instead. > >>>>> > >>>>> Reviewed by: kib > >>>> > >>>>Should __FreeBSD_Version be bumped? > >>>> > >>> > >>>Unlikely. It can be in an odd case it turns out there is a module which > >>>is using the field. > >> > >>Can someone do me a favor and make sure sysutils/lsof still > >>compiles/works? > >> > >>I'm OOT at the moment, and have a test IPv6 patch on my 12 system. > > > >I just ran lsof and it worked fine at least for the basic case. > > > >Apparently it indeed still goes through kernel memory. Did anyone ask > >the author what kind of interfaces would they want to NOT have to do > >this? > > > >Also, it looks like it constains some kind of a loop to imitate > >closefrom. > > > >On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: > >close(3773297) ERR#9 'Bad file > >descriptor' > >close(3773298) ERR#9 'Bad file > >descriptor' > >close(3773299) ERR#9 'Bad file > >descriptor' > >close(3773300) ERR#9 'Bad file > >descriptor' > >close(3773301) ERR#9 'Bad file > >descriptor' > >close(3773302) ERR#9 'Bad file > >descriptor' > >close(3773303) ERR#9 'Bad file > >descriptor' > >[snip] > > > >At least for freebsd this can be patched with the use of closefrom() on > >all supported releases. > > > >Arguably this may be a side effect of limits set too high, perhaps > >linux > >sets them sigifnicanly lower and the problem is not that terrible. > > We've had this discussion before (re: interfaces). I thought the > current versions of lsof only close > the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) > This is 4.90.g,8 "formally" built for 11.0. The typical limit for fd is 1024 on linux, while it is higher on fbsd. I presume it goes up to the limit. (as in, ulimit -n) So what's up with the discussion on interfaces? The current state seems detrimental to everyone. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Sep 30 18:04: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 659A0C0397F; Fri, 30 Sep 2016 18:04:15 +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 40014F5E; Fri, 30 Sep 2016 18:04:15 +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=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=khKMaytrwwqTVOYEgaVp/iRV2H4Gql5TqXv+x3o14X4=; b=jU397EzzwpGNGlD9EZcJAhkBEw DvUDNz5eu6FFMofuI3x+rew4Je6syZVcPJTH9uPjzbvWuR/dHTqvD4uEVEjUhDuP9B8umi5NUUtDa EriEkP0bokDSNxfyhkiUWMocqLgm/Yv/T45tdKqqBDLSJregUK3pJOyKwMrTZU92ACm8=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:36381 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq2AP-0005W3-RT; Fri, 30 Sep 2016 13:04:13 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 13:04:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 14:04:13 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930180107.GE3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> <20160930180107.GE3714@dft-labs.eu> Message-ID: <0ced80c92e1f6a24a4fc033254db3461@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 18:04:15 -0000 On 2016-09-30 14:01, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:58:16PM -0400, Larry Rosenman wrote: >> On 2016-09-30 13:55, Mateusz Guzik wrote: >> >On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: >> >>On 2016-09-30 13:28, Mateusz Guzik wrote: >> >>>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> >>>>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> >>>>> Author: mjg >> >>>>> Date: Fri Sep 30 17:11:03 2016 >> >>>>> New Revision: 306509 >> >>>>> URL: https://svnweb.freebsd.org/changeset/base/306509 >> >>>>> >> >>>>> Log: >> >>>>> vfs: remove the __bo_vnode field from struct vnode >> >>>>> >> >>>>> The pointer can be obtained using __containerof instead. >> >>>>> >> >>>>> Reviewed by: kib >> >>>> >> >>>>Should __FreeBSD_Version be bumped? >> >>>> >> >>> >> >>>Unlikely. It can be in an odd case it turns out there is a module which >> >>>is using the field. >> >> >> >>Can someone do me a favor and make sure sysutils/lsof still >> >>compiles/works? >> >> >> >>I'm OOT at the moment, and have a test IPv6 patch on my 12 system. >> > >> >I just ran lsof and it worked fine at least for the basic case. >> > >> >Apparently it indeed still goes through kernel memory. Did anyone ask >> >the author what kind of interfaces would they want to NOT have to do >> >this? >> > >> >Also, it looks like it constains some kind of a loop to imitate >> >closefrom. >> > >> >On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: >> >close(3773297) ERR#9 'Bad file >> >descriptor' >> >close(3773298) ERR#9 'Bad file >> >descriptor' >> >close(3773299) ERR#9 'Bad file >> >descriptor' >> >close(3773300) ERR#9 'Bad file >> >descriptor' >> >close(3773301) ERR#9 'Bad file >> >descriptor' >> >close(3773302) ERR#9 'Bad file >> >descriptor' >> >close(3773303) ERR#9 'Bad file >> >descriptor' >> >[snip] >> > >> >At least for freebsd this can be patched with the use of closefrom() on >> >all supported releases. >> > >> >Arguably this may be a side effect of limits set too high, perhaps >> >linux >> >sets them sigifnicanly lower and the problem is not that terrible. >> >> We've had this discussion before (re: interfaces). I thought the >> current versions of lsof only close >> the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) >> > > This is 4.90.g,8 "formally" built for 11.0. The typical limit for fd is > 1024 on linux, while it is higher on fbsd. I presume it goes up to the > limit. (as in, ulimit -n) > > So what's up with the discussion on interfaces? > > The current state seems detrimental to everyone. Vic Abell (Author, Retired from Purdue, 70+ yrs old) has to maintain portability to other OS's, and every time we go through this discussion it drops off. You are welcome to try again, but I wouldn't bet on it. Vic Abell -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-all@freebsd.org Fri Sep 30 18:08: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 4D569C03A97; Fri, 30 Sep 2016 18:08:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4AE1346; Fri, 30 Sep 2016 18:08:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UI8HhE066971; Fri, 30 Sep 2016 18:08:17 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UI8H21066968; Fri, 30 Sep 2016 18:08:17 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201609301808.u8UI8H21066968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 30 Sep 2016 18:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306515 - head/sys/dev/bxe 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.23 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: Fri, 30 Sep 2016 18:08:18 -0000 Author: davidcs Date: Fri Sep 30 18:08:16 2016 New Revision: 306515 URL: https://svnweb.freebsd.org/changeset/base/306515 Log: Revert commit r306284 - Fixes for issues under high workloads Will fix and recommit patch Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h head/sys/dev/bxe/bxe_stats.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Fri Sep 30 17:49:04 2016 (r306514) +++ head/sys/dev/bxe/bxe.c Fri Sep 30 18:08:16 2016 (r306515) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.89" +#define BXE_DRIVER_VERSION "1.78.81" #include "bxe.h" #include "ecore_sp.h" @@ -489,16 +489,7 @@ static const struct { { STATS_OFFSET32(mbuf_alloc_tpa), 4, STATS_FLAGS_FUNC, "mbuf_alloc_tpa"}, { STATS_OFFSET32(tx_queue_full_return), - 4, STATS_FLAGS_FUNC, "tx_queue_full_return"}, - { STATS_OFFSET32(bxe_tx_mq_start_lock_failures), - 4, STATS_FLAGS_FUNC, "bxe_tx_mq_start_lock_failures"}, - { STATS_OFFSET32(tx_request_link_down_failures), - 4, STATS_FLAGS_FUNC, "tx_request_link_down_failures"}, - { STATS_OFFSET32(bd_avail_too_less_failures), - 4, STATS_FLAGS_FUNC, "bd_avail_too_less_failures"}, - { STATS_OFFSET32(tx_mq_not_empty), - 4, STATS_FLAGS_FUNC, "tx_mq_not_empty"} - + 4, STATS_FLAGS_FUNC, "tx_queue_full_return"} }; static const struct { @@ -611,15 +602,7 @@ static const struct { { Q_STATS_OFFSET32(mbuf_alloc_tpa), 4, "mbuf_alloc_tpa"}, { Q_STATS_OFFSET32(tx_queue_full_return), - 4, "tx_queue_full_return"}, - { Q_STATS_OFFSET32(bxe_tx_mq_start_lock_failures), - 4, "bxe_tx_mq_start_lock_failures"}, - { Q_STATS_OFFSET32(tx_request_link_down_failures), - 4, "tx_request_link_down_failures"}, - { Q_STATS_OFFSET32(bd_avail_too_less_failures), - 4, "bd_avail_too_less_failures"}, - { Q_STATS_OFFSET32(tx_mq_not_empty), - 4, "tx_mq_not_empty"} + 4, "tx_queue_full_return"} }; #define BXE_NUM_ETH_STATS ARRAY_SIZE(bxe_eth_stats_arr) @@ -5638,18 +5621,11 @@ bxe_tx_mq_start_locked(struct bxe_softc return (EINVAL); } - if (m != NULL) { - rc = drbr_enqueue(ifp, tx_br, m); - if (rc != 0) { - fp->eth_q_stats.tx_soft_errors++; - goto bxe_tx_mq_start_locked_exit; - } - } - if (!sc->link_vars.link_up || (if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) { - fp->eth_q_stats.tx_request_link_down_failures++; + if (m != NULL) + rc = drbr_enqueue(ifp, tx_br, m); goto bxe_tx_mq_start_locked_exit; } @@ -5659,22 +5635,24 @@ bxe_tx_mq_start_locked(struct bxe_softc fp->eth_q_stats.tx_max_drbr_queue_depth = depth; } - /* keep adding entries while there are frames to send */ - while ((next = drbr_peek(ifp, tx_br)) != NULL) { - /* handle any completions if we're running low */ - tx_bd_avail = bxe_tx_avail(sc, fp); - if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) { - /* bxe_txeof will set IFF_DRV_OACTIVE appropriately */ - bxe_txeof(sc, fp); - tx_bd_avail = bxe_tx_avail(sc, fp); - if (tx_bd_avail < (BXE_TSO_MAX_SEGMENTS + 1)) { - fp->eth_q_stats.bd_avail_too_less_failures++; - m_freem(next); - drbr_advance(ifp, tx_br); - rc = ENOBUFS; - break; - } + if (m == NULL) { + /* no new work, check for pending frames */ + next = drbr_dequeue_drv(ifp, tx_br); + } else if (drbr_needs_enqueue_drv(ifp, tx_br)) { + /* have both new and pending work, maintain packet order */ + rc = drbr_enqueue(ifp, tx_br, m); + if (rc != 0) { + fp->eth_q_stats.tx_soft_errors++; + goto bxe_tx_mq_start_locked_exit; } + next = drbr_dequeue_drv(ifp, tx_br); + } else { + /* new work only and nothing pending */ + next = m; + } + + /* keep adding entries while there are frames to send */ + while (next != NULL) { /* the mbuf now belongs to us */ fp->eth_q_stats.mbuf_alloc_tx++; @@ -5689,12 +5667,12 @@ bxe_tx_mq_start_locked(struct bxe_softc fp->eth_q_stats.tx_encap_failures++; if (next != NULL) { /* mark the TX queue as full and save the frame */ - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - drbr_putback(ifp, tx_br, next); + if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); + /* XXX this may reorder the frame */ + rc = drbr_enqueue(ifp, tx_br, next); fp->eth_q_stats.mbuf_alloc_tx--; fp->eth_q_stats.tx_frames_deferred++; - } else - drbr_advance(ifp, tx_br); + } /* stop looking for more work */ break; @@ -5704,9 +5682,20 @@ bxe_tx_mq_start_locked(struct bxe_softc tx_count++; /* send a copy of the frame to any BPF listeners */ - BPF_MTAP(ifp, next); + if_etherbpfmtap(ifp, next); + + tx_bd_avail = bxe_tx_avail(sc, fp); - drbr_advance(ifp, tx_br); + /* handle any completions if we're running low */ + if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) { + /* bxe_txeof will set IFF_DRV_OACTIVE appropriately */ + bxe_txeof(sc, fp); + if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE) { + break; + } + } + + next = drbr_dequeue_drv(ifp, tx_br); } /* all TX packets were dequeued and/or the tx ring is full */ @@ -5716,32 +5705,10 @@ bxe_tx_mq_start_locked(struct bxe_softc } bxe_tx_mq_start_locked_exit: - /* If we didn't drain the drbr, enqueue a task in the future to do it. */ - if (!drbr_empty(ifp, tx_br)) { - fp->eth_q_stats.tx_mq_not_empty++; - taskqueue_enqueue_timeout(fp->tq, &fp->tx_timeout_task, 1); - } return (rc); } -static void -bxe_tx_mq_start_deferred(void *arg, - int pending) -{ - struct bxe_fastpath *fp = (struct bxe_fastpath *)arg; - struct bxe_softc *sc = fp->sc; -#if __FreeBSD_version >= 800000 - if_t ifp = sc->ifp; -#else - struct ifnet *ifp = sc->ifnet; -#endif /* #if __FreeBSD_version >= 800000 */ - - BXE_FP_TX_LOCK(fp); - bxe_tx_mq_start_locked(sc, ifp, fp, NULL); - BXE_FP_TX_UNLOCK(fp); -} - /* Multiqueue (TSS) dispatch routine. */ static int bxe_tx_mq_start(struct ifnet *ifp, @@ -5763,10 +5730,8 @@ bxe_tx_mq_start(struct ifnet *ifp, if (BXE_FP_TX_TRYLOCK(fp)) { rc = bxe_tx_mq_start_locked(sc, ifp, fp, m); BXE_FP_TX_UNLOCK(fp); - } else { + } else rc = drbr_enqueue(ifp, fp->tx_br, m); - taskqueue_enqueue(fp->tq, &fp->tx_task); - } return (rc); } @@ -6988,8 +6953,6 @@ bxe_link_attn(struct bxe_softc *sc) uint32_t pause_enabled = 0; struct host_port_stats *pstats; int cmng_fns; - struct bxe_fastpath *fp; - int i; /* Make sure that we are synced with the current statistics */ bxe_stats_handle(sc, STATS_EVENT_STOP); @@ -7021,12 +6984,6 @@ bxe_link_attn(struct bxe_softc *sc) if (sc->state == BXE_STATE_OPEN) { bxe_stats_handle(sc, STATS_EVENT_LINK_UP); } - - /* Restart tx when the link comes back. */ - FOR_EACH_ETH_QUEUE(sc, i) { - fp = &sc->fp[i]; - taskqueue_enqueue(fp->tq, &fp->tx_task); - } } if (sc->link_vars.link_up && sc->link_vars.line_speed) { @@ -8636,6 +8593,11 @@ bxe_handle_fp_tq(void *context, * we need to add a "process/continue" flag here that the driver * can use to tell the task here not to do anything. */ +#if 0 + if (!(if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING)) { + return; + } +#endif /* update the fastpath index */ bxe_update_fp_sb_idx(fp); @@ -9073,10 +9035,6 @@ bxe_interrupt_detach(struct bxe_softc *s fp = &sc->fp[i]; if (fp->tq) { taskqueue_drain(fp->tq, &fp->tq_task); - taskqueue_drain(fp->tq, &fp->tx_task); - while (taskqueue_cancel_timeout(fp->tq, &fp->tx_timeout_task, - NULL)) - taskqueue_drain_timeout(fp->tq, &fp->tx_timeout_task); taskqueue_free(fp->tq); fp->tq = NULL; } @@ -9121,12 +9079,9 @@ bxe_interrupt_attach(struct bxe_softc *s snprintf(fp->tq_name, sizeof(fp->tq_name), "bxe%d_fp%d_tq", sc->unit, i); TASK_INIT(&fp->tq_task, 0, bxe_handle_fp_tq, fp); - TASK_INIT(&fp->tx_task, 0, bxe_tx_mq_start_deferred, fp); fp->tq = taskqueue_create_fast(fp->tq_name, M_NOWAIT, taskqueue_thread_enqueue, &fp->tq); - TIMEOUT_TASK_INIT(fp->tq, &fp->tx_timeout_task, 0, - bxe_tx_mq_start_deferred, fp); taskqueue_start_threads(&fp->tq, 1, PI_NET, /* higher priority */ "%s", fp->tq_name); } @@ -12159,12 +12114,9 @@ static void bxe_periodic_callout_func(void *xsc) { struct bxe_softc *sc = (struct bxe_softc *)xsc; - int i; - -#if __FreeBSD_version < 800000 struct bxe_fastpath *fp; uint16_t tx_bd_avail; -#endif + int i; if (!BXE_CORE_TRYLOCK(sc)) { /* just bail and try again next time */ @@ -12186,7 +12138,28 @@ bxe_periodic_callout_func(void *xsc) return; } -#if __FreeBSD_version < 800000 +#if __FreeBSD_version >= 800000 + + FOR_EACH_QUEUE(sc, i) { + fp = &sc->fp[i]; + + if (BXE_FP_TX_TRYLOCK(fp)) { + if_t ifp = sc->ifp; + /* + * If interface was stopped due to unavailable + * bds, try to process some tx completions + */ + (void) bxe_txeof(sc, fp); + + tx_bd_avail = bxe_tx_avail(sc, fp); + if (tx_bd_avail >= BXE_TX_CLEANUP_THRESHOLD) { + bxe_tx_mq_start_locked(sc, ifp, fp, NULL); + } + BXE_FP_TX_UNLOCK(fp); + } + } + +#else fp = &sc->fp[0]; if (BXE_FP_TX_TRYLOCK(fp)) { @@ -12204,7 +12177,7 @@ bxe_periodic_callout_func(void *xsc) BXE_FP_TX_UNLOCK(fp); } - + #endif /* #if __FreeBSD_version >= 800000 */ /* Check for TX timeouts on any fastpath. */ Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Fri Sep 30 17:49:04 2016 (r306514) +++ head/sys/dev/bxe/bxe.h Fri Sep 30 18:08:16 2016 (r306515) @@ -644,9 +644,6 @@ struct bxe_fastpath { struct taskqueue *tq; char tq_name[32]; - struct task tx_task; - struct timeout_task tx_timeout_task; - /* ethernet client ID (each fastpath set of RX/TX/CQE is a client) */ uint8_t cl_id; #define FP_CL_ID(fp) (fp->cl_id) @@ -2303,7 +2300,7 @@ void bxe_dump_mbuf_data(struct bxe_softc extern int bxe_grc_dump(struct bxe_softc *sc); #if __FreeBSD_version >= 800000 -#if (__FreeBSD_version >= 1001513 && __FreeBSD_version < 1100000) || __FreeBSD_version >= 1100048 +#if __FreeBSD_version >= 1000000 #define BXE_SET_FLOWID(m) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE) #define BXE_VALID_FLOWID(m) (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) #else Modified: head/sys/dev/bxe/bxe_stats.h ============================================================================== --- head/sys/dev/bxe/bxe_stats.h Fri Sep 30 17:49:04 2016 (r306514) +++ head/sys/dev/bxe/bxe_stats.h Fri Sep 30 18:08:16 2016 (r306515) @@ -266,12 +266,6 @@ struct bxe_eth_stats { /* num. of times tx queue full occurred */ uint32_t tx_queue_full_return; - - /* debug stats */ - uint32_t bxe_tx_mq_start_lock_failures; - uint32_t tx_request_link_down_failures; - uint32_t bd_avail_too_less_failures; - uint32_t tx_mq_not_empty; }; @@ -378,12 +372,6 @@ struct bxe_eth_q_stats { /* num. of times tx queue full occurred */ uint32_t tx_queue_full_return; - - /* debug stats */ - uint32_t bxe_tx_mq_start_lock_failures; - uint32_t tx_request_link_down_failures; - uint32_t bd_avail_too_less_failures; - uint32_t tx_mq_not_empty; }; struct bxe_eth_stats_old { From owner-svn-src-all@freebsd.org Fri Sep 30 18:12: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 54D82C03CF5; Fri, 30 Sep 2016 18:12:18 +0000 (UTC) (envelope-from cem@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 304381825; Fri, 30 Sep 2016 18:12:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UICHKU070684; Fri, 30 Sep 2016 18:12:17 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UICHqP070679; Fri, 30 Sep 2016 18:12:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609301812.u8UICHqP070679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 30 Sep 2016 18:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306516 - in head/sys: amd64/amd64 amd64/include x86/include x86/x86 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.23 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: Fri, 30 Sep 2016 18:12:18 -0000 Author: cem Date: Fri Sep 30 18:12:16 2016 New Revision: 306516 URL: https://svnweb.freebsd.org/changeset/base/306516 Log: Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags Reduce contention during TLB invalidation operations by using a per-CPU completion flag, rather than a single atomically-updated variable. On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements show that smp_tlb_shootdown is about 50% faster with this patch; observations with VTune show that the percentage of time spent in invlrng_single_page on an interrupt (actually doing invalidation, rather than synchronization) increases from 31% with the old mechanism to 71% with the new one. (Running a basic file server workload.) Submitted by: Anton Rang Reviewed by: cem (earlier version), kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8041 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:12:16 2016 (r306516) @@ -409,6 +409,7 @@ void invltlb_invpcid_handler(void) { struct invpcid_descr d; + uint64_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -417,17 +418,20 @@ invltlb_invpcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : INVPCID_CTX); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invltlb_pcid_handler(void) { + uint64_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -435,6 +439,7 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) { invltlb_glob(); } else { @@ -450,5 +455,5 @@ invltlb_pcid_handler(void) smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); } } - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/amd64/include/pcpu.h Fri Sep 30 18:12:16 2016 (r306516) @@ -65,7 +65,8 @@ u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ - char __pad[149] /* be divisor of PAGE_SIZE \ + uint64_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ + char __pad[141] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 Modified: head/sys/x86/include/x86_smp.h ============================================================================== --- head/sys/x86/include/x86_smp.h Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/x86/include/x86_smp.h Fri Sep 30 18:12:16 2016 (r306516) @@ -35,7 +35,7 @@ extern volatile int aps_ready; extern struct mtx ap_boot_mtx; extern int cpu_logical; extern int cpu_cores; -extern volatile int smp_tlb_wait; +extern volatile uint64_t smp_tlb_generation; extern struct pmap *smp_tlb_pmap; extern u_int xhits_gbl[]; extern u_int xhits_pg[]; Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/x86/x86/mp_x86.c Fri Sep 30 18:12:16 2016 (r306516) @@ -1304,12 +1304,15 @@ cpususpend_handler(void) void invlcache_handler(void) { + uint64_t generation; + #ifdef COUNT_IPIS (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; wbinvd(); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } /* @@ -1367,7 +1370,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ /* Variables needed for SMP tlb shootdown. */ static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; pmap_t smp_tlb_pmap; -volatile int smp_tlb_wait; +volatile uint64_t smp_tlb_generation; #ifdef __amd64__ #define read_eflags() read_rflags() @@ -1377,15 +1380,16 @@ static void smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2) { - int cpu, ncpu, othercpus; - - othercpus = mp_ncpus - 1; /* does not shootdown self */ + cpuset_t other_cpus; + volatile uint64_t *p_cpudone; + uint64_t generation; + int cpu; /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { - if (othercpus < 1) + if (mp_ncpus <= 1) return; } else { CPU_CLR(PCPU_GET(cpuid), &mask); @@ -1399,23 +1403,28 @@ smp_targeted_tlb_shootdown(cpuset_t mask smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; - smp_tlb_wait = 0; + generation = ++smp_tlb_generation; if (CPU_ISFULLSET(&mask)) { - ncpu = othercpus; ipi_all_but_self(vector); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); } else { - ncpu = 0; + other_cpus = mask; while ((cpu = CPU_FFS(&mask)) != 0) { cpu--; CPU_CLR(cpu, &mask); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, vector); ipi_send_cpu(cpu, vector); - ncpu++; } } - while (smp_tlb_wait < ncpu) - ia32_pause(); + while ((cpu = CPU_FFS(&other_cpus)) != 0) { + cpu--; + CPU_CLR(cpu, &other_cpus); + p_cpudone = &cpuid_to_pcpu[cpu]->pc_smp_tlb_done; + while (*p_cpudone != generation) + ia32_pause(); + } mtx_unlock_spin(&smp_ipi_mtx); } @@ -1473,6 +1482,8 @@ smp_cache_flush(void) void invltlb_handler(void) { + uint64_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1480,16 +1491,19 @@ invltlb_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) invltlb_glob(); else invltlb(); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invlpg_handler(void) { + uint64_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1497,14 +1511,16 @@ invlpg_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; invlpg(smp_tlb_addr1); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invlrng_handler(void) { - vm_offset_t addr; + vm_offset_t addr, addr2; + uint64_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -1514,10 +1530,12 @@ invlrng_handler(void) #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; + addr2 = smp_tlb_addr2; + generation = smp_tlb_generation; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < smp_tlb_addr2); + } while (addr < addr2); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } From owner-svn-src-all@freebsd.org Fri Sep 30 18:14: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 3923DC03D81; Fri, 30 Sep 2016 18:14:06 +0000 (UTC) (envelope-from hiren@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 08D8A19E7; Fri, 30 Sep 2016 18:14:05 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIE5t3070800; Fri, 30 Sep 2016 18:14:05 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIE5te070799; Fri, 30 Sep 2016 18:14:05 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609301814.u8UIE5te070799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Fri, 30 Sep 2016 18:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306517 - stable/11/sys/netinet X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 18:14:06 -0000 Author: hiren Date: Fri Sep 30 18:14:05 2016 New Revision: 306517 URL: https://svnweb.freebsd.org/changeset/base/306517 Log: MFC r304855 Update TCPS_HAVERCVDFIN() macro to correctly include all states a connection can be in after receiving a FIN. FWIW, NetBSD has this change for quite some time. This has been tested at Netflix and Limelight in production traffic. Modified: stable/11/sys/netinet/tcp_fsm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_fsm.h ============================================================================== --- stable/11/sys/netinet/tcp_fsm.h Fri Sep 30 18:12:16 2016 (r306516) +++ stable/11/sys/netinet/tcp_fsm.h Fri Sep 30 18:14:05 2016 (r306517) @@ -73,7 +73,8 @@ #define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED) #define TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED) -#define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT) +#define TCPS_HAVERCVDFIN(s) \ + ((s) == TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2)) #ifdef TCPOUTFLAGS /* From owner-svn-src-all@freebsd.org Fri Sep 30 18:36:24 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 E63D6C044B0; Fri, 30 Sep 2016 18:36:24 +0000 (UTC) (envelope-from sevan@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 B6ACB937; Fri, 30 Sep 2016 18:36:24 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIaNah078614; Fri, 30 Sep 2016 18:36:23 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIaNUi078613; Fri, 30 Sep 2016 18:36:23 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201609301836.u8UIaNUi078613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 30 Sep 2016 18:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306518 - head/share/misc 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.23 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: Fri, 30 Sep 2016 18:36:25 -0000 Author: sevan (doc committer) Date: Fri Sep 30 18:36:23 2016 New Revision: 306518 URL: https://svnweb.freebsd.org/changeset/base/306518 Log: Add myself to the list & note who is my mentor. Approved by: bcr (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Fri Sep 30 18:14:05 2016 (r306517) +++ head/share/misc/committers-doc.dot Fri Sep 30 18:36:23 2016 (r306518) @@ -85,6 +85,7 @@ pluknet [label="Sergey Kandaurov\nplukne remko [label="Remko Lodder\nremko@FreeBSD.org\n2004/10/16"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] +sevan [label="Sevan Janiyan\nsevan@FreeBSD.org\n2016/09/16"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2014/01/15"] taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] @@ -104,6 +105,7 @@ bcr -> crees bcr -> jgh bcr -> allanjude bcr -> bhd +bcr -> sevan blackend -> ale From owner-svn-src-all@freebsd.org Fri Sep 30 18:43: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 2E485C04614; Fri, 30 Sep 2016 18:43:40 +0000 (UTC) (envelope-from avos@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 09A6ED7B; Fri, 30 Sep 2016 18:43:39 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIhdFF082705; Fri, 30 Sep 2016 18:43:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIhdY1082704; Fri, 30 Sep 2016 18:43:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609301843.u8UIhdY1082704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 30 Sep 2016 18:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306519 - head/sys/net80211 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.23 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: Fri, 30 Sep 2016 18:43:40 -0000 Author: avos Date: Fri Sep 30 18:43:39 2016 New Revision: 306519 URL: https://svnweb.freebsd.org/changeset/base/306519 Log: net80211: do not cancel scan when packet is sent. Restore pre-r300383 behavior when a frame is sent: - stop scan; - send frame; - when beacon arrives and our bit in TIM is not set - restart the scan. NOTE: Ideally, this should introduce new interface (ieee80211_pause_anyscan()); however, since ieee80211_cancel_anyscan() is not used by drivers and only called by ieee80211_start_pkt() the current patch overrides it's behavior instead. Tested with Intel 3945BG, STA mode Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D7979 Modified: head/sys/net80211/ieee80211_scan_sw.c Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Fri Sep 30 18:36:23 2016 (r306518) +++ head/sys/net80211/ieee80211_scan_sw.c Fri Sep 30 18:43:39 2016 (r306519) @@ -57,9 +57,11 @@ struct scan_state { u_int ss_iflags; /* flags used internally */ #define ISCAN_MINDWELL 0x0001 /* min dwell time reached */ #define ISCAN_DISCARD 0x0002 /* discard rx'd frames */ -#define ISCAN_CANCEL 0x0004 /* cancel current scan */ -#define ISCAN_ABORT 0x0008 /* end the scan immediately */ -#define ISCAN_RUNNING 0x0010 /* scan was started */ +#define ISCAN_INTERRUPT 0x0004 /* interrupt current scan */ +#define ISCAN_CANCEL 0x0008 /* cancel current scan */ +#define ISCAN_PAUSE (ISCAN_INTERRUPT | ISCAN_CANCEL) +#define ISCAN_ABORT 0x0010 /* end the scan immediately */ +#define ISCAN_RUNNING 0x0020 /* scan was started */ unsigned long ss_chanmindwell; /* min dwell on curchan */ unsigned long ss_scanend; /* time scan must stop */ @@ -415,27 +417,31 @@ cancel_scan(struct ieee80211vap *vap, in { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_scan_state *ss = ic->ic_scan; + struct scan_state *ss_priv = SCAN_PRIVATE(ss); + int signal; IEEE80211_LOCK(ic); + signal = any ? ISCAN_PAUSE : ISCAN_CANCEL; if ((ic->ic_flags & IEEE80211_F_SCAN) && (any || ss->ss_vap == vap) && - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0) { + (ss_priv->ss_iflags & signal) == 0) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: cancel %s scan\n", func, + "%s: %s %s scan\n", func, + any ? "pause" : "cancel", ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive"); /* clear bg scan NOPICK */ ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; - /* mark cancel request and wake up the scan task */ - scan_signal_locked(ss, ISCAN_CANCEL); + /* mark request and wake up the scan task */ + scan_signal_locked(ss, signal); } else { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: called; F_SCAN=%d, vap=%s, CANCEL=%d\n", + "%s: called; F_SCAN=%d, vap=%s, signal=%d\n", func, !! (ic->ic_flags & IEEE80211_F_SCAN), (ss->ss_vap == vap ? "match" : "nomatch"), - !! (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL)); + !! (ss_priv->ss_iflags & signal)); } IEEE80211_UNLOCK(ic); } @@ -868,9 +874,11 @@ scan_done(struct ieee80211_scan_state *s if (ss->ss_next >= ss->ss_last) ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; - ieee80211_notify_scan_done(vap); + /* send 'scan done' event if not interrupted due to traffic. */ + if (!(ss_priv->ss_iflags & ISCAN_INTERRUPT)) + ieee80211_notify_scan_done(vap); } - ss_priv->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT); + ss_priv->ss_iflags &= ~(ISCAN_PAUSE | ISCAN_ABORT); ss_priv->ss_scanend = 0; ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); IEEE80211_UNLOCK(ic); From owner-svn-src-all@freebsd.org Fri Sep 30 18:47: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 1D296C046E8; Fri, 30 Sep 2016 18:47:36 +0000 (UTC) (envelope-from jhb@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 E2351A6; Fri, 30 Sep 2016 18:47:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIlZXj083010; Fri, 30 Sep 2016 18:47:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIlYpo083004; Fri, 30 Sep 2016 18:47:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609301847.u8UIlYpo083004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 18:47:34 +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: r306520 - in stable: 10/share/man/man9 10/sys/amd64/vmm/io 10/sys/dev/pci 11/share/man/man9 11/sys/amd64/vmm/io 11/sys/dev/pci 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.23 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: Fri, 30 Sep 2016 18:47:36 -0000 Author: jhb Date: Fri Sep 30 18:47:34 2016 New Revision: 306520 URL: https://svnweb.freebsd.org/changeset/base/306520 Log: MFC 305502: Reset PCI pass through devices via PCI-e FLR during VM start/end. Add routines to trigger a function level reset (FLR) of a PCI-express device via the PCI-express device control register. This also includes support routines to wait for pending transactions to complete as well as calculating the maximum completion timeout permitted by a device. Change the ppt(4) driver to reset pass through devices before attaching to a VM during startup and before detaching from a VM during shutdown. Sponsored by: Chelsio Communications Modified: stable/10/share/man/man9/Makefile stable/10/share/man/man9/pci.9 stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pcireg.h stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/pci.9 stable/11/sys/amd64/vmm/io/ppt.c stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pcireg.h stable/11/sys/dev/pci/pcivar.h Directory Properties: stable/11/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Fri Sep 30 18:43:39 2016 (r306519) +++ stable/10/share/man/man9/Makefile Fri Sep 30 18:47:34 2016 (r306520) @@ -1037,7 +1037,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_set_max_read_req.9 \ pci.9 pci_write_config.9 \ pci.9 pcie_adjust_config.9 \ + pci.9 pcie_flr.9 \ + pci.9 pcie_max_completion_timeout.9 \ pci.9 pcie_read_config.9 \ + pci.9 pcie_wait_for_pending_transactions.9 \ pci.9 pcie_write_config.9 MLINKS+=pfil.9 pfil_add_hook.9 \ pfil.9 pfil_hook_get.9 \ Modified: stable/10/share/man/man9/pci.9 ============================================================================== --- stable/10/share/man/man9/pci.9 Fri Sep 30 18:43:39 2016 (r306519) +++ stable/10/share/man/man9/pci.9 Fri Sep 30 18:47:34 2016 (r306520) @@ -62,7 +62,10 @@ .Nm pci_set_powerstate , .Nm pci_write_config , .Nm pcie_adjust_config , +.Nm pcie_flr , +.Nm pcie_get_max_completion_timeout , .Nm pcie_read_config , +.Nm pcie_wait_for_pending_transactions , .Nm pcie_write_config .Nd PCI bus interface .Sh SYNOPSIS @@ -139,8 +142,14 @@ .Fa "uint32_t val" .Fa "int width" .Fc +.Ft bool +.Fn pcie_flr "device_t dev" "u_int max_delay" "bool force" +.Ft int +.Fn pcie_get_max_completion_timeout "device_t dev" .Ft uint32_t .Fn pcie_read_config "device_t dev" "int reg" "int width" +.Ft bool +.Fn pcie_wait_for_pending_transactions "device_t dev" "u_int max_delay" .Ft void .Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width" .Sh DESCRIPTION @@ -393,6 +402,51 @@ keyword, then .Fn pci_get_vpd_readonly returns an error. +.Pp +The +.Fn pcie_get_max_completion_timeout +function returns the maximum completion timeout configured for the device +.Fa dev +in microseconds. +If the +.Fa dev +device is not a PCI-express device, +.Fn pcie_get_max_completion_timeout +returns zero. +When completion timeouts are disabled for +.Fa dev , +this function returns the maxmimum timeout that would be used if timeouts +were enabled. +.Pp +The +.Fn pcie_wait_for_pending_transactions +function waits for any pending transactions initiated by the +.Fa dev +device to complete. +The function checks for pending transactions by polling the transactions +pending flag in the PCI-express device status register. +It returns +.Dv true +once the transaction pending flag is clear. +If transactions are still pending after +.Fa max_delay +milliseconds, +.Fn pcie_wait_for_pending_transactions +returns +.Dv false . +If +.Fa max_delay +is set to zero, +.Fn pcie_wait_for_pending_transactions +performs a single check; +otherwise, +this function may sleep while polling the transactions pending flag. +.Nm pcie_wait_for_pending_transactions +returns +.Dv true +if +.Fa dev +is not a PCI-express device. .Ss Device Configuration The .Fn pci_enable_busmaster @@ -541,6 +595,51 @@ is invoked, then the device will be transitioned to .Dv PCI_POWERSTATE_D0 before any config registers are restored. +.Pp +The +.Fn pcie_flr +function requests a Function Level Reset +.Pq FLR +of +.Fa dev . +If +.Fa dev +is not a PCI-express device or does not support Function Level Resets via +the PCI-express device control register, +.Dv false +is returned. +Pending transactions are drained by disabling busmastering and calling +.Fn pcie_wait_for_pending_transactions +before resetting the device. +The +.Fa max_delay +argument specifies the maximum timeout to wait for pending transactions as +described for +.Fn pcie_wait_for_pending_transactions . +If +.Fn pcie_wait_for_pending_transactions +fails with a timeout and +.Fa force +is +.Dv false , +busmastering is re-enabled and +.Dv false +is returned. +If +.Fn pcie_wait_for_pending_transactions +fails with a timeout and +.Fa force +is +.Dv true , +the device is reset despite the timeout. +After the reset has been requested, +.Nm pcie_flr +sleeps for at least 100 milliseconds before returning +.Dv true . +Note that +.Nm pcie_flr +does not save and restore any state around the reset. +The caller should save and restore state as needed. .Ss Message Signaled Interrupts Message Signaled Interrupts .Pq MSI Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Fri Sep 30 18:43:39 2016 (r306519) +++ stable/10/sys/amd64/vmm/io/ppt.c Fri Sep 30 18:47:34 2016 (r306520) @@ -362,6 +362,11 @@ ppt_assign_device(struct vm *vm, int bus if (ppt->vm != NULL && ppt->vm != vm) return (EBUSY); + pci_save_state(ppt->dev); + pcie_flr(ppt->dev, + max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), + true); + pci_restore_state(ppt->dev); ppt->vm = vm; iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); @@ -382,6 +387,12 @@ ppt_unassign_device(struct vm *vm, int b */ if (ppt->vm != vm) return (EBUSY); + + pci_save_state(ppt->dev); + pcie_flr(ppt->dev, + max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), + true); + pci_restore_state(ppt->dev); ppt_unmap_mmio(vm, ppt); ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Fri Sep 30 18:43:39 2016 (r306519) +++ stable/10/sys/dev/pci/pci.c Fri Sep 30 18:47:34 2016 (r306520) @@ -5339,3 +5339,165 @@ pci_find_pcie_root_port(device_t dev) dev = pcib; } } + +/* + * Wait for pending transactions to complete on a PCI-express function. + * + * The maximum delay is specified in milliseconds in max_delay. Note + * that this function may sleep. + * + * Returns true if the function is idle and false if the timeout is + * exceeded. If dev is not a PCI-express function, this returns true. + */ +bool +pcie_wait_for_pending_transactions(device_t dev, u_int max_delay) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + uint16_t sta; + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (true); + + sta = pci_read_config(dev, cap + PCIER_DEVICE_STA, 2); + while (sta & PCIEM_STA_TRANSACTION_PND) { + if (max_delay == 0) + return (false); + + /* Poll once every 100 milliseconds up to the timeout. */ + if (max_delay > 100) { + pause_sbt("pcietp", 100 * SBT_1MS, 0, C_HARDCLOCK); + max_delay -= 100; + } else { + pause_sbt("pcietp", max_delay * SBT_1MS, 0, + C_HARDCLOCK); + max_delay = 0; + } + sta = pci_read_config(dev, cap + PCIER_DEVICE_STA, 2); + } + + return (true); +} + +/* + * Determine the maximum Completion Timeout in microseconds. + * + * For non-PCI-express functions this returns 0. + */ +int +pcie_get_max_completion_timeout(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (0); + + /* + * Functions using the 1.x spec use the default timeout range of + * 50 microseconds to 50 milliseconds. Functions that do not + * support programmable timeouts also use this range. + */ + if ((dinfo->cfg.pcie.pcie_flags & PCIEM_FLAGS_VERSION) < 2 || + (pci_read_config(dev, cap + PCIER_DEVICE_CAP2, 4) & + PCIEM_CAP2_COMP_TIMO_RANGES) == 0) + return (50 * 1000); + + switch (pci_read_config(dev, cap + PCIER_DEVICE_CTL2, 2) & + PCIEM_CTL2_COMP_TIMO_VAL) { + case PCIEM_CTL2_COMP_TIMO_100US: + return (100); + case PCIEM_CTL2_COMP_TIMO_10MS: + return (10 * 1000); + case PCIEM_CTL2_COMP_TIMO_55MS: + return (55 * 1000); + case PCIEM_CTL2_COMP_TIMO_210MS: + return (210 * 1000); + case PCIEM_CTL2_COMP_TIMO_900MS: + return (900 * 1000); + case PCIEM_CTL2_COMP_TIMO_3500MS: + return (3500 * 1000); + case PCIEM_CTL2_COMP_TIMO_13S: + return (13 * 1000 * 1000); + case PCIEM_CTL2_COMP_TIMO_64S: + return (64 * 1000 * 1000); + default: + return (50 * 1000); + } +} + +/* + * Perform a Function Level Reset (FLR) on a device. + * + * This function first waits for any pending transactions to complete + * within the timeout specified by max_delay. If transactions are + * still pending, the function will return false without attempting a + * reset. + * + * If dev is not a PCI-express function or does not support FLR, this + * function returns false. + * + * Note that no registers are saved or restored. The caller is + * responsible for saving and restoring any registers including + * PCI-standard registers via pci_save_state() and + * pci_restore_state(). + */ +bool +pcie_flr(device_t dev, u_int max_delay, bool force) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + uint16_t cmd, ctl; + int compl_delay; + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (false); + + if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR)) + return (false); + + /* + * Disable busmastering to prevent generation of new + * transactions while waiting for the device to go idle. If + * the idle timeout fails, the command register is restored + * which will re-enable busmastering. + */ + cmd = pci_read_config(dev, PCIR_COMMAND, 2); + pci_write_config(dev, PCIR_COMMAND, cmd & ~(PCIM_CMD_BUSMASTEREN), 2); + if (!pcie_wait_for_pending_transactions(dev, max_delay)) { + if (!force) { + pci_write_config(dev, PCIR_COMMAND, cmd, 2); + return (false); + } + pci_printf(&dinfo->cfg, + "Resetting with transactions pending after %d ms\n", + max_delay); + + /* + * Extend the post-FLR delay to cover the maximum + * Completion Timeout delay of anything in flight + * during the FLR delay. Enforce a minimum delay of + * at least 10ms. + */ + compl_delay = pcie_get_max_completion_timeout(dev) / 1000; + if (compl_delay < 10) + compl_delay = 10; + } else + compl_delay = 0; + + /* Initiate the reset. */ + ctl = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + pci_write_config(dev, cap + PCIER_DEVICE_CTL, ctl | + PCIEM_CTL_INITIATE_FLR, 2); + + /* Wait for 100ms. */ + pause_sbt("pcieflr", (100 + compl_delay) * SBT_1MS, 0, C_HARDCLOCK); + + if (pci_read_config(dev, cap + PCIER_DEVICE_STA, 2) & + PCIEM_STA_TRANSACTION_PND) + pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n"); + return (true); +} Modified: stable/10/sys/dev/pci/pcireg.h ============================================================================== --- stable/10/sys/dev/pci/pcireg.h Fri Sep 30 18:43:39 2016 (r306519) +++ stable/10/sys/dev/pci/pcireg.h Fri Sep 30 18:47:34 2016 (r306520) @@ -822,10 +822,25 @@ #define PCIEM_ROOT_STA_PME_STATUS 0x00010000 #define PCIEM_ROOT_STA_PME_PEND 0x00020000 #define PCIER_DEVICE_CAP2 0x24 -#define PCIEM_CAP2_ARI 0x20 +#define PCIEM_CAP2_COMP_TIMO_RANGES 0x0000000f +#define PCIEM_CAP2_COMP_TIMO_RANGE_A 0x00000001 +#define PCIEM_CAP2_COMP_TIMO_RANGE_B 0x00000002 +#define PCIEM_CAP2_COMP_TIMO_RANGE_C 0x00000004 +#define PCIEM_CAP2_COMP_TIMO_RANGE_D 0x00000008 +#define PCIEM_CAP2_COMP_TIMO_DISABLE 0x00000010 +#define PCIEM_CAP2_ARI 0x00000020 #define PCIER_DEVICE_CTL2 0x28 -#define PCIEM_CTL2_COMP_TIMEOUT_VAL 0x000f -#define PCIEM_CTL2_COMP_TIMEOUT_DIS 0x0010 +#define PCIEM_CTL2_COMP_TIMO_VAL 0x000f +#define PCIEM_CTL2_COMP_TIMO_50MS 0x0000 +#define PCIEM_CTL2_COMP_TIMO_100US 0x0001 +#define PCIEM_CTL2_COMP_TIMO_10MS 0x0002 +#define PCIEM_CTL2_COMP_TIMO_55MS 0x0005 +#define PCIEM_CTL2_COMP_TIMO_210MS 0x0006 +#define PCIEM_CTL2_COMP_TIMO_900MS 0x0009 +#define PCIEM_CTL2_COMP_TIMO_3500MS 0x000a +#define PCIEM_CTL2_COMP_TIMO_13S 0x000d +#define PCIEM_CTL2_COMP_TIMO_64S 0x000e +#define PCIEM_CTL2_COMP_TIMO_DISABLE 0x0010 #define PCIEM_CTL2_ARI 0x0020 #define PCIEM_CTL2_ATOMIC_REQ_ENABLE 0x0040 #define PCIEM_CTL2_ATOMIC_EGR_BLOCK 0x0080 Modified: stable/10/sys/dev/pci/pcivar.h ============================================================================== --- stable/10/sys/dev/pci/pcivar.h Fri Sep 30 18:43:39 2016 (r306519) +++ stable/10/sys/dev/pci/pcivar.h Fri Sep 30 18:47:34 2016 (r306520) @@ -543,7 +543,9 @@ uint32_t pcie_read_config(device_t dev, void pcie_write_config(device_t dev, int reg, uint32_t value, int width); uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask, uint32_t value, int width); - +bool pcie_flr(device_t dev, u_int max_delay, bool force); +int pcie_get_max_completion_timeout(device_t dev); +bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); #ifdef BUS_SPACE_MAXADDR #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) From owner-svn-src-all@freebsd.org Fri Sep 30 18:47: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 DC2EEC04705; Fri, 30 Sep 2016 18:47:36 +0000 (UTC) (envelope-from jhb@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 A3E10A8; Fri, 30 Sep 2016 18:47:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIlZ8N083021; Fri, 30 Sep 2016 18:47:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIlZJe083015; Fri, 30 Sep 2016 18:47:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609301847.u8UIlZJe083015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 18:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306520 - in stable: 10/share/man/man9 10/sys/amd64/vmm/io 10/sys/dev/pci 11/share/man/man9 11/sys/amd64/vmm/io 11/sys/dev/pci X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 18:47:37 -0000 Author: jhb Date: Fri Sep 30 18:47:34 2016 New Revision: 306520 URL: https://svnweb.freebsd.org/changeset/base/306520 Log: MFC 305502: Reset PCI pass through devices via PCI-e FLR during VM start/end. Add routines to trigger a function level reset (FLR) of a PCI-express device via the PCI-express device control register. This also includes support routines to wait for pending transactions to complete as well as calculating the maximum completion timeout permitted by a device. Change the ppt(4) driver to reset pass through devices before attaching to a VM during startup and before detaching from a VM during shutdown. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/pci.9 stable/11/sys/amd64/vmm/io/ppt.c stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pcireg.h stable/11/sys/dev/pci/pcivar.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man9/Makefile stable/10/share/man/man9/pci.9 stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pcireg.h stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Fri Sep 30 18:43:39 2016 (r306519) +++ stable/11/share/man/man9/Makefile Fri Sep 30 18:47:34 2016 (r306520) @@ -1319,7 +1319,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_set_max_read_req.9 \ pci.9 pci_write_config.9 \ pci.9 pcie_adjust_config.9 \ + pci.9 pcie_flr.9 \ + pci.9 pcie_max_completion_timeout.9 \ pci.9 pcie_read_config.9 \ + pci.9 pcie_wait_for_pending_transactions.9 \ pci.9 pcie_write_config.9 MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ pci_iov_schema.9 pci_iov_schema_add_bool.9 \ Modified: stable/11/share/man/man9/pci.9 ============================================================================== --- stable/11/share/man/man9/pci.9 Fri Sep 30 18:43:39 2016 (r306519) +++ stable/11/share/man/man9/pci.9 Fri Sep 30 18:47:34 2016 (r306520) @@ -66,7 +66,10 @@ .Nm pci_set_powerstate , .Nm pci_write_config , .Nm pcie_adjust_config , +.Nm pcie_flr , +.Nm pcie_get_max_completion_timeout , .Nm pcie_read_config , +.Nm pcie_wait_for_pending_transactions , .Nm pcie_write_config .Nd PCI bus interface .Sh SYNOPSIS @@ -145,8 +148,14 @@ .Fa "uint32_t val" .Fa "int width" .Fc +.Ft bool +.Fn pcie_flr "device_t dev" "u_int max_delay" "bool force" +.Ft int +.Fn pcie_get_max_completion_timeout "device_t dev" .Ft uint32_t .Fn pcie_read_config "device_t dev" "int reg" "int width" +.Ft bool +.Fn pcie_wait_for_pending_transactions "device_t dev" "u_int max_delay" .Ft void .Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width" .Ft void @@ -431,6 +440,51 @@ keyword, then .Fn pci_get_vpd_readonly returns an error. +.Pp +The +.Fn pcie_get_max_completion_timeout +function returns the maximum completion timeout configured for the device +.Fa dev +in microseconds. +If the +.Fa dev +device is not a PCI-express device, +.Fn pcie_get_max_completion_timeout +returns zero. +When completion timeouts are disabled for +.Fa dev , +this function returns the maxmimum timeout that would be used if timeouts +were enabled. +.Pp +The +.Fn pcie_wait_for_pending_transactions +function waits for any pending transactions initiated by the +.Fa dev +device to complete. +The function checks for pending transactions by polling the transactions +pending flag in the PCI-express device status register. +It returns +.Dv true +once the transaction pending flag is clear. +If transactions are still pending after +.Fa max_delay +milliseconds, +.Fn pcie_wait_for_pending_transactions +returns +.Dv false . +If +.Fa max_delay +is set to zero, +.Fn pcie_wait_for_pending_transactions +performs a single check; +otherwise, +this function may sleep while polling the transactions pending flag. +.Nm pcie_wait_for_pending_transactions +returns +.Dv true +if +.Fa dev +is not a PCI-express device. .Ss Device Configuration The .Fn pci_enable_busmaster @@ -662,6 +716,51 @@ is invoked, then the device will be transitioned to .Dv PCI_POWERSTATE_D0 before any config registers are restored. +.Pp +The +.Fn pcie_flr +function requests a Function Level Reset +.Pq FLR +of +.Fa dev . +If +.Fa dev +is not a PCI-express device or does not support Function Level Resets via +the PCI-express device control register, +.Dv false +is returned. +Pending transactions are drained by disabling busmastering and calling +.Fn pcie_wait_for_pending_transactions +before resetting the device. +The +.Fa max_delay +argument specifies the maximum timeout to wait for pending transactions as +described for +.Fn pcie_wait_for_pending_transactions . +If +.Fn pcie_wait_for_pending_transactions +fails with a timeout and +.Fa force +is +.Dv false , +busmastering is re-enabled and +.Dv false +is returned. +If +.Fn pcie_wait_for_pending_transactions +fails with a timeout and +.Fa force +is +.Dv true , +the device is reset despite the timeout. +After the reset has been requested, +.Nm pcie_flr +sleeps for at least 100 milliseconds before returning +.Dv true . +Note that +.Nm pcie_flr +does not save and restore any state around the reset. +The caller should save and restore state as needed. .Ss Message Signaled Interrupts Message Signaled Interrupts .Pq MSI Modified: stable/11/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/11/sys/amd64/vmm/io/ppt.c Fri Sep 30 18:43:39 2016 (r306519) +++ stable/11/sys/amd64/vmm/io/ppt.c Fri Sep 30 18:47:34 2016 (r306520) @@ -362,6 +362,11 @@ ppt_assign_device(struct vm *vm, int bus if (ppt->vm != NULL && ppt->vm != vm) return (EBUSY); + pci_save_state(ppt->dev); + pcie_flr(ppt->dev, + max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), + true); + pci_restore_state(ppt->dev); ppt->vm = vm; iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); @@ -382,6 +387,12 @@ ppt_unassign_device(struct vm *vm, int b */ if (ppt->vm != vm) return (EBUSY); + + pci_save_state(ppt->dev); + pcie_flr(ppt->dev, + max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), + true); + pci_restore_state(ppt->dev); ppt_unmap_mmio(vm, ppt); ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Fri Sep 30 18:43:39 2016 (r306519) +++ stable/11/sys/dev/pci/pci.c Fri Sep 30 18:47:34 2016 (r306520) @@ -5891,3 +5891,165 @@ pci_find_pcie_root_port(device_t dev) dev = pcib; } } + +/* + * Wait for pending transactions to complete on a PCI-express function. + * + * The maximum delay is specified in milliseconds in max_delay. Note + * that this function may sleep. + * + * Returns true if the function is idle and false if the timeout is + * exceeded. If dev is not a PCI-express function, this returns true. + */ +bool +pcie_wait_for_pending_transactions(device_t dev, u_int max_delay) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + uint16_t sta; + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (true); + + sta = pci_read_config(dev, cap + PCIER_DEVICE_STA, 2); + while (sta & PCIEM_STA_TRANSACTION_PND) { + if (max_delay == 0) + return (false); + + /* Poll once every 100 milliseconds up to the timeout. */ + if (max_delay > 100) { + pause_sbt("pcietp", 100 * SBT_1MS, 0, C_HARDCLOCK); + max_delay -= 100; + } else { + pause_sbt("pcietp", max_delay * SBT_1MS, 0, + C_HARDCLOCK); + max_delay = 0; + } + sta = pci_read_config(dev, cap + PCIER_DEVICE_STA, 2); + } + + return (true); +} + +/* + * Determine the maximum Completion Timeout in microseconds. + * + * For non-PCI-express functions this returns 0. + */ +int +pcie_get_max_completion_timeout(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (0); + + /* + * Functions using the 1.x spec use the default timeout range of + * 50 microseconds to 50 milliseconds. Functions that do not + * support programmable timeouts also use this range. + */ + if ((dinfo->cfg.pcie.pcie_flags & PCIEM_FLAGS_VERSION) < 2 || + (pci_read_config(dev, cap + PCIER_DEVICE_CAP2, 4) & + PCIEM_CAP2_COMP_TIMO_RANGES) == 0) + return (50 * 1000); + + switch (pci_read_config(dev, cap + PCIER_DEVICE_CTL2, 2) & + PCIEM_CTL2_COMP_TIMO_VAL) { + case PCIEM_CTL2_COMP_TIMO_100US: + return (100); + case PCIEM_CTL2_COMP_TIMO_10MS: + return (10 * 1000); + case PCIEM_CTL2_COMP_TIMO_55MS: + return (55 * 1000); + case PCIEM_CTL2_COMP_TIMO_210MS: + return (210 * 1000); + case PCIEM_CTL2_COMP_TIMO_900MS: + return (900 * 1000); + case PCIEM_CTL2_COMP_TIMO_3500MS: + return (3500 * 1000); + case PCIEM_CTL2_COMP_TIMO_13S: + return (13 * 1000 * 1000); + case PCIEM_CTL2_COMP_TIMO_64S: + return (64 * 1000 * 1000); + default: + return (50 * 1000); + } +} + +/* + * Perform a Function Level Reset (FLR) on a device. + * + * This function first waits for any pending transactions to complete + * within the timeout specified by max_delay. If transactions are + * still pending, the function will return false without attempting a + * reset. + * + * If dev is not a PCI-express function or does not support FLR, this + * function returns false. + * + * Note that no registers are saved or restored. The caller is + * responsible for saving and restoring any registers including + * PCI-standard registers via pci_save_state() and + * pci_restore_state(). + */ +bool +pcie_flr(device_t dev, u_int max_delay, bool force) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + uint16_t cmd, ctl; + int compl_delay; + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (false); + + if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR)) + return (false); + + /* + * Disable busmastering to prevent generation of new + * transactions while waiting for the device to go idle. If + * the idle timeout fails, the command register is restored + * which will re-enable busmastering. + */ + cmd = pci_read_config(dev, PCIR_COMMAND, 2); + pci_write_config(dev, PCIR_COMMAND, cmd & ~(PCIM_CMD_BUSMASTEREN), 2); + if (!pcie_wait_for_pending_transactions(dev, max_delay)) { + if (!force) { + pci_write_config(dev, PCIR_COMMAND, cmd, 2); + return (false); + } + pci_printf(&dinfo->cfg, + "Resetting with transactions pending after %d ms\n", + max_delay); + + /* + * Extend the post-FLR delay to cover the maximum + * Completion Timeout delay of anything in flight + * during the FLR delay. Enforce a minimum delay of + * at least 10ms. + */ + compl_delay = pcie_get_max_completion_timeout(dev) / 1000; + if (compl_delay < 10) + compl_delay = 10; + } else + compl_delay = 0; + + /* Initiate the reset. */ + ctl = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + pci_write_config(dev, cap + PCIER_DEVICE_CTL, ctl | + PCIEM_CTL_INITIATE_FLR, 2); + + /* Wait for 100ms. */ + pause_sbt("pcieflr", (100 + compl_delay) * SBT_1MS, 0, C_HARDCLOCK); + + if (pci_read_config(dev, cap + PCIER_DEVICE_STA, 2) & + PCIEM_STA_TRANSACTION_PND) + pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n"); + return (true); +} Modified: stable/11/sys/dev/pci/pcireg.h ============================================================================== --- stable/11/sys/dev/pci/pcireg.h Fri Sep 30 18:43:39 2016 (r306519) +++ stable/11/sys/dev/pci/pcireg.h Fri Sep 30 18:47:34 2016 (r306520) @@ -885,10 +885,25 @@ #define PCIEM_ROOT_STA_PME_STATUS 0x00010000 #define PCIEM_ROOT_STA_PME_PEND 0x00020000 #define PCIER_DEVICE_CAP2 0x24 -#define PCIEM_CAP2_ARI 0x20 +#define PCIEM_CAP2_COMP_TIMO_RANGES 0x0000000f +#define PCIEM_CAP2_COMP_TIMO_RANGE_A 0x00000001 +#define PCIEM_CAP2_COMP_TIMO_RANGE_B 0x00000002 +#define PCIEM_CAP2_COMP_TIMO_RANGE_C 0x00000004 +#define PCIEM_CAP2_COMP_TIMO_RANGE_D 0x00000008 +#define PCIEM_CAP2_COMP_TIMO_DISABLE 0x00000010 +#define PCIEM_CAP2_ARI 0x00000020 #define PCIER_DEVICE_CTL2 0x28 -#define PCIEM_CTL2_COMP_TIMEOUT_VAL 0x000f -#define PCIEM_CTL2_COMP_TIMEOUT_DIS 0x0010 +#define PCIEM_CTL2_COMP_TIMO_VAL 0x000f +#define PCIEM_CTL2_COMP_TIMO_50MS 0x0000 +#define PCIEM_CTL2_COMP_TIMO_100US 0x0001 +#define PCIEM_CTL2_COMP_TIMO_10MS 0x0002 +#define PCIEM_CTL2_COMP_TIMO_55MS 0x0005 +#define PCIEM_CTL2_COMP_TIMO_210MS 0x0006 +#define PCIEM_CTL2_COMP_TIMO_900MS 0x0009 +#define PCIEM_CTL2_COMP_TIMO_3500MS 0x000a +#define PCIEM_CTL2_COMP_TIMO_13S 0x000d +#define PCIEM_CTL2_COMP_TIMO_64S 0x000e +#define PCIEM_CTL2_COMP_TIMO_DISABLE 0x0010 #define PCIEM_CTL2_ARI 0x0020 #define PCIEM_CTL2_ATOMIC_REQ_ENABLE 0x0040 #define PCIEM_CTL2_ATOMIC_EGR_BLOCK 0x0080 Modified: stable/11/sys/dev/pci/pcivar.h ============================================================================== --- stable/11/sys/dev/pci/pcivar.h Fri Sep 30 18:43:39 2016 (r306519) +++ stable/11/sys/dev/pci/pcivar.h Fri Sep 30 18:47:34 2016 (r306520) @@ -595,7 +595,9 @@ uint32_t pcie_read_config(device_t dev, void pcie_write_config(device_t dev, int reg, uint32_t value, int width); uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask, uint32_t value, int width); - +bool pcie_flr(device_t dev, u_int max_delay, bool force); +int pcie_get_max_completion_timeout(device_t dev); +bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); #ifdef BUS_SPACE_MAXADDR #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) From owner-svn-src-all@freebsd.org Fri Sep 30 18:58: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 16CBAC049A6; Fri, 30 Sep 2016 18:58:52 +0000 (UTC) (envelope-from cem@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 E8BFAA2F; Fri, 30 Sep 2016 18:58:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIwpak086861; Fri, 30 Sep 2016 18:58:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIwo8v086857; Fri, 30 Sep 2016 18:58:50 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609301858.u8UIwo8v086857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 30 Sep 2016 18:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306521 - in head/sys: amd64/amd64 amd64/include x86/include x86/x86 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.23 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: Fri, 30 Sep 2016 18:58:52 -0000 Author: cem Date: Fri Sep 30 18:58:50 2016 New Revision: 306521 URL: https://svnweb.freebsd.org/changeset/base/306521 Log: Revert r306516 for now, it is incomplete on i386 Noted by: kib Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:58:50 2016 (r306521) @@ -409,7 +409,6 @@ void invltlb_invpcid_handler(void) { struct invpcid_descr d; - uint64_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -418,20 +417,17 @@ invltlb_invpcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : INVPCID_CTX); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } void invltlb_pcid_handler(void) { - uint64_t generation; - #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -439,7 +435,6 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) { invltlb_glob(); } else { @@ -455,5 +450,5 @@ invltlb_pcid_handler(void) smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); } } - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/amd64/include/pcpu.h Fri Sep 30 18:58:50 2016 (r306521) @@ -65,8 +65,7 @@ u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ - uint64_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ - char __pad[141] /* be divisor of PAGE_SIZE \ + char __pad[149] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 Modified: head/sys/x86/include/x86_smp.h ============================================================================== --- head/sys/x86/include/x86_smp.h Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/x86/include/x86_smp.h Fri Sep 30 18:58:50 2016 (r306521) @@ -35,7 +35,7 @@ extern volatile int aps_ready; extern struct mtx ap_boot_mtx; extern int cpu_logical; extern int cpu_cores; -extern volatile uint64_t smp_tlb_generation; +extern volatile int smp_tlb_wait; extern struct pmap *smp_tlb_pmap; extern u_int xhits_gbl[]; extern u_int xhits_pg[]; Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/x86/x86/mp_x86.c Fri Sep 30 18:58:50 2016 (r306521) @@ -1304,15 +1304,12 @@ cpususpend_handler(void) void invlcache_handler(void) { - uint64_t generation; - #ifdef COUNT_IPIS (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; wbinvd(); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } /* @@ -1370,7 +1367,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ /* Variables needed for SMP tlb shootdown. */ static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; pmap_t smp_tlb_pmap; -volatile uint64_t smp_tlb_generation; +volatile int smp_tlb_wait; #ifdef __amd64__ #define read_eflags() read_rflags() @@ -1380,16 +1377,15 @@ static void smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2) { - cpuset_t other_cpus; - volatile uint64_t *p_cpudone; - uint64_t generation; - int cpu; + int cpu, ncpu, othercpus; + + othercpus = mp_ncpus - 1; /* does not shootdown self */ /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { - if (mp_ncpus <= 1) + if (othercpus < 1) return; } else { CPU_CLR(PCPU_GET(cpuid), &mask); @@ -1403,28 +1399,23 @@ smp_targeted_tlb_shootdown(cpuset_t mask smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; - generation = ++smp_tlb_generation; + smp_tlb_wait = 0; if (CPU_ISFULLSET(&mask)) { + ncpu = othercpus; ipi_all_but_self(vector); - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); } else { - other_cpus = mask; + ncpu = 0; while ((cpu = CPU_FFS(&mask)) != 0) { cpu--; CPU_CLR(cpu, &mask); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, vector); ipi_send_cpu(cpu, vector); + ncpu++; } } - while ((cpu = CPU_FFS(&other_cpus)) != 0) { - cpu--; - CPU_CLR(cpu, &other_cpus); - p_cpudone = &cpuid_to_pcpu[cpu]->pc_smp_tlb_done; - while (*p_cpudone != generation) - ia32_pause(); - } + while (smp_tlb_wait < ncpu) + ia32_pause(); mtx_unlock_spin(&smp_ipi_mtx); } @@ -1482,8 +1473,6 @@ smp_cache_flush(void) void invltlb_handler(void) { - uint64_t generation; - #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1491,19 +1480,16 @@ invltlb_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) invltlb_glob(); else invltlb(); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } void invlpg_handler(void) { - uint64_t generation; - #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1511,16 +1497,14 @@ invlpg_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; invlpg(smp_tlb_addr1); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } void invlrng_handler(void) { - vm_offset_t addr, addr2; - uint64_t generation; + vm_offset_t addr; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -1530,12 +1514,10 @@ invlrng_handler(void) #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; - addr2 = smp_tlb_addr2; - generation = smp_tlb_generation; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < addr2); + } while (addr < smp_tlb_addr2); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } From owner-svn-src-all@freebsd.org Fri Sep 30 19:21: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 E252AC0304F; Fri, 30 Sep 2016 19:21:03 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 664FDC9C; Fri, 30 Sep 2016 19:21:03 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UJL2D7095319; Fri, 30 Sep 2016 19:21:02 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UJL2Ws095317; Fri, 30 Sep 2016 19:21:02 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201609301921.u8UJL2Ws095317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 30 Sep 2016 19:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306522 - head/sys/dev/qlxgbe 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.23 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: Fri, 30 Sep 2016 19:21:04 -0000 Author: davidcs Date: Fri Sep 30 19:21:02 2016 New Revision: 306522 URL: https://svnweb.freebsd.org/changeset/base/306522 Log: Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_boot.c head/sys/dev/qlxgbe/ql_fw.c head/sys/dev/qlxgbe/ql_minidump.c head/sys/dev/qlxgbe/ql_reset.c Modified: head/sys/dev/qlxgbe/ql_boot.c ============================================================================== --- head/sys/dev/qlxgbe/ql_boot.c Fri Sep 30 18:58:50 2016 (r306521) +++ head/sys/dev/qlxgbe/ql_boot.c Fri Sep 30 19:21:02 2016 (r306522) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x40, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x5e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1535,7 +1535,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x20, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x52, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb5, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, + 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1589,7 +1589,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x14, 0x7c, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, @@ -1624,7 +1624,7 @@ unsigned char ql83xx_bootloader[] = { 0x04, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x4c, 0x01, @@ -1739,13 +1739,13 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x05, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0xa8, 0x22, 0x00, 0x40, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x20, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0xe0, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, @@ -1803,8 +1803,8 @@ unsigned char ql83xx_bootloader[] = { 0x0e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xb5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xbd, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xf8, 0x0e, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x06, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, @@ -1827,8 +1827,8 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x04, 0x01, 0x8d, 0x02, 0x32, 0x04, 0x1b, 0x08, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x85, 0x01, 0x40, 0x06, 0x00, 0x00, 0x00, 0x78, 0x38, 0x04, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x84, 0x02, @@ -1988,7 +1988,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x29, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa5, 0x03, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2104,7 +2104,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x40, 0x00, 0x80, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xd7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2119,7 +2119,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2135,7 +2135,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x4d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, + 0xda, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -2196,7 +2196,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2209,7 +2209,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -2903,7 +2903,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd6, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, + 0xde, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3097,7 +3097,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd7, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, @@ -3147,7 +3147,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3264,7 +3264,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2d, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, @@ -3313,7 +3313,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x80, 0x01, 0xa0, 0x00, 0x0a, 0x0c, 0x03, 0x08, 0x92, 0x20, 0x0b, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x80, 0x00, 0xcc, 0x02, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x09, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x8c, 0x00, 0x42, 0x03, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x0a, 0xe0, 0x82, 0x01, 0xa0, 0x0a, 0x94, 0xa0, 0x01, 0xa0, 0x7b, 0x10, 0x80, 0x01, 0x13, 0xe8, 0x00, 0xb0, 0x02, 0x40, 0x81, @@ -3329,7 +3329,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0xc0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00, 0xc0, 0x01, 0x00, 0xa0, @@ -3361,18 +3361,18 @@ unsigned char ql83xx_bootloader[] = { 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe2, 0x01, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, + 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0a, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -3683,7 +3683,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, + 0xe9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3707,7 +3707,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, + 0xeb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3888,7 +3888,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xed, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -4067,7 +4067,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xef, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4143,7 +4143,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, + 0xf0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -4373,7 +4373,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xea, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -4448,7 +4448,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xec, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xf4, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, @@ -5093,17 +5093,17 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x0b, 0x20, 0x80, 0x01, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xcd, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xd5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xd1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, + 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, 0x0b, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfa, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, + 0x02, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, 0x20, 0x0f, 0x07, 0x04, 0x00, 0x00, 0x00, 0x02, 0x88, 0xc3, 0x01, 0x81, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5773,7 +5773,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -5800,7 +5800,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xff, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x07, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -5840,7 +5840,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x09, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -6426,1136 +6426,1146 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x00, 0x00, 0x10, 0x41, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, - 0x00, 0x08, 0x30, 0x00, 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, 0x0e, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0d, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, + 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, 0x99, 0x45, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, + 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, + 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0xc0, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, + 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, 0x40, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, - 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, - 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x04, 0x00, 0xa0, 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, - 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, - 0x40, 0x04, 0x1a, 0x0e, 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x14, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, + 0x99, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x3c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x04, 0x00, 0x00, 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x10, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, - 0x40, 0x0a, 0x1f, 0x01, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x0a, 0x20, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, - 0x41, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, - 0x20, 0x04, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x4a, 0x05, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, - 0x08, 0xa2, 0x21, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, - 0xfd, 0x00, 0x00, 0x87, 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, - 0x43, 0x61, 0x18, 0x82, 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, - 0x40, 0x2e, 0x46, 0x0a, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd0, 0x42, 0x01, 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x9a, 0x0c, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, - 0x00, 0xe8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, + 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, + 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x00, 0xcd, 0x41, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, 0x40, 0x04, 0x1a, 0x0e, + 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x80, + 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, + 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, - 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x01, 0x8d, 0x83, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x29, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0xea, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, - 0x1f, 0x08, 0xa0, 0x00, 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, - 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, - 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, - 0x00, 0xb8, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, + 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, - 0x30, 0x02, 0x9a, 0x0b, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, - 0xa0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, 0x40, 0x0a, 0x1f, 0x01, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x0a, 0x20, 0xa8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, 0x41, 0x04, 0x00, 0x00, + 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, 0x20, 0x04, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x05, + 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, 0x08, 0xa2, 0x21, 0xe4, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, 0xfd, 0x00, 0x00, 0x87, + 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, 0x43, 0x61, 0x18, 0x82, + 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, 0x40, 0x2e, 0x46, 0x0a, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x42, 0x01, + 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0c, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xe8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, + 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd3, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x8d, 0x83, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, - 0x00, 0x08, 0x30, 0x00, 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, - 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0c, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xea, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, - 0x26, 0x19, 0x87, 0x06, 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, 0x1f, 0x08, 0xa0, 0x00, + 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, 0x41, 0x06, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x01, 0x00, 0x00, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0xb8, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0d, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, 0x30, 0x02, 0x9a, 0x0b, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x1b, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x0a, - 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x98, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0xa0, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, 0x00, 0x08, 0x30, 0x00, + 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x58, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x1f, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, 0x26, 0x19, 0x87, 0x06, + 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x80, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xa0, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 30 19:46: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 63C59C03A62; Fri, 30 Sep 2016 19:46:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D22B184; Fri, 30 Sep 2016 19:46:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UJkGjO007763; Fri, 30 Sep 2016 19:46:16 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UJkDNc007734; Fri, 30 Sep 2016 19:46:13 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609301946.u8UJkDNc007734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 30 Sep 2016 19:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306523 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/disassembler source/components/executer source/components/parser source/components/tables source/c... X-SVN-Group: vendor-sys 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.23 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: Fri, 30 Sep 2016 19:46:17 -0000 Author: jkim Date: Fri Sep 30 19:46:13 2016 New Revision: 306523 URL: https://svnweb.freebsd.org/changeset/base/306523 Log: Import ACPICA 20160930. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/compiler/aslmaputils.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/platform/acmacosx.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/changes.txt Fri Sep 30 19:46:13 2016 (r306523) @@ -1,4 +1,83 @@ ---------------------------------------- +30 September 2016. Summary of changes for version 20160930: + + +1) ACPICA kernel-resident subsystem: + +Fixed a regression in the internal AcpiTbFindTable function where a non +AE_OK exception could inadvertently be returned even if the function did +not fail. This problem affects the following operators: + DataTableRegion + LoadTable + +Fixed a regression in the LoadTable operator where a load to any +namespace location other than the root no longer worked properly. + +Increased the maximum loop count value that will result in the +AE_AML_INFINITE_LOOP exception. This is a mechanism that is intended to +prevent infinite loops within the AML interpreter and thus the host OS +kernel. The value is increased from 0xFFFF to 0xFFFFF loops (65,535 to +1,048,575). + +Moved the AcpiGbl_MaxLoopIterations configuration variable to the public +acpixf.h file. This allows hosts to easily configure the maximum loop +count at runtime. + +Removed an illegal character in the strtoul64.c file. This character +caused errors with some C compilers. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 140.4K Code, 58.1K Data, 198.5K Total + Debug Version: 200.7K Code, 82.1K Data, 282.8K Total + Previous Release: + Non-Debug Version: 140.0K Code, 58.1K Data, 198.1K Total + Debug Version: 200.3K Code, 82.1K Data, 282.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a problem with the conversion of Else{If{ blocks into +the simpler ASL ElseIf keyword. During the conversion, a trailing If +block could be lost and missing from the disassembled output. + +iASL: Fixed a missing parser rule for the ObjectType operator. For ASL+, +the missing rule caused a parse error when using the Index operator as an +operand to ObjectType. This construct now compiles properly. Example: + ObjectType(PKG1[4]). + +iASL: Correctly handle unresolved symbols in the hardware map file (-lm +option). Previously, unresolved symbols could cause a protection fault. +Such symbols are now marked as unresolved in the map file. + +iASL: Implemented support to allow control method invocations as an +operand to the ASL DeRefOf operator. Example: + DeRefOf(MTH1(Local0)) + +Disassembler: Improved support for the ToPLD ASL macro. Detection of a +possible _PLD buffer now includes examination of both the normal buffer +length (16 or 20) as well as the surrounding AML package length. + +Disassembler: Fixed a problem with the decoding of complex expressions +within the Divide operator for ASL+. For the case where both the quotient +and remainder targets are specified, the entire statement cannot be +disassembled. Previously, the output incorrectly contained a mix of ASL- +and ASL+ operators. This mixed statement causes a syntax error when +compiled. Example: + Divide (Add (INT1, 6), 128, RSLT, QUOT) // was incorrectly +disassembled to: + Divide (INT1 + 6, 128, RSLT, QUOT) + +iASL/Tools: Added support to process AML and non-AML ACPI tables +consistently. For the disassembler and AcpiExec, allow all types of ACPI +tables (AML and data tables). For the iASL -e option, allow only AML +tables (DSDT/SSDT). + +---------------------------------------- 31 August 2016. Summary of changes for version 20160831: Modified: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/common/acfileio.c Fri Sep 30 19:46:13 2016 (r306523) @@ -262,12 +262,14 @@ AcGetOneTableFromFile ( return (Status); } + if (GetOnlyAmlTables) { - /* Table must be an AML table (DSDT/SSDT) or FADT */ - - if (!ACPI_COMPARE_NAME (TableHeader.Signature, ACPI_SIG_FADT) && - !AcpiUtIsAmlTable (&TableHeader)) + /* + * Table must be an AML table (DSDT/SSDT). + * Used for iASL -e option only. + */ + if (!AcpiUtIsAmlTable (&TableHeader)) { fprintf (stderr, " %s: Table [%4.4s] is not an AML table - ignoring\n", Modified: vendor-sys/acpica/dist/source/compiler/aslmaputils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Sep 30 19:46:13 2016 (r306523) @@ -80,6 +80,12 @@ MpGetHidFromParseTree ( Op = HidNode->Op; + if (!Op) + { + /* Object is not resolved, probably an External */ + + return ("Unresolved Symbol - referenced but not defined in this table"); + } switch (Op->Asl.ParseOpcode) { Modified: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Sep 30 19:46:13 2016 (r306523) @@ -351,6 +351,20 @@ OpnDoFieldCommon ( NewBitOffset = (UINT32) PkgLengthNode->Asl.Value.Integer; CurrentBitOffset += NewBitOffset; + if ((NewBitOffset == 0) && + (Next->Asl.ParseOpcode == PARSEOP_RESERVED_BYTES)) + { + /* + * Unnamed field with a bit length of zero. We can + * safely just ignore this. However, we will not ignore + * a named field of zero length, we don't want to just + * toss out a name. + */ + Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; + PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; + break; + } + /* Save the current AccessAs value for error checking later */ switch (AccessType) Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Sep 30 19:46:13 2016 (r306523) @@ -561,6 +561,13 @@ AslDoOptions ( Gbl_CompileTimesFlag = TRUE; break; + case 'd': + + /* Disable disassembler code optimizations */ + + AcpiGbl_DoDisassemblerOptimizations = FALSE; + break; + case 'e': /* iASL: Disable External opcode generation */ Modified: vendor-sys/acpica/dist/source/compiler/aslrules.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrules.y Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/compiler/aslrules.y Fri Sep 30 19:46:13 2016 (r306523) @@ -530,7 +530,7 @@ ObjectTypeName | RefOfTerm {} | DerefOfTerm {} | IndexTerm {} - + | IndexExpTerm {} /* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */ ; Modified: vendor-sys/acpica/dist/source/compiler/aslxref.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslxref.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/compiler/aslxref.c Fri Sep 30 19:46:13 2016 (r306523) @@ -826,16 +826,18 @@ XfNamespaceLocateBegin ( /* * A reference to a method within one of these opcodes is not an * invocation of the method, it is simply a reference to the method. + * + * September 2016: Removed DeRefOf from this list */ if ((Op->Asl.Parent) && - ((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) || - (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEREFOF) || + ((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)|| (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE))) { return_ACPI_STATUS (AE_OK); } + /* * There are two types of method invocation: * 1) Invocation with arguments -- the parser recognizes this Modified: vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c ============================================================================== --- vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c Fri Sep 30 19:46:13 2016 (r306523) @@ -529,7 +529,8 @@ AcpiDmIsStringBuffer ( * * PARAMETERS: Op - Buffer Object to be examined * - * RETURN: TRUE if buffer contains a ASCII string, FALSE otherwise + * RETURN: TRUE if buffer appears to contain data produced via the + * ToPLD macro, FALSE otherwise * * DESCRIPTION: Determine if a buffer Op contains a _PLD structure * @@ -541,12 +542,60 @@ AcpiDmIsPldBuffer ( { ACPI_NAMESPACE_NODE *Node; ACPI_PARSE_OBJECT *SizeOp; + ACPI_PARSE_OBJECT *ByteListOp; ACPI_PARSE_OBJECT *ParentOp; + UINT64 BufferSize; + UINT64 InitializerSize; - /* Buffer size is the buffer argument */ - + /* + * Get the BufferSize argument - Buffer(BufferSize) + * If the buffer was generated by the ToPld macro, it must + * be a BYTE constant. + */ SizeOp = Op->Common.Value.Arg; + if (SizeOp->Common.AmlOpcode != AML_BYTE_OP) + { + return (FALSE); + } + + /* Check the declared BufferSize, two possibilities */ + + BufferSize = SizeOp->Common.Value.Integer; + if ((BufferSize != ACPI_PLD_REV1_BUFFER_SIZE) && + (BufferSize != ACPI_PLD_REV2_BUFFER_SIZE)) + { + return (FALSE); + } + + /* + * Check the initializer list length. This is the actual + * number of bytes in the buffer as counted by the AML parser. + * The declared BufferSize can be larger than the actual length. + * However, for the ToPLD macro, the BufferSize will be the same + * as the initializer list length. + */ + ByteListOp = SizeOp->Common.Next; + if (!ByteListOp) + { + return (FALSE); /* Zero-length buffer case */ + } + + InitializerSize = ByteListOp->Common.Value.Integer; + if ((InitializerSize != ACPI_PLD_REV1_BUFFER_SIZE) && + (InitializerSize != ACPI_PLD_REV2_BUFFER_SIZE)) + { + return (FALSE); + } + + /* Final size check */ + + if (BufferSize != InitializerSize) + { + return (FALSE); + } + + /* Now examine the buffer parent */ ParentOp = Op->Common.Parent; if (!ParentOp) @@ -571,8 +620,17 @@ AcpiDmIsPldBuffer ( return (FALSE); } - /* Check for proper form: Name(_PLD, Package() {Buffer() {}}) */ - + /* + * Check for proper form: Name(_PLD, Package() {ToPLD()}) + * + * Note: All other forms such as + * Return (Package() {ToPLD()}) + * Local0 = ToPLD() + * etc. are not converted back to the ToPLD macro, because + * there is really no deterministic way to disassemble the buffer + * back to the ToPLD macro, other than trying to find the "_PLD" + * name + */ if (ParentOp->Common.AmlOpcode == AML_PACKAGE_OP) { ParentOp = ParentOp->Common.Parent; Modified: vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c ============================================================================== --- vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c Fri Sep 30 19:46:13 2016 (r306523) @@ -98,6 +98,9 @@ AcpiDmCheckForSymbolicOpcode ( ACPI_PARSE_OBJECT *Child1; ACPI_PARSE_OBJECT *Child2; ACPI_PARSE_OBJECT *Target; + ACPI_PARSE_OBJECT *GrandChild1; + ACPI_PARSE_OBJECT *GrandChild2; + ACPI_PARSE_OBJECT *GrandTarget = NULL; /* Exit immediately if ASL+ not enabled */ @@ -107,6 +110,14 @@ AcpiDmCheckForSymbolicOpcode ( return (FALSE); } + /* Check for a non-ASL+ statement, propagate the flag */ + + if (Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_LEGACY_ASL_ONLY) + { + Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (FALSE); + } + /* Get the first operand */ Child1 = AcpiPsGetArg (Op, 0); @@ -323,6 +334,7 @@ AcpiDmCheckForSymbolicOpcode ( if (AcpiDmIsValidTarget (Target)) { Child1->Common.OperatorSymbol = NULL; + Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; return (FALSE); } @@ -339,6 +351,13 @@ AcpiDmCheckForSymbolicOpcode ( if (!AcpiDmIsValidTarget (Target)) { + if (Op->Common.Parent->Common.AmlOpcode == AML_STORE_OP) + { + Op->Common.DisasmFlags = 0; + Child1->Common.OperatorSymbol = NULL; + return (FALSE); + } + /* Not a valid target (placeholder only, from parser) */ break; } @@ -478,6 +497,69 @@ AcpiDmCheckForSymbolicOpcode ( /* * Target is the 2nd operand. * We know the target is valid, it is not optional. + * + * The following block implements "Ignore conversion if a store + * is followed by a math/bit operator that has no target". Used + * only for the ASL test suite. + */ + if (!AcpiGbl_DoDisassemblerOptimizations) + { + switch (Child1->Common.AmlOpcode) + { + /* This operator has two operands and two targets */ + + case AML_DIVIDE_OP: + + GrandChild1 = Child1->Common.Value.Arg; + GrandChild2 = GrandChild1->Common.Next; + GrandTarget = GrandChild2->Common.Next; + + if (GrandTarget && !AcpiDmIsValidTarget (GrandTarget)) + { + Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (FALSE); + } + GrandTarget = GrandTarget->Common.Next; + break; + + case AML_ADD_OP: + case AML_SUBTRACT_OP: + case AML_MULTIPLY_OP: + case AML_MOD_OP: + case AML_SHIFT_LEFT_OP: + case AML_SHIFT_RIGHT_OP: + case AML_BIT_AND_OP: + case AML_BIT_OR_OP: + case AML_BIT_XOR_OP: + case AML_INDEX_OP: + + /* These operators have two operands and a target */ + + GrandChild1 = Child1->Common.Value.Arg; + GrandChild2 = GrandChild1->Common.Next; + GrandTarget = GrandChild2->Common.Next; + break; + + case AML_BIT_NOT_OP: + + /* This operator has one operand and a target */ + + GrandChild1 = Child1->Common.Value.Arg; + GrandTarget = GrandChild1->Common.Next; + break; + + default: + break; + } + + if (GrandTarget && !AcpiDmIsValidTarget (GrandTarget)) + { + Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (FALSE); + } + } + + /* * In the parse tree, simply swap the target with the * source so that the target is processed first. */ @@ -563,6 +645,7 @@ AcpiDmCloseOperator ( { BOOLEAN IsCStyleOp = FALSE; + /* Always emit paren if ASL+ disassembly disabled */ if (!AcpiGbl_CstyleDisassembly) @@ -571,6 +654,14 @@ AcpiDmCloseOperator ( return; } + /* Check for a non-ASL+ statement */ + + if (Op->Common.DisasmFlags & ACPI_PARSEOP_LEGACY_ASL_ONLY) + { + AcpiOsPrintf (")"); + return; + } + /* Check if we need to add an additional closing paren */ switch (Op->Common.AmlOpcode) Modified: vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c ============================================================================== --- vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c Fri Sep 30 19:46:13 2016 (r306523) @@ -64,6 +64,10 @@ static void AcpiDmConvertToElseIf ( ACPI_PARSE_OBJECT *Op); +static void +AcpiDmPromoteSubtree ( + ACPI_PARSE_OBJECT *StartOp); + /******************************************************************************* * @@ -1067,12 +1071,22 @@ AcpiDmConvertToElseIf ( * be the only blocks under the original Else. */ IfOp = OriginalElseOp->Common.Value.Arg; + if (!IfOp || (IfOp->Common.AmlOpcode != AML_IF_OP) || (IfOp->Asl.Next && (IfOp->Asl.Next->Common.AmlOpcode != AML_ELSE_OP))) { - /* Not an Else..If sequence, cannot convert to ElseIf */ + /* Not a proper Else..If sequence, cannot convert to ElseIf */ + + AcpiOsPrintf ("%s", "Else"); + return; + } + + /* Cannot have anything following the If...Else block */ + ElseOp = IfOp->Common.Next; + if (ElseOp && ElseOp->Common.Next) + { AcpiOsPrintf ("%s", "Else"); return; } @@ -1100,7 +1114,10 @@ AcpiDmConvertToElseIf ( /* If an ELSE matches the IF, promote it also */ ElseOp->Common.Parent = OriginalElseOp->Common.Parent; - ElseOp->Common.Next = OriginalElseOp->Common.Next; + + /* Promote the entire block under the ElseIf (All Next OPs) */ + + AcpiDmPromoteSubtree (OriginalElseOp); } else { @@ -1122,3 +1139,48 @@ AcpiDmConvertToElseIf ( OriginalElseOp->Common.Next = IfOp; } + + +/******************************************************************************* + * + * FUNCTION: AcpiDmPromoteSubtree + * + * PARAMETERS: StartOpOp - Original parent of the entire subtree + * + * RETURN: None + * + * DESCRIPTION: Promote an entire parse subtree up one level. + * + ******************************************************************************/ + +static void +AcpiDmPromoteSubtree ( + ACPI_PARSE_OBJECT *StartOp) +{ + ACPI_PARSE_OBJECT *Op; + ACPI_PARSE_OBJECT *ParentOp; + + + /* New parent for subtree elements */ + + ParentOp = StartOp->Common.Parent; + + /* First child starts the subtree */ + + Op = StartOp->Common.Value.Arg; + + /* Walk the top-level elements of the subtree */ + + while (Op) + { + Op->Common.Parent = ParentOp; + if (!Op->Common.Next) + { + /* Last Op in list, update its next field */ + + Op->Common.Next = StartOp->Common.Next; + break; + } + Op = Op->Common.Next; + } +} Modified: vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c ============================================================================== --- vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c Fri Sep 30 19:46:13 2016 (r306523) @@ -443,16 +443,17 @@ AcpiDmIoFlags2 ( UINT8 SpecificFlags) { + /* _TTP */ + AcpiOsPrintf (", %s", AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 4)]); - /* TRS is only used if TTP is TypeTranslation */ - - if (SpecificFlags & 0x10) - { - AcpiOsPrintf (", %s", - AcpiGbl_TrsDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]); - } + /* + * TRS is only used if TTP is TypeTranslation. However, the disassembler + * always emits exactly what is in the AML. + */ + AcpiOsPrintf (", %s", + AcpiGbl_TrsDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]); } Modified: vendor-sys/acpica/dist/source/components/executer/exconfig.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exconfig.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/executer/exconfig.c Fri Sep 30 19:46:13 2016 (r306523) @@ -581,11 +581,18 @@ AcpiExUnloadTable ( TableIndex = TableDesc->Reference.Value; + /* + * Release the interpreter lock so that the table lock won't have + * strict order requirement against it. + */ + AcpiExExitInterpreter (); + /* Ensure the table is still loaded */ if (!AcpiTbIsTableLoaded (TableIndex)) { - return_ACPI_STATUS (AE_NOT_EXIST); + Status = AE_NOT_EXIST; + goto LockAndExit; } /* Invoke table handler if present */ @@ -605,16 +612,25 @@ AcpiExUnloadTable ( Status = AcpiTbDeleteNamespaceByOwner (TableIndex); if (ACPI_FAILURE (Status)) { - return_ACPI_STATUS (Status); + goto LockAndExit; } (void) AcpiTbReleaseOwnerId (TableIndex); AcpiTbSetTableLoadedFlag (TableIndex, FALSE); +LockAndExit: + + /* Re-acquire the interpreter lock */ + + AcpiExEnterInterpreter (); + /* * Invalidate the handle. We do this because the handle may be stored * in a named object and may not be actually deleted until much later. */ - DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID; - return_ACPI_STATUS (AE_OK); + if (ACPI_SUCCESS (Status)) + { + DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID; + } + return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/source/components/parser/psxface.c ============================================================================== --- vendor-sys/acpica/dist/source/components/parser/psxface.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/parser/psxface.c Fri Sep 30 19:46:13 2016 (r306523) @@ -334,6 +334,18 @@ AcpiPsExecuteTable ( WalkState->ParseFlags |= ACPI_PARSE_MODULE_LEVEL; } + /* Info->Node is the default location to load the table */ + + if (Info->Node && Info->Node != AcpiGbl_RootNode) + { + Status = AcpiDsScopeStackPush ( + Info->Node, ACPI_TYPE_METHOD, WalkState); + if (ACPI_FAILURE (Status)) + { + goto Cleanup; + } + } + /* * Parse the AML, WalkState will be deleted by ParseAml */ Modified: vendor-sys/acpica/dist/source/components/tables/tbdata.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbdata.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/tables/tbdata.c Fri Sep 30 19:46:13 2016 (r306523) @@ -681,18 +681,13 @@ AcpiTbDeleteNamespaceByOwner ( * lock may block, and also since the execution of a namespace walk * must be allowed to use the interpreter. */ - (void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER); Status = AcpiUtAcquireWriteLock (&AcpiGbl_NamespaceRwLock); - - AcpiNsDeleteNamespaceByOwner (OwnerId); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - + AcpiNsDeleteNamespaceByOwner (OwnerId); AcpiUtReleaseWriteLock (&AcpiGbl_NamespaceRwLock); - - Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER); return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/source/components/tables/tbfind.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbfind.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/tables/tbfind.c Fri Sep 30 19:46:13 2016 (r306523) @@ -156,5 +156,5 @@ AcpiTbFindTable ( UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (AE_NOT_FOUND); + return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/source/components/tables/tbxfload.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbxfload.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/tables/tbxfload.c Fri Sep 30 19:46:13 2016 (r306523) @@ -262,7 +262,7 @@ AcpiTbLoadNamespace ( if (!TablesFailed) { ACPI_INFO (( - "%u ACPI AML tables successfully acquired and loaded\n", + "%u ACPI AML tables successfully acquired and loaded", TablesLoaded)); } else @@ -276,6 +276,11 @@ AcpiTbLoadNamespace ( Status = AE_CTRL_TERMINATE; } +#ifdef ACPI_APPLICATION + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\n")); +#endif + + UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_ACPI_STATUS (Status); @@ -423,9 +428,9 @@ AcpiUnloadParentTable ( return_ACPI_STATUS (AE_TYPE); } - /* Must acquire the interpreter lock during this operation */ + /* Must acquire the table lock during this operation */ - Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER); + Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -456,9 +461,11 @@ AcpiUnloadParentTable ( /* Ensure the table is actually loaded */ + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); if (!AcpiTbIsTableLoaded (i)) { Status = AE_NOT_EXIST; + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); break; } @@ -485,10 +492,11 @@ AcpiUnloadParentTable ( Status = AcpiTbReleaseOwnerId (i); AcpiTbSetTableLoadedFlag (i, FALSE); + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); break; } - (void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER); + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c Fri Sep 30 19:46:13 2016 (r306523) @@ -85,7 +85,7 @@ AcpiUtStrtoulBase16 ( * The integer is initialized to the value zero. * The ASCII string is interpreted as a hexadecimal constant. * - * 1) A “0x” prefix is not allowed. However, ACPICA allows this for + * 1) A "0x" prefix is not allowed. However, ACPICA allows this for * compatibility with previous ACPICA. (NO ERROR) * * 2) Terminates when the size of an integer is reached (32 or 64 bits). Modified: vendor-sys/acpica/dist/source/include/acconfig.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acconfig.h Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/include/acconfig.h Fri Sep 30 19:46:13 2016 (r306523) @@ -148,7 +148,7 @@ /* Maximum number of While() loops before abort */ -#define ACPI_MAX_LOOP_COUNT 0xFFFF +#define ACPI_MAX_LOOP_COUNT 0x000FFFFF /****************************************************************************** Modified: vendor-sys/acpica/dist/source/include/acglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acglobal.h Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/include/acglobal.h Fri Sep 30 19:46:13 2016 (r306523) @@ -245,10 +245,6 @@ ACPI_INIT_GLOBAL (UINT32, ACPI_GLOBAL (ACPI_THREAD_STATE *, AcpiGbl_CurrentWalkList); -/* Maximum number of While() loop iterations before forced abort */ - -ACPI_GLOBAL (UINT16, AcpiGbl_MaxLoopIterations); - /* Control method single step flag */ ACPI_GLOBAL (UINT8, AcpiGbl_CmSingleStep); @@ -322,6 +318,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmEmitExternalOpcodes, FALSE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DoDisassemblerOptimizations, TRUE); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing); Modified: vendor-sys/acpica/dist/source/include/aclocal.h ============================================================================== --- vendor-sys/acpica/dist/source/include/aclocal.h Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/include/aclocal.h Fri Sep 30 19:46:13 2016 (r306523) @@ -917,7 +917,7 @@ typedef union acpi_parse_value ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\ UINT8 ArgListLength; /* Number of elements in the arg list */\ ACPI_DISASM_ONLY_MEMBERS (\ - UINT8 DisasmFlags; /* Used during AML disassembly */\ + UINT16 DisasmFlags; /* Used during AML disassembly */\ UINT8 DisasmOpcode; /* Subtype used for disassembly */\ char *OperatorSymbol;/* Used for C-style operator name strings */\ char AmlOpName[16]) /* Op name (debug only) */ @@ -1037,14 +1037,15 @@ typedef struct acpi_parse_state /* Parse object DisasmFlags */ -#define ACPI_PARSEOP_IGNORE 0x01 -#define ACPI_PARSEOP_PARAMETER_LIST 0x02 -#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 -#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08 -#define ACPI_PARSEOP_CLOSING_PAREN 0x10 -#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20 -#define ACPI_PARSEOP_ASSIGNMENT 0x40 -#define ACPI_PARSEOP_ELSEIF 0x80 +#define ACPI_PARSEOP_IGNORE 0x0001 +#define ACPI_PARSEOP_PARAMETER_LIST 0x0002 +#define ACPI_PARSEOP_EMPTY_TERMLIST 0x0004 +#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x0008 +#define ACPI_PARSEOP_CLOSING_PAREN 0x0010 +#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x0020 +#define ACPI_PARSEOP_ASSIGNMENT 0x0040 +#define ACPI_PARSEOP_ELSEIF 0x0080 +#define ACPI_PARSEOP_LEGACY_ASL_ONLY 0x0100 /***************************************************************************** Modified: vendor-sys/acpica/dist/source/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acpixf.h Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/include/acpixf.h Fri Sep 30 19:46:13 2016 (r306523) @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20160831 +#define ACPI_CA_VERSION 0x20160930 #include "acconfig.h" #include "actypes.h" @@ -261,6 +261,13 @@ ACPI_INIT_GLOBAL (UINT8, Acpi ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE); /* + * Maximum number of While() loop iterations before forced method abort. + * This mechanism is intended to prevent infinite loops during interpreter + * execution within a host kernel. + */ +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_COUNT); + +/* * This mechanism is used to trace a specified AML method. The method is * traced each time it is executed. */ Modified: vendor-sys/acpica/dist/source/include/platform/acmacosx.h ============================================================================== --- vendor-sys/acpica/dist/source/include/platform/acmacosx.h Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/include/platform/acmacosx.h Fri Sep 30 19:46:13 2016 (r306523) @@ -47,7 +47,6 @@ #include "aclinux.h" #ifdef __APPLE__ -#define sem_destroy sem_close #define ACPI_USE_ALTERNATE_TIMEOUT #endif /* __APPLE__ */ Modified: vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c ============================================================================== --- vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c Fri Sep 30 19:46:13 2016 (r306523) @@ -754,8 +754,12 @@ AcpiOsCreateSemaphore ( #ifdef __APPLE__ { - char *SemaphoreName = tmpnam (NULL); + static int SemaphoreCount = 0; + char SemaphoreName[32]; + snprintf (SemaphoreName, sizeof (SemaphoreName), "acpi_sem_%d", + SemaphoreCount++); + printf ("%s\n", SemaphoreName); Sem = sem_open (SemaphoreName, O_EXCL|O_CREAT, 0755, InitialUnits); if (!Sem) { @@ -807,10 +811,17 @@ AcpiOsDeleteSemaphore ( return (AE_BAD_PARAMETER); } +#ifdef __APPLE__ + if (sem_close (Sem) == -1) + { + return (AE_BAD_PARAMETER); + } +#else if (sem_destroy (Sem) == -1) { return (AE_BAD_PARAMETER); } +#endif return (AE_OK); } Modified: vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c Fri Sep 30 19:46:13 2016 (r306523) @@ -433,7 +433,7 @@ AbCompareAmlFiles ( { if (Char1 != Char2) { - printf ("Error - Byte mismatch at offset %8.8X: 0x%2.2X 0x%2.2X\n", + printf ("Error - Byte mismatch at offset %8.4X: 0x%2.2X 0x%2.2X\n", Offset, Char1, Char2); Mismatches++; if (Mismatches > 100) @@ -471,7 +471,10 @@ AbCompareAmlFiles ( } printf ("%u Mismatches found\n", Mismatches); - Status = 0; + if (Mismatches == 0) + { + Status = 0; + } Exit2: fclose (File2); Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Fri Sep 30 19:46:13 2016 (r306523) @@ -542,7 +542,7 @@ main ( /* Get all ACPI AML tables in this file */ Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind], - ACPI_GET_ONLY_AML_TABLES, &ListHead); + ACPI_GET_ALL_TABLES, &ListHead); if (ACPI_FAILURE (Status)) { ExitCode = -1; Modified: vendor-sys/acpica/dist/source/tools/acpinames/anmain.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpinames/anmain.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/tools/acpinames/anmain.c Fri Sep 30 19:46:13 2016 (r306523) @@ -176,7 +176,7 @@ main ( /* Get all ACPI AML tables in this file */ Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind], - ACPI_GET_ONLY_AML_TABLES, &ListHead); + ACPI_GET_ALL_TABLES, &ListHead); if (ACPI_FAILURE (Status)) { return (-1); Modified: vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c Fri Sep 30 19:21:02 2016 (r306522) +++ vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c Fri Sep 30 19:46:13 2016 (r306523) @@ -321,7 +321,7 @@ AsConvertFile ( ConditionalTable = ConversionTable->SourceConditionalTable; StructTable = ConversionTable->SourceStructTable; SpecialMacroTable = ConversionTable->SourceSpecialMacroTable; - break; + break; case FILE_TYPE_HEADER: From owner-svn-src-all@freebsd.org Fri Sep 30 19:46: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 582D9C03AC0; Fri, 30 Sep 2016 19:46:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 115BE308; Fri, 30 Sep 2016 19:46:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UJkoKP007821; Fri, 30 Sep 2016 19:46:50 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UJkoSK007820; Fri, 30 Sep 2016 19:46:50 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609301946.u8UJkoSK007820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 30 Sep 2016 19:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306524 - vendor-sys/acpica/20160930 X-SVN-Group: vendor-sys 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.23 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: Fri, 30 Sep 2016 19:46:51 -0000 Author: jkim Date: Fri Sep 30 19:46:50 2016 New Revision: 306524 URL: https://svnweb.freebsd.org/changeset/base/306524 Log: Tag ACPICA 20160930. Added: vendor-sys/acpica/20160930/ - copied from r306523, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Fri Sep 30 19:59: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 9895DC03E59; Fri, 30 Sep 2016 19:59:58 +0000 (UTC) (envelope-from adrian@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 5803CC4D; Fri, 30 Sep 2016 19:59:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UJxv7x011573; Fri, 30 Sep 2016 19:59:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UJxvJg011567; Fri, 30 Sep 2016 19:59:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609301959.u8UJxvJg011567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 30 Sep 2016 19:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306525 - in head/lib: . librss 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.23 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: Fri, 30 Sep 2016 19:59:58 -0000 Author: adrian Date: Fri Sep 30 19:59:56 2016 New Revision: 306525 URL: https://svnweb.freebsd.org/changeset/base/306525 Log: Add librss, a simple wrapper around RSS APIs so applications can begin auto-tuning. I've used this in a handful of RSS test applications. It is just some very simple functions to fetch the RSS configuration, query the per-bucket CPU set, and mark sockets as local to an RSS bucket. It should be sufficient for both thread-based and process-based workloads. (Yes, I wrote a manpage.) This is based on some early RSS API and wrapper API work I did whilst I was at Netflix. Thanks to Netflix for the very original work that spawned this; thanks to Peter Grehan for his feedback about RSS APIs and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the APIs. These fed into the simple userland API I wrote up here. Reviewed by: gallatin Added: head/lib/librss/ head/lib/librss/Makefile (contents, props changed) head/lib/librss/librss.3 (contents, props changed) head/lib/librss/librss.c (contents, props changed) head/lib/librss/librss.h (contents, props changed) Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Sep 30 19:46:50 2016 (r306524) +++ head/lib/Makefile Fri Sep 30 19:59:56 2016 (r306525) @@ -89,6 +89,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libprocstat \ ${_libradius} \ librpcsvc \ + librss \ librt \ ${_librtld_db} \ libsbuf \ Added: head/lib/librss/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/Makefile Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +PACKAGE= lib${LIB} +SHLIBDIR?= /lib + +.include + +LIB= rss +SHLIB_MAJOR= 1 + +SRCS=librss.c + +.include Added: head/lib/librss/librss.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/librss.3 Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,153 @@ +.\" $FreeBSD$ +.\" +.Dd September 29, 2016 +.Dt LIBRSS 3 +.Os +.Sh NAME +.Nm librss +.Nd Provide Receive-side scaling awareness to userland applications +.Sh LIBRARY +.Lb librss +.Sh SYNOPSIS +.In librss.h +.Ft struct rss_config * +.Fn rss_config_get "void" +.Ft void +.Fn rss_config_free "struct rss_config *cfg" +.Ft int +.Fn rss_config_get_bucket_count "struct rss_config *cfg" +.Ft int +.Fn rss_set_bucket_rebalance_cb "rss_bucket_rebalance_cb_t *cb" "void *cbdata" +.Ft int +.Fn rss_sock_set_bindmulti "int fd" "int af" "int val" +.Ft int +.Fn rss_sock_set_rss_bucket "int fd" "int af" "int rss_bucket" +.Ft int +.Fn rss_sock_set_recvrss "int fd" "int af" "int val" +.Sh DESCRIPTION +The +.Nm +library and the functions it provides are used for both fetching +the system RSS configuration and interacting with RSS aware +sockets. +.Pp +Applications will typically call +.Fn rss_config_get +to fetch the current RSS configuration from the system and perform +initial setup. +This typically involves spawning worker threads, one per RSS bucket, +and optionally binding them to the per-bucket CPU set. +.Pp +The +.Vt rss_config +struct is defined as: +.Bd -literal +struct rss_config { + int rss_ncpus; + int rss_nbuckets; + int rss_basecpu; + int *rss_bucket_map; +}; +.Ed +.Pp +Applications will typically use the +.Fn rss_config_get_bucket_count +function to fetch the number of RSS buckets, create one thread +per RSS bucket for RSS aware work, then one RSS aware socket to receive +UDP datagrams or TCP connections +in each particular RSS bucket / thread. +.Pp +The +.Fn rss_get_bucket_cpuset +function sets the given cpuset up for the given +RSS bucket and behaviour. +Typically applications will wish to just query for +.Vt RSS_BUCKET_TYPE_KERNEL_ALL +unless they wish to potentially setup different +worker threads for transmit and receive. +.Pp +The +.Vt rss_bucket_type_t +enum is defined as: +.Bd -literal +typedef enum { + RSS_BUCKET_TYPE_NONE = 0, + RSS_BUCKET_TYPE_KERNEL_ALL = 1, + RSS_BUCKET_TYPE_KERNEL_TX = 2, + RSS_BUCKET_TYPE_KERNEL_RX = 3, + RSS_BUCKET_TYPE_MAX = 3, +} rss_bucket_type_t; +.Ed +.Pp +The rebalance callback +.Vt rss_bucket_rebalance_cb_t +is defined as: +.Bd -literal +typedef void rss_bucket_rebalance_cb_t(void *arg); +.Ed +.Pp +The +.Fn rss_set_bucket_rebalance_cb +function sets an optional callback that will be called if the kernel +rebalances RSS buckets. +This is intended as a future expansion to rebalance buckets rather than +reprogram the RSS key, so typically the only work to be performed +is to rebind worker threads to an updated cpuset. +.Pp +Once RSS setup is completed, +.Fn rss_config_free +is called to free the RSS configuration structure. +.Pp +To make a +.Vt bind +socket RSS aware, the +.Fn rss_sock_set_bindmulti +function is used to enable or disable per-RSS bucket +behaviour. +The socket filedescriptor, address family and enable flag +.Vt val +are passed in. +.Pp +If +.Vt val +is set to 1, the socket can be placed in an RSS bucket and will only accept +datagrams (for UDP) or connections (for TCP) that are received for that +RSS bucket. +If set to 0, the socket is placed in the default PCB and will see +datagrams/connections that are not initially consumed by a PCB aware +socket. +.Pp +The +.Fn rss_sock_set_rss_bucket +function configures the RSS bucket which a socket belongs in. +Note that TCP sockets created by +.Xr accept 2 +will automatically be assigned to the RSS bucket. +.Pp +The +.Fn rss_sock_set_recvrss +function enables or disables receiving RSS related information +as socket options in. +.2 recvmsg +calls. +.Pp +When enabled, UDP datagrams will have a message with the +.Vt IP_RECVFLOWID +option indicating the 32-bit receive flowid as a uint32_t, +and the +.Vt IP_RECVRSSBUCKETID +option indicating the 32 bit RSS bucket id as a uint32_t. +.Sh ERRORS +The functions return either <0 or NULL as appropriate upon error. +.Sh SEE ALSO +.Xr PCBGROUP 9 +.Sh HISTORY +The +.Xr librss.3 +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An Adrian Chadd Aq Mt adrian@FreeBSD.org +.Sh BUGS +There is currently no kernel mechanism to rebalance the RSS bucket to CPU +mapping, and so the callback mechanism is a no-op. Added: head/lib/librss/librss.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/librss.c Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,311 @@ +/* + * Copyright (c) 2016 Adrian Chadd + * 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 + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "librss.h" + +int +rss_sock_set_bindmulti(int fd, int af, int val) +{ + int opt; + socklen_t optlen; + int retval; + + /* Set bindmulti */ + opt = val; + optlen = sizeof(opt); + retval = setsockopt(fd, + af == AF_INET ? IPPROTO_IP : IPPROTO_IPV6, + af == AF_INET ? IP_BINDMULTI : IPV6_BINDMULTI, + &opt, + optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_BINDMULTI)", __func__); + return (-1); + } + return (0); +} + +int +rss_sock_set_rss_bucket(int fd, int af, int rss_bucket) +{ + int opt; + socklen_t optlen; + int retval; + int f, p; + + switch (af) { + case AF_INET: + p = IPPROTO_IP; + f = IP_RSS_LISTEN_BUCKET; + break; + case AF_INET6: + p = IPPROTO_IPV6; + f = IPV6_RSS_LISTEN_BUCKET; + break; + default: + return (-1); + } + + /* Set RSS bucket */ + opt = rss_bucket; + optlen = sizeof(opt); + retval = setsockopt(fd, p, f, &opt, optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_RSS_LISTEN_BUCKET)", __func__); + return (-1); + } + return (0); +} + +int +rss_sock_set_recvrss(int fd, int af, int val) +{ + int opt, retval; + socklen_t optlen; + int f1, f2, p; + + switch (af) { + case AF_INET: + p = IPPROTO_IP; + f1 = IP_RECVFLOWID; + f2 = IP_RECVRSSBUCKETID; + break; + case AF_INET6: + p = IPPROTO_IPV6; + f1 = IPV6_RECVFLOWID; + f2 = IPV6_RECVRSSBUCKETID; + break; + default: + return (-1); + } + + /* Enable/disable flowid */ + opt = val; + optlen = sizeof(opt); + retval = setsockopt(fd, p, f1, &opt, optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_RECVFLOWID)", __func__); + return (-1); + } + + /* Enable/disable RSS bucket reception */ + opt = val; + optlen = sizeof(opt); + retval = setsockopt(fd, p, f2, &opt, optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_RECVRSSBUCKETID)", __func__); + return (-1); + } + + return (0); +} + +static int +rss_getsysctlint(const char *s) +{ + int val, retval; + size_t rlen; + + rlen = sizeof(int); + retval = sysctlbyname(s, &val, &rlen, NULL, 0); + if (retval < 0) { + warn("sysctlbyname (%s)", s); + return (-1); + } + + return (val); +} + +static int +rss_getbucketmap(int *bucket_map, int nbuckets) +{ + /* XXX I'm lazy; so static string it is */ + char bstr[2048]; + int retval; + size_t rlen; + char *s, *ss; + int r, b, c; + + /* Paranoia */ + memset(bstr, '\0', sizeof(bstr)); + + rlen = sizeof(bstr) - 1; + retval = sysctlbyname("net.inet.rss.bucket_mapping", bstr, &rlen, NULL, 0); + if (retval < 0) { + warn("sysctlbyname (net.inet.rss.bucket_mapping)"); + return (-1); + } + + ss = bstr; + while ((s = strsep(&ss, " ")) != NULL) { + r = sscanf(s, "%d:%d", &b, &c); + if (r != 2) { + fprintf(stderr, "%s: string (%s) not parsable\n", + __func__, + s); + return (-1); + } + if (b > nbuckets) { + fprintf(stderr, "%s: bucket %d > nbuckets %d\n", + __func__, + b, + nbuckets); + return (-1); + } + /* XXX no maxcpu check */ + bucket_map[b] = c; + } + return (0); +} + +struct rss_config * +rss_config_get(void) +{ + struct rss_config *rc = NULL; + + rc = calloc(1, sizeof(*rc)); + if (rc == NULL) { + warn("%s: calloc", __func__); + goto error; + } + + rc->rss_ncpus = rss_getsysctlint("net.inet.rss.ncpus"); + if (rc->rss_ncpus < 0) { + fprintf(stderr, "%s: couldn't fetch net.inet.rss.ncpus\n", __func__); + goto error; + } + + rc->rss_nbuckets = rss_getsysctlint("net.inet.rss.buckets"); + if (rc->rss_nbuckets < 0) { + fprintf(stderr, "%s: couldn't fetch net.inet.rss.nbuckets\n", __func__); + goto error; + } + + rc->rss_basecpu = rss_getsysctlint("net.inet.rss.basecpu"); + if (rc->rss_basecpu< 0) { + fprintf(stderr, "%s: couldn't fetch net.inet.rss.basecpu\n", __func__); + goto error; + } + + rc->rss_bucket_map = calloc(rc->rss_nbuckets, sizeof(int)); + if (rc->rss_bucket_map == NULL) { + warn("%s: calloc (rss buckets; %d entries)", __func__, rc->rss_nbuckets); + goto error; + } + + if (rss_getbucketmap(rc->rss_bucket_map, rc->rss_nbuckets) != 0) { + fprintf(stderr, "%s: rss_getbucketmap failed\n", __func__); + goto error; + } + + return (rc); + +error: + if ((rc != NULL) && rc->rss_bucket_map) + free(rc->rss_bucket_map); + if (rc != NULL) + free(rc); + return (NULL); +} + +void +rss_config_free(struct rss_config *rc) +{ + + if ((rc != NULL) && rc->rss_bucket_map) + free(rc->rss_bucket_map); + if (rc != NULL) + free(rc); +} + +int +rss_config_get_bucket_count(struct rss_config *rc) +{ + + if (rc == NULL) + return (-1); + return (rc->rss_nbuckets); +} + +int +rss_get_bucket_cpuset(struct rss_config *rc, rss_bucket_type_t btype, + int bucket, cpuset_t *cs) +{ + + if (bucket < 0 || bucket >= rc->rss_nbuckets) { + errno = EINVAL; + return (-1); + } + + /* + * For now all buckets are the same, but eventually we'll want + * to allow administrators to set separate RSS cpusets for + * {kernel,user} {tx, rx} combinations. + */ + if (btype <= RSS_BUCKET_TYPE_NONE || btype > RSS_BUCKET_TYPE_MAX) { + errno = ENOTSUP; + return (-1); + } + + CPU_ZERO(cs); + CPU_SET(rc->rss_bucket_map[bucket], cs); + + return (0); +} + +int +rss_set_bucket_rebalance_cb(rss_bucket_rebalance_cb_t *cb, void *cbdata) +{ + + (void) cb; + (void) cbdata; + + /* + * For now there's no rebalance callback, so + * just return 0 and ignore it. + */ + return (0); +} Added: head/lib/librss/librss.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/librss.h Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2016 Adrian Chadd + * 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. + * + * $FreeBSD$ + */ + +#ifndef __LIBRSS_H__ +#define __LIBRSS_H__ + +struct rss_config { + int rss_ncpus; + int rss_nbuckets; + int rss_basecpu; + int *rss_bucket_map; +}; + +typedef enum { + RSS_BUCKET_TYPE_NONE = 0, + RSS_BUCKET_TYPE_KERNEL_ALL = 1, + RSS_BUCKET_TYPE_KERNEL_TX = 2, + RSS_BUCKET_TYPE_KERNEL_RX = 3, + RSS_BUCKET_TYPE_MAX = 3, +} rss_bucket_type_t; + +typedef void rss_bucket_rebalance_cb_t(void *arg); + +/* + * Enable/disable whether to allow for multiple bind()s to the + * given PCB entry. + * + * This must be done before bind(). + */ +extern int rss_sock_set_bindmulti(int fd, int af, int val); + +/* + * Set the RSS bucket for the given file descriptor. + * + * This must be done before bind(). + */ +extern int rss_sock_set_rss_bucket(int fd, int af, int rss_bucket); + +/* + * Enable or disable receiving RSS/flowid information on + * received UDP frames. + */ +extern int rss_sock_set_recvrss(int fd, int af, int val); + +/* + * Fetch RSS configuration information. + */ +extern struct rss_config * rss_config_get(void); + +/* + * Free an RSS configuration structure. + */ +extern void rss_config_free(struct rss_config *rc); + +/* + * Return how many RSS buckets there are. + */ +extern int rss_config_get_bucket_count(struct rss_config *rc); + +/* + * Fetch the cpuset configuration for the given RSS bucket and + * type. + */ +extern int rss_get_bucket_cpuset(struct rss_config *rc, + rss_bucket_type_t btype, int bucket, cpuset_t *cs); + +/* + * Set a callback for bucket rebalancing. + * + * This will occur in a separate thread context rather than + * a signal handler. + */ +extern int rss_set_bucket_rebalance_cb(rss_bucket_rebalance_cb_t *cb, + void *cbdata); + +#endif /* __LIBRSS_H__ */ From owner-svn-src-all@freebsd.org Fri Sep 30 20:06: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 57257C0404A; Fri, 30 Sep 2016 20:06:06 +0000 (UTC) (envelope-from sevan@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 3236A112; Fri, 30 Sep 2016 20:06:06 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UK65EJ015359; Fri, 30 Sep 2016 20:06:05 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UK65BY015358; Fri, 30 Sep 2016 20:06:05 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201609302006.u8UK65BY015358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 30 Sep 2016 20:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306526 - head/share/misc 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.23 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: Fri, 30 Sep 2016 20:06:06 -0000 Author: sevan (doc committer) Date: Fri Sep 30 20:06:05 2016 New Revision: 306526 URL: https://svnweb.freebsd.org/changeset/base/306526 Log: Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree. Ammend the position of NetBSD 6.0.2 release in the tree as it came after OpenBSD[1] & DragonFlyBSD[2] release according to the release information. The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from NetBSD CVS copy) and confirmed with history page[3] [1] http://www.openbsd.org/53.html [2] https://www.dragonflybsd.org/releases/ [3] http://netbsd.org/releases/formal.html#history Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8099 Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Sep 30 19:59:56 2016 (r306525) +++ head/share/misc/bsd-family-tree Fri Sep 30 20:06:05 2016 (r306526) @@ -258,6 +258,9 @@ FreeBSD 5.2 | | | | 8.3 | | | | | | | | | | | | NetBSD | | | | | | | | 5.1.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 5.1.4 | | | | | | | | OpenBSD 5.1 | | | | Mac OS X | `----. | | | | | 10.8 | \ | | @@ -268,14 +271,17 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | | | NetBSD | | | | | | | | | 5.2.1 | | + | | | | | | | | | | + | | | | | | | NetBSD | | + | | | | | | | 5.2.2 | | | | | | | | | | | | | | | | | \ | | | | | | | | NetBSD | | | | | | | | 6.0.1 | | - | | | | | | | | | + | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -338,6 +344,7 @@ FreeBSD 5.2 | | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | + | | NetBSD 7.0.1 | | | | | | DragonFly 4.6.0 *--FreeBSD | | OpenBSD 6.0 | | 11.0 | | | | @@ -661,12 +668,14 @@ Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] DragonFly 3.6.0 2013-11-25 [DFB] FreeBSD 10.0 2014-01-20 [FBD] -NetBSD 6.0.4 2014-01-27 [NBD] -NetBSD 6.1.3 2014-01-27 [NBD] +NetBSD 5.1.4 2014-01-25 [NBD] +NetBSD 5.2.2 2014-01-25 [NBD] +NetBSD 6.0.4 2014-01-25 [NBD] +NetBSD 6.1.3 2014-01-25 [NBD] DragonFly 3.6.1 2014-02-22 [DFB] DragonFly 3.6.2 2014-04-10 [DFB] -NetBSD 6.0.5 2014-04-19 [NDB] -NetBSD 6.1.4 2014-04-19 [NDB] +NetBSD 6.0.5 2014-04-12 [NDB] +NetBSD 6.1.4 2014-04-12 [NDB] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] DragonFly 3.8.1 2014-06-16 [DFB] @@ -691,6 +700,7 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] From owner-svn-src-all@freebsd.org Fri Sep 30 20:20: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 AC2A8C0421E; Fri, 30 Sep 2016 20:20:08 +0000 (UTC) (envelope-from emaste@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 7D314940; Fri, 30 Sep 2016 20:20:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UKK78Z019280; Fri, 30 Sep 2016 20:20:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UKK7Db019277; Fri, 30 Sep 2016 20:20:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609302020.u8UKK7Db019277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Sep 2016 20:20:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306527 - head/lib/msun/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.23 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: Fri, 30 Sep 2016 20:20:08 -0000 Author: emaste Date: Fri Sep 30 20:20:07 2016 New Revision: 306527 URL: https://svnweb.freebsd.org/changeset/base/306527 Log: libm: remove unused variables for LDBL_MANT_DIG != 113 Sponsored by: The FreeBSD Foundation Modified: head/lib/msun/src/e_coshl.c head/lib/msun/src/e_sinhl.c head/lib/msun/src/s_tanhl.c Modified: head/lib/msun/src/e_coshl.c ============================================================================== --- head/lib/msun/src/e_coshl.c Fri Sep 30 20:06:05 2016 (r306526) +++ head/lib/msun/src/e_coshl.c Fri Sep 30 20:20:07 2016 (r306527) @@ -86,7 +86,9 @@ long double coshl(long double x) { long double hi,lo,x2,x4; +#if LDBL_MANT_DIG == 113 double dx2; +#endif uint16_t ix; GET_LDBL_EXPSIGN(ix,x); Modified: head/lib/msun/src/e_sinhl.c ============================================================================== --- head/lib/msun/src/e_sinhl.c Fri Sep 30 20:06:05 2016 (r306526) +++ head/lib/msun/src/e_sinhl.c Fri Sep 30 20:20:07 2016 (r306527) @@ -85,7 +85,10 @@ long double sinhl(long double x) { long double hi,lo,x2,x4; - double dx2,s; +#if LDBL_MANT_DIG == 113 + double dx2; +#endif + double s; int16_t ix,jx; GET_LDBL_EXPSIGN(jx,x); Modified: head/lib/msun/src/s_tanhl.c ============================================================================== --- head/lib/msun/src/s_tanhl.c Fri Sep 30 20:06:05 2016 (r306526) +++ head/lib/msun/src/s_tanhl.c Fri Sep 30 20:20:07 2016 (r306527) @@ -113,7 +113,9 @@ long double tanhl(long double x) { long double hi,lo,s,x2,x4,z; +#if LDBL_MANT_DIG == 113 double dx2; +#endif int16_t jx,ix; GET_LDBL_EXPSIGN(jx,x); From owner-svn-src-all@freebsd.org Fri Sep 30 20:35:14 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 2933FC045FE; Fri, 30 Sep 2016 20:35:14 +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 EB6C8134D; Fri, 30 Sep 2016 20:35:13 +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 u8UKZDY0026984; Fri, 30 Sep 2016 20:35:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UKZDHf026983; Fri, 30 Sep 2016 20:35:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609302035.u8UKZDHf026983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Sep 2016 20:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306528 - head/usr.sbin/sesutil 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.23 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: Fri, 30 Sep 2016 20:35:14 -0000 Author: mav Date: Fri Sep 30 20:35:12 2016 New Revision: 306528 URL: https://svnweb.freebsd.org/changeset/base/306528 Log: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. MFC after: 1 week Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Fri Sep 30 20:20:07 2016 (r306527) +++ head/usr.sbin/sesutil/sesutil.c Fri Sep 30 20:35:12 2016 (r306528) @@ -118,10 +118,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { From owner-svn-src-all@freebsd.org Fri Sep 30 21:00:11 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 360AAC049B6; Fri, 30 Sep 2016 21:00:11 +0000 (UTC) (envelope-from markj@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 0119B1CFF; Fri, 30 Sep 2016 21:00:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UL0AH9034817; Fri, 30 Sep 2016 21:00:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UL0A3w034815; Fri, 30 Sep 2016 21:00:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609302100.u8UL0A3w034815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Sep 2016 21:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306529 - head/sys/cam 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.23 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: Fri, 30 Sep 2016 21:00:11 -0000 Author: markj Date: Fri Sep 30 21:00:09 2016 New Revision: 306529 URL: https://svnweb.freebsd.org/changeset/base/306529 Log: cam_periph_ccbwait could return while ccb in progress In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb pinfo.index and status fields to determine whether the ccb was done, but these fields are updated without a contending lock and could glitch into states that would be erroneously interpreted as done. Instead, have cam_periph_ccbwait look for the explicit result of the function cam_periph_done. Submitted by: Ryan Libby Reviewed by: mav MFC after: 3 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8020 Modified: head/sys/cam/cam_periph.c head/sys/cam/cam_periph.h Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Fri Sep 30 20:35:12 2016 (r306528) +++ head/sys/cam/cam_periph.c Fri Sep 30 21:00:09 2016 (r306529) @@ -975,16 +975,6 @@ cam_periph_unmapmem(union ccb *ccb, stru PRELE(curproc); } -void -cam_periph_ccbwait(union ccb *ccb) -{ - - if ((ccb->ccb_h.pinfo.index != CAM_UNQUEUED_INDEX) - || ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG)) - xpt_path_sleep(ccb->ccb_h.path, &ccb->ccb_h.cbfcnp, PRIBIO, - "cbwait", 0); -} - int cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int (*error_routine)(union ccb *ccb, @@ -1048,13 +1038,38 @@ cam_periph_ioctl(struct cam_periph *peri } static void +cam_periph_done_panic(struct cam_periph *periph, union ccb *done_ccb) +{ + + panic("%s: already done with ccb %p", __func__, done_ccb); +} + +static void cam_periph_done(struct cam_periph *periph, union ccb *done_ccb) { /* Caller will release the CCB */ + xpt_path_assert(done_ccb->ccb_h.path, MA_OWNED); + done_ccb->ccb_h.cbfcnp = cam_periph_done_panic; wakeup(&done_ccb->ccb_h.cbfcnp); } +static void +cam_periph_ccbwait(union ccb *ccb) +{ + + if ((ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) { + while (ccb->ccb_h.cbfcnp != cam_periph_done_panic) + xpt_path_sleep(ccb->ccb_h.path, &ccb->ccb_h.cbfcnp, + PRIBIO, "cbwait", 0); + } + KASSERT(ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX && + (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG, + ("%s: proceeding with incomplete ccb: ccb=%p, func_code=%#x, " + "status=%#x, index=%d", __func__, ccb, ccb->ccb_h.func_code, + ccb->ccb_h.status, ccb->ccb_h.pinfo.index)); +} + int cam_periph_runccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, @@ -1069,6 +1084,9 @@ cam_periph_runccb(union ccb *ccb, starttime = NULL; xpt_path_assert(ccb->ccb_h.path, MA_OWNED); + KASSERT((ccb->ccb_h.flags & CAM_UNLOCKED) == 0, + ("%s: ccb=%p, func_code=%#x, flags=%#x", __func__, ccb, + ccb->ccb_h.func_code, ccb->ccb_h.flags)); /* * If the user has supplied a stats structure, and if we understand @@ -1088,9 +1106,10 @@ cam_periph_runccb(union ccb *ccb, cam_periph_ccbwait(ccb); if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) error = 0; - else if (error_routine != NULL) + else if (error_routine != NULL) { + ccb->ccb_h.cbfcnp = cam_periph_done; error = (*error_routine)(ccb, camflags, sense_flags); - else + } else error = 0; } while (error == ERESTART); Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Fri Sep 30 20:35:12 2016 (r306528) +++ head/sys/cam/cam_periph.h Fri Sep 30 21:00:09 2016 (r306529) @@ -166,7 +166,6 @@ void cam_periph_unmapmem(union ccb *ccb struct cam_periph_map_info *mapinfo); union ccb *cam_periph_getccb(struct cam_periph *periph, u_int32_t priority); -void cam_periph_ccbwait(union ccb *ccb); int cam_periph_runccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, cam_flags camflags, From owner-svn-src-all@freebsd.org Fri Sep 30 21:04: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 04DCAC04B0B; Fri, 30 Sep 2016 21:04:58 +0000 (UTC) (envelope-from gonzo@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 A7DE41C9; Fri, 30 Sep 2016 21:04:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UL4uAK038657; Fri, 30 Sep 2016 21:04:56 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UL4uaS038654; Fri, 30 Sep 2016 21:04:56 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609302104.u8UL4uaS038654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 21:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306530 - in head/sys/dev: evdev usb/input 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.23 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: Fri, 30 Sep 2016 21:04:58 -0000 Author: gonzo Date: Fri Sep 30 21:04:56 2016 New Revision: 306530 URL: https://svnweb.freebsd.org/changeset/base/306530 Log: Declare a module for evdev and add dependency to ukbd(4) and ums(4) Prepare for making evdev a module. "Pure" evdev device drivers (like touchscreen) and evdev itself can be built as a modules regardless of "options EVDEV" in kernel config. So if people does not require evdev functionality in hybrid drivers like ums and ukbd they can, for instance, kldload evdev and utouchscreen to run FreeBSD in kiosk mode. Modified: head/sys/dev/evdev/evdev.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Fri Sep 30 21:00:09 2016 (r306529) +++ head/sys/dev/evdev/evdev.c Fri Sep 30 21:04:56 2016 (r306530) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -916,3 +917,23 @@ evdev_stop_repeat(struct evdev_dev *evde evdev->ev_rep_key = KEY_RESERVED; } } + +static int +evdev_modevent(module_t mod, int type, void *unused) +{ + switch (type) { + case MOD_LOAD: + return 0; + case MOD_UNLOAD: + return 0; + } + return EINVAL; +} + +static moduledata_t evdev_mod = { + "evdev", + evdev_modevent, + 0 +}; +DECLARE_MODULE(evdev, evdev_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); +MODULE_VERSION(evdev, 1); Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Fri Sep 30 21:00:09 2016 (r306529) +++ head/sys/dev/usb/input/ukbd.c Fri Sep 30 21:04:56 2016 (r306530) @@ -2300,5 +2300,8 @@ static driver_t ukbd_driver = { DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); MODULE_DEPEND(ukbd, usb, 1, 1, 1); +#ifdef EVDEV +MODULE_DEPEND(ukbd, evdev, 1, 1, 1); +#endif MODULE_VERSION(ukbd, 1); USB_PNP_HOST_INFO(ukbd_devs); Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Fri Sep 30 21:00:09 2016 (r306529) +++ head/sys/dev/usb/input/ums.c Fri Sep 30 21:04:56 2016 (r306530) @@ -1199,5 +1199,8 @@ static driver_t ums_driver = { DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass, NULL, 0); MODULE_DEPEND(ums, usb, 1, 1, 1); +#ifdef EVDEV +MODULE_DEPEND(ums, evdev, 1, 1, 1); +#endif MODULE_VERSION(ums, 1); USB_PNP_HOST_INFO(ums_devs); From owner-svn-src-all@freebsd.org Fri Sep 30 21:13:20 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 80491C04D72; Fri, 30 Sep 2016 21:13:20 +0000 (UTC) (envelope-from gonzo@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 50B20B57; Fri, 30 Sep 2016 21:13:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ULDJ10042386; Fri, 30 Sep 2016 21:13:19 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ULDJBU042385; Fri, 30 Sep 2016 21:13:19 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609302113.u8ULDJBU042385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 21:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306531 - head/sys/arm/ti 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.23 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: Fri, 30 Sep 2016 21:13:20 -0000 Author: gonzo Date: Fri Sep 30 21:13:19 2016 New Revision: 306531 URL: https://svnweb.freebsd.org/changeset/base/306531 Log: Add dependency to evdev module (if required) Modified: head/sys/arm/ti/ti_adc.c Modified: head/sys/arm/ti/ti_adc.c ============================================================================== --- head/sys/arm/ti/ti_adc.c Fri Sep 30 21:04:56 2016 (r306530) +++ head/sys/arm/ti/ti_adc.c Fri Sep 30 21:13:19 2016 (r306531) @@ -958,3 +958,6 @@ static devclass_t ti_adc_devclass; DRIVER_MODULE(ti_adc, simplebus, ti_adc_driver, ti_adc_devclass, 0, 0); MODULE_VERSION(ti_adc, 1); MODULE_DEPEND(ti_adc, simplebus, 1, 1, 1); +#ifdef EVDEV +MODULE_DEPEND(ti_adc, evdev, 1, 1, 1); +#endif From owner-svn-src-all@freebsd.org Fri Sep 30 21:14:43 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 D2BEAC04E83; Fri, 30 Sep 2016 21:14:43 +0000 (UTC) (envelope-from gonzo@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 A3329DEC; Fri, 30 Sep 2016 21:14:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ULEg0q042600; Fri, 30 Sep 2016 21:14:42 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ULEg0X042599; Fri, 30 Sep 2016 21:14:42 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609302114.u8ULEg0X042599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 21:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306532 - head/sys/arm/broadcom/bcm2835 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.23 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: Fri, 30 Sep 2016 21:14:43 -0000 Author: gonzo Date: Fri Sep 30 21:14:42 2016 New Revision: 306532 URL: https://svnweb.freebsd.org/changeset/base/306532 Log: Add dependency to evdev module Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Fri Sep 30 21:13:19 2016 (r306531) +++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Fri Sep 30 21:14:42 2016 (r306532) @@ -335,3 +335,4 @@ static driver_t ft5406ts_driver = { }; DRIVER_MODULE(ft5406ts, ofwbus, ft5406ts_driver, ft5406ts_devclass, 0, 0); +MODULE_DEPEND(ft5406ts, evdev, 1, 1, 1); From owner-svn-src-all@freebsd.org Fri Sep 30 22:05: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 9B0B0C03C9E; Fri, 30 Sep 2016 22:05:49 +0000 (UTC) (envelope-from jhb@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 7631EB0B; Fri, 30 Sep 2016 22:05:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UM5mtW061300; Fri, 30 Sep 2016 22:05:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UM5m84061293; Fri, 30 Sep 2016 22:05:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609302205.u8UM5m84061293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 22:05: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: r306533 - in stable: 10/lib/libdevctl 10/sys/kern 10/sys/sys 10/usr.sbin/devctl 11/lib/libdevctl 11/sys/kern 11/sys/sys 11/usr.sbin/devctl 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.23 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: Fri, 30 Sep 2016 22:05:49 -0000 Author: jhb Date: Fri Sep 30 22:05:47 2016 New Revision: 306533 URL: https://svnweb.freebsd.org/changeset/base/306533 Log: MFC 305034: Implement 'devctl clear driver' to undo a previous 'set driver'. Add a new 'clear driver' command for devctl along with the accompanying ioctl and devctl_clear_driver() library routine to reset a device to use a wildcard devclass instead of a fixed devclass. This can be used to undo a previous 'set driver' command. After the device's name has been reset to permit wildcard names, it is reprobed so that it can attach to newly-available (to it) device drivers. Sponsored by: Chelsio Communications Modified: stable/10/lib/libdevctl/devctl.3 stable/10/lib/libdevctl/devctl.c stable/10/lib/libdevctl/devctl.h stable/10/sys/kern/subr_bus.c stable/10/sys/sys/bus.h stable/10/usr.sbin/devctl/devctl.8 stable/10/usr.sbin/devctl/devctl.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libdevctl/devctl.3 stable/11/lib/libdevctl/devctl.c stable/11/lib/libdevctl/devctl.h stable/11/sys/kern/subr_bus.c stable/11/sys/sys/bus.h stable/11/usr.sbin/devctl/devctl.8 stable/11/usr.sbin/devctl/devctl.c Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/libdevctl/devctl.3 ============================================================================== --- stable/10/lib/libdevctl/devctl.3 Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/lib/libdevctl/devctl.3 Fri Sep 30 22:05:47 2016 (r306533) @@ -25,12 +25,13 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2016 +.Dd August 29, 2016 .Dt DEVCTL 3 .Os .Sh NAME .Nm devctl , .Nm devctl_attach , +.Nm devctl_clear_driver , .Nm devctl_detach , .Nm devctl_disable , .Nm devctl_enable , @@ -43,6 +44,8 @@ .Ft int .Fn devctl_attach "const char *device" .Ft int +.Fn devctl_clear_driver "const char *device" "bool force" +.Ft int .Fn devctl_detach "const char *device" "bool force" .Ft int .Fn devctl_disable "const char *device" "bool force_detach" @@ -133,9 +136,26 @@ If the device is already attached and is true, the device will be detached from its current device driver before it is attached to the new device driver. +.Pp +The +.Fn devctl_clear_driver +function resets a device so that it can be attached to any valid device +driver rather than only drivers with a previously specified name. +This function is used to undo a previous call to +.Fn devctl_set_driver . +If the device is already attached and +.Fa force +is false, +the request will fail. +If the device is already attached and +.Fa force +is true, +the device will be detached from its current device driver. +After the device's name is reset, +it is reprobed and attached to a suitable device driver if one is found. .Sh RETURN VALUES -.Rv -std devctl_attach devctl_detach devctl_disable devctl_enable \ -devctl_set_driver +.Rv -std devctl_attach devctl_clear_driver devctl_detach \ +devctl_disable devctl_enable devctl_set_driver .Sh ERRORS In addition to specific errors noted below, all of the @@ -244,6 +264,24 @@ The device is disabled. .It Bq Er ENXIO The new device driver failed to attach. .El +.Pp +The +.Fn devctl_clear_driver +function may fail if: +.Bl -tag -width Er +.It Bq Er EBUSY +The device is currently attached to a device driver and +.Fa force +is false. +.It Bq Er EBUSY +The current device driver for +.Fa device +is busy and cannot detach at this time. +.It Bq Er EINVAL +The device is not configured for a specific device driver name. +.It Bq Er ENXIO +The device driver chosen after reprobing failed to attach. +.El .Sh SEE ALSO .Xr devinfo 3 , .Xr devstat 3 , Modified: stable/10/lib/libdevctl/devctl.c ============================================================================== --- stable/10/lib/libdevctl/devctl.c Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/lib/libdevctl/devctl.c Fri Sep 30 22:05:47 2016 (r306533) @@ -108,3 +108,11 @@ devctl_set_driver(const char *device, co req.dr_flags |= DEVF_SET_DRIVER_DETACH; return (devctl_request(DEV_SET_DRIVER, &req)); } + +int +devctl_clear_driver(const char *device, bool force) +{ + + return (devctl_simple_request(DEV_CLEAR_DRIVER, device, force ? + DEVF_CLEAR_DRIVER_DETACH : 0)); +} Modified: stable/10/lib/libdevctl/devctl.h ============================================================================== --- stable/10/lib/libdevctl/devctl.h Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/lib/libdevctl/devctl.h Fri Sep 30 22:05:47 2016 (r306533) @@ -36,5 +36,6 @@ int devctl_detach(const char *device, bo int devctl_enable(const char *device); int devctl_disable(const char *device, bool force_detach); int devctl_set_driver(const char *device, const char *driver, bool force); +int devctl_clear_driver(const char *device, bool force); #endif /* !__DEVCTL_H__ */ Modified: stable/10/sys/kern/subr_bus.c ============================================================================== --- stable/10/sys/kern/subr_bus.c Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/sys/kern/subr_bus.c Fri Sep 30 22:05:47 2016 (r306533) @@ -5069,6 +5069,7 @@ devctl2_ioctl(struct cdev *cdev, u_long case DEV_ENABLE: case DEV_DISABLE: case DEV_SET_DRIVER: + case DEV_CLEAR_DRIVER: error = priv_check(td, PRIV_DRIVER); if (error == 0) error = find_device(req, &dev); @@ -5210,6 +5211,25 @@ devctl2_ioctl(struct cdev *cdev, u_long error = device_probe_and_attach(dev); break; } + case DEV_CLEAR_DRIVER: + if (!(dev->flags & DF_FIXEDCLASS)) { + error = 0; + break; + } + if (device_is_attached(dev)) { + if (req->dr_flags & DEVF_CLEAR_DRIVER_DETACH) + error = device_detach(dev); + else + error = EBUSY; + if (error) + break; + } + + dev->flags &= ~DF_FIXEDCLASS; + dev->flags |= DF_WILDCARD; + devclass_delete_device(dev->devclass, dev); + error = device_probe_and_attach(dev); + break; } mtx_unlock(&Giant); return (error); Modified: stable/10/sys/sys/bus.h ============================================================================== --- stable/10/sys/sys/bus.h Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/sys/sys/bus.h Fri Sep 30 22:05:47 2016 (r306533) @@ -103,6 +103,7 @@ struct devreq { #define DEV_ENABLE _IOW('D', 3, struct devreq) #define DEV_DISABLE _IOW('D', 4, struct devreq) #define DEV_SET_DRIVER _IOW('D', 7, struct devreq) +#define DEV_CLEAR_DRIVER _IOW('D', 8, struct devreq) /* Flags for DEV_DETACH and DEV_DISABLE. */ #define DEVF_FORCE_DETACH 0x0000001 @@ -110,6 +111,9 @@ struct devreq { /* Flags for DEV_SET_DRIVER. */ #define DEVF_SET_DRIVER_DETACH 0x0000001 /* Detach existing driver. */ +/* Flags for DEV_CLEAR_DRIVER. */ +#define DEVF_CLEAR_DRIVER_DETACH 0x0000001 /* Detach existing driver. */ + #ifdef _KERNEL #include Modified: stable/10/usr.sbin/devctl/devctl.8 ============================================================================== --- stable/10/usr.sbin/devctl/devctl.8 Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/usr.sbin/devctl/devctl.8 Fri Sep 30 22:05:47 2016 (r306533) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2016 +.Dd August 29, 2016 .Dt DEVCTL 8 .Os .Sh NAME @@ -36,6 +36,10 @@ .Cm attach .Ar device .Nm +.Cm clear driver +.Op Fl f +.Ar device +.Nm .Cm detach .Op Fl f .Ar device @@ -115,6 +119,21 @@ If the device is already attached to a d .Fl f flag is not specified, the device will not be changed. +.It Xo Cm clear driver +.Op Fl f +.Ar device +.Xc +Clear a previously-forced driver name so that the device is able to use any +valid device driver. +After the previous name has been cleared, +the device is reprobed so that other device drivers may attach to it. +This can be used to undo an earlier +.Cm set driver +command. +If the device is currently attached to a device driver and the +.Fl f +flag is not specified, +the device will not be changed. .El .Sh SEE ALSO .Xr devctl 3 , Modified: stable/10/usr.sbin/devctl/devctl.c ============================================================================== --- stable/10/usr.sbin/devctl/devctl.c Fri Sep 30 21:14:42 2016 (r306532) +++ stable/10/usr.sbin/devctl/devctl.c Fri Sep 30 22:05:47 2016 (r306533) @@ -65,17 +65,19 @@ static int devctl_table_handler(struct d SET_DECLARE(DEVCTL_DATASET(top), struct devctl_command); +DEVCTL_TABLE(top, clear); DEVCTL_TABLE(top, set); static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n", "usage: devctl attach device", " devctl detach [-f] device", " devctl disable [-f] device", " devctl enable device", - " devctl set driver [-f] device driver"); + " devctl set driver [-f] device driver", + " devctl clear driver [-f] device"); exit(1); } @@ -233,6 +235,40 @@ set_driver(int ac, char **av) } DEVCTL_COMMAND(set, driver, set_driver); +static void +clear_driver_usage(void) +{ + + fprintf(stderr, "usage: devctl clear driver [-f] device\n"); + exit(1); +} + +static int +clear_driver(int ac, char **av) +{ + bool force; + int ch; + + force = false; + while ((ch = getopt(ac, av, "f")) != -1) + switch (ch) { + case 'f': + force = true; + break; + default: + clear_driver_usage(); + } + ac -= optind; + av += optind; + + if (ac != 1) + clear_driver_usage(); + if (devctl_clear_driver(av[0], force) < 0) + err(1, "Failed to clear %s driver", av[0]); + return (0); +} +DEVCTL_COMMAND(clear, driver, clear_driver); + int main(int ac, char *av[]) { From owner-svn-src-all@freebsd.org Fri Sep 30 22:05: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 66F38C03CA6; Fri, 30 Sep 2016 22:05:50 +0000 (UTC) (envelope-from jhb@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 44E60B0C; Fri, 30 Sep 2016 22:05:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UM5n7Z061312; Fri, 30 Sep 2016 22:05:49 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UM5mPw061305; Fri, 30 Sep 2016 22:05:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609302205.u8UM5mPw061305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 22:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306533 - in stable: 10/lib/libdevctl 10/sys/kern 10/sys/sys 10/usr.sbin/devctl 11/lib/libdevctl 11/sys/kern 11/sys/sys 11/usr.sbin/devctl X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 22:05:50 -0000 Author: jhb Date: Fri Sep 30 22:05:47 2016 New Revision: 306533 URL: https://svnweb.freebsd.org/changeset/base/306533 Log: MFC 305034: Implement 'devctl clear driver' to undo a previous 'set driver'. Add a new 'clear driver' command for devctl along with the accompanying ioctl and devctl_clear_driver() library routine to reset a device to use a wildcard devclass instead of a fixed devclass. This can be used to undo a previous 'set driver' command. After the device's name has been reset to permit wildcard names, it is reprobed so that it can attach to newly-available (to it) device drivers. Sponsored by: Chelsio Communications Modified: stable/11/lib/libdevctl/devctl.3 stable/11/lib/libdevctl/devctl.c stable/11/lib/libdevctl/devctl.h stable/11/sys/kern/subr_bus.c stable/11/sys/sys/bus.h stable/11/usr.sbin/devctl/devctl.8 stable/11/usr.sbin/devctl/devctl.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libdevctl/devctl.3 stable/10/lib/libdevctl/devctl.c stable/10/lib/libdevctl/devctl.h stable/10/sys/kern/subr_bus.c stable/10/sys/sys/bus.h stable/10/usr.sbin/devctl/devctl.8 stable/10/usr.sbin/devctl/devctl.c Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/libdevctl/devctl.3 ============================================================================== --- stable/11/lib/libdevctl/devctl.3 Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/lib/libdevctl/devctl.3 Fri Sep 30 22:05:47 2016 (r306533) @@ -25,12 +25,13 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2016 +.Dd August 29, 2016 .Dt DEVCTL 3 .Os .Sh NAME .Nm devctl , .Nm devctl_attach , +.Nm devctl_clear_driver , .Nm devctl_delete , .Nm devctl_detach , .Nm devctl_disable , @@ -47,6 +48,8 @@ .Ft int .Fn devctl_attach "const char *device" .Ft int +.Fn devctl_clear_driver "const char *device" "bool force" +.Ft int .Fn devctl_delete "const char *device" "bool force" .Ft int .Fn devctl_detach "const char *device" "bool force" @@ -166,12 +169,30 @@ the device will be detached from its cur attached to the new device driver. .Pp The +.Fn devctl_clear_driver +function resets a device so that it can be attached to any valid device +driver rather than only drivers with a previously specified name. +This function is used to undo a previous call to +.Fn devctl_set_driver . +If the device is already attached and +.Fa force +is false, +the request will fail. +If the device is already attached and +.Fa force +is true, +the device will be detached from its current device driver. +After the device's name is reset, +it is reprobed and attached to a suitable device driver if one is found. +.Pp +The .Fn devctl_rescan function rescans a bus device checking for devices that have been added or removed. .Sh RETURN VALUES -.Rv -std devctl_attach devctl_delete devctl_detach devctl_disable \ -devctl_enable devctl_suspend devctl_rescan devctl_resume devctl_set_driver +.Rv -std devctl_attach devctl_clear_driver devctl_delete devctl_detach \ +devctl_disable devctl_enable devctl_suspend devctl_rescan devctl_resume \ +devctl_set_driver .Sh ERRORS In addition to specific errors noted below, all of the @@ -302,6 +323,24 @@ The new device driver failed to attach. .El .Pp The +.Fn devctl_clear_driver +function may fail if: +.Bl -tag -width Er +.It Bq Er EBUSY +The device is currently attached to a device driver and +.Fa force +is false. +.It Bq Er EBUSY +The current device driver for +.Fa device +is busy and cannot detach at this time. +.It Bq Er EINVAL +The device is not configured for a specific device driver name. +.It Bq Er ENXIO +The device driver chosen after reprobing failed to attach. +.El +.Pp +The .Fn devctl_rescan function may fail if: .Bl -tag -width Er Modified: stable/11/lib/libdevctl/devctl.c ============================================================================== --- stable/11/lib/libdevctl/devctl.c Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/lib/libdevctl/devctl.c Fri Sep 30 22:05:47 2016 (r306533) @@ -124,6 +124,14 @@ devctl_set_driver(const char *device, co } int +devctl_clear_driver(const char *device, bool force) +{ + + return (devctl_simple_request(DEV_CLEAR_DRIVER, device, force ? + DEVF_CLEAR_DRIVER_DETACH : 0)); +} + +int devctl_rescan(const char *device) { Modified: stable/11/lib/libdevctl/devctl.h ============================================================================== --- stable/11/lib/libdevctl/devctl.h Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/lib/libdevctl/devctl.h Fri Sep 30 22:05:47 2016 (r306533) @@ -38,6 +38,7 @@ int devctl_disable(const char *device, b int devctl_suspend(const char *device); int devctl_resume(const char *device); int devctl_set_driver(const char *device, const char *driver, bool force); +int devctl_clear_driver(const char *device, bool force); int devctl_rescan(const char *device); int devctl_delete(const char *device, bool force); Modified: stable/11/sys/kern/subr_bus.c ============================================================================== --- stable/11/sys/kern/subr_bus.c Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/sys/kern/subr_bus.c Fri Sep 30 22:05:47 2016 (r306533) @@ -5427,6 +5427,7 @@ devctl2_ioctl(struct cdev *cdev, u_long case DEV_SUSPEND: case DEV_RESUME: case DEV_SET_DRIVER: + case DEV_CLEAR_DRIVER: case DEV_RESCAN: case DEV_DELETE: error = priv_check(td, PRIV_DRIVER); @@ -5592,6 +5593,25 @@ devctl2_ioctl(struct cdev *cdev, u_long error = device_probe_and_attach(dev); break; } + case DEV_CLEAR_DRIVER: + if (!(dev->flags & DF_FIXEDCLASS)) { + error = 0; + break; + } + if (device_is_attached(dev)) { + if (req->dr_flags & DEVF_CLEAR_DRIVER_DETACH) + error = device_detach(dev); + else + error = EBUSY; + if (error) + break; + } + + dev->flags &= ~DF_FIXEDCLASS; + dev->flags |= DF_WILDCARD; + devclass_delete_device(dev->devclass, dev); + error = device_probe_and_attach(dev); + break; case DEV_RESCAN: if (!device_is_attached(dev)) { error = ENXIO; Modified: stable/11/sys/sys/bus.h ============================================================================== --- stable/11/sys/sys/bus.h Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/sys/sys/bus.h Fri Sep 30 22:05:47 2016 (r306533) @@ -117,6 +117,7 @@ struct devreq { #define DEV_SUSPEND _IOW('D', 5, struct devreq) #define DEV_RESUME _IOW('D', 6, struct devreq) #define DEV_SET_DRIVER _IOW('D', 7, struct devreq) +#define DEV_CLEAR_DRIVER _IOW('D', 8, struct devreq) #define DEV_RESCAN _IOW('D', 9, struct devreq) #define DEV_DELETE _IOW('D', 10, struct devreq) @@ -126,6 +127,9 @@ struct devreq { /* Flags for DEV_SET_DRIVER. */ #define DEVF_SET_DRIVER_DETACH 0x0000001 /* Detach existing driver. */ +/* Flags for DEV_CLEAR_DRIVER. */ +#define DEVF_CLEAR_DRIVER_DETACH 0x0000001 /* Detach existing driver. */ + /* Flags for DEV_DELETE. */ #define DEVF_FORCE_DELETE 0x0000001 Modified: stable/11/usr.sbin/devctl/devctl.8 ============================================================================== --- stable/11/usr.sbin/devctl/devctl.8 Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/usr.sbin/devctl/devctl.8 Fri Sep 30 22:05:47 2016 (r306533) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2016 +.Dd August 29, 2016 .Dt DEVCTL 8 .Os .Sh NAME @@ -36,6 +36,10 @@ .Cm attach .Ar device .Nm +.Cm clear driver +.Op Fl f +.Ar device +.Nm .Cm detach .Op Fl f .Ar device @@ -133,6 +137,21 @@ If the device is already attached to a d .Fl f flag is not specified, the device will not be changed. +.It Xo Cm clear driver +.Op Fl f +.Ar device +.Xc +Clear a previously-forced driver name so that the device is able to use any +valid device driver. +After the previous name has been cleared, +the device is reprobed so that other device drivers may attach to it. +This can be used to undo an earlier +.Cm set driver +command. +If the device is currently attached to a device driver and the +.Fl f +flag is not specified, +the device will not be changed. .It Cm rescan Ar device Rescan a bus device checking for devices that have been added or removed. Modified: stable/11/usr.sbin/devctl/devctl.c ============================================================================== --- stable/11/usr.sbin/devctl/devctl.c Fri Sep 30 21:14:42 2016 (r306532) +++ stable/11/usr.sbin/devctl/devctl.c Fri Sep 30 22:05:47 2016 (r306533) @@ -65,12 +65,13 @@ static int devctl_table_handler(struct d SET_DECLARE(DEVCTL_DATASET(top), struct devctl_command); +DEVCTL_TABLE(top, clear); DEVCTL_TABLE(top, set); static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: devctl attach device", " devctl detach [-f] device", " devctl disable [-f] device", @@ -78,6 +79,7 @@ usage(void) " devctl suspend device", " devctl resume device", " devctl set driver [-f] device driver", + " devctl clear driver [-f] device", " devctl rescan device", " devctl delete [-f] device"); exit(1); @@ -261,6 +263,40 @@ set_driver(int ac, char **av) } DEVCTL_COMMAND(set, driver, set_driver); +static void +clear_driver_usage(void) +{ + + fprintf(stderr, "usage: devctl clear driver [-f] device\n"); + exit(1); +} + +static int +clear_driver(int ac, char **av) +{ + bool force; + int ch; + + force = false; + while ((ch = getopt(ac, av, "f")) != -1) + switch (ch) { + case 'f': + force = true; + break; + default: + clear_driver_usage(); + } + ac -= optind; + av += optind; + + if (ac != 1) + clear_driver_usage(); + if (devctl_clear_driver(av[0], force) < 0) + err(1, "Failed to clear %s driver", av[0]); + return (0); +} +DEVCTL_COMMAND(clear, driver, clear_driver); + static int rescan(int ac, char **av) { From owner-svn-src-all@freebsd.org Fri Sep 30 22:28: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 278D9C04186; Fri, 30 Sep 2016 22:28:22 +0000 (UTC) (envelope-from tsoome@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 EBDCB176F; Fri, 30 Sep 2016 22:28:21 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UMSLGA068685; Fri, 30 Sep 2016 22:28:21 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UMSLuQ068684; Fri, 30 Sep 2016 22:28:21 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201609302228.u8UMSLuQ068684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 30 Sep 2016 22:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306534 - head/lib/libstand 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.23 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: Fri, 30 Sep 2016 22:28:22 -0000 Author: tsoome Date: Fri Sep 30 22:28:20 2016 New Revision: 306534 URL: https://svnweb.freebsd.org/changeset/base/306534 Log: cd9660_open should check for padding The libstand cd9660 reader code must check for extents having padding. Reviewed by: jhb Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8101 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Fri Sep 30 22:05:47 2016 (r306533) +++ head/lib/libstand/cd9660.c Fri Sep 30 22:28:20 2016 (r306534) @@ -353,7 +353,15 @@ cd9660_open(const char *path, struct ope dp = (struct iso_directory_record *) ((char *) dp + isonum_711(dp->length)); - off += isonum_711(dp->length); + + /* if the new block is zero length, its padding */ + if (isonum_711(dp->length) == 0) { + /* skip to next block, if any */ + off = boff * ISO_DEFAULT_BLOCK_SIZE; + continue; + } else { + off += isonum_711(dp->length); + } } if (off >= dsize) { rc = ENOENT; From owner-svn-src-all@freebsd.org Fri Sep 30 22:29:20 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 8D1C8C041DF; Fri, 30 Sep 2016 22:29:20 +0000 (UTC) (envelope-from jhb@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 45457192E; Fri, 30 Sep 2016 22:29:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UMTJeu068765; Fri, 30 Sep 2016 22:29:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UMTJl5068763; Fri, 30 Sep 2016 22:29:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609302229.u8UMTJl5068763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Sep 2016 22:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306535 - in stable/11: share/man/man9 sys/kern X-SVN-Group: stable-11 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.23 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: Fri, 30 Sep 2016 22:29:20 -0000 Author: jhb Date: Fri Sep 30 22:29:19 2016 New Revision: 306535 URL: https://svnweb.freebsd.org/changeset/base/306535 Log: MFC 305751: Make device_quiet() an attachment property. In particular, reset the DF_QUIET flag when detaching from a device so that a driver that marks a device quiet doesn't dictate policy for a different driver that may claim the device in the future. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man9/device_quiet.9 stable/11/sys/kern/subr_bus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/device_quiet.9 ============================================================================== --- stable/11/share/man/man9/device_quiet.9 Fri Sep 30 22:28:20 2016 (r306534) +++ stable/11/share/man/man9/device_quiet.9 Fri Sep 30 22:29:19 2016 (r306535) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 1999 +.Dd September 12, 2016 .Dt DEVICE_QUIET 9 .Os .Sh NAME @@ -49,16 +49,18 @@ Each device has a quiet flag associated with it. A device is verbose by default when it is created but may be quieted to prevent -the device identification string to be printed during probe. +printing of the device identification string during attach +and printing of a message during detach. To quiet a device, call -.Fn device_quiet , -to re-enable to probe message (to make the message appear again, for -example after a -.Xr device_detach 9 ) +.Fn device_quiet +during a device driver probe routine. +To re-enable probe messages, call .Fn device_verbose . To test to see if a device is quieted, call .Fn device_is_quiet . +.Pp +Devices are implicitly marked verbose after a driver detaches. .Sh SEE ALSO .Xr device 9 .Sh AUTHORS Modified: stable/11/sys/kern/subr_bus.c ============================================================================== --- stable/11/sys/kern/subr_bus.c Fri Sep 30 22:28:20 2016 (r306534) +++ stable/11/sys/kern/subr_bus.c Fri Sep 30 22:29:19 2016 (r306535) @@ -2146,6 +2146,12 @@ device_probe_child(device_t dev, device_ } /* + * Reset DF_QUIET in case this driver doesn't + * end up as the best driver. + */ + device_verbose(child); + + /* * Probes that return BUS_PROBE_NOWILDCARD or lower * only match on devices whose driver was explicitly * specified. @@ -2970,6 +2976,7 @@ device_detach(device_t dev) if (!(dev->flags & DF_FIXEDCLASS)) devclass_delete_device(dev->devclass, dev); + device_verbose(dev); dev->state = DS_NOTPRESENT; (void)device_set_driver(dev, NULL); device_sysctl_fini(dev); From owner-svn-src-all@freebsd.org Fri Sep 30 22:41:00 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 45277C04350; Fri, 30 Sep 2016 22:41:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E49361142; Fri, 30 Sep 2016 22:40:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UMexeJ074549; Fri, 30 Sep 2016 22:40:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UMexp2074545; Fri, 30 Sep 2016 22:40:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609302240.u8UMexp2074545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 30 Sep 2016 22:40:59 +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: r306536 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... 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.23 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: Fri, 30 Sep 2016 22:41:00 -0000 Author: jkim Date: Fri Sep 30 22:40:58 2016 New Revision: 306536 URL: https://svnweb.freebsd.org/changeset/base/306536 Log: MFC: r284583, r285797, r285799, r287168, r298714, r298720, r298838, r300879 Merge ACPICA up to 20160527. Requested by: mav Added: stable/10/sys/contrib/dev/acpica/common/acfileio.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/common/acfileio.c stable/10/sys/contrib/dev/acpica/common/dmtables.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/common/dmtables.c stable/10/sys/contrib/dev/acpica/compiler/aslcstyle.y - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/aslcstyle.y stable/10/sys/contrib/dev/acpica/compiler/asldebug.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/asldebug.c stable/10/sys/contrib/dev/acpica/compiler/aslexternal.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/aslexternal.c stable/10/sys/contrib/dev/acpica/compiler/aslpld.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/aslpld.c stable/10/sys/contrib/dev/acpica/compiler/aslresources.y - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/aslresources.y stable/10/sys/contrib/dev/acpica/compiler/aslxrefout.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/aslxrefout.c stable/10/sys/contrib/dev/acpica/compiler/dttable1.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/dttable1.c stable/10/sys/contrib/dev/acpica/compiler/dttable2.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/compiler/dttable2.c stable/10/sys/contrib/dev/acpica/components/debugger/dbobject.c - copied, changed from r285797, head/sys/contrib/dev/acpica/components/debugger/dbobject.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c - copied, changed from r285797, head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c stable/10/sys/contrib/dev/acpica/components/executer/exconcat.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/components/executer/exconcat.c stable/10/sys/contrib/dev/acpica/components/executer/extrace.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/components/executer/extrace.c stable/10/sys/contrib/dev/acpica/components/utilities/utascii.c - copied unchanged from r298714, head/sys/contrib/dev/acpica/components/utilities/utascii.c stable/10/sys/contrib/dev/acpica/components/utilities/utnonansi.c - copied, changed from r285797, head/sys/contrib/dev/acpica/components/utilities/utnonansi.c stable/10/sys/contrib/dev/acpica/include/acclib.h - copied, changed from r284583, head/sys/contrib/dev/acpica/include/acclib.h stable/10/sys/libkern/strncat.c - copied unchanged from r298714, head/sys/libkern/strncat.c Deleted: stable/10/sys/contrib/dev/acpica/components/disassembler/dmobject.c stable/10/sys/contrib/dev/acpica/components/utilities/utfileio.c Modified: stable/10/sys/conf/files stable/10/sys/contrib/dev/acpica/acpica_prep.sh stable/10/sys/contrib/dev/acpica/changes.txt stable/10/sys/contrib/dev/acpica/common/acgetline.c stable/10/sys/contrib/dev/acpica/common/adfile.c stable/10/sys/contrib/dev/acpica/common/adisasm.c stable/10/sys/contrib/dev/acpica/common/adwalk.c stable/10/sys/contrib/dev/acpica/common/ahids.c stable/10/sys/contrib/dev/acpica/common/ahpredef.c stable/10/sys/contrib/dev/acpica/common/ahtable.c stable/10/sys/contrib/dev/acpica/common/ahuuids.c stable/10/sys/contrib/dev/acpica/common/cmfsize.c stable/10/sys/contrib/dev/acpica/common/dmextern.c stable/10/sys/contrib/dev/acpica/common/dmrestag.c stable/10/sys/contrib/dev/acpica/common/dmtable.c stable/10/sys/contrib/dev/acpica/common/dmtbdump.c stable/10/sys/contrib/dev/acpica/common/dmtbinfo.c stable/10/sys/contrib/dev/acpica/common/getopt.c stable/10/sys/contrib/dev/acpica/compiler/aslanalyze.c stable/10/sys/contrib/dev/acpica/compiler/aslascii.c stable/10/sys/contrib/dev/acpica/compiler/aslbtypes.c stable/10/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/10/sys/contrib/dev/acpica/compiler/aslcompile.c stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.l stable/10/sys/contrib/dev/acpica/compiler/asldefine.h stable/10/sys/contrib/dev/acpica/compiler/aslerror.c stable/10/sys/contrib/dev/acpica/compiler/aslfileio.c stable/10/sys/contrib/dev/acpica/compiler/aslfiles.c stable/10/sys/contrib/dev/acpica/compiler/aslfold.c stable/10/sys/contrib/dev/acpica/compiler/aslglobal.h stable/10/sys/contrib/dev/acpica/compiler/aslhex.c stable/10/sys/contrib/dev/acpica/compiler/asllength.c stable/10/sys/contrib/dev/acpica/compiler/asllisting.c stable/10/sys/contrib/dev/acpica/compiler/asllistsup.c stable/10/sys/contrib/dev/acpica/compiler/aslload.c stable/10/sys/contrib/dev/acpica/compiler/asllookup.c stable/10/sys/contrib/dev/acpica/compiler/aslmain.c stable/10/sys/contrib/dev/acpica/compiler/aslmap.c stable/10/sys/contrib/dev/acpica/compiler/aslmapenter.c stable/10/sys/contrib/dev/acpica/compiler/aslmapoutput.c stable/10/sys/contrib/dev/acpica/compiler/aslmaputils.c stable/10/sys/contrib/dev/acpica/compiler/aslmessages.c stable/10/sys/contrib/dev/acpica/compiler/aslmessages.h stable/10/sys/contrib/dev/acpica/compiler/aslmethod.c stable/10/sys/contrib/dev/acpica/compiler/aslnamesp.c stable/10/sys/contrib/dev/acpica/compiler/asloffset.c stable/10/sys/contrib/dev/acpica/compiler/aslopcodes.c stable/10/sys/contrib/dev/acpica/compiler/asloperands.c stable/10/sys/contrib/dev/acpica/compiler/aslopt.c stable/10/sys/contrib/dev/acpica/compiler/asloptions.c stable/10/sys/contrib/dev/acpica/compiler/aslparser.y stable/10/sys/contrib/dev/acpica/compiler/aslpredef.c stable/10/sys/contrib/dev/acpica/compiler/aslprepkg.c stable/10/sys/contrib/dev/acpica/compiler/aslprintf.c stable/10/sys/contrib/dev/acpica/compiler/aslprune.c stable/10/sys/contrib/dev/acpica/compiler/aslresource.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype1.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype1i.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2d.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2e.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2q.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2s.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2w.c stable/10/sys/contrib/dev/acpica/compiler/aslrules.y stable/10/sys/contrib/dev/acpica/compiler/aslstartup.c stable/10/sys/contrib/dev/acpica/compiler/aslstubs.c stable/10/sys/contrib/dev/acpica/compiler/aslsupport.l stable/10/sys/contrib/dev/acpica/compiler/aslsupport.y stable/10/sys/contrib/dev/acpica/compiler/asltokens.y stable/10/sys/contrib/dev/acpica/compiler/asltransform.c stable/10/sys/contrib/dev/acpica/compiler/asltree.c stable/10/sys/contrib/dev/acpica/compiler/asltypes.h stable/10/sys/contrib/dev/acpica/compiler/asltypes.y stable/10/sys/contrib/dev/acpica/compiler/aslutils.c stable/10/sys/contrib/dev/acpica/compiler/asluuid.c stable/10/sys/contrib/dev/acpica/compiler/aslwalks.c stable/10/sys/contrib/dev/acpica/compiler/aslxref.c stable/10/sys/contrib/dev/acpica/compiler/dtcompile.c stable/10/sys/contrib/dev/acpica/compiler/dtcompiler.h stable/10/sys/contrib/dev/acpica/compiler/dtexpress.c stable/10/sys/contrib/dev/acpica/compiler/dtfield.c stable/10/sys/contrib/dev/acpica/compiler/dtio.c stable/10/sys/contrib/dev/acpica/compiler/dtparser.l stable/10/sys/contrib/dev/acpica/compiler/dtparser.y stable/10/sys/contrib/dev/acpica/compiler/dtsubtable.c stable/10/sys/contrib/dev/acpica/compiler/dttable.c stable/10/sys/contrib/dev/acpica/compiler/dttemplate.c stable/10/sys/contrib/dev/acpica/compiler/dttemplate.h stable/10/sys/contrib/dev/acpica/compiler/dtutils.c stable/10/sys/contrib/dev/acpica/compiler/preprocess.h stable/10/sys/contrib/dev/acpica/compiler/prexpress.c stable/10/sys/contrib/dev/acpica/compiler/prmacros.c stable/10/sys/contrib/dev/acpica/compiler/prparser.l stable/10/sys/contrib/dev/acpica/compiler/prparser.y stable/10/sys/contrib/dev/acpica/compiler/prscan.c stable/10/sys/contrib/dev/acpica/compiler/prutils.c stable/10/sys/contrib/dev/acpica/components/debugger/dbcmds.c stable/10/sys/contrib/dev/acpica/components/debugger/dbconvert.c stable/10/sys/contrib/dev/acpica/components/debugger/dbdisply.c stable/10/sys/contrib/dev/acpica/components/debugger/dbexec.c stable/10/sys/contrib/dev/acpica/components/debugger/dbfileio.c stable/10/sys/contrib/dev/acpica/components/debugger/dbhistry.c stable/10/sys/contrib/dev/acpica/components/debugger/dbinput.c stable/10/sys/contrib/dev/acpica/components/debugger/dbmethod.c stable/10/sys/contrib/dev/acpica/components/debugger/dbnames.c stable/10/sys/contrib/dev/acpica/components/debugger/dbstats.c stable/10/sys/contrib/dev/acpica/components/debugger/dbtest.c stable/10/sys/contrib/dev/acpica/components/debugger/dbutils.c stable/10/sys/contrib/dev/acpica/components/debugger/dbxface.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmnames.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmopcode.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrc.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmutils.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmwalk.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsargs.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsfield.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsinit.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsobject.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsutils.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswexec.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswload.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswload2.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswscope.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswstate.c stable/10/sys/contrib/dev/acpica/components/events/evevent.c stable/10/sys/contrib/dev/acpica/components/events/evglock.c stable/10/sys/contrib/dev/acpica/components/events/evgpe.c stable/10/sys/contrib/dev/acpica/components/events/evgpeblk.c stable/10/sys/contrib/dev/acpica/components/events/evgpeinit.c stable/10/sys/contrib/dev/acpica/components/events/evgpeutil.c stable/10/sys/contrib/dev/acpica/components/events/evhandler.c stable/10/sys/contrib/dev/acpica/components/events/evmisc.c stable/10/sys/contrib/dev/acpica/components/events/evregion.c stable/10/sys/contrib/dev/acpica/components/events/evrgnini.c stable/10/sys/contrib/dev/acpica/components/events/evsci.c stable/10/sys/contrib/dev/acpica/components/events/evxface.c stable/10/sys/contrib/dev/acpica/components/events/evxfevnt.c stable/10/sys/contrib/dev/acpica/components/events/evxfgpe.c stable/10/sys/contrib/dev/acpica/components/events/evxfregn.c stable/10/sys/contrib/dev/acpica/components/executer/exconfig.c stable/10/sys/contrib/dev/acpica/components/executer/exconvrt.c stable/10/sys/contrib/dev/acpica/components/executer/excreate.c stable/10/sys/contrib/dev/acpica/components/executer/exdebug.c stable/10/sys/contrib/dev/acpica/components/executer/exdump.c stable/10/sys/contrib/dev/acpica/components/executer/exfield.c stable/10/sys/contrib/dev/acpica/components/executer/exfldio.c stable/10/sys/contrib/dev/acpica/components/executer/exmisc.c stable/10/sys/contrib/dev/acpica/components/executer/exmutex.c stable/10/sys/contrib/dev/acpica/components/executer/exnames.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg1.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg2.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg3.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg6.c stable/10/sys/contrib/dev/acpica/components/executer/exprep.c stable/10/sys/contrib/dev/acpica/components/executer/exregion.c stable/10/sys/contrib/dev/acpica/components/executer/exresnte.c stable/10/sys/contrib/dev/acpica/components/executer/exresolv.c stable/10/sys/contrib/dev/acpica/components/executer/exresop.c stable/10/sys/contrib/dev/acpica/components/executer/exstore.c stable/10/sys/contrib/dev/acpica/components/executer/exstoren.c stable/10/sys/contrib/dev/acpica/components/executer/exstorob.c stable/10/sys/contrib/dev/acpica/components/executer/exsystem.c stable/10/sys/contrib/dev/acpica/components/executer/exutils.c stable/10/sys/contrib/dev/acpica/components/hardware/hwacpi.c stable/10/sys/contrib/dev/acpica/components/hardware/hwesleep.c stable/10/sys/contrib/dev/acpica/components/hardware/hwgpe.c stable/10/sys/contrib/dev/acpica/components/hardware/hwpci.c stable/10/sys/contrib/dev/acpica/components/hardware/hwregs.c stable/10/sys/contrib/dev/acpica/components/hardware/hwsleep.c stable/10/sys/contrib/dev/acpica/components/hardware/hwtimer.c stable/10/sys/contrib/dev/acpica/components/hardware/hwvalid.c stable/10/sys/contrib/dev/acpica/components/hardware/hwxface.c stable/10/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c stable/10/sys/contrib/dev/acpica/components/namespace/nsaccess.c stable/10/sys/contrib/dev/acpica/components/namespace/nsalloc.c stable/10/sys/contrib/dev/acpica/components/namespace/nsarguments.c stable/10/sys/contrib/dev/acpica/components/namespace/nsconvert.c stable/10/sys/contrib/dev/acpica/components/namespace/nsdump.c stable/10/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c stable/10/sys/contrib/dev/acpica/components/namespace/nseval.c stable/10/sys/contrib/dev/acpica/components/namespace/nsinit.c stable/10/sys/contrib/dev/acpica/components/namespace/nsload.c stable/10/sys/contrib/dev/acpica/components/namespace/nsnames.c stable/10/sys/contrib/dev/acpica/components/namespace/nsobject.c stable/10/sys/contrib/dev/acpica/components/namespace/nsparse.c stable/10/sys/contrib/dev/acpica/components/namespace/nspredef.c stable/10/sys/contrib/dev/acpica/components/namespace/nsprepkg.c stable/10/sys/contrib/dev/acpica/components/namespace/nsrepair.c stable/10/sys/contrib/dev/acpica/components/namespace/nsrepair2.c stable/10/sys/contrib/dev/acpica/components/namespace/nssearch.c stable/10/sys/contrib/dev/acpica/components/namespace/nsutils.c stable/10/sys/contrib/dev/acpica/components/namespace/nswalk.c stable/10/sys/contrib/dev/acpica/components/namespace/nsxfeval.c stable/10/sys/contrib/dev/acpica/components/namespace/nsxfname.c stable/10/sys/contrib/dev/acpica/components/namespace/nsxfobj.c stable/10/sys/contrib/dev/acpica/components/parser/psargs.c stable/10/sys/contrib/dev/acpica/components/parser/psloop.c stable/10/sys/contrib/dev/acpica/components/parser/psobject.c stable/10/sys/contrib/dev/acpica/components/parser/psopcode.c stable/10/sys/contrib/dev/acpica/components/parser/psopinfo.c stable/10/sys/contrib/dev/acpica/components/parser/psparse.c stable/10/sys/contrib/dev/acpica/components/parser/psscope.c stable/10/sys/contrib/dev/acpica/components/parser/pstree.c stable/10/sys/contrib/dev/acpica/components/parser/psutils.c stable/10/sys/contrib/dev/acpica/components/parser/pswalk.c stable/10/sys/contrib/dev/acpica/components/parser/psxface.c stable/10/sys/contrib/dev/acpica/components/resources/rsaddr.c stable/10/sys/contrib/dev/acpica/components/resources/rscalc.c stable/10/sys/contrib/dev/acpica/components/resources/rscreate.c stable/10/sys/contrib/dev/acpica/components/resources/rsdump.c stable/10/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c stable/10/sys/contrib/dev/acpica/components/resources/rsinfo.c stable/10/sys/contrib/dev/acpica/components/resources/rsio.c stable/10/sys/contrib/dev/acpica/components/resources/rsirq.c stable/10/sys/contrib/dev/acpica/components/resources/rslist.c stable/10/sys/contrib/dev/acpica/components/resources/rsmemory.c stable/10/sys/contrib/dev/acpica/components/resources/rsmisc.c stable/10/sys/contrib/dev/acpica/components/resources/rsserial.c stable/10/sys/contrib/dev/acpica/components/resources/rsutils.c stable/10/sys/contrib/dev/acpica/components/resources/rsxface.c stable/10/sys/contrib/dev/acpica/components/tables/tbdata.c stable/10/sys/contrib/dev/acpica/components/tables/tbfadt.c stable/10/sys/contrib/dev/acpica/components/tables/tbfind.c stable/10/sys/contrib/dev/acpica/components/tables/tbinstal.c stable/10/sys/contrib/dev/acpica/components/tables/tbprint.c stable/10/sys/contrib/dev/acpica/components/tables/tbutils.c stable/10/sys/contrib/dev/acpica/components/tables/tbxface.c stable/10/sys/contrib/dev/acpica/components/tables/tbxfload.c stable/10/sys/contrib/dev/acpica/components/tables/tbxfroot.c stable/10/sys/contrib/dev/acpica/components/utilities/utaddress.c stable/10/sys/contrib/dev/acpica/components/utilities/utalloc.c stable/10/sys/contrib/dev/acpica/components/utilities/utbuffer.c stable/10/sys/contrib/dev/acpica/components/utilities/utcache.c stable/10/sys/contrib/dev/acpica/components/utilities/utcopy.c stable/10/sys/contrib/dev/acpica/components/utilities/utdebug.c stable/10/sys/contrib/dev/acpica/components/utilities/utdecode.c stable/10/sys/contrib/dev/acpica/components/utilities/utdelete.c stable/10/sys/contrib/dev/acpica/components/utilities/uterror.c stable/10/sys/contrib/dev/acpica/components/utilities/uteval.c stable/10/sys/contrib/dev/acpica/components/utilities/utexcep.c stable/10/sys/contrib/dev/acpica/components/utilities/utglobal.c stable/10/sys/contrib/dev/acpica/components/utilities/uthex.c stable/10/sys/contrib/dev/acpica/components/utilities/utids.c stable/10/sys/contrib/dev/acpica/components/utilities/utinit.c stable/10/sys/contrib/dev/acpica/components/utilities/utlock.c stable/10/sys/contrib/dev/acpica/components/utilities/utmath.c stable/10/sys/contrib/dev/acpica/components/utilities/utmisc.c stable/10/sys/contrib/dev/acpica/components/utilities/utmutex.c stable/10/sys/contrib/dev/acpica/components/utilities/utobject.c stable/10/sys/contrib/dev/acpica/components/utilities/utosi.c stable/10/sys/contrib/dev/acpica/components/utilities/utownerid.c stable/10/sys/contrib/dev/acpica/components/utilities/utpredef.c stable/10/sys/contrib/dev/acpica/components/utilities/utprint.c stable/10/sys/contrib/dev/acpica/components/utilities/utresrc.c stable/10/sys/contrib/dev/acpica/components/utilities/utstate.c stable/10/sys/contrib/dev/acpica/components/utilities/utstring.c stable/10/sys/contrib/dev/acpica/components/utilities/uttrack.c stable/10/sys/contrib/dev/acpica/components/utilities/utuuid.c stable/10/sys/contrib/dev/acpica/components/utilities/utxface.c stable/10/sys/contrib/dev/acpica/components/utilities/utxferror.c stable/10/sys/contrib/dev/acpica/components/utilities/utxfinit.c stable/10/sys/contrib/dev/acpica/components/utilities/utxfmutex.c stable/10/sys/contrib/dev/acpica/include/acapps.h stable/10/sys/contrib/dev/acpica/include/acbuffer.h stable/10/sys/contrib/dev/acpica/include/accommon.h stable/10/sys/contrib/dev/acpica/include/acconfig.h stable/10/sys/contrib/dev/acpica/include/acdebug.h stable/10/sys/contrib/dev/acpica/include/acdisasm.h stable/10/sys/contrib/dev/acpica/include/acdispat.h stable/10/sys/contrib/dev/acpica/include/acevents.h stable/10/sys/contrib/dev/acpica/include/acexcep.h stable/10/sys/contrib/dev/acpica/include/acglobal.h stable/10/sys/contrib/dev/acpica/include/achware.h stable/10/sys/contrib/dev/acpica/include/acinterp.h stable/10/sys/contrib/dev/acpica/include/aclocal.h stable/10/sys/contrib/dev/acpica/include/acmacros.h stable/10/sys/contrib/dev/acpica/include/acnames.h stable/10/sys/contrib/dev/acpica/include/acnamesp.h stable/10/sys/contrib/dev/acpica/include/acobject.h stable/10/sys/contrib/dev/acpica/include/acopcode.h stable/10/sys/contrib/dev/acpica/include/acoutput.h stable/10/sys/contrib/dev/acpica/include/acparser.h stable/10/sys/contrib/dev/acpica/include/acpi.h stable/10/sys/contrib/dev/acpica/include/acpiosxf.h stable/10/sys/contrib/dev/acpica/include/acpixf.h stable/10/sys/contrib/dev/acpica/include/acpredef.h stable/10/sys/contrib/dev/acpica/include/acresrc.h stable/10/sys/contrib/dev/acpica/include/acrestyp.h stable/10/sys/contrib/dev/acpica/include/acstruct.h stable/10/sys/contrib/dev/acpica/include/actables.h stable/10/sys/contrib/dev/acpica/include/actbl.h stable/10/sys/contrib/dev/acpica/include/actbl1.h stable/10/sys/contrib/dev/acpica/include/actbl2.h stable/10/sys/contrib/dev/acpica/include/actbl3.h stable/10/sys/contrib/dev/acpica/include/actypes.h stable/10/sys/contrib/dev/acpica/include/acutils.h stable/10/sys/contrib/dev/acpica/include/acuuid.h stable/10/sys/contrib/dev/acpica/include/amlcode.h stable/10/sys/contrib/dev/acpica/include/amlresrc.h stable/10/sys/contrib/dev/acpica/include/platform/acenv.h stable/10/sys/contrib/dev/acpica/include/platform/acenvex.h stable/10/sys/contrib/dev/acpica/include/platform/acfreebsd.h stable/10/sys/contrib/dev/acpica/include/platform/acgcc.h stable/10/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c stable/10/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c stable/10/sys/dev/acpica/Osd/OsdDebug.c stable/10/sys/dev/acpica/Osd/OsdSchedule.c stable/10/sys/dev/acpica/acpi.c stable/10/sys/sys/libkern.h stable/10/sys/x86/acpica/acpi_wakeup.c stable/10/usr.sbin/acpi/acpidb/Makefile stable/10/usr.sbin/acpi/acpidb/acpidb.c stable/10/usr.sbin/acpi/iasl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Sep 30 22:29:19 2016 (r306535) +++ stable/10/sys/conf/files Fri Sep 30 22:40:58 2016 (r306536) @@ -270,11 +270,11 @@ contrib/dev/acpica/components/debugger/d contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug -contrib/dev/acpica/components/debugger/dbfileio.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbobject.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug @@ -284,7 +284,6 @@ contrib/dev/acpica/components/disassembl contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug -contrib/dev/acpica/components/disassembler/dmobject.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug @@ -293,6 +292,7 @@ contrib/dev/acpica/components/disassembl contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi +contrib/dev/acpica/components/dispatcher/dsdebug.c optional acpi contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi @@ -320,6 +320,7 @@ contrib/dev/acpica/components/events/evx contrib/dev/acpica/components/events/evxfevnt.c optional acpi contrib/dev/acpica/components/events/evxfgpe.c optional acpi contrib/dev/acpica/components/events/evxfregn.c optional acpi +contrib/dev/acpica/components/executer/exconcat.c optional acpi contrib/dev/acpica/components/executer/exconfig.c optional acpi contrib/dev/acpica/components/executer/exconvrt.c optional acpi contrib/dev/acpica/components/executer/excreate.c optional acpi @@ -343,6 +344,7 @@ contrib/dev/acpica/components/executer/e contrib/dev/acpica/components/executer/exstoren.c optional acpi contrib/dev/acpica/components/executer/exstorob.c optional acpi contrib/dev/acpica/components/executer/exsystem.c optional acpi +contrib/dev/acpica/components/executer/extrace.c optional acpi contrib/dev/acpica/components/executer/exutils.c optional acpi contrib/dev/acpica/components/hardware/hwacpi.c optional acpi contrib/dev/acpica/components/hardware/hwesleep.c optional acpi @@ -389,7 +391,7 @@ contrib/dev/acpica/components/parser/psx contrib/dev/acpica/components/resources/rsaddr.c optional acpi contrib/dev/acpica/components/resources/rscalc.c optional acpi contrib/dev/acpica/components/resources/rscreate.c optional acpi -contrib/dev/acpica/components/resources/rsdump.c optional acpi +contrib/dev/acpica/components/resources/rsdump.c optional acpi acpi_debug contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi contrib/dev/acpica/components/resources/rsinfo.c optional acpi contrib/dev/acpica/components/resources/rsio.c optional acpi @@ -411,6 +413,7 @@ contrib/dev/acpica/components/tables/tbx contrib/dev/acpica/components/tables/tbxfroot.c optional acpi contrib/dev/acpica/components/utilities/utaddress.c optional acpi contrib/dev/acpica/components/utilities/utalloc.c optional acpi +contrib/dev/acpica/components/utilities/utascii.c optional acpi contrib/dev/acpica/components/utilities/utbuffer.c optional acpi contrib/dev/acpica/components/utilities/utcache.c optional acpi contrib/dev/acpica/components/utilities/utcopy.c optional acpi @@ -428,6 +431,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utmath.c optional acpi contrib/dev/acpica/components/utilities/utmisc.c optional acpi contrib/dev/acpica/components/utilities/utmutex.c optional acpi +contrib/dev/acpica/components/utilities/utnonansi.c optional acpi contrib/dev/acpica/components/utilities/utobject.c optional acpi contrib/dev/acpica/components/utilities/utosi.c optional acpi contrib/dev/acpica/components/utilities/utownerid.c optional acpi @@ -3269,6 +3273,7 @@ libkern/strndup.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard +libkern/strncat.c standard libkern/strncmp.c standard libkern/strncpy.c standard libkern/strnlen.c standard Modified: stable/10/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- stable/10/sys/contrib/dev/acpica/acpica_prep.sh Fri Sep 30 22:29:19 2016 (r306535) +++ stable/10/sys/contrib/dev/acpica/acpica_prep.sh Fri Sep 30 22:40:58 2016 (r306536) @@ -19,20 +19,20 @@ fulldirs="common compiler components inc # files to remove stripdirs="generate libraries tests tools" stripfiles="Makefile README accygwin.h acdragonfly.h acdragonflyex.h \ - acefi.h achaiku.h acintel.h aclinux.h aclinuxex.h acmacosx.h \ - acmsvc.h acnetbsd.h acos2.h acwin.h acwin64.h new_table.txt \ - osbsdtbl.c osefitbl.c osefixf.c osfreebsdtbl.c oslinuxtbl.c \ - osunixdir.c osunixmap.c oswindir.c oswintbl.c oswinxf.c \ - readme.txt utclib.c" + acefi.h acefiex.h achaiku.h acintel.h aclinux.h aclinuxex.h \ + acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h \ + acwin.h acwin64.h acwinex.h new_table.txt osbsdtbl.c osefitbl.c \ + osefixf.c osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c \ + oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c" # include files to canonify -src_headers="acapps.h acbuffer.h accommon.h acconfig.h acdebug.h \ - acdisasm.h acdispat.h acevents.h acexcep.h acglobal.h achware.h \ - acinterp.h aclocal.h acmacros.h acnames.h acnamesp.h acobject.h \ - acopcode.h acoutput.h acparser.h acpi.h acpiosxf.h acpixf.h \ - acpredef.h acresrc.h acrestyp.h acstruct.h actables.h actbl.h \ - actbl1.h actbl2.h actbl3.h actypes.h acutils.h amlcode.h \ - amlresrc.h platform/acenv.h platform/acenvex.h \ +src_headers="acapps.h acbuffer.h acclib.h accommon.h acconfig.h \ + acdebug.h acdisasm.h acdispat.h acevents.h acexcep.h acglobal.h \ + achware.h acinterp.h aclocal.h acmacros.h acnames.h acnamesp.h \ + acobject.h acopcode.h acoutput.h acparser.h acpi.h acpiosxf.h \ + acpixf.h acpredef.h acresrc.h acrestyp.h acstruct.h actables.h \ + actbl.h actbl1.h actbl2.h actbl3.h actypes.h acutils.h acuuid.h \ + amlcode.h amlresrc.h platform/acenv.h platform/acenvex.h \ platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ aslsupport.l asltypes.h dtcompiler.h dttemplate.h preprocess.h" Modified: stable/10/sys/contrib/dev/acpica/changes.txt ============================================================================== --- stable/10/sys/contrib/dev/acpica/changes.txt Fri Sep 30 22:29:19 2016 (r306535) +++ stable/10/sys/contrib/dev/acpica/changes.txt Fri Sep 30 22:40:58 2016 (r306536) @@ -1,5 +1,930 @@ ---------------------------------------- -08 April 2015. Summary of changes for version 20150515: +27 May 2016. Summary of changes for version 20160527: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Temporarily reverted the new arbitrary bit length/alignment support in +AcpiHwRead/AcpiHwWrite for the Generic Address Structure. There have been +a number of regressions with the new code that need to be fully resolved +and tested before this support can be finally integrated into ACPICA. +Apologies for any inconveniences these issues may have caused. + +The ACPI message macros are not configurable (ACPI_MSG_ERROR, +ACPI_MSG_EXCEPTION, ACPI_MSG_WARNING, ACPI_MSG_INFO, ACPI_MSG_BIOS_ERROR, +and ACPI_MSG_BIOS_WARNING). Lv Zheng. + +Fixed a couple of GCC warnings associated with the use of the -Wcast-qual +option. Adds a new return macro, return_STR. Junk-uk Kim. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 136.8K Code, 51.6K Data, 188.4K Total + Debug Version: 201.5K Code, 82.2K Data, 283.7K Total + Previous Release: + Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total + Debug Version: 200.9K Code, 82.2K Data, 283.1K Total + +---------------------------------------- +22 April 2016. Summary of changes for version 20160422: + +1) ACPICA kernel-resident subsystem: + +Fixed a regression in the GAS (generic address structure) arbitrary bit +support in AcpiHwRead/AcpiHwWrite. Problem could cause incorrect behavior +and incorrect return values. Lv Zheng. ACPICA BZ 1270. + +ACPI 6.0: Added support for new/renamed resource macros. One new argument +was added to each of these macros, and the original name has been +deprecated. The AML disassembler will always disassemble to the new +names. Support for the new macros was added to iASL, disassembler, +resource manager, and the acpihelp utility. ACPICA BZ 1274. + + I2cSerialBus -> I2cSerialBusV2 + SpiSerialBus -> SpiSerialBusV2 + UartSerialBus -> UartSerialBusV2 + +ACPI 6.0: Added support for a new integer field that was appended to the +package object returned by the _BIX method. This adds iASL compile-time +and AML runtime error checking. ACPICA BZ 1273. + +ACPI 6.1: Added support for a new PCCT subtable, "HW-Reduced Comm +Subspace Type2" (Headers, Disassembler, and data table compiler). + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total + Debug Version: 201.5K Code, 82.2K Data, 283.7K Total + Previous Release: + Non-Debug Version: 137.1K Code, 51.5K Data, 188.6K Total + Debug Version: 201.0K Code, 82.0K Data, 283.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented an ASL grammar extension to allow/enable executable +"module-level code" to be created and executed under the various +operators that create new scopes. This type of AML code is already +supported in all known AML interpreters, and the grammar change will +appear in the next version of the ACPI specification. Simplifies the +conditional runtime creation of named objects under these object types: + + Device + PowerResource + Processor + Scope + ThermalZone + +iASL: Implemented a new ASL extension, a "For" loop macro to add greater +ease-of-use to the ASL language. The syntax is similar to the +corresponding C operator, and is implemented with the existing AML While +opcode -- thus requiring no changes to existing AML interpreters. + + For (Initialize, Predicate, Update) {TermList} + +Grammar: + ForTerm := + For ( + Initializer // Nothing | TermArg => ComputationalData + Predicate // Nothing | TermArg => ComputationalData + Update // Nothing | TermArg => ComputationalData + ) {TermList} + + +iASL: The _HID/_ADR detection and validation has been enhanced to search +under conditionals in order to allow these objects to be conditionally +created at runtime. + +iASL: Fixed several issues with the constant folding feature. The +improvement allows better detection and resolution of statements that can +be folded at compile time. ACPICA BZ 1266. + +iASL/Disassembler: Fixed a couple issues with the Else{If{}...} +conversion to the ASL ElseIf operator where incorrect ASL code could be +generated. + +iASL/Disassembler: Fixed a problem with the ASL+ code disassembly where +sometimes an extra (and extraneous) set of parentheses were emitted for +some combinations of operators. Although this did not cause any problems +with recompilation of the disassembled code, it made the code more +difficult to read. David Box. ACPICA BZ 1231. + +iASL: Changed to ignore the unreferenced detection for predefined names +of resource descriptor elements, when the resource descriptor is +created/defined within a control method. + +iASL: Disassembler: Fix a possible fault with externally declared Buffer +objects. + +---------------------------------------- +18 March 2016. Summary of changes for version 20160318: + +1) ACPICA kernel-resident subsystem: + +Added support for arbitrary bit lengths and bit offsets for registers +defined by the Generic Address Structure. Previously, only aligned bit +lengths of 8/16/32/64 were supported. This was sufficient for many years, +but recently some machines have been seen that require arbitrary bit- +level support. ACPICA BZ 1240. Lv Zheng. + +Fixed an issue where the \_SB._INI method sometimes must be evaluated +before any _REG methods are evaluated. Lv Zheng. + +Implemented several changes related to ACPI table support +(Headers/Disassembler/TableCompiler): +NFIT: For ACPI 6.1, updated to add some additional new fields and +constants. +FADT: Updated a warning message and set compliance to ACPI 6.1 (Version +6). +DMAR: Added new constants per the 10/2014 DMAR spec. +IORT: Added new subtable per the 10/2015 IORT spec. +HEST: For ACPI 6.1, added new constants and new subtable. +DBG2: Added new constants per the 12/2015 DBG2 spec. +FPDT: Fixed several incorrect fields, add the FPDT boot record structure. +ACPICA BZ 1249. +ERST/EINJ: Updated disassembler with new "Execute Timings" actions. + +Updated header support for the DMAR table to match the current version of +the related spec. + +Added extensions to the ASL Concatenate operator to allow any ACPI object +to be passed as an operand. Any object other than Integer/String/Buffer +simply returns a string containing the object type. This extends the +usefulness of the Printf macros. Previously, Concatenate would abort the +control method if a non-data object was encountered. + +ACPICA source code: Deployed the C "const" keyword across the source code +where appropriate. ACPICA BZ 732. Joerg Sonnenberger (NetBSD). + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 137.1K Code, 51.5K Data, 188.6K Total + Debug Version: 201.0K Code, 82.0K Data, 283.0K Total + Previous Release: + Non-Debug Version: 136.2K Code, 51.5K Data, 187.7K Total + Debug Version: 200.4K Code, 82.0K Data, 282.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Improved the heuristic used to determine the number of +arguments for an externally defined control method (a method in another +table). Although this is an improvement, there is no deterministic way to +"guess" the number of method arguments. Only the ACPI 6.0 External opcode +will completely solve this problem as it is deployed (automatically) in +newer BIOS code. + +iASL/Disassembler: Fixed an ordering issue for emitted External() ASL +statements that could cause errors when the disassembled file is +compiled. ACPICA BZ 1243. David Box. + +iASL: Fixed a regression caused by the merger of the two versions of the +local strtoul64. Because of a dependency on a global variable, strtoul64 +could return an error for integers greater than a 32-bit value. ACPICA BZ +1260. + +iASL: Fixed a regression where a fault could occur for an ASL Return +statement if it invokes a control method that is not resolved. ACPICA BZ +1264. + +AcpiXtract: Improved input file validation: detection of binary files and +non-acpidump text files. + +---------------------------------------- +12 February 2016. Summary of changes for version 20160212: + +1) ACPICA kernel-resident subsystem: + +Implemented full support for the ACPI 6.1 specification (released in +January). This version of the specification is available at: +http://www.uefi.org/specifications + +Only a relatively small number of changes were required in ACPICA to +support ACPI 6.1, in these areas: +- New predefined names +- New _HID values +- A new subtable for HEST +- A few other header changes for new values + +Ensure \_SB_._INI is executed before any _REG methods are executed. There +appears to be existing BIOS code that relies on this behavior. Lv Zheng. + +Reverted a change made in version 20151218 which enabled method +invocations to be targets of various ASL operators (SuperName and Target +grammar elements). While the new behavior is supported by the ACPI +specification, other AML interpreters do not support this behavior and +never will. The ACPI specification will be updated for ACPI 6.2 to remove +this support. Therefore, the change was reverted to the original ACPICA +behavior. + +ACPICA now supports the GCC 6 compiler. + +Current Release: (Note: build changes increased sizes) + Non-Debug Version: 136.2K Code, 51.5K Data, 187.7K Total + Debug Version: 200.4K Code, 82.0K Data, 282.4K Total +Previous Release: + Non-Debug Version: 102.7K Code, 28.4K Data, 131.1K Total + Debug Version: 200.4K Code, 81.9K Data, 282.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +Completed full support for the ACPI 6.0 External() AML opcode. The +compiler emits an external AML opcode for each ASL External statement. +This opcode is used by the disassembler to assist with the disassembly of +external control methods by specifying the required number of arguments +for the method. AML interpreters do not use this opcode. To ensure that +interpreters do not even see the opcode, a block of one or more external +opcodes is surrounded by an "If(0)" construct. As this feature becomes +commonly deployed in BIOS code, the ability of disassemblers to correctly +disassemble AML code will be greatly improved. David Box. + +iASL: Implemented support for an optional cross-reference output file. +The -lx option will create a the cross-reference file with the suffix +"xrf". Three different types of cross-reference are created in this file: +- List of object references made from within each control method +- Invocation (caller) list for each user-defined control method +- List of references to each non-method object in the namespace + +iASL: Method invocations as ASL Target operands are now disallowed and +flagged as errors in preparation for ACPI 6.2 (see the description of the +problem above). + +---------------------------------------- +8 January 2016. Summary of changes for version 20160108: + +1) ACPICA kernel-resident subsystem: + +Updated all ACPICA copyrights and signons to 2016: Added the 2016 +copyright to all source code module headers and utility/tool signons. +This includes the standard Linux dual-license header. This affects +virtually every file in the ACPICA core subsystem, iASL compiler, all +ACPICA utilities, and the ACPICA test suite. + +Fixed a regression introduced in version 20151218 concerning the +execution of so-called module-level ASL/AML code. Namespace objects +created under a module-level If() construct were not properly/fully +entered into the namespace and could cause an interpreter fault when +accessed. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + +Current Release: + Non-Debug Version: 102.7K Code, 28.4K Data, 131.1K Total + Debug Version: 200.4K Code, 81.9K Data, 282.4K Total + Previous Release: + Non-Debug Version: 102.6K Code, 28.4K Data, 131.0K Total + Debug Version: 200.3K Code, 81.9K Data, 282.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +Fixed a problem with the compilation of the GpioIo and GpioInt resource +descriptors. The _PIN field name was incorrectly defined to be an array +of 32-bit values, but the _PIN values are in fact 16 bits each. This +would cause incorrect bit width warnings when using Word (16-bit) fields +to access the descriptors. + + +---------------------------------------- +18 December 2015. Summary of changes for version 20151218: + +1) ACPICA kernel-resident subsystem: + +Implemented per-AML-table execution of "module-level code" as individual +ACPI tables are loaded into the namespace during ACPICA initialization. +In other words, any module-level code within an AML table is executed +immediately after the table is loaded, instead of batched and executed +after all of the tables have been loaded. This provides compatibility +with other ACPI implementations. ACPICA BZ 1219. Bob Moore, Lv Zheng, +David Box. + +To fully support the feature above, the default operation region handlers +for the SystemMemory, SystemIO, and PCI_Config address spaces are now +installed before any ACPI tables are loaded. This enables module-level +code to access these address spaces during the table load and module- +level code execution phase. ACPICA BZ 1220. Bob Moore, Lv Zheng, David +Box. + +Implemented several changes to the internal _REG support in conjunction +with the changes above. Also, changes to the AcpiExec/AcpiNames/Examples +utilities for the changes above. Although these tools were changed, host +operating systems that simply use the default handlers for SystemMemory, +SystemIO, and PCI_Config spaces should not require any update. Lv Zheng. + +For example, in the code below, DEV1 is conditionally added to the +namespace by the DSDT via module-level code that accesses an operation +region. The SSDT references DEV1 via the Scope operator. DEV1 must be +created immediately after the DSDT is loaded in order for the SSDT to +successfully reference DEV1. Previously, this code would cause an +AE_NOT_EXIST exception during the load of the SSDT. Now, this code is +fully supported by ACPICA. + + DefinitionBlock ("", "DSDT", 2, "Intel", "DSDT1", 1) + { + OperationRegion (OPR1, SystemMemory, 0x400, 32) + Field (OPR1, AnyAcc, NoLock, Preserve) + { + FLD1, 1 + } + If (FLD1) + { + Device (\DEV1) + { + } + } + } + DefinitionBlock ("", "SSDT", 2, "Intel", "SSDT1", 1) + { + External (\DEV1, DeviceObj) + Scope (\DEV1) + { + } + } + +Fixed an AML interpreter problem where control method invocations were +not handled correctly when the invocation was itself a SuperName argument +to another ASL operator. In these cases, the method was not invoked. +ACPICA BZ 1002. Affects the following ASL operators that have a SuperName +argument: + Store + Acquire, Wait + CondRefOf, RefOf + Decrement, Increment + Load, Unload + Notify + Signal, Release, Reset + SizeOf + +Implemented automatic String-to-ObjectReference conversion support for +packages returned by predefined names (such as _DEP). A common BIOS error +is to add double quotes around an ObjectReference namepath, which turns +the reference into an unexpected string object. This support detects the +problem and corrects it before the package is returned to the caller that +invoked the method. Lv Zheng. + +Implemented extensions to the Concatenate operator. Concatenate now +accepts any type of object, it is not restricted to simply +Integer/String/Buffer. For objects other than these 3 basic data types, +the argument is treated as a string containing the name of the object +type. This expands the utility of Concatenate and the Printf/Fprintf +macros. ACPICA BZ 1222. + +Cleaned up the output of the ASL Debug object. The timer() value is now +optional and no longer emitted by default. Also, the basic data types of +Integer/String/Buffer are simply emitted as their values, without a data +type string -- since the data type is obvious from the output. ACPICA BZ +1221. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 102.6K Code, 28.4K Data, 131.0K Total + Debug Version: 200.3K Code, 81.9K Data, 282.3K Total + Previous Release: + Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total + Debug Version: 199.6K Code, 81.8K Data, 281.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed some issues with the ASL Include() operator. This operator +was incorrectly defined in the iASL parser rules, causing a new scope to +be opened for the code within the include file. This could lead to +several issues, including allowing ASL code that is technically illegal +and not supported by AML interpreters. Note, this does not affect the +related #include preprocessor operator. ACPICA BZ 1212. + +iASL/Disassembler: Implemented support for the ASL ElseIf operator. This +operator is essentially an ASL macro since there is no AML opcode +associated with it. The code emitted by the iASL compiler for ElseIf is +an Else opcode followed immediately by an If opcode. The disassembler +will now emit an ElseIf if it finds an Else immediately followed by an +If. This simplifies the decoded ASL, especially for deeply nested +If..Else and large Switch constructs. Thus, the disassembled code more +closely follows the original source ASL. ACPICA BZ 1211. Example: + + Old disassembly: + Else + { + If (Arg0 == 0x02) + { + Local0 = 0x05 + } + } + + New disassembly: + ElseIf (Arg0 == 0x02) + { + Local0 = 0x05 + } + +AcpiExec: Added support for the new module level code behavior and the +early region installation. This required a small change to the +initialization, since AcpiExec must install its own operation region +handlers. + +AcpiExec: Added support to make the debug object timer optional. Default +is timer disabled. This cleans up the debug object output -- the timer +data is rarely used. + +AcpiExec: Multiple ACPI tables are now loaded in the order that they +appear on the command line. This can be important when there are +interdependencies/references between the tables. + +iASL/Templates. Add support to generate template files with multiple +SSDTs within a single output file. Also added ommand line support to +specify the number of SSDTs (in addition to a single DSDT). ACPICA BZ +1223, 1225. + + +---------------------------------------- +24 November 2015. Summary of changes for version 20151124: + +1) ACPICA kernel-resident subsystem: + +Fixed a possible regression for a previous update to FADT handling. The +FADT no longer has a fixed table ID, causing some issues with code that +was hardwired to a specific ID. Lv Zheng. + +Fixed a problem where the method auto-serialization could interfere with +the current SyncLevel. This change makes the auto-serialization support +transparent to the SyncLevel support and management. + +Removed support for the _SUB predefined name in AcpiGetObjectInfo. This +interface is intended for early access to the namespace during the +initial namespace device discovery walk. The _SUB method has been seen to +access operation regions in some cases, causing errors because the +operation regions are not fully initialized. + +AML Debugger: Fixed some issues with the terminate/quit/exit commands +that can cause faults. Lv Zheng. + +AML Debugger: Add thread ID support so that single-step mode only applies +to the AML Debugger thread. This prevents runtime errors within some +kernels. Lv Zheng. + +Eliminated extraneous warnings from AcpiGetSleepTypeData. Since the _Sx +methods that are invoked by this interface are optional, removed warnings +emitted for the case where one or more of these methods do not exist. +ACPICA BZ 1208, original change by Prarit Bhargava. + +Made a major pass through the entire ACPICA source code base to +standardize formatting that has diverged a bit over time. There are no +functional changes, but this will of course cause quite a few code +differences from the previous ACPICA release. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total + Debug Version: 199.6K Code, 81.8K Data, 281.4K Total + Previous Release: + Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total + Debug Version: 199.3K Code, 81.4K Data, 280.7K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/acpiexec/acpixtract/disassembler: Added support to allow multiple +definition blocks within a single ASL file and the resulting AML file. +Support for this type of file was also added to the various tools that +use binary AML files: acpiexec, acpixtract, and the AML disassembler. The +example code below shows two definition blocks within the same file: + + DefinitionBlock ("dsdt.aml", "DSDT", 2, "Intel", "Template", +0x12345678) + { + } + DefinitionBlock ("", "SSDT", 2, "Intel", "Template", 0xABCDEF01) + { + } + +iASL: Enhanced typechecking for the Name() operator. All expressions for +the value of the named object must be reduced/folded to a single constant +at compile time, as per the ACPI specification (the AML definition of +Name()). + +iASL: Fixed some code indentation issues for the -ic and -ia options (C +and assembly headers). Now all emitted code correctly begins in column 1. + +iASL: Added an error message for an attempt to open a Scope() on an +object defined in an SSDT. The DSDT is always loaded into the namespace +first, so any attempt to open a Scope on an SSDT object will fail at +runtime. + + +---------------------------------------- +30 September 2015. Summary of changes for version 20150930: + +1) ACPICA kernel-resident subsystem: + +Debugger: Implemented several changes and bug fixes to assist support for +the in-kernel version of the AML debugger. Lv Zheng. +- Fix the "predefined" command for in-kernel debugger. +- Do not enter debug command loop for the help and version commands. +- Disallow "execute" command during execution/single-step of a method. + +Interpreter: Updated runtime typechecking for all operators that have +target operands. The operand is resolved and validated that it is legal. +For example, the target cannot be a non-data object such as a Device, +Mutex, ThermalZone, etc., as per the ACPI specification. + +Debugger: Fixed the double-mutex user I/O handshake to work when local +deadlock detection is enabled. + +Debugger: limited display of method locals and arguments (LocalX and +ArgX) to only those that have actually been initialized. This prevents +lines of extraneous output. + +Updated the definition of the NFIT table to correct the bit polarity of +one flag: ACPI_NFIT_MEM_ARMED --> ACPI_NFIT_MEM_NOT_ARMED + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total + Debug Version: 199.3K Code, 81.4K Data, 280.7K Total + Previous Release: + Non-Debug Version: 101.3K Code, 27.7K Data, 129.0K Total + Debug Version: 198.6K Code, 80.9K Data, 279.5K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Improved the compile-time typechecking for operands of many of the +ASL operators: + +-- Added an option to disable compiler operand/operator typechecking (- +ot). + +-- For the following operators, the TermArg operands are now validated +when possible to be Integer data objects: BankField, OperationRegion, +DataTableRegion, Buffer, and Package. + +-- Store (Source, Target): Both the source and target operands are +resolved and checked that the operands are both legal. For example, +neither operand can be a non-data object such as a Device, Mutex, +ThermalZone, etc. Note, as per the ACPI specification, the CopyObject +operator can be used to store an object to any type of target object. + +-- Store (Source, Target): If the source is a Package object, the target +must be a Package object, LocalX, ArgX, or Debug. Likewise, if the target +is a Package, the source must also be a Package. + +-- Store (Source, Target): A warning is issued if the source and target +resolve to the identical named object. + +-- Store (Source, ): An error is generated for the +target method invocation, as this construct is not supported by the AML +interpreter. + +-- For all ASL math and logic operators, the target operand must be a +data object (Integer, String, Buffer, LocalX, ArgX, or Debug). This +includes the function return value also. + +-- External declarations are also included in the typechecking where +possible. External objects defined using the UnknownObj keyword cannot be +typechecked, however. + +iASL and Disassembler: Added symbolic (ASL+) support for the ASL Index +operator: +- Legacy code: Index(PKG1, 3) +- New ASL+ code: PKG1[3] +This completes the ACPI 6.0 ASL+ support as it was the only operator not +supported. + +iASL: Fixed the file suffix for the preprocessor output file (.i). Two +spaces were inadvertently appended to the filename, causing file access +and deletion problems on some systems. + +ASL Test Suite (ASLTS): Updated the master makefile to generate all +possible compiler output files when building the test suite -- thus +exercising these features of the compiler. These files are automatically +deleted when the test suite exits. + + +---------------------------------------- +18 August 2015. Summary of changes for version 20150818: + +1) ACPICA kernel-resident subsystem: + +Fix a regression for AcpiGetTableByIndex interface causing it to fail. Lv +Zheng. ACPICA BZ 1186. + +Completed development to ensure that the ACPICA Disassembler and Debugger +are fully standalone components of ACPICA. Removed cross-component +dependences. Lv Zheng. + +The max-number-of-AML-loops is now runtime configurable (previously was +compile-time only). This is essentially a loop timeout to force-abort +infinite AML loops. ACPCIA BZ 1192. + +Debugger: Cleanup output to dump ACPI names and namepaths without any +trailing underscores. Lv Zheng. ACPICA BZ 1135. + +Removed unnecessary conditional compilations across the Debugger and +Disassembler components where entire modules could be left uncompiled. + +The aapits test is deprecated and has been removed from the ACPICA git +tree. The test has never been completed and has not been maintained, thus +becoming rather useless. ACPICA BZ 1015, 794. + +A batch of small changes to close bugzilla and other reports: +- Remove duplicate code for _PLD processing. ACPICA BZ 1176. +- Correctly cleanup after a ACPI table load failure. ACPICA BZ 1185. +- iASL: Support POSIX yacc again in makefile. Jung-uk Kim. +- ACPI table support: general cleanup and simplification. Lv Zheng, Bob +Moore. +- ACPI table support: fix for a buffer read overrun in AcpiTbFindTable. +ACPICA BZ 1184. +- Enhance parameter validation for DataTableRegion and LoadTable ASL/AML +operators. +- Debugger: Split debugger initialization/termination interfaces. Lv +Zheng. +- AcpiExec: Emit OemTableId for SSDTs during the load phase for table +identification. +- AcpiExec: Add debug message during _REG method phase during table +load/init. +- AcpiNames: Fix a regression where some output was missing and no longer +emitted. +- Debugger: General cleanup and simplification. Lv Zheng. +- Disassembler: Cleanup use of several global option variables. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 101.3K Code, 27.7K Data, 129.0K Total + Debug Version: 198.6K Code, 80.9K Data, 279.5K Total + Previous Release: + Non-Debug Version: 100.9K Code, 24.5K Data, 125.4K Total + Debug Version: 197.8K Code, 81.5K Data, 279.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec: Fixed a problem where any more than 32 ACPI tables in the XSDT +were not handled properly and caused load errors. Now, properly invoke +and use the ACPICA auto-reallocate mechanism for ACPI table data +structures. ACPICA BZ 1188 + +AcpiNames: Add command-line wildcard support for ACPI table files. ACPICA +BZ 1190. + +AcpiExec and AcpiNames: Add -l option to load ACPI tables only. For +AcpiExec, this means that no control methods (like _REG/_INI/_STA) are +executed during initialization. ACPICA BZ 1187, 1189. + +iASL/Disassembler: Implemented a prototype "listing" mode that emits AML +that corresponds to each disassembled ASL statement, to simplify +debugging. ACPICA BZ 1191. + +Debugger: Add option to the "objects" command to display a summary of the +current namespace objects (Object type and count). This is displayed if +the command is entered with no arguments. + +AcpiNames: Add -x option to specify debug level, similar to AcpiExec. + + +---------------------------------------- +17 July 2015. Summary of changes for version 20150717: + +1) ACPICA kernel-resident subsystem: + +Improved the partitioning between the Debugger and Disassembler +components. This allows the Debugger to be used standalone within kernel +code without the Disassembler (which is used for single stepping also). +This renames and moves one file, dmobject.c to dbobject.c. Lv Zheng. + +Debugger: Implemented a new command to trace the execution of control +methods (Trace). This is especially useful for the in-kernel version of +the debugger when file I/O may not be available for method trace output. +See the ACPICA reference for more information. Lv Zheng. + +Moved all C library prototypes (used for the local versions of these +functions when requested) to a new header, acclib.h +Cleaned up the use of non-ANSI C library functions. These functions are +implemented locally in ACPICA. Moved all such functions to a common +source file, utnonansi.c + +Debugger: Fixed a problem with the "!!" command (get last command +executed) where the debugger could enter an infinite loop and eventually +crash. + +Removed the use of local macros that were used for some of the standard C +library functions to automatically cast input parameters. This mostly +affected the is* functions where the input parameter is defined to be an +int. This required a few modifications to the main ACPICA source code to +provide casting for these functions and eliminate possible compiler +warnings for these parameters. + +Across the source code, added additional status/error checking to resolve +issues discovered by static source code analysis tools such as Coverity. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 100.9K Code, 24.5K Data, 125.4K Total + Debug Version: 197.8K Code, 81.5K Data, 279.3K Total + Previous Release: + Non-Debug Version: 100.6K Code, 27.6K Data, 128.2K Total + Debug Version: 196.2K Code, 81.0K Data, 277.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a regression where the device map file feature no longer +worked properly when used in conjunction with the disassembler. It only +worked properly with the compiler itself. + +iASL: Implemented a new warning for method LocalX variables that are set +but never used (similar to a C compiler such as gcc). This also applies +to ArgX variables that are not defined by the parent method, and are +instead (legally) used as local variables. + +iASL/Preprocessor: Finished the pass-through of line numbers from the +preprocessor to the compiler. This ensures that compiler errors/warnings +have the correct original line numbers and filenames, regardless of any +#include files. + +iASL/Preprocessor: Fixed a couple of issues with comment handling and the +pass-through of comments to the preprocessor output file (which becomes +the compiler input file). Also fixed a problem with // comments that +appear after a math expression. + +iASL: Added support for the TCPA server table to the table compiler and +template generator. (The client table was already previously supported) + +iASL/Preprocessor: Added a permanent #define of the symbol "__IASL__" to +identify the iASL compiler. + +Cleaned up the use of the macros NEGATIVE and POSITIVE which were defined +multiple times. The new names are ACPI_SIGN_NEGATIVE and +ACPI_SIGN_POSITIVE. + +AcpiHelp: Update to expand help messages for the iASL preprocessor +directives. + + +---------------------------------------- +19 June 2015. Summary of changes for version 20150619: + +Two regressions in version 20150616 have been addressed: + +Fixes some problems/issues with the C library macro removal (ACPI_STRLEN, +etc.) This update changes ACPICA to only use the standard headers for +functions, or the prototypes for the local versions of the C library +functions. Across the source code, this required some additional casts +for some Clib invocations for portability. Moved all local prototypes to +a new file, acclib.h + +Fixes several problems with recent changes to the handling of the FACS +table that could cause some systems not to boot. + + +---------------------------------------- +16 June 2015. Summary of changes for version 20150616: + + +1) ACPICA kernel-resident subsystem: + +Across the entire ACPICA source code base, the various macros for the C +library functions (such as ACPI_STRLEN, etc.) have been removed and +replaced by the standard C library names (strlen, etc.) The original +purpose for these macros is no longer applicable. This simplification +reduces the number of macros used in the ACPICA source code +significantly, improving readability and maintainability. + +Implemented support for a new ACPI table, the OSDT. This table, the +"override" SDT, can be loaded directly by the host OS at boot time. It +enables the replacement of existing namespace objects that were installed +via the DSDT and/or SSDTs. The primary purpose for this is to replace +buggy or incorrect ASL/AML code obtained via the BIOS. The OSDT is slated +for inclusion in a future version of the ACPI Specification. Lv Zheng/Bob +Moore. + +Added support for systems with (improperly) two FACS tables -- a "32-bit" +table (via FADT 32-bit legacy field) and a "64-bit" table (via the 64-bit +X field). This change will support both automatically. There continues to +be systems found with this issue. This support requires a change to the +AcpiSetFirmwareWakingVector interface. Also, a public global variable has +been added to allow the host to select which FACS is desired +(AcpiGbl_Use32BitFacsAddresses). See the ACPICA reference for more +details Lv Zheng. + +Added a new feature to allow for systems that do not contain an FACS. +Although this is already supported on hardware-reduced platforms, the +feature has been extended for all platforms. The reasoning is that we do +not want to abort the entire ACPICA initialization just because the +system is seriously buggy and has no FACS. + +Fixed a problem where the GUID strings for NFIT tables (in acuuid.h) were +not correctly transcribed from the ACPI specification in ACPICA version +20150515. + +Implemented support for the _CLS object in the AcpiGetObjectInfo external +interface. + +Updated the definitions of the TCPA and TPM2 ACPI tables to the more +recent TCG ACPI Specification, December 14, 2014. Table disassembler and +compiler also updated. Note: The TCPA "server" table is not supported by +the disassembler/table-compiler at this time. + +ACPI 6.0: Added definitions for the new GIC version field in the MADT. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 100.6K Code, 27.6K Data, 128.2K Total + Debug Version: 196.2K Code, 81.0K Data, 277.2K Total + Previous Release: + Non-Debug Version: 99.9K Code, 27.5K Data, 127.4K Total + Debug Version: 195.2K Code, 80.8K Data, 276.0K Total + + +2) iASL Compiler/Disassembler and Tools: + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Sep 30 23:01:38 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 854C9C04785; Fri, 30 Sep 2016 23:01:38 +0000 (UTC) (envelope-from cem@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 3BCCD1FC8; Fri, 30 Sep 2016 23:01:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UN1bNb083046; Fri, 30 Sep 2016 23:01:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UN1bde083045; Fri, 30 Sep 2016 23:01:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609302301.u8UN1bde083045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 30 Sep 2016 23:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306537 - head/lib/libc/sys 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.23 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: Fri, 30 Sep 2016 23:01:38 -0000 Author: cem Date: Fri Sep 30 23:01:37 2016 New Revision: 306537 URL: https://svnweb.freebsd.org/changeset/base/306537 Log: open.2: Document Capsicum behavior Document open(2) and openat(2) behavior in Capsicum capability mode. Reviewed by: ed (previous version), emaste, rwatson (previous version), wblock Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7947 Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Fri Sep 30 22:40:58 2016 (r306536) +++ head/lib/libc/sys/open.2 Fri Sep 30 23:01:37 2016 (r306537) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd April 2, 2015 +.Dd September 30, 2016 .Dt OPEN 2 .Os .Sh NAME @@ -95,6 +95,28 @@ parameter, the current working directory and the behavior is identical to a call to .Fn open . .Pp +In +.Xr capsicum 4 +capability mode, +.Fn open +is not permitted. +The +.Fa path +argument to +.Fn openat +must be strictly relative to a file descriptor +.Fa fd , +as defined in +.Pa sys/kern/vfs_lookup.c . +.Fa path +must not be an absolute path and must not contain ".." components. +Additionally, no symbolic link in +.Fa path +may contain ".." components either. +.Fa fd +must not be +.Dv AT_FDCWD . +.Pp The flags specified are formed by .Em or Ns 'ing the following values @@ -447,8 +469,18 @@ nor a file descriptor associated with a .It Bq Er ENOTDIR .Dv O_DIRECTORY is specified and the file is not a directory. +.It Bq Er ECAPMODE +.Dv AT_FDCWD +is specified and the process is in capability mode. +.It Bq Er ECAPMODE +.Fn open +was called and the process is in capability mode. +.It Bq Er ENOTCAPABLE +.Fa path +is an absolute path or contained "..". .El .Sh SEE ALSO +.Xr capsicum 4 , .Xr chmod 2 , .Xr close 2 , .Xr dup 2 , From owner-svn-src-all@freebsd.org Fri Sep 30 23:19: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 6B9E0C04B42; Fri, 30 Sep 2016 23:19:09 +0000 (UTC) (envelope-from tsoome@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 2DE17AB1; Fri, 30 Sep 2016 23:19:09 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UNJ81V087618; Fri, 30 Sep 2016 23:19:08 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UNJ8oh087617; Fri, 30 Sep 2016 23:19:08 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201609302319.u8UNJ8oh087617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 30 Sep 2016 23:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306538 - head/lib/libstand 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.23 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: Fri, 30 Sep 2016 23:19:09 -0000 Author: tsoome Date: Fri Sep 30 23:19:08 2016 New Revision: 306538 URL: https://svnweb.freebsd.org/changeset/base/306538 Log: cstyle fix of cd9660_open in libstand rS306534 did create bad cstyle by my mistake, correcting it. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8103 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Fri Sep 30 23:01:37 2016 (r306537) +++ head/lib/libstand/cd9660.c Fri Sep 30 23:19:08 2016 (r306538) @@ -356,11 +356,11 @@ cd9660_open(const char *path, struct ope /* if the new block is zero length, its padding */ if (isonum_711(dp->length) == 0) { - /* skip to next block, if any */ - off = boff * ISO_DEFAULT_BLOCK_SIZE; - continue; + /* skip to next block, if any */ + off = boff * ISO_DEFAULT_BLOCK_SIZE; + continue; } else { - off += isonum_711(dp->length); + off += isonum_711(dp->length); } } if (off >= dsize) { From owner-svn-src-all@freebsd.org Fri Sep 30 23:20:13 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 1A4ECC04BA8; Fri, 30 Sep 2016 23:20:13 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (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 8EA50C47; Fri, 30 Sep 2016 23:20:12 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x22f.google.com with SMTP id l131so118585541lfl.2; Fri, 30 Sep 2016 16:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XjO1oND5mXDoPMFRUAIE/nCiNfUDkI4xagemrlSBjAA=; b=bAlXp3SvzHwlig7n+P5QVkpE163QS9tEcN97Fygf4+pPTxmjB+6bwxz7yQg7A/MavJ 1Ko0+XKPv2DTEvgDuJ99JfysBrEqaLiKHpcpmdnpGjxzqqQoaEHUzIAEAOhyAYSQ8YwE IDo5zXTmC2CVljyzA7gQlBns8s4YiUundslPSHu2mqyM+1MraOrg9MHngFqcUih/+p8f SFHNkxojEY8juuMoSpvJ6EGSFBXF80jKAkpvfN8WaL3XxBWbHYd0Tf8/rcFadATLM53+ lHsbNe+XaetAR4iEGeVOFQEdILtMil8Q+ydO2dgNbpbTS6Iy3kOiO3qFRutrU2ghAM+c gQYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XjO1oND5mXDoPMFRUAIE/nCiNfUDkI4xagemrlSBjAA=; b=PxFUlZq2AWnTKF92TpBvg0n7utsYcWzDQ1iJS3RcQ0gFz5I/AQu4nklA0A3l45wsxq Tf4SSEkFdG/7zel5XeSmcX6zgjRdiGjbcO5mlII36T0saXoAhyEEDQTN0nykKm8tiEQn WX5q4BxnQ1dm1DMV0TiVdNW0TJvrHmnAu+2khuelf5SESeThIEpD28Ny9zseJAHl70tf KTea+rivjDtxYz7OUzktuZM2CDiyMKbMDg3pkgMYAL/Shll4HmzDLBWBAteKnteRio2e 4e9yMdefSDvUGZ5PoA/lrRR5Mebf+Ti56OHy7F/GzyRtO8vPMvXo/mOsaos0Q/QFfZXH 64rw== X-Gm-Message-State: AA6/9Rn+E08MZ6sVVCrzLXli+ltxA+mrG2ECYO7xncfedSh9exM/cfJzsyD+eU22c5Q9Yg== X-Received: by 10.46.32.205 with SMTP id g74mr3820940lji.1.1475277609923; Fri, 30 Sep 2016 16:20:09 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id u68sm1804613lfg.33.2016.09.30.16.20.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 16:20:09 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 1 Oct 2016 01:20:08 +0200 From: Baptiste Daroussin To: David C Somayajulu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306515 - head/sys/dev/bxe Message-ID: <20160930232007.i57uir32aynbrljy@ivaldir.etoilebsd.net> References: <201609301808.u8UI8H21066968@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dnvrzbyiwp73yw2g" Content-Disposition: inline In-Reply-To: <201609301808.u8UI8H21066968@repo.freebsd.org> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 30 Sep 2016 23:20:13 -0000 --dnvrzbyiwp73yw2g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2016 at 06:08:17PM +0000, David C Somayajulu wrote: > Author: davidcs > Date: Fri Sep 30 18:08:16 2016 > New Revision: 306515 > URL: https://svnweb.freebsd.org/changeset/base/306515 >=20 > Log: > Revert commit > r306284 - Fixes for issues under high workloads > =20 > Will fix and recommit patch >=20 > Modified: > head/sys/dev/bxe/bxe.c > head/sys/dev/bxe/bxe.h > head/sys/dev/bxe/bxe_stats.h >=20 Thanks! Best regards, Bapt --dnvrzbyiwp73yw2g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7vMiAAoJEGOJi9zxtz5aD34P/RjBDA+P4RncTh4FMHLKHgKy QxZrR73Xwnc+9WU3pw5bVZ6FYsxYoWuagypLURRw7rbNRmvZz1M/thTql2l+8aU3 +NIitS99RlOutR5mI7UbYNBcPiSFf09ma0ydhrcXS5drsi9l+nbDc3+uOkZJMkAj kNnxPIxTGOtx+3L+ezzyN3XWDnL44H279s/Lywg7lLrCNyc7RdI8eqjJIK5/6vRv F2AecKTknC4pw1eCbK5D6jDaSYePrpWDu4XVVPiGU+TQYRtO/EkV9P5Tqkv7V8Tq /yle8t6++iOp+BDwNHCG/Cv/h3jP5XecV/+2Cb1htki9yQ3MHKi2MSbASDIwU3gH kpk3M9R5uZPcau7dmpZyMyf++NwykCPARqYGu3tNi89l61wtY19dbU89z8K8pS2A ehezJVItA61XjauKoUEOXsrjRuX50757MDdjx0AA776QP6QGuHcbccnSGShvexVs l2GW0CT/Wo2xbVIjGDThEZ82qH+RMlr3SjOCO5QZToKGUC+GQNsGDOcXCcy5LdB1 UpTsUw0Nuow+WuViDs8W4wDQanKkAwRAE+LVih3XQXQf728wFDn8Iy6vDsM7TVq7 EfYQr9D30GyjW6ZpPoYOtyej46V4w8KHy/YaP0rAbzISeDaIqyu8cl86vsLWJ1kt bT2RI4bkG+X5peJfkWN2 =NymC -----END PGP SIGNATURE----- --dnvrzbyiwp73yw2g-- From owner-svn-src-all@freebsd.org Fri Sep 30 23:35:48 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 5D1BBC04111; Fri, 30 Sep 2016 23:35:48 +0000 (UTC) (envelope-from bapt@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 1705D15B7; Fri, 30 Sep 2016 23:35:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UNZlQa094847; Fri, 30 Sep 2016 23:35:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UNZlhV094846; Fri, 30 Sep 2016 23:35:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609302335.u8UNZlhV094846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 30 Sep 2016 23:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306539 - vendor/dma/dist X-SVN-Group: vendor 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.23 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: Fri, 30 Sep 2016 23:35:48 -0000 Author: bapt Date: Fri Sep 30 23:35:47 2016 New Revision: 306539 URL: https://svnweb.freebsd.org/changeset/base/306539 Log: Import dma snapshot 20160929 Modified: vendor/dma/dist/dma-mbox-create.c Modified: vendor/dma/dist/dma-mbox-create.c ============================================================================== --- vendor/dma/dist/dma-mbox-create.c Fri Sep 30 23:19:08 2016 (r306538) +++ vendor/dma/dist/dma-mbox-create.c Fri Sep 30 23:35:47 2016 (r306539) @@ -89,9 +89,7 @@ main(int argc, char **argv) struct group *gr; uid_t user_uid; gid_t mail_gid; - int error; - char fn[PATH_MAX+1]; - int f; + int f, maildirfd; openlog("dma-mbox-create", 0, LOG_MAIL); @@ -131,26 +129,22 @@ main(int argc, char **argv) if (!pw) logfail(EX_NOUSER, "cannot find user `%s'", user); - user_uid = pw->pw_uid; + maildirfd = open(_PATH_MAILDIR, O_RDONLY); + if (maildirfd < 0) + logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR); - error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user); - if (error < 0 || (size_t)error >= sizeof(fn)) { - if (error >= 0) { - errno = 0; - logfail(EX_USAGE, "mbox path too long"); - } - logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); - } + user_uid = pw->pw_uid; - f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); + f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); if (f < 0) - logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); + logfail(EX_NOINPUT, "cannot open mbox `%s'", user); if (fchown(f, user_uid, mail_gid)) - logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change owner of mbox `%s'", user); if (fchmod(f, 0620)) - logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", + user); /* file should be present with the right owner and permissions */ From owner-svn-src-all@freebsd.org Fri Sep 30 23:36: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 7F13CC04160; Fri, 30 Sep 2016 23:36:29 +0000 (UTC) (envelope-from bapt@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 41D6F1709; Fri, 30 Sep 2016 23:36:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UNaSB9094925; Fri, 30 Sep 2016 23:36:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UNaSqX094924; Fri, 30 Sep 2016 23:36:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609302336.u8UNaSqX094924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 30 Sep 2016 23:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306540 - vendor/dma/20160929 X-SVN-Group: vendor 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.23 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: Fri, 30 Sep 2016 23:36:29 -0000 Author: bapt Date: Fri Sep 30 23:36:28 2016 New Revision: 306540 URL: https://svnweb.freebsd.org/changeset/base/306540 Log: tag import of dma 20160929 Added: vendor/dma/20160929/ - copied from r306538, vendor/dma/dist/ Replaced: vendor/dma/20160929/dma-mbox-create.c - copied unchanged from r306539, vendor/dma/dist/dma-mbox-create.c Copied: vendor/dma/20160929/dma-mbox-create.c (from r306539, vendor/dma/dist/dma-mbox-create.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/20160929/dma-mbox-create.c Fri Sep 30 23:36:28 2016 (r306540, copy of r306539, vendor/dma/dist/dma-mbox-create.c) @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2010-2014, Simon Schubert <2@0x2c.org>. + * Copyright (c) 2008 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Simon Schubert <2@0x2c.org>. + * + * 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. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS 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. + */ + +/* + * This binary is setuid root. Use extreme caution when touching + * user-supplied information. Keep the root window as small as possible. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dma.h" + + +static void +logfail(int exitcode, const char *fmt, ...) +{ + int oerrno = errno; + va_list ap; + char outs[1024]; + + outs[0] = 0; + if (fmt != NULL) { + va_start(ap, fmt); + vsnprintf(outs, sizeof(outs), fmt, ap); + va_end(ap); + } + + errno = oerrno; + if (*outs != 0) + syslog(LOG_ERR, errno ? "%s: %m" : "%s", outs); + else + syslog(LOG_ERR, errno ? "%m" : "unknown error"); + + exit(exitcode); +} + +/* + * Create a mbox in /var/mail for a given user, or make sure + * the permissions are correct for dma. + */ + +int +main(int argc, char **argv) +{ + const char *user; + struct passwd *pw; + struct group *gr; + uid_t user_uid; + gid_t mail_gid; + int f, maildirfd; + + openlog("dma-mbox-create", 0, LOG_MAIL); + + errno = 0; + gr = getgrnam(DMA_GROUP); + if (!gr) + logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP); + + mail_gid = gr->gr_gid; + + if (setgid(mail_gid) != 0) + logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, DMA_GROUP); + if (getegid() != mail_gid) + logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); + + /* + * We take exactly one argument: the username. + */ + if (argc != 2) { + errno = 0; + logfail(EX_USAGE, "no arguments"); + } + user = argv[1]; + + syslog(LOG_NOTICE, "creating mbox for `%s'", user); + + /* the username may not contain a pathname separator */ + if (strchr(user, '/')) { + errno = 0; + logfail(EX_DATAERR, "path separator in username `%s'", user); + exit(1); + } + + /* verify the user exists */ + errno = 0; + pw = getpwnam(user); + if (!pw) + logfail(EX_NOUSER, "cannot find user `%s'", user); + + maildirfd = open(_PATH_MAILDIR, O_RDONLY); + if (maildirfd < 0) + logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR); + + user_uid = pw->pw_uid; + + f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); + if (f < 0) + logfail(EX_NOINPUT, "cannot open mbox `%s'", user); + + if (fchown(f, user_uid, mail_gid)) + logfail(EX_OSERR, "cannot change owner of mbox `%s'", user); + + if (fchmod(f, 0620)) + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", + user); + + /* file should be present with the right owner and permissions */ + + syslog(LOG_NOTICE, "successfully created mbox for `%s'", user); + + return (0); +} From owner-svn-src-all@freebsd.org Fri Sep 30 23:38:27 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 B1BFBC04210; Fri, 30 Sep 2016 23:38:27 +0000 (UTC) (envelope-from bapt@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 6ACD71965; Fri, 30 Sep 2016 23:38:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UNcQrk095180; Fri, 30 Sep 2016 23:38:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UNcQoW095179; Fri, 30 Sep 2016 23:38:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609302338.u8UNcQoW095179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 30 Sep 2016 23:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306541 - head/contrib/dma 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.23 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: Fri, 30 Sep 2016 23:38:27 -0000 Author: bapt Date: Fri Sep 30 23:38:26 2016 New Revision: 306541 URL: https://svnweb.freebsd.org/changeset/base/306541 Log: Import dma 20160929 MFC after: 1 week Modified: head/contrib/dma/dma-mbox-create.c Directory Properties: head/contrib/dma/ (props changed) Modified: head/contrib/dma/dma-mbox-create.c ============================================================================== --- head/contrib/dma/dma-mbox-create.c Fri Sep 30 23:36:28 2016 (r306540) +++ head/contrib/dma/dma-mbox-create.c Fri Sep 30 23:38:26 2016 (r306541) @@ -89,9 +89,7 @@ main(int argc, char **argv) struct group *gr; uid_t user_uid; gid_t mail_gid; - int error; - char fn[PATH_MAX+1]; - int f; + int f, maildirfd; openlog("dma-mbox-create", 0, LOG_MAIL); @@ -131,26 +129,22 @@ main(int argc, char **argv) if (!pw) logfail(EX_NOUSER, "cannot find user `%s'", user); - user_uid = pw->pw_uid; + maildirfd = open(_PATH_MAILDIR, O_RDONLY); + if (maildirfd < 0) + logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR); - error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user); - if (error < 0 || (size_t)error >= sizeof(fn)) { - if (error >= 0) { - errno = 0; - logfail(EX_USAGE, "mbox path too long"); - } - logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); - } + user_uid = pw->pw_uid; - f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); + f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); if (f < 0) - logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); + logfail(EX_NOINPUT, "cannot open mbox `%s'", user); if (fchown(f, user_uid, mail_gid)) - logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change owner of mbox `%s'", user); if (fchmod(f, 0620)) - logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", + user); /* file should be present with the right owner and permissions */ From owner-svn-src-all@freebsd.org Sat Oct 1 00:11: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 4B145C049DF; Sat, 1 Oct 2016 00:11:12 +0000 (UTC) (envelope-from bapt@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 D959CA40; Sat, 1 Oct 2016 00:11:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u910BBW1007683; Sat, 1 Oct 2016 00:11:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u910BAjp007670; Sat, 1 Oct 2016 00:11:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610010011.u910BAjp007670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Oct 2016 00:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306542 - in vendor/libucl/dist: . haskell include m4 python python/src python/tests src tests/schema X-SVN-Group: vendor 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.23 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: Sat, 01 Oct 2016 00:11:12 -0000 Author: bapt Date: Sat Oct 1 00:11:09 2016 New Revision: 306542 URL: https://svnweb.freebsd.org/changeset/base/306542 Log: Update libucl to snapshot 20160812 Added: vendor/libucl/dist/haskell/ vendor/libucl/dist/haskell/hucl.hs vendor/libucl/dist/m4/gcov.m4 vendor/libucl/dist/python/tests/ vendor/libucl/dist/python/tests/__init__.py (contents, props changed) vendor/libucl/dist/python/tests/compat.py (contents, props changed) vendor/libucl/dist/python/tests/test_dump.py (contents, props changed) vendor/libucl/dist/python/tests/test_load.py (contents, props changed) vendor/libucl/dist/python/tests/test_validation.py (contents, props changed) Deleted: vendor/libucl/dist/python/test.sh vendor/libucl/dist/python/test_uclmodule.py Modified: vendor/libucl/dist/CMakeLists.txt vendor/libucl/dist/Makefile.unix vendor/libucl/dist/Makefile.w32 vendor/libucl/dist/README.md vendor/libucl/dist/include/ucl++.h vendor/libucl/dist/include/ucl.h vendor/libucl/dist/python/setup.py vendor/libucl/dist/python/src/uclmodule.c vendor/libucl/dist/src/mum.h vendor/libucl/dist/src/ucl_parser.c vendor/libucl/dist/src/ucl_schema.c vendor/libucl/dist/src/ucl_util.c vendor/libucl/dist/tests/schema/patternProperties.json vendor/libucl/dist/tests/schema/refRemote.json Modified: vendor/libucl/dist/CMakeLists.txt ============================================================================== --- vendor/libucl/dist/CMakeLists.txt Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/CMakeLists.txt Sat Oct 1 00:11:09 2016 (r306542) @@ -205,8 +205,7 @@ SET(UCLSRC src/ucl_util.c src/ucl_hash.c src/ucl_schema.c src/ucl_msgpack.c - src/ucl_sexp.c - src/xxhash.c) + src/ucl_sexp.c) SET (LIB_TYPE STATIC) Modified: vendor/libucl/dist/Makefile.unix ============================================================================== --- vendor/libucl/dist/Makefile.unix Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/Makefile.unix Sat Oct 1 00:11:09 2016 (r306542) @@ -1,7 +1,7 @@ CC ?= gcc DESTDIR ?= /usr/local LD ?= gcc -C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src +C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src -I./klib MAJOR_VERSION = 0 MINOR_VERSION = 2 PATCH_VERSION = 9 @@ -25,13 +25,12 @@ HDEPS = $(SRCDIR)/ucl_hash.h \ $(SRCDIR)/ucl_chartable.h \ $(SRCDIR)/ucl_internal.h \ $(INCLUDEDIR)/ucl.h \ - $(SRCDIR)/xxhash.h + $(SRCDIR)/mum.h OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ - $(OBJDIR)/ucl_schema.o \ - $(OBJDIR)/xxhash.o + $(OBJDIR)/ucl_schema.o all: $(OBJDIR) $(OBJDIR)/$(SONAME) @@ -55,8 +54,6 @@ $(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash $(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c $(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS) $(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c -$(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $(HDEPS) - $(CC) -o $(OBJDIR)/xxhash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/xxhash.c clean: $(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME_FULL) $(OBJDIR)/$(SONAME) $(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump $(OBJDIR)/test_generate $(OBJDIR)/test_schema || true Modified: vendor/libucl/dist/Makefile.w32 ============================================================================== --- vendor/libucl/dist/Makefile.w32 Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/Makefile.w32 Sat Oct 1 00:11:09 2016 (r306542) @@ -28,14 +28,13 @@ HDEPS = $(SRCDIR)/ucl_hash.h \ $(SRCDIR)/ucl_chartable.h \ $(SRCDIR)/ucl_internal.h \ $(INCLUDEDIR)/ucl.h \ - $(SRCDIR)/xxhash.h + $(SRCDIR)/mum.h OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ $(OBJDIR)/ucl_emitter_utils.o \ - $(OBJDIR)/ucl_schema.o \ - $(OBJDIR)/xxhash.o + $(OBJDIR)/ucl_schema.o all: $(OBJDIR) $(OBJDIR)/$(SONAME) Modified: vendor/libucl/dist/README.md ============================================================================== --- vendor/libucl/dist/README.md Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/README.md Sat Oct 1 00:11:09 2016 (r306542) @@ -12,7 +12,7 @@ - [Named keys hierarchy](#named-keys-hierarchy) - [Convenient numbers and booleans](#convenient-numbers-and-booleans) - [General improvements](#general-improvements) - - [Commments](#commments) + - [Comments](#comments) - [Macros support](#macros-support) - [Variables support](#variables-support) - [Multiline strings](#multiline-strings) @@ -21,7 +21,7 @@ - [Performance](#performance) - [Conclusion](#conclusion) -## Introduction +## Introduction This document describes the main features and principles of the configuration language called `UCL` - universal configuration language. @@ -47,7 +47,7 @@ section { string = "something"; subsection { host = { - host = "hostname"; + host = "hostname"; port = 900; } host = { @@ -163,9 +163,9 @@ section { } } ``` - + Plain definitions may be more complex and contain more than a single level of nested objects: - + ```nginx section "blah" "foo" { key = value; @@ -174,7 +174,7 @@ section "blah" "foo" { is presented as: -```nginx +```nginx section { blah { foo { @@ -196,17 +196,17 @@ section { ## General improvements -### Commments +### Comments UCL supports different style of comments: -* single line: `#` +* single line: `#` * multiline: `/* ... */` Multiline comments may be nested: ```c # Sample single line comment -/* +/* some comment /* nested comment */ end of comment @@ -263,7 +263,7 @@ all files that matches the specified pat for your operating system). This option is meaningless for URL includes. * `url` (default: **true**) - allow URL includes. * `path` (default: empty) - A UCL_ARRAY of directories to search for the include file. -Search ends after the first patch, unless `glob` is true, then all matches are included. +Search ends after the first match, unless `glob` is true, then all matches are included. * `prefix` (default false) - Put included contents inside an object, instead of loading them into the root. If no `key` is provided, one is automatically generated based on each files basename() * `key` (default: ) - Key to load contents of include into. If @@ -273,7 +273,7 @@ object or an array. * `priority` (default: 0) - specify priority for the include (see below). * `duplicate` (default: 'append') - specify policy of duplicates resolving: - `append` - default strategy, if we have new object of higher priority then it replaces old one, if we have new object with less priority it is ignored completely, and if we have two duplicate objects with the same priority then we have a multi-value key (implicit array) - - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardeless of priorities) + - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardless of priorities) - `error` - create error on duplicate keys and stop parsing - `rewrite` - always rewrite an old value with new one (ignoring priorities) @@ -320,7 +320,7 @@ Here are some rules for this syntax: * Multiline terminator must start just after `<<` symbols and it must consist of capital letters only (e.g. `< ParserHandle +foreign import ccall "ucl_parser_add_string" ucl_parser_add_string :: ParserHandle -> CString -> CUInt -> IO Bool +foreign import ccall "ucl_parser_add_file" ucl_parser_add_file :: ParserHandle -> CString -> IO Bool +foreign import ccall "ucl_parser_get_object" ucl_parser_get_object :: ParserHandle -> UCLObjectHandle +foreign import ccall "ucl_parser_get_error" ucl_parser_get_error :: ParserHandle -> CString + +foreign import ccall "ucl_object_iterate_new" ucl_object_iterate_new :: UCLObjectHandle -> UCLIterHandle +foreign import ccall "ucl_object_iterate_safe" ucl_object_iterate_safe :: UCLIterHandle -> Bool -> UCLObjectHandle +foreign import ccall "ucl_object_type" ucl_object_type :: UCLObjectHandle -> CUInt +foreign import ccall "ucl_object_key" ucl_object_key :: UCLObjectHandle -> CString +foreign import ccall "ucl_object_toint" ucl_object_toint :: UCLObjectHandle -> CInt +foreign import ccall "ucl_object_todouble" ucl_object_todouble :: UCLObjectHandle -> CDouble +foreign import ccall "ucl_object_tostring" ucl_object_tostring :: UCLObjectHandle -> CString +foreign import ccall "ucl_object_toboolean" ucl_object_toboolean :: UCLObjectHandle -> Bool + +foreign import ccall "ucl_object_emit" ucl_object_emit :: UCLObjectHandle -> UCLEmitterType -> CString +foreign import ccall "ucl_object_emit_len" ucl_object_emit_len :: UCLObjectHandle -> UCLEmitterType -> Ptr CSize -> IO CString + +type UCL_TYPE = CUInt +ucl_OBJECT :: UCL_TYPE +ucl_OBJECT = 0 +ucl_ARRAY :: UCL_TYPE +ucl_ARRAY = 1 +ucl_INT :: UCL_TYPE +ucl_INT = 2 +ucl_FLOAT :: UCL_TYPE +ucl_FLOAT = 3 +ucl_STRING :: UCL_TYPE +ucl_STRING = 4 +ucl_BOOLEAN :: UCL_TYPE +ucl_BOOLEAN = 5 +ucl_TIME :: UCL_TYPE +ucl_TIME = 6 +ucl_USERDATA :: UCL_TYPE +ucl_USERDATA = 7 +ucl_NULL :: UCL_TYPE +ucl_NULL = 8 + +ucl_emit_json :: UCLEmitterType +ucl_emit_json = 0 +ucl_emit_json_compact :: UCLEmitterType +ucl_emit_json_compact = 1 :: UCLEmitterType +ucl_emit_msgpack :: UCLEmitterType +ucl_emit_msgpack = 4 :: UCLEmitterType + +ucl_parser_parse_string_pure :: String -> Either UCLObjectHandle ErrorString +ucl_parser_parse_string_pure s = unsafePerformIO $ do + cs <- newCString s + let p = ucl_parser_new 0x4 + didParse <- ucl_parser_add_string p cs (toEnum $ length s) + if didParse + then return $ Left $ ucl_parser_get_object p + else Right <$> peekCString ( ucl_parser_get_error p) + +ucl_parser_add_file_pure :: String -> Either UCLObjectHandle ErrorString +ucl_parser_add_file_pure s = unsafePerformIO $ do + cs <- newCString s + let p = ucl_parser_new 0x4 + didParse <- ucl_parser_add_file p cs + if didParse + then return $ Left $ ucl_parser_get_object p + else Right <$> peekCString ( ucl_parser_get_error p) + +unpack :: MSG.MessagePack a => String -> Either a ErrorString +unpack s = case ucl_parser_parse_string_pure s of + (Right err) -> Right err + (Left obj) -> case MSG.fromObject (ucl_to_msgpack_object obj) of + Nothing -> Right "MessagePack fromObject Error" + (Just a) -> Left a + +ucl_to_msgpack_object :: UCLObjectHandle -> MSG.Object +ucl_to_msgpack_object o = toMsgPackObj (ucl_object_type o) o + where + toMsgPackObj n obj + |n==ucl_OBJECT = MSG.ObjectMap $ uclObjectToVector obj + |n==ucl_ARRAY = MSG.ObjectArray undefined + |n==ucl_INT = MSG.ObjectInt $ fromEnum $ ucl_object_toint obj + |n==ucl_FLOAT = MSG.ObjectDouble $ realToFrac $ ucl_object_todouble obj + |n==ucl_STRING = MSG.ObjectStr $ T.pack $ unsafePerformIO $ peekCString $ ucl_object_tostring obj + |n==ucl_BOOLEAN = MSG.ObjectBool $ ucl_object_toboolean obj + |n==ucl_TIME = error "time undefined" + |n==ucl_USERDATA = error "userdata undefined" + |n==ucl_NULL = error "null undefined" + |otherwise = error "\"Unknown Type\" Error" + +uclObjectToVector :: UCLObjectHandle -> V.Vector (MSG.Object,MSG.Object) +uclObjectToVector o = iterateObject (ucl_object_iterate_safe iter True ) iter V.empty + where + iter = ucl_object_iterate_new o + iterateObject obj it vec = if ucl_object_type obj == ucl_NULL + then vec + else iterateObject (ucl_object_iterate_safe it True) it (V.snoc vec ( getUclKey obj , ucl_to_msgpack_object obj)) + getUclKey obj = MSG.ObjectStr $ T.pack $ unsafePerformIO $ peekCString $ ucl_object_key obj + +uclArrayToVector :: UCLObjectHandle -> V.Vector MSG.Object +uclArrayToVector o = iterateArray (ucl_object_iterate_safe iter True ) iter V.empty + where + iter = ucl_object_iterate_new o + iterateArray obj it vec = if ucl_object_type obj == ucl_NULL + then vec + else iterateArray (ucl_object_iterate_safe it True) it (V.snoc vec (ucl_to_msgpack_object obj)) + Modified: vendor/libucl/dist/include/ucl++.h ============================================================================== --- vendor/libucl/dist/include/ucl++.h Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/include/ucl++.h Sat Oct 1 00:11:09 2016 (r306542) @@ -24,6 +24,9 @@ #pragma once #include +#include +#include +#include #include #include @@ -100,6 +103,68 @@ private: return func; }; + static bool ucl_variable_getter(const unsigned char *data, size_t len, + unsigned char ** /*replace*/, size_t * /*replace_len*/, bool *need_free, void* ud) + { + *need_free = false; + + auto vars = reinterpret_cast *>(ud); + if (vars && data && len != 0) { + vars->emplace (data, data + len); + } + return false; + } + + static bool ucl_variable_replacer (const unsigned char *data, size_t len, + unsigned char **replace, size_t *replace_len, bool *need_free, void* ud) + { + *need_free = false; + + auto replacer = reinterpret_cast(ud); + if (!replacer) { + return false; + } + + std::string var_name (data, data + len); + if (!replacer->is_variable (var_name)) { + return false; + } + + std::string var_value = replacer->replace (var_name); + if (var_value.empty ()) { + return false; + } + + *replace = (unsigned char *)UCL_ALLOC (var_value.size ()); + memcpy (*replace, var_value.data (), var_value.size ()); + + *replace_len = var_value.size (); + *need_free = true; + + return true; + } + + template + static Ucl parse_with_strategy_function (C config_func, P parse_func, std::string &err) + { + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + config_func (parser); + + if (!parse_func (parser)) { + err.assign (ucl_parser_get_error (parser)); + ucl_parser_free (parser); + + return nullptr; + } + + auto obj = ucl_parser_get_object (parser); + ucl_parser_free (parser); + + // Obj will handle ownership + return Ucl (obj); + } + std::unique_ptr obj; public: @@ -117,9 +182,9 @@ public: const_iterator(const Ucl &obj) { it = std::shared_ptr(ucl_object_iterate_new (obj.obj.get()), - ucl_iter_deleter()); + ucl_iter_deleter()); cur.reset (new Ucl(ucl_object_iterate_safe (it.get(), true))); - if (!*cur) { + if (cur->type() == UCL_NULL) { it.reset (); cur.reset (); } @@ -153,7 +218,7 @@ public: cur.reset (new Ucl(ucl_object_iterate_safe (it.get(), true))); } - if (!*cur) { + if (cur && cur->type() == UCL_NULL) { it.reset (); cur.reset (); } @@ -171,6 +236,17 @@ public: } }; + struct variable_replacer { + virtual ~variable_replacer() {} + + virtual bool is_variable (const std::string &str) const + { + return !str.empty (); + } + + virtual std::string replace (const std::string &var) const = 0; + }; + // We grab ownership if get non-const ucl_object_t Ucl(ucl_object_t *other) { obj.reset (other); @@ -211,20 +287,20 @@ public: obj.reset (ucl_object_fromstring_common (value.data (), value.size (), UCL_STRING_RAW)); } - Ucl(const char * value) { + Ucl(const char *value) { obj.reset (ucl_object_fromstring_common (value, 0, UCL_STRING_RAW)); } // Implicit constructor: anything with a to_json() function. template - Ucl(const T & t) : Ucl(t.to_ucl()) {} + Ucl(const T &t) : Ucl(t.to_ucl()) {} // Implicit constructor: map-like objects (std::map, std::unordered_map, etc) template ::value && std::is_constructible::value, int>::type = 0> - Ucl(const M & m) { + Ucl(const M &m) { obj.reset (ucl_object_typed_new (UCL_OBJECT)); auto cobj = obj.get (); @@ -238,7 +314,7 @@ public: template ::value, int>::type = 0> - Ucl(const V & v) { + Ucl(const V &v) { obj.reset (ucl_object_typed_new (UCL_ARRAY)); auto cobj = obj.get (); @@ -356,46 +432,138 @@ public: return out; } - static Ucl parse (const std::string & in, std::string & err) + static Ucl parse (const std::string &in, std::string &err) { - auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + return parse (in, std::map(), err); + } - if (!ucl_parser_add_chunk (parser, (const unsigned char *)in.data (), - in.size ())) { - err.assign (ucl_parser_get_error (parser)); - ucl_parser_free (parser); + static Ucl parse (const std::string &in, const std::map &vars, std::string &err) + { + auto config_func = [&vars] (ucl_parser *parser) { + for (const auto & item : vars) { + ucl_parser_register_variable (parser, item.first.c_str (), item.second.c_str ()); + } + }; + + auto parse_func = [&in] (ucl_parser *parser) { + return ucl_parser_add_chunk (parser, (unsigned char *)in.data (), in.size ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + static Ucl parse (const std::string &in, const variable_replacer &replacer, std::string &err) + { + auto config_func = [&replacer] (ucl_parser *parser) { + ucl_parser_set_variables_handler (parser, ucl_variable_replacer, + &const_cast(replacer)); + }; + + auto parse_func = [&in] (ucl_parser *parser) { + return ucl_parser_add_chunk (parser, (unsigned char *) in.data (), in.size ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static Ucl parse (const char *in, std::string &err) + { + return parse (in, std::map(), err); + } + + static Ucl parse (const char *in, const std::map &vars, std::string &err) + { + if (!in) { + err = "null input"; return nullptr; } + return parse (std::string (in), vars, err); + } - auto obj = ucl_parser_get_object (parser); + static Ucl parse (const char *in, const variable_replacer &replacer, std::string &err) + { + if (!in) { + err = "null input"; + return nullptr; + } + return parse (std::string(in), replacer, err); + } + + static Ucl parse_from_file (const std::string &filename, std::string &err) + { + return parse_from_file (filename, std::map(), err); + } + + static Ucl parse_from_file (const std::string &filename, const std::map &vars, std::string &err) + { + auto config_func = [&vars] (ucl_parser *parser) { + for (const auto & item : vars) { + ucl_parser_register_variable (parser, item.first.c_str (), item.second.c_str ()); + } + }; + + auto parse_func = [&filename] (ucl_parser *parser) { + return ucl_parser_add_file (parser, filename.c_str ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static Ucl parse_from_file (const std::string &filename, const variable_replacer &replacer, std::string &err) + { + auto config_func = [&replacer] (ucl_parser *parser) { + ucl_parser_set_variables_handler (parser, ucl_variable_replacer, + &const_cast(replacer)); + }; + + auto parse_func = [&filename] (ucl_parser *parser) { + return ucl_parser_add_file (parser, filename.c_str ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static std::vector find_variable (const std::string &in) + { + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + std::set vars; + ucl_parser_set_variables_handler (parser, ucl_variable_getter, &vars); + ucl_parser_add_chunk (parser, (const unsigned char *)in.data (), in.size ()); ucl_parser_free (parser); - // Obj will handle ownership - return Ucl (obj); + std::vector result; + std::move (vars.begin (), vars.end (), std::back_inserter (result)); + return result; } - static Ucl parse (const char * in, std::string & err) + static std::vector find_variable (const char *in) { - if (in) { - return parse (std::string(in), err); - } else { - err = "null input"; - return nullptr; + if (!in) { + return std::vector(); } + return find_variable (std::string (in)); } - static Ucl parse (std::istream &ifs, std::string &err) + static std::vector find_variable_from_file (const std::string &filename) { - return Ucl::parse (std::string(std::istreambuf_iterator(ifs), - std::istreambuf_iterator()), err); + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + std::set vars; + ucl_parser_set_variables_handler (parser, ucl_variable_getter, &vars); + ucl_parser_add_file (parser, filename.c_str ()); + ucl_parser_free (parser); + + std::vector result; + std::move (vars.begin (), vars.end (), std::back_inserter (result)); + return std::move (result); } - Ucl& operator= (Ucl rhs) - { - obj.swap (rhs.obj); - return *this; - } + Ucl& operator= (Ucl rhs) + { + obj.swap (rhs.obj); + return *this; + } bool operator== (const Ucl &rhs) const { Modified: vendor/libucl/dist/include/ucl.h ============================================================================== --- vendor/libucl/dist/include/ucl.h Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/include/ucl.h Sat Oct 1 00:11:09 2016 (r306542) @@ -1016,7 +1016,6 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file - * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1026,7 +1025,6 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file - * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1035,6 +1033,20 @@ UCL_EXTERN bool ucl_parser_add_file_prio const char *filename, unsigned priority); /** + * Load and add data from a file + * @param parser parser structure + * @param filename the name of file + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_file_full (struct ucl_parser *parser, const char *filename, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Load and add data from a file descriptor * @param parser parser structure * @param filename the name of file Added: vendor/libucl/dist/m4/gcov.m4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/dist/m4/gcov.m4 Sat Oct 1 00:11:09 2016 (r306542) @@ -0,0 +1,89 @@ +# SYNOPSIS +# +# Add code coverage support with gcov/lcov. +# +# AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Provides a --enable-coverage option which checks for available +# gcov/lcov binaries and provides ENABLE_CODE_COVERAGE conditional. +# +# LAST MODIFICATION +# +# $Id: coverage.m4 40881 2013-08-20 17:54:39Z damon $ +# +# COPYLEFT +# +# Copyright (c) 2012 Roy H. Stogner +# Copyright (c) 2010 Karl W. Schulz +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_CODE_COVERAGE], +[ + +AC_ARG_ENABLE(coverage, AC_HELP_STRING([--enable-coverage],[configure code coverage analysis tools])) + +HAVE_GCOV_TOOLS=0 + +GCOV_FLAGS="" + +if test "x$enable_coverage" = "xyes"; then + + # ---------------------------- + # Check for gcov/lcov binaries + # ---------------------------- + + AC_ARG_VAR([GCOV], [Coverage testing command]) + if test "x$GCOV" = "x"; then + AC_PATH_PROG(GCOV, gcov, no) + else + AC_PATH_PROG(GCOV, $GCOV, no) + fi + + AC_PATH_PROG(LCOV, lcov, no) + AC_PATH_PROG(GENHTML, genhtml) + + # ---------------------------------- + # include coverage compiler options + # ---------------------------------- + AC_MSG_CHECKING([for clang]) + + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], [[ + #ifndef __clang__ + not clang + #endif + ]])], + [CLANG=yes], [CLANG=no]) + + AC_MSG_RESULT([$CLANG]) + HAVE_GCOV_TOOLS=1 + COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage" + COVERAGE_LDFLAGS="--coverage -fprofile-arcs -ftest-coverage" + COVERAGE_OPTFLAGS="-O0" + + # Test for C... + CFLAGS="${GCOV_FLAGS} ${CFLAGS}" + CXXFLAGS="${GCOV_FLAGS} ${CXXFLAGS}" + if test "x$GCC" = "xyes" -a "x$CLANG" = "xno"; then + COVERAGE_LIBS="-lgcov" + else + COVERAGE_LIBS="" + fi +fi + +AC_SUBST([GCOV]) +AC_SUBST([LCOV]) +AC_SUBST([GENHTML]) +AC_SUBST([GENHTML_OPTIONS]) +AC_SUBST([COVERAGE_CFLAGS]) +AC_SUBST([COVERAGE_OPTFLAGS]) +AC_SUBST([COVERAGE_LDFLAGS]) +AC_SUBST([COVERAGE_LIBS]) +AM_CONDITIONAL(CODE_COVERAGE_ENABLED,test x$HAVE_GCOV_TOOLS = x1) + +]) Modified: vendor/libucl/dist/python/setup.py ============================================================================== --- vendor/libucl/dist/python/setup.py Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/python/setup.py Sat Oct 1 00:11:09 2016 (r306542) @@ -1,37 +1,43 @@ -import distutils.ccompiler -import distutils.sysconfig -from distutils.core import setup, Extension +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup, Extension + import os +import sys +tests_require = [] -compiler = distutils.ccompiler.new_compiler() -search_paths=[os.path.expanduser('~/{}'), '/opt/local/{}', '/usr/local/{}', '/usr/{}'] -lib_paths = [ a.format("lib") for a in search_paths] -inc_paths = [ a.format("include") for a in search_paths] +if sys.version < '2.7': + tests_require.append('unittest2') -uclmodule = Extension('ucl', - include_dirs = inc_paths, - library_dirs = lib_paths, - libraries = ['ucl'], - sources = ['src/uclmodule.c'], - runtime_library_dirs = lib_paths, - language='c') +uclmodule = Extension( + 'ucl', + libraries = ['ucl'], + sources = ['src/uclmodule.c'], + language = 'c' +) -setup(name='ucl', - version='1.0', - description='ucl parser and emmitter', +setup( + name = 'ucl', + version = '0.8', + description = 'ucl parser and emmitter', ext_modules = [uclmodule], - author="Eitan Adler", - author_email="lists@eitanadler.com", - url="https://github.com/vstakhov/libucl/", - license="MIT", - classifiers=["Development Status :: 3 - Alpha", + test_suite = 'tests', + tests_require = tests_require, + author = "Eitan Adler, Denis Volpato Martins", + author_email = "lists@eitanadler.com", + url = "https://github.com/vstakhov/libucl/", + license = "MIT", + classifiers = [ + "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: DFSG approved", "License :: OSI Approved :: MIT License", "Programming Language :: C", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries", - ] - ) + ] +) Modified: vendor/libucl/dist/python/src/uclmodule.c ============================================================================== --- vendor/libucl/dist/python/src/uclmodule.c Fri Sep 30 23:38:26 2016 (r306541) +++ vendor/libucl/dist/python/src/uclmodule.c Sat Oct 1 00:11:09 2016 (r306542) @@ -2,6 +2,8 @@ #include #include +static PyObject *SchemaError; + static PyObject * _basic_ucl_type (ucl_object_t const *obj) { @@ -13,9 +15,11 @@ _basic_ucl_type (ucl_object_t const *obj case UCL_STRING: return Py_BuildValue ("s", ucl_object_tostring (obj)); case UCL_BOOLEAN: - return ucl_object_toboolean (obj) ? Py_True : Py_False; + return PyBool_FromLong (ucl_object_toboolean (obj)); case UCL_TIME: return Py_BuildValue ("d", ucl_object_todouble (obj)); + case UCL_NULL: + Py_RETURN_NONE; } return NULL; } @@ -124,26 +128,60 @@ _iterate_python (PyObject *obj) { if (obj == Py_None) { return ucl_object_new(); - } else if (PyBool_Check (obj)) { + } + else if (PyBool_Check (obj)) { return ucl_object_frombool (obj == Py_True); - } else if (PyInt_Check (obj)) { + } +#if PY_MAJOR_VERSION < 3 + else if (PyInt_Check (obj)) { return ucl_object_fromint (PyInt_AsLong (obj)); - } else if (PyFloat_Check (obj)) { + } +#endif + else if (PyLong_Check (obj)) { + return ucl_object_fromint (PyLong_AsLong (obj)); + } + else if (PyFloat_Check (obj)) { return ucl_object_fromdouble (PyFloat_AsDouble (obj)); - } else if (PyString_Check (obj)) { + } + else if (PyUnicode_Check (obj)) { + ucl_object_t *ucl_str; + PyObject *str = PyUnicode_AsASCIIString(obj); + ucl_str = ucl_object_fromstring (PyBytes_AsString (str)); + Py_DECREF(str); + return ucl_str; + } +#if PY_MAJOR_VERSION < 3 + else if (PyString_Check (obj)) { return ucl_object_fromstring (PyString_AsString (obj)); - // } else if (PyDateTime_Check (obj)) { } +#endif else if (PyDict_Check(obj)) { PyObject *key, *value; Py_ssize_t pos = 0; ucl_object_t *top, *elm; + char *keystr = NULL; top = ucl_object_typed_new (UCL_OBJECT); while (PyDict_Next(obj, &pos, &key, &value)) { elm = _iterate_python(value); - ucl_object_insert_key (top, elm, PyString_AsString(key), 0, true); + + if (PyUnicode_Check(key)) { + PyObject *keyascii = PyUnicode_AsASCIIString(key); + keystr = PyBytes_AsString(keyascii); + Py_DECREF(keyascii); + } +#if PY_MAJOR_VERSION < 3 + else if (PyString_Check(key)) { + keystr = PyString_AsString(key); + } +#endif + else { + PyErr_SetString(PyExc_TypeError, "Unknown key type"); + return NULL; + } + + ucl_object_insert_key (top, elm, keystr, 0, true); } return top; @@ -195,11 +233,6 @@ ucl_dump (PyObject *self, PyObject *args Py_RETURN_NONE; } - if (!PyDict_Check(obj)) { - PyErr_SetString(PyExc_TypeError, "Argument must be dict"); - return NULL; - } - root = _iterate_python(obj); if (root) { PyObject *ret; @@ -207,7 +240,11 @@ ucl_dump (PyObject *self, PyObject *args buf = (char *) ucl_object_emit (root, emitter); ucl_object_unref (root); +#if PY_MAJOR_VERSION < 3 ret = PyString_FromString (buf); +#else + ret = PyUnicode_FromString (buf); +#endif free(buf); return ret; @@ -219,17 +256,35 @@ ucl_dump (PyObject *self, PyObject *args static PyObject * ucl_validate (PyObject *self, PyObject *args) { - char *uclstr, *schema; + PyObject *dataobj, *schemaobj; + ucl_object_t *data, *schema; + bool r; + struct ucl_schema_error err; - if (PyArg_ParseTuple(args, "zz", &uclstr, &schema)) { - if (!uclstr || !schema) { - Py_RETURN_NONE; - } + if (!PyArg_ParseTuple (args, "OO", &schemaobj, &dataobj)) { + PyErr_SetString (PyExc_TypeError, "Unhandled object type"); + return NULL; + } - PyErr_SetString(PyExc_NotImplementedError, "schema validation is not yet supported"); + schema = _iterate_python(schemaobj); + if (!schema) + return NULL; + + data = _iterate_python(dataobj); + if (!data) + return NULL; + + // validation + r = ucl_object_validate (schema, data, &err); + ucl_object_unref (schema); + ucl_object_unref (data); + + if (!r) { + PyErr_SetString (SchemaError, err.msg); + return NULL; } - return NULL; + Py_RETURN_TRUE; } static PyMethodDef uclMethods[] = { @@ -247,6 +302,10 @@ init_macros(PyObject *mod) PyModule_AddIntMacro(mod, UCL_EMIT_CONFIG); PyModule_AddIntMacro(mod, UCL_EMIT_YAML); PyModule_AddIntMacro(mod, UCL_EMIT_MSGPACK); + + SchemaError = PyErr_NewException("ucl.SchemaError", NULL, NULL); + Py_INCREF(SchemaError); + PyModule_AddObject(mod, "SchemaError", SchemaError); } #if PY_MAJOR_VERSION >= 3 Added: vendor/libucl/dist/python/tests/__init__.py ============================================================================== Added: vendor/libucl/dist/python/tests/compat.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/dist/python/tests/compat.py Sat Oct 1 00:11:09 2016 (r306542) @@ -0,0 +1,8 @@ +try: + import unittest2 as unittest +except ImportError: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 1 00:12: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 4D32EC04B08; Sat, 1 Oct 2016 00:12:05 +0000 (UTC) (envelope-from bapt@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 0539BC2B; Sat, 1 Oct 2016 00:12:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u910C45h008440; Sat, 1 Oct 2016 00:12:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u910C3dm008432; Sat, 1 Oct 2016 00:12:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610010012.u910C3dm008432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Oct 2016 00:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306543 - in vendor/libucl/20160812: . haskell include lua m4 python python/src python/tests src tests tests/basic tests/schema uthash utils X-SVN-Group: vendor 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.23 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: Sat, 01 Oct 2016 00:12:05 -0000 Author: bapt Date: Sat Oct 1 00:12:03 2016 New Revision: 306543 URL: https://svnweb.freebsd.org/changeset/base/306543 Log: tag import of libucl 20160812 Added: vendor/libucl/20160812/ - copied from r294088, vendor/libucl/dist/ vendor/libucl/20160812/haskell/ - copied from r306542, vendor/libucl/dist/haskell/ vendor/libucl/20160812/m4/gcov.m4 - copied unchanged from r306542, vendor/libucl/dist/m4/gcov.m4 vendor/libucl/20160812/python/tests/ - copied from r306542, vendor/libucl/dist/python/tests/ vendor/libucl/20160812/src/mum.h - copied unchanged from r306542, vendor/libucl/dist/src/mum.h vendor/libucl/20160812/tests/basic/escapes.in - copied unchanged from r298162, vendor/libucl/dist/tests/basic/escapes.in vendor/libucl/20160812/tests/basic/escapes.res - copied unchanged from r298162, vendor/libucl/dist/tests/basic/escapes.res vendor/libucl/20160812/tests/basic/load.in - copied unchanged from r298162, vendor/libucl/dist/tests/basic/load.in vendor/libucl/20160812/tests/basic/load.inc - copied unchanged from r298162, vendor/libucl/dist/tests/basic/load.inc vendor/libucl/20160812/tests/basic/load.res - copied unchanged from r298162, vendor/libucl/dist/tests/basic/load.res Replaced: vendor/libucl/20160812/CMakeLists.txt - copied unchanged from r306542, vendor/libucl/dist/CMakeLists.txt vendor/libucl/20160812/ChangeLog.md - copied unchanged from r298162, vendor/libucl/dist/ChangeLog.md vendor/libucl/20160812/Makefile.am - copied unchanged from r298162, vendor/libucl/dist/Makefile.am vendor/libucl/20160812/Makefile.unix - copied unchanged from r306542, vendor/libucl/dist/Makefile.unix vendor/libucl/20160812/Makefile.w32 - copied unchanged from r306542, vendor/libucl/dist/Makefile.w32 vendor/libucl/20160812/README.md - copied unchanged from r306542, vendor/libucl/dist/README.md vendor/libucl/20160812/configure.ac - copied unchanged from r298162, vendor/libucl/dist/configure.ac vendor/libucl/20160812/include/ucl++.h - copied unchanged from r306542, vendor/libucl/dist/include/ucl++.h vendor/libucl/20160812/include/ucl.h - copied unchanged from r306542, vendor/libucl/dist/include/ucl.h vendor/libucl/20160812/lua/lua_ucl.c - copied unchanged from r298162, vendor/libucl/dist/lua/lua_ucl.c vendor/libucl/20160812/python/setup.py - copied unchanged from r306542, vendor/libucl/dist/python/setup.py vendor/libucl/20160812/python/src/uclmodule.c - copied unchanged from r306542, vendor/libucl/dist/python/src/uclmodule.c vendor/libucl/20160812/src/Makefile.am - copied unchanged from r301333, vendor/libucl/dist/src/Makefile.am vendor/libucl/20160812/src/ucl_emitter.c - copied unchanged from r298162, vendor/libucl/dist/src/ucl_emitter.c vendor/libucl/20160812/src/ucl_emitter_streamline.c - copied unchanged from r298162, vendor/libucl/dist/src/ucl_emitter_streamline.c vendor/libucl/20160812/src/ucl_hash.c - copied unchanged from r301333, vendor/libucl/dist/src/ucl_hash.c vendor/libucl/20160812/src/ucl_hash.h - copied unchanged from r298162, vendor/libucl/dist/src/ucl_hash.h vendor/libucl/20160812/src/ucl_internal.h - copied unchanged from r301333, vendor/libucl/dist/src/ucl_internal.h vendor/libucl/20160812/src/ucl_msgpack.c - copied unchanged from r301333, vendor/libucl/dist/src/ucl_msgpack.c vendor/libucl/20160812/src/ucl_parser.c - copied unchanged from r306542, vendor/libucl/dist/src/ucl_parser.c vendor/libucl/20160812/src/ucl_schema.c - copied unchanged from r306542, vendor/libucl/dist/src/ucl_schema.c vendor/libucl/20160812/src/ucl_sexp.c - copied unchanged from r298162, vendor/libucl/dist/src/ucl_sexp.c vendor/libucl/20160812/src/ucl_util.c - copied unchanged from r306542, vendor/libucl/dist/src/ucl_util.c vendor/libucl/20160812/tests/basic.test - copied unchanged from r298162, vendor/libucl/dist/tests/basic.test vendor/libucl/20160812/tests/basic/18.in - copied unchanged from r298162, vendor/libucl/dist/tests/basic/18.in vendor/libucl/20160812/tests/basic/18.res - copied unchanged from r298162, vendor/libucl/dist/tests/basic/18.res vendor/libucl/20160812/tests/basic/2.res - copied unchanged from r298162, vendor/libucl/dist/tests/basic/2.res vendor/libucl/20160812/tests/basic/9.in - copied unchanged from r298162, vendor/libucl/dist/tests/basic/9.in vendor/libucl/20160812/tests/basic/9.res - copied unchanged from r298162, vendor/libucl/dist/tests/basic/9.res vendor/libucl/20160812/tests/generate.res - copied unchanged from r298162, vendor/libucl/dist/tests/generate.res vendor/libucl/20160812/tests/schema.test - copied unchanged from r298162, vendor/libucl/dist/tests/schema.test vendor/libucl/20160812/tests/schema/definitions.json - copied unchanged from r298162, vendor/libucl/dist/tests/schema/definitions.json vendor/libucl/20160812/tests/schema/patternProperties.json - copied unchanged from r306542, vendor/libucl/dist/tests/schema/patternProperties.json vendor/libucl/20160812/tests/schema/ref.json - copied unchanged from r298162, vendor/libucl/dist/tests/schema/ref.json vendor/libucl/20160812/tests/schema/refRemote.json - copied unchanged from r306542, vendor/libucl/dist/tests/schema/refRemote.json vendor/libucl/20160812/tests/test_basic.c - copied unchanged from r298162, vendor/libucl/dist/tests/test_basic.c vendor/libucl/20160812/tests/test_generate.c - copied unchanged from r298162, vendor/libucl/dist/tests/test_generate.c vendor/libucl/20160812/tests/test_msgpack.c - copied unchanged from r298162, vendor/libucl/dist/tests/test_msgpack.c vendor/libucl/20160812/tests/test_schema.c - copied unchanged from r298162, vendor/libucl/dist/tests/test_schema.c vendor/libucl/20160812/uthash/uthash.h - copied unchanged from r301333, vendor/libucl/dist/uthash/uthash.h vendor/libucl/20160812/utils/objdump.c - copied unchanged from r298162, vendor/libucl/dist/utils/objdump.c Deleted: vendor/libucl/20160812/python/test.sh vendor/libucl/20160812/python/test_uclmodule.py vendor/libucl/20160812/src/xxhash.c vendor/libucl/20160812/src/xxhash.h Copied: vendor/libucl/20160812/CMakeLists.txt (from r306542, vendor/libucl/dist/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20160812/CMakeLists.txt Sat Oct 1 00:12:03 2016 (r306543, copy of r306542, vendor/libucl/dist/CMakeLists.txt) @@ -0,0 +1,259 @@ +PROJECT(libucl C) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) + +SET(LIBUCL_VERSION_MAJOR 0) +SET(LIBUCL_VERSION_MINOR 5) +SET(LIBUCL_VERSION_PATCH 0) + +SET(LIBUCL_VERSION + "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") + +INCLUDE(CheckCCompilerFlag) +INCLUDE(FindOpenSSL) + +OPTION(ENABLE_URL_INCLUDE "Enable urls in ucl includes (requires libcurl or libfetch) [default: OFF]" OFF) +OPTION(ENABLE_URL_SIGN "Enable signatures check in ucl includes (requires openssl) [default: OFF]" OFF) +OPTION(BUILD_SHARED_LIBS "Build Shared Libraries [default: OFF]" OFF) +OPTION(ENABLE_LUA "Enable lua support [default: OFF]" OFF) +OPTION(ENABLE_LUAJIT "Enable luajit support [default: OFF]" OFF) + +# Find lua installation +MACRO(FindLua) + # Find lua libraries + UNSET(LUA_INCLUDE_DIR CACHE) + UNSET(LUA_LIBRARY CACHE) + CMAKE_PARSE_ARGUMENTS(LUA "" "VERSION_MAJOR;VERSION_MINOR;ROOT" "" ${ARGN}) + + IF(NOT LUA_VERSION_MAJOR OR NOT LUA_VERSION_MINOR) + MESSAGE(FATAL_ERROR "Invalid FindLua invocation: ${ARGN}") + ENDIF() + + IF(ENABLE_LUAJIT MATCHES "ON") + MESSAGE(STATUS "Check for luajit ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") + FIND_PATH(LUA_INCLUDE_DIR luajit.h + HINTS + "${RSPAMD_SEARCH_PATH}" "${LUA_ROOT}" + $ENV{LUA_DIR} + PATH_SUFFIXES "include/luajit-2.0" + "include/luajit${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "include/luajit${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "include/luajit-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "include/luajit" + "include/lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "include/lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "include/lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + include/lua include + PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} + ) + FIND_LIBRARY(LUA_LIBRARY + NAMES luajit + "luajit-2.0" + "luajit2.0" + "luajit${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "luajit${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "luajit-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + HINTS + "${RSPAMD_SEARCH_PATH}" "${LUA_ROOT}" + $ENV{LUA_DIR} + PATH_SUFFIXES lib64 lib + PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS} + DOC "Lua library" + ) + + IF(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR) + MESSAGE(STATUS "Fallback from luajit to plain lua") + SET(ENABLE_LUAJIT "OFF") + MESSAGE(STATUS "Check for lua ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") + FIND_PATH(LUA_INCLUDE_DIR lua.h + HINTS + "${RSPAMD_SEARCH_PATH}" "${LUA_ROOT}" + $ENV{LUA_DIR} + PATH_SUFFIXES "include/lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "include/lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "include/lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + include/lua include + PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} + ) + FIND_LIBRARY(LUA_LIBRARY + NAMES lua + "lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + HINTS + "${RSPAMD_SEARCH_PATH}" "${LUA_ROOT}" + $ENV{LUA_DIR} + PATH_SUFFIXES lib64 lib + PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS} + DOC "Lua library" + ) + ENDIF() + ELSE(ENABLE_LUAJIT MATCHES "ON") + MESSAGE(STATUS "Check for lua ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") + FIND_PATH(LUA_INCLUDE_DIR lua.h + HINTS + "${RSPAMD_SEARCH_PATH}" "${LUA_ROOT}" + $ENV{LUA_DIR} + PATH_SUFFIXES "include/lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "include/lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "include/lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + include/lua include + PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} + ) + FIND_LIBRARY(LUA_LIBRARY + NAMES lua + "lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}" + "lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + "lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" + HINTS + "${RSPAMD_SEARCH_PATH}" "${LUA_ROOT}" + $ENV{LUA_DIR} + PATH_SUFFIXES lib64 lib + PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS} + DOC "Lua library" + ) + ENDIF(ENABLE_LUAJIT MATCHES "ON") + + IF(LUA_LIBRARY AND LUA_INCLUDE_DIR) + SET(LUA_FOUND 1) + IF(NOT LUA_VERSION_MAJOR OR NOT LUA_VERSION_MINOR) + SET(LUA_VERSION_MAJOR ${LUA_VERSION_MAJOR}) + SET(LUA_VERSION_MINOR ${LUA_VERSION_MINOR}) + ENDIF(NOT LUA_VERSION_MAJOR OR NOT LUA_VERSION_MINOR) + IF(ENABLE_LUAJIT MATCHES "ON") + MESSAGE(STATUS "Found luajit ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") + ELSE(ENABLE_LUAJIT MATCHES "ON") + MESSAGE(STATUS "Found lua ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") + ENDIF(ENABLE_LUAJIT MATCHES "ON") + ENDIF(LUA_LIBRARY AND LUA_INCLUDE_DIR) +ENDMACRO() + +IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt) +ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + +IF(ENABLE_URL_INCLUDE MATCHES "ON") + FIND_LIBRARY(LIBFETCH_LIBRARY NAMES fetch PATHS PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + DOC "Path where the libfetch library can be found") + IF(LIBFETCH_LIBRARY) + FIND_FILE(HAVE_FETCH_H NAMES fetch.h PATHS /usr/include + /opt/include + /usr/local/include + DOC "Path to libfetch header") + ELSE(LIBFETCH_LIBRARY) + # Try to find libcurl + ProcessPackage(CURL libcurl) + IF(NOT CURL_FOUND) + MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration") + ENDIF(NOT CURL_FOUND) + ENDIF(LIBFETCH_LIBRARY) +ENDIF(ENABLE_URL_INCLUDE MATCHES "ON") + +SET(CMAKE_C_WARN_FLAGS "") +CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL) +CHECK_C_COMPILER_FLAG(-W SUPPORT_W) +CHECK_C_COMPILER_FLAG(-Wno-unused-parameter SUPPORT_WPARAM) +CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN) +CHECK_C_COMPILER_FLAG(-Wstrict-prototypes SUPPORT_WSTRICT_PROTOTYPES) +IF(NOT "${CMAKE_C_COMPILER_ID}" MATCHES SunPro) + CHECK_C_COMPILER_FLAG("-std=c99" SUPPORT_STD_FLAG) +ENDIF(NOT "${CMAKE_C_COMPILER_ID}" MATCHES SunPro) +IF(SUPPORT_W) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W") +ENDIF(SUPPORT_W) +IF(SUPPORT_WALL) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wall") +ENDIF(SUPPORT_WALL) +IF(SUPPORT_WPARAM) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-parameter") +ENDIF(SUPPORT_WPARAM) +IF(SUPPORT_WPOINTER_SIGN) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign") +ENDIF(SUPPORT_WPOINTER_SIGN) +IF(SUPPORT_WSTRICT_PROTOTYPES) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wstrict-prototypes") +ENDIF(SUPPORT_WSTRICT_PROTOTYPES) +IF(SUPPORT_STD_FLAG) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -std=c99") +ENDIF(SUPPORT_STD_FLAG) + +IF(ENABLE_URL_SIGN MATCHES "ON") + IF(OPENSSL_FOUND) + SET(HAVE_OPENSSL 1) + INCLUDE_DIRECTORIES("${OPENSSL_INCLUDE_DIR}") + ENDIF(OPENSSL_FOUND) +ENDIF(ENABLE_URL_SIGN MATCHES "ON") + +INCLUDE_DIRECTORIES("src") +INCLUDE_DIRECTORIES("include") +INCLUDE_DIRECTORIES("uthash") +INCLUDE_DIRECTORIES("klib") + +SET(UCLSRC src/ucl_util.c + src/ucl_parser.c + src/ucl_emitter.c + src/ucl_emitter_streamline.c + src/ucl_emitter_utils.c + src/ucl_hash.c + src/ucl_schema.c + src/ucl_msgpack.c + src/ucl_sexp.c) + + +SET (LIB_TYPE STATIC) +IF (BUILD_SHARED_LIBS) + SET (LIB_TYPE SHARED) +ENDIF (BUILD_SHARED_LIBS) +ADD_LIBRARY(ucl ${LIB_TYPE} ${UCLSRC}) +SET_TARGET_PROPERTIES(ucl PROPERTIES VERSION ${LIBUCL_VERSION} SOVERSION ${LIBUCL_VERSION_MAJOR}) + +IF(ENABLE_LUA MATCHES "ON") + IF(ENABLE_LUAJIT MATCHES "ON") + FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") + IF(NOT LUA_FOUND) + MESSAGE(FATAL_ERROR "Lua not found, lua support is required") + ELSE(NOT LUA_FOUND) + INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") + ENDIF(NOT LUA_FOUND) + ELSE(ENABLE_LUAJIT MATCHES "ON") + FindLua(VERSION_MAJOR "5" VERSION_MINOR "2" ROOT "${LUA_ROOT}") + IF(NOT LUA_FOUND) + FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") + ENDIF(NOT LUA_FOUND) + IF(NOT LUA_FOUND) + MESSAGE(FATAL_ERROR "Lua not found, lua support is required") + ELSE(NOT LUA_FOUND) + INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") + ENDIF(NOT LUA_FOUND) + ENDIF(ENABLE_LUAJIT MATCHES "ON") + SET(UCL_LUA_SRC lua/lua_ucl.c) + ADD_LIBRARY(lua-ucl ${LIB_TYPE} ${UCL_LUA_SRC}) + IF(ENABLE_LUAJIT MATCHES "ON") + TARGET_LINK_LIBRARIES(lua-ucl "${LUAJIT_LIBRARY}") + ELSE(ENABLE_LUAJIT MATCHES "ON") + TARGET_LINK_LIBRARIES(lua-ucl "${LUA_LIBRARY}") + ENDIF(ENABLE_LUAJIT MATCHES "ON") + TARGET_LINK_LIBRARIES(lua-ucl ucl) + SET_TARGET_PROPERTIES(lua-ucl PROPERTIES VERSION ${LIBUCL_VERSION} SOVERSION ${LIBUCL_VERSION_MAJOR}) +ENDIF() + +IF(HAVE_FETCH_H) + TARGET_LINK_LIBRARIES(ucl fetch) +ELSE(HAVE_FETCH_H) + IF(CURL_FOUND) + TARGET_LINK_LIBRARIES(ucl ${CURL_LIBRARIES}) + ENDIF(CURL_FOUND) +ENDIF(HAVE_FETCH_H) +IF(ENABLE_URL_SIGN MATCHES "ON") + IF(OPENSSL_FOUND) + TARGET_LINK_LIBRARIES(ucl ${OPENSSL_LIBRARIES}) + ENDIF(OPENSSL_FOUND) +ENDIF(ENABLE_URL_SIGN MATCHES "ON") Copied: vendor/libucl/20160812/ChangeLog.md (from r298162, vendor/libucl/dist/ChangeLog.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20160812/ChangeLog.md Sat Oct 1 00:12:03 2016 (r306543, copy of r298162, vendor/libucl/dist/ChangeLog.md) @@ -0,0 +1,67 @@ +# Version history + +## Libucl 0.5 + +- Streamline emitter has been added, so it is now possible to output partial `ucl` objects +- Emitter now is more flexible due to emitter_context structure + +### 0.5.1 +- Fixed number of bugs and memory leaks + +### 0.5.2 + +- Allow userdata objects to be emitted and destructed +- Use userdata objects to store lua function references + +### Libucl 0.6 + +- Reworked macro interface + +### Libucl 0.6.1 + +- Various utilities fixes + +### Libucl 0.7.0 + +- Move to klib library from uthash to reduce memory overhead and increase performance + +### Libucl 0.7.1 + +- Added safe iterators API + +### Libucl 0.7.2 + +- Fixed serious bugs in schema and arrays iteration + +### Libucl 0.7.3 + +- Fixed a bug with macroes that come after an empty object +- Fixed a bug in include processing when an incorrect variable has been destroyed (use-after-free) + +### Libucl 0.8.0 + +- Allow to save comments and macros when parsing UCL documents +- C++ API +- Python bindings (by Eitan Adler) +- Add msgpack support for parser and emitter +- Add Canonical S-expressions parser for libucl +- CLI interface for parsing and validation (by Maxim Ignatenko) +- Implement include with priority +- Add 'nested' functionality to .include macro (by Allan Jude) +- Allow searching an array of paths for includes (by Allan Jude) +- Add new .load macro (by Allan Jude) +- Implement .inherit macro (#100) +- Add merge strategies +- Add schema validation to lua API +- Add support for external references to schema validation +- Add coveralls integration to libucl +- Implement tests for 80% of libucl code lines +- Fix tonns of minor and major bugs +- Improve documentation +- Rework function names to the common conventions (old names are preserved for backwards compatibility) +- Add Coverity scan integration +- Add fuzz tests + +**Incompatible changes**: + +- `ucl_object_emit_full` now accepts additional argument `comments` that could be used to emit comments with UCL output \ No newline at end of file Copied: vendor/libucl/20160812/Makefile.am (from r298162, vendor/libucl/dist/Makefile.am) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20160812/Makefile.am Sat Oct 1 00:12:03 2016 (r306543, copy of r298162, vendor/libucl/dist/Makefile.am) @@ -0,0 +1,81 @@ +ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = uthash klib README.md + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libucl.pc + +if LUA_SUB + LUA_SUBDIR = lua +endif + +COVERAGE_INFO_FILE = $(top_builddir)/coverage.info +COVERAGE_REPORT_DIR = $(top_builddir)/coverage + +.PHONY = coverage-requirement-check clean-coverage-report + +coverage-requirement-check: + @if test ! -e $(GCOV); then \ + echo "Cannot find $(GCOV). Please install gcov."; \ + exit 1; \ + fi + +coverage: coverage-requirement-check clean-coverage coverage-build coverage-check coverage-report + @echo "Please execute 'make clean' before 'make' or 'make check' to remove instrumented object files(compiled with -O0 etc.). Note that 'make clean' also remove coverage data." + +coverage-build: coverage-requirement-check + @if test `find $(top_builddir) -name "*.gcno" | wc -l` -eq 0; then \ + echo "Start to remove old non-instrumented object files..."; \ + $(MAKE) $(AM_MAKEFLAGS) clean; \ + echo "Successfully removed old non-instrumented object files."; \ + fi + @echo "Start to build libraries with coverage options..." + $(MAKE) $(AM_MAKEFLAGS) \ + CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS) $(COVERAGE_OPTFLAGS)" \ + CXXFLAGS="$(CXXFLAGS) $(COVERAGE_CXXFLAGS) $(COVERAGE_OPTFLAGS)" \ + LDFLAGS="$(LDFLAGS) $(COVERAGE_LDFLAGS)" \ + LIBS="$(LIBS) $(COVERAGE_LIBS)" + @echo "Successfully built libraries with coverage options." + +coverage-check: coverage-requirement-check + @echo "Start to run tests with instrumented libraries..." + $(MAKE) $(AM_MAKEFLAGS) check \ + CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS) $(COVERAGE_OPTFLAGS)" \ + CXXFLAGS="$(CXXFLAGS) $(COVERAGE_CXXFLAGS) $(COVERAGE_OPTFLAGS)" \ + LDFLAGS="$(LDFLAGS) $(COVERAGE_LDFLAGS)" \ + LIBS="$(LIBS) $(COVERAGE_LIBS)" + @echo "Successfully run tests with instrumented libraries." + +coverage-lcov: coverage-check coverage-requirement-check + $(LCOV) --capture \ + --directory "$(top_builddir)/" \ + --output-file $(COVERAGE_INFO_FILE) \ + --gcov-tool $(GCOV) \ + --compat-libtool --checksum + $(LCOV) --extract $(COVERAGE_INFO_FILE) `pwd`/src/ucl_\* \ + --output-file $(COVERAGE_INFO_FILE) + +coverage-report: coverage-lcov + @echo "Start to create coverage reports..." + $(GENHTML) --prefix "$(top_srcdir)" \ + --output-directory $(COVERAGE_REPORT_DIR) \ + --title $(PACKAGE_NAME) \ + --legend --show-details \ + $(GENHTML_OPTIONS) \ + $(COVERAGE_INFO_FILE) + @echo "Successfully created coverage reports into $(COVERAGE_REPORT_DIR) directory." + +clean-coverage-report: + -rm -rf $(COVERAGE_INFO_FILE) + -rm -rf $(COVERAGE_REPORT_DIR) + +clean-coverage: clean-coverage-report + -$(LCOV) --gcov-tool $(GCOV) --zerocounters --directory $(top_builddir) + @if xargs --version 2>/dev/null; then \ + find $(top_builddir) -name "*.gcno" | xargs --no-run-if-empty rm; \ + else \ + find $(top_builddir) -name "*.gcno" | xargs rm; \ + fi + +clean-local: clean-coverage + +SUBDIRS = src tests utils doc $(LUA_SUBDIR) Copied: vendor/libucl/20160812/Makefile.unix (from r306542, vendor/libucl/dist/Makefile.unix) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20160812/Makefile.unix Sat Oct 1 00:12:03 2016 (r306543, copy of r306542, vendor/libucl/dist/Makefile.unix) @@ -0,0 +1,89 @@ +CC ?= gcc +DESTDIR ?= /usr/local +LD ?= gcc +C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src -I./klib +MAJOR_VERSION = 0 +MINOR_VERSION = 2 +PATCH_VERSION = 9 +VERSION = "$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)" +SONAME = libucl.so +SONAME_FULL = $(SONAME).$(MAJOR_VERSION) +OBJDIR ?= .obj +TESTDIR ?= tests +SRCDIR ?= src +INCLUDEDIR ?= include +MKDIR ?= mkdir +INSTALL ?= install +RM ?= rm +RMDIR ?= rmdir +LN ?= ln +LD_SHARED_FLAGS ?= -Wl,-soname,$(SONAME) -shared -lm +LD_UCL_FLAGS ?= -L$(OBJDIR) -Wl,-rpath,$(OBJDIR) -lucl +LD_ADD ?= -lrt +COPT_FLAGS ?= -O2 +HDEPS = $(SRCDIR)/ucl_hash.h \ + $(SRCDIR)/ucl_chartable.h \ + $(SRCDIR)/ucl_internal.h \ + $(INCLUDEDIR)/ucl.h \ + $(SRCDIR)/mum.h +OBJECTS = $(OBJDIR)/ucl_hash.o \ + $(OBJDIR)/ucl_util.o \ + $(OBJDIR)/ucl_parser.o \ + $(OBJDIR)/ucl_emitter.o \ + $(OBJDIR)/ucl_schema.o + +all: $(OBJDIR) $(OBJDIR)/$(SONAME) + +$(OBJDIR)/$(SONAME): $(OBJDIR)/$(SONAME_FULL) + $(LN) -sf $(SONAME_FULL) $(OBJDIR)/$(SONAME) + +$(OBJDIR)/$(SONAME_FULL): $(OBJECTS) + $(CC) -o $(OBJDIR)/$(SONAME_FULL) $(OBJECTS) $(LD_SHARED_FLAGS) $(LDFLAGS) $(SSL_LIBS) $(FETCH_LIBS) + +$(OBJDIR): + @$(MKDIR) -p $(OBJDIR) + +# Compile rules +$(OBJDIR)/ucl_util.o: $(SRCDIR)/ucl_util.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_util.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_util.c +$(OBJDIR)/ucl_parser.o: $(SRCDIR)/ucl_parser.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_parser.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_parser.c +$(OBJDIR)/ucl_emitter.o: $(SRCDIR)/ucl_emitter.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_emitter.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_emitter.c +$(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c +$(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c + +clean: + $(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME_FULL) $(OBJDIR)/$(SONAME) $(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump $(OBJDIR)/test_generate $(OBJDIR)/test_schema || true + $(RMDIR) $(OBJDIR) + +# Utils + +chargen: utils/chargen.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/chargen $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) utils/chargen.c +objdump: utils/objdump.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/objdump $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) utils/objdump.c $(LD_UCL_FLAGS) + +# Tests + +test: $(OBJDIR) $(OBJDIR)/$(SONAME) $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/test_generate $(OBJDIR)/test_schema + +run-test: test + TEST_DIR=$(TESTDIR) $(TESTDIR)/run_tests.sh $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/test_generate $(OBJDIR)/test_schema + +$(OBJDIR)/test_basic: $(TESTDIR)/test_basic.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_basic $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_basic.c $(LD_UCL_FLAGS) +$(OBJDIR)/test_schema: $(TESTDIR)/test_schema.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_schema $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_schema.c $(LD_UCL_FLAGS) +$(OBJDIR)/test_speed: $(TESTDIR)/test_speed.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_speed $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_speed.c $(LD_UCL_FLAGS) $(LD_ADD) +$(OBJDIR)/test_generate: $(TESTDIR)/test_generate.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_generate $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_generate.c $(LD_UCL_FLAGS) $(LD_ADD) + +install: $(OBJDIR)/$(SONAME) + $(INSTALL) -m0755 $(SONAME) $(DESTDIR)/lib/$(SONAME) + $(INSTALL) -m0644 include/ucl.h $(DESTDIR)/include/ucl.h + +.PHONY: clean $(OBJDIR) Copied: vendor/libucl/20160812/Makefile.w32 (from r306542, vendor/libucl/dist/Makefile.w32) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20160812/Makefile.w32 Sat Oct 1 00:12:03 2016 (r306543, copy of r306542, vendor/libucl/dist/Makefile.w32) @@ -0,0 +1,92 @@ +CC ?= gcc +DESTDIR ?= /usr/local +LD ?= gcc +C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src +MAJOR_VERSION = 0 +MINOR_VERSION = 2 +PATCH_VERSION = 9 +VERSION = "$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)" +SONAME = libucl.dll +OBJDIR ?= .obj +TESTDIR ?= tests +SRCDIR ?= src +INCLUDEDIR ?= include +MKDIR ?= mkdir +INSTALL ?= install +RM ?= rm +RMDIR ?= rmdir +ifeq (Windows_NT, $(OS)) +LN ?= ln +else +LN ?= rem ln +endif +LD_SHARED_FLAGS ?= -Wl,-soname,$(SONAME) -shared -lm +LD_UCL_FLAGS ?= -L$(OBJDIR) -Wl,-rpath,$(OBJDIR) -lucl +LD_ADD ?= -lrt +COPT_FLAGS ?= -O2 +HDEPS = $(SRCDIR)/ucl_hash.h \ + $(SRCDIR)/ucl_chartable.h \ + $(SRCDIR)/ucl_internal.h \ + $(INCLUDEDIR)/ucl.h \ + $(SRCDIR)/mum.h +OBJECTS = $(OBJDIR)/ucl_hash.o \ + $(OBJDIR)/ucl_util.o \ + $(OBJDIR)/ucl_parser.o \ + $(OBJDIR)/ucl_emitter.o \ + $(OBJDIR)/ucl_emitter_utils.o \ + $(OBJDIR)/ucl_schema.o + +all: $(OBJDIR) $(OBJDIR)/$(SONAME) + +$(OBJDIR)/$(SONAME): $(OBJECTS) + $(CC) -o $(OBJDIR)/$(SONAME) $(OBJECTS) $(LD_SHARED_FLAGS) $(LDFLAGS) $(SSL_LIBS) $(FETCH_LIBS) + +$(OBJDIR): + @$(MKDIR) -p $(OBJDIR) + +# Compile rules +$(OBJDIR)/ucl_util.o: $(SRCDIR)/ucl_util.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_util.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_util.c +$(OBJDIR)/ucl_parser.o: $(SRCDIR)/ucl_parser.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_parser.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_parser.c +$(OBJDIR)/ucl_emitter.o: $(SRCDIR)/ucl_emitter.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_emitter.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_emitter.c +$(OBJDIR)/ucl_emitter_utils.o: $(SRCDIR)/ucl_emitter_utils.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_emitter_utils.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_emitter_utils.c +$(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c +$(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c +$(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $(HDEPS) + $(CC) -o $(OBJDIR)/xxhash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/xxhash.c + +clean: + $(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME) $(OBJDIR)/$(SONAME) $(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump $(OBJDIR)/test_generate + $(RMDIR) $(OBJDIR) + +# Utils + +chargen: utils/chargen.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/chargen $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) utils/chargen.c +objdump: utils/objdump.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/objdump $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) utils/objdump.c $(LD_UCL_FLAGS) + +# Tests + +test: $(OBJDIR) $(OBJDIR)/$(SONAME) $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/test_generate + +run-test: test + TEST_DIR=$(TESTDIR) $(TESTDIR)/run_tests.sh $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/test_generate + +$(OBJDIR)/test_basic: $(TESTDIR)/test_basic.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_basic $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_basic.c $(LD_UCL_FLAGS) +$(OBJDIR)/test_speed: $(TESTDIR)/test_speed.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_speed $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_speed.c $(LD_UCL_FLAGS) $(LD_ADD) +$(OBJDIR)/test_generate: $(TESTDIR)/test_generate.c $(OBJDIR)/$(SONAME) + $(CC) -o $(OBJDIR)/test_generate $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_generate.c $(LD_UCL_FLAGS) $(LD_ADD) + +install: $(OBJDIR)/$(SONAME) + $(INSTALL) -m0755 $(SONAME) $(DESTDIR)/lib/$(SONAME) + $(INSTALL) -m0644 include/ucl.h $(DESTDIR)/include/ucl.h + +.PHONY: clean $(OBJDIR) Copied: vendor/libucl/20160812/README.md (from r306542, vendor/libucl/dist/README.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20160812/README.md Sat Oct 1 00:12:03 2016 (r306543, copy of r306542, vendor/libucl/dist/README.md) @@ -0,0 +1,382 @@ +# LIBUCL + +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138)[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Introduction](#introduction) +- [Basic structure](#basic-structure) +- [Improvements to the json notation](#improvements-to-the-json-notation) + - [General syntax sugar](#general-syntax-sugar) + - [Automatic arrays creation](#automatic-arrays-creation) + - [Named keys hierarchy](#named-keys-hierarchy) + - [Convenient numbers and booleans](#convenient-numbers-and-booleans) +- [General improvements](#general-improvements) + - [Comments](#comments) + - [Macros support](#macros-support) + - [Variables support](#variables-support) + - [Multiline strings](#multiline-strings) +- [Emitter](#emitter) +- [Validation](#validation) +- [Performance](#performance) +- [Conclusion](#conclusion) + +## Introduction + +This document describes the main features and principles of the configuration +language called `UCL` - universal configuration language. + +If you are looking for the libucl API documentation you can find it at [this page](doc/api.md). + +## Basic structure + +UCL is heavily infused by `nginx` configuration as the example of a convenient configuration +system. However, UCL is fully compatible with `JSON` format and is able to parse json files. +For example, you can write the same configuration in the following ways: + +* in nginx like: + +```nginx +param = value; +section { + param = value; + param1 = value1; + flag = true; + number = 10k; + time = 0.2s; + string = "something"; + subsection { + host = { + host = "hostname"; + port = 900; + } + host = { + host = "hostname"; + port = 901; + } + } +} +``` + +* or in JSON: + +```json +{ + "param": "value", + "param1": "value1", + "flag": true, + "subsection": { + "host": [ + { + "host": "hostname", + "port": 900 + }, + { + "host": "hostname", + "port": 901 + } + ] + } +} +``` + +## Improvements to the json notation. + +There are various things that make ucl configuration more convenient for editing than strict json: + +### General syntax sugar + +* Braces are not necessary to enclose a top object: it is automatically treated as an object: + +```json +"key": "value" +``` +is equal to: +```json +{"key": "value"} +``` + +* There is no requirement of quotes for strings and keys, moreover, `:` may be replaced `=` or even be skipped for objects: + +```nginx +key = value; +section { + key = value; +} +``` +is equal to: +```json +{ + "key": "value", + "section": { + "key": "value" + } +} +``` + +* No commas mess: you can safely place a comma or semicolon for the last element in an array or an object: + +```json +{ + "key1": "value", + "key2": "value", +} +``` +### Automatic arrays creation + +* Non-unique keys in an object are allowed and are automatically converted to the arrays internally: + +```json +{ + "key": "value1", + "key": "value2" +} +``` +is converted to: +```json +{ + "key": ["value1", "value2"] +} +``` + +### Named keys hierarchy + +UCL accepts named keys and organize them into objects hierarchy internally. Here is an example of this process: +```nginx +section "blah" { + key = value; +} +section foo { + key = value; +} +``` + +is converted to the following object: + +```nginx +section { + blah { + key = value; + } + foo { + key = value; + } +} +``` + +Plain definitions may be more complex and contain more than a single level of nested objects: + +```nginx +section "blah" "foo" { + key = value; +} +``` + +is presented as: + +```nginx +section { + blah { + foo { + key = value; + } + } +} +``` + +### Convenient numbers and booleans + +* Numbers can have suffixes to specify standard multipliers: + + `[kKmMgG]` - standard 10 base multipliers (so `1k` is translated to 1000) + + `[kKmMgG]b` - 2 power multipliers (so `1kb` is translated to 1024) + + `[s|min|d|w|y]` - time multipliers, all time values are translated to float number of seconds, for example `10min` is translated to 600.0 and `10ms` is translated to 0.01 +* Hexadecimal integers can be used by `0x` prefix, for example `key = 0xff`. However, floating point values can use decimal base only. +* Booleans can be specified as `true` or `yes` or `on` and `false` or `no` or `off`. +* It is still possible to treat numbers and booleans as strings by enclosing them in double quotes. + +## General improvements + +### Comments + +UCL supports different style of comments: + +* single line: `#` +* multiline: `/* ... */` + +Multiline comments may be nested: +```c +# Sample single line comment +/* + some comment + /* nested comment */ + end of comment +*/ +``` + +### Macros support + +UCL supports external macros both multiline and single line ones: +```nginx +.macro "sometext"; +.macro { + Some long text + .... +}; +``` + +Moreover, each macro can accept an optional list of arguments in braces. These +arguments themselves are the UCL object that is parsed and passed to a macro as +options: + +```nginx +.macro(param=value) "something"; +.macro(param={key=value}) "something"; +.macro(.include "params.conf") "something"; +.macro(#this is multiline macro +param = [value1, value2]) "something"; +.macro(key="()") "something"; +``` + +UCL also provide a convenient `include` macro to load content from another files +to the current UCL object. This macro accepts either path to file: + +```nginx +.include "/full/path.conf" +.include "./relative/path.conf" +.include "${CURDIR}/path.conf" +``` + +or URL (if ucl is built with url support provided by either `libcurl` or `libfetch`): + + .include "http://example.com/file.conf" + +`.include` macro supports a set of options: + +* `try` (default: **false**) - if this option is `true` than UCL treats errors on loading of +this file as non-fatal. For example, such a file can be absent but it won't stop the parsing +of the top-level document. +* `sign` (default: **false**) - if this option is `true` UCL loads and checks the signature for +a file from path named `.sig`. Trusted public keys should be provided for UCL API after +parser is created but before any configurations are parsed. +* `glob` (default: **false**) - if this option is `true` UCL treats the filename as GLOB pattern and load +all files that matches the specified pattern (normally the format of patterns is defined in `glob` manual page +for your operating system). This option is meaningless for URL includes. +* `url` (default: **true**) - allow URL includes. +* `path` (default: empty) - A UCL_ARRAY of directories to search for the include file. +Search ends after the first match, unless `glob` is true, then all matches are included. +* `prefix` (default false) - Put included contents inside an object, instead +of loading them into the root. If no `key` is provided, one is automatically generated based on each files basename() +* `key` (default: ) - Key to load contents of include into. If +the key already exists, it must be the correct type +* `target` (default: object) - Specify if the `prefix` `key` should be an +object or an array. +* `priority` (default: 0) - specify priority for the include (see below). +* `duplicate` (default: 'append') - specify policy of duplicates resolving: + - `append` - default strategy, if we have new object of higher priority then it replaces old one, if we have new object with less priority it is ignored completely, and if we have two duplicate objects with the same priority then we have a multi-value key (implicit array) + - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardless of priorities) + - `error` - create error on duplicate keys and stop parsing + - `rewrite` - always rewrite an old value with new one (ignoring priorities) + +Priorities are used by UCL parser to manage the policy of objects rewriting during including other files +as following: + +* If we have two objects with the same priority then we form an implicit array +* If a new object has bigger priority then we overwrite an old one +* If a new object has lower priority then we ignore it + +By default, the priority of top-level object is set to zero (lowest priority). Currently, +you can define up to 16 priorities (from 0 to 15). Includes with bigger priorities will +rewrite keys from the objects with lower priorities as specified by the policy. + +### Variables support + +UCL supports variables in input. Variables are registered by a user of the UCL parser and can be presented in the following forms: + +* `${VARIABLE}` +* `$VARIABLE` + +UCL currently does not support nested variables. To escape variables one could use double dollar signs: + +* `$${VARIABLE}` is converted to `${VARIABLE}` +* `$$VARIABLE` is converted to `$VARIABLE` + +However, if no valid variables are found in a string, no expansion will be performed (and `$$` thus remains unchanged). This may be a subject +to change in future libucl releases. + +### Multiline strings + +UCL can handle multiline strings as well as single line ones. It uses shell/perl like notation for such objects: +``` +key = < 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 BB5B8C04CAC; Sat, 1 Oct 2016 00:14:03 +0000 (UTC) (envelope-from bapt@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 85698E5C; Sat, 1 Oct 2016 00:14:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u910E2RR010581; Sat, 1 Oct 2016 00:14:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u910E1Gu010568; Sat, 1 Oct 2016 00:14:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610010014.u910E1Gu010568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Oct 2016 00:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306544 - in head/contrib/libucl: . haskell include m4 python python/src python/tests src tests/schema 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.23 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: Sat, 01 Oct 2016 00:14:03 -0000 Author: bapt Date: Sat Oct 1 00:14:01 2016 New Revision: 306544 URL: https://svnweb.freebsd.org/changeset/base/306544 Log: Import libucl 20160812 Added: head/contrib/libucl/haskell/ - copied from r306543, vendor/libucl/dist/haskell/ head/contrib/libucl/m4/gcov.m4 - copied unchanged from r306543, vendor/libucl/dist/m4/gcov.m4 head/contrib/libucl/python/tests/ - copied from r306543, vendor/libucl/dist/python/tests/ Deleted: head/contrib/libucl/python/test.sh head/contrib/libucl/python/test_uclmodule.py Modified: head/contrib/libucl/CMakeLists.txt head/contrib/libucl/Makefile.unix head/contrib/libucl/Makefile.w32 head/contrib/libucl/README.md head/contrib/libucl/include/ucl++.h head/contrib/libucl/include/ucl.h head/contrib/libucl/python/setup.py head/contrib/libucl/python/src/uclmodule.c head/contrib/libucl/src/ucl_parser.c head/contrib/libucl/src/ucl_schema.c head/contrib/libucl/src/ucl_util.c head/contrib/libucl/tests/schema/patternProperties.json head/contrib/libucl/tests/schema/refRemote.json Directory Properties: head/contrib/libucl/ (props changed) Modified: head/contrib/libucl/CMakeLists.txt ============================================================================== --- head/contrib/libucl/CMakeLists.txt Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/CMakeLists.txt Sat Oct 1 00:14:01 2016 (r306544) @@ -205,8 +205,7 @@ SET(UCLSRC src/ucl_util.c src/ucl_hash.c src/ucl_schema.c src/ucl_msgpack.c - src/ucl_sexp.c - src/xxhash.c) + src/ucl_sexp.c) SET (LIB_TYPE STATIC) Modified: head/contrib/libucl/Makefile.unix ============================================================================== --- head/contrib/libucl/Makefile.unix Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/Makefile.unix Sat Oct 1 00:14:01 2016 (r306544) @@ -1,7 +1,7 @@ CC ?= gcc DESTDIR ?= /usr/local LD ?= gcc -C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src +C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src -I./klib MAJOR_VERSION = 0 MINOR_VERSION = 2 PATCH_VERSION = 9 @@ -25,13 +25,12 @@ HDEPS = $(SRCDIR)/ucl_hash.h \ $(SRCDIR)/ucl_chartable.h \ $(SRCDIR)/ucl_internal.h \ $(INCLUDEDIR)/ucl.h \ - $(SRCDIR)/xxhash.h + $(SRCDIR)/mum.h OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ - $(OBJDIR)/ucl_schema.o \ - $(OBJDIR)/xxhash.o + $(OBJDIR)/ucl_schema.o all: $(OBJDIR) $(OBJDIR)/$(SONAME) @@ -55,8 +54,6 @@ $(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash $(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c $(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS) $(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c -$(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $(HDEPS) - $(CC) -o $(OBJDIR)/xxhash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/xxhash.c clean: $(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME_FULL) $(OBJDIR)/$(SONAME) $(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump $(OBJDIR)/test_generate $(OBJDIR)/test_schema || true Modified: head/contrib/libucl/Makefile.w32 ============================================================================== --- head/contrib/libucl/Makefile.w32 Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/Makefile.w32 Sat Oct 1 00:14:01 2016 (r306544) @@ -28,14 +28,13 @@ HDEPS = $(SRCDIR)/ucl_hash.h \ $(SRCDIR)/ucl_chartable.h \ $(SRCDIR)/ucl_internal.h \ $(INCLUDEDIR)/ucl.h \ - $(SRCDIR)/xxhash.h + $(SRCDIR)/mum.h OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ $(OBJDIR)/ucl_emitter_utils.o \ - $(OBJDIR)/ucl_schema.o \ - $(OBJDIR)/xxhash.o + $(OBJDIR)/ucl_schema.o all: $(OBJDIR) $(OBJDIR)/$(SONAME) Modified: head/contrib/libucl/README.md ============================================================================== --- head/contrib/libucl/README.md Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/README.md Sat Oct 1 00:14:01 2016 (r306544) @@ -12,7 +12,7 @@ - [Named keys hierarchy](#named-keys-hierarchy) - [Convenient numbers and booleans](#convenient-numbers-and-booleans) - [General improvements](#general-improvements) - - [Commments](#commments) + - [Comments](#comments) - [Macros support](#macros-support) - [Variables support](#variables-support) - [Multiline strings](#multiline-strings) @@ -21,7 +21,7 @@ - [Performance](#performance) - [Conclusion](#conclusion) -## Introduction +## Introduction This document describes the main features and principles of the configuration language called `UCL` - universal configuration language. @@ -47,7 +47,7 @@ section { string = "something"; subsection { host = { - host = "hostname"; + host = "hostname"; port = 900; } host = { @@ -163,9 +163,9 @@ section { } } ``` - + Plain definitions may be more complex and contain more than a single level of nested objects: - + ```nginx section "blah" "foo" { key = value; @@ -174,7 +174,7 @@ section "blah" "foo" { is presented as: -```nginx +```nginx section { blah { foo { @@ -196,17 +196,17 @@ section { ## General improvements -### Commments +### Comments UCL supports different style of comments: -* single line: `#` +* single line: `#` * multiline: `/* ... */` Multiline comments may be nested: ```c # Sample single line comment -/* +/* some comment /* nested comment */ end of comment @@ -263,7 +263,7 @@ all files that matches the specified pat for your operating system). This option is meaningless for URL includes. * `url` (default: **true**) - allow URL includes. * `path` (default: empty) - A UCL_ARRAY of directories to search for the include file. -Search ends after the first patch, unless `glob` is true, then all matches are included. +Search ends after the first match, unless `glob` is true, then all matches are included. * `prefix` (default false) - Put included contents inside an object, instead of loading them into the root. If no `key` is provided, one is automatically generated based on each files basename() * `key` (default: ) - Key to load contents of include into. If @@ -273,7 +273,7 @@ object or an array. * `priority` (default: 0) - specify priority for the include (see below). * `duplicate` (default: 'append') - specify policy of duplicates resolving: - `append` - default strategy, if we have new object of higher priority then it replaces old one, if we have new object with less priority it is ignored completely, and if we have two duplicate objects with the same priority then we have a multi-value key (implicit array) - - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardeless of priorities) + - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardless of priorities) - `error` - create error on duplicate keys and stop parsing - `rewrite` - always rewrite an old value with new one (ignoring priorities) @@ -320,7 +320,7 @@ Here are some rules for this syntax: * Multiline terminator must start just after `<<` symbols and it must consist of capital letters only (e.g. `< +#include +#include +#include #include #include @@ -100,6 +103,68 @@ private: return func; }; + static bool ucl_variable_getter(const unsigned char *data, size_t len, + unsigned char ** /*replace*/, size_t * /*replace_len*/, bool *need_free, void* ud) + { + *need_free = false; + + auto vars = reinterpret_cast *>(ud); + if (vars && data && len != 0) { + vars->emplace (data, data + len); + } + return false; + } + + static bool ucl_variable_replacer (const unsigned char *data, size_t len, + unsigned char **replace, size_t *replace_len, bool *need_free, void* ud) + { + *need_free = false; + + auto replacer = reinterpret_cast(ud); + if (!replacer) { + return false; + } + + std::string var_name (data, data + len); + if (!replacer->is_variable (var_name)) { + return false; + } + + std::string var_value = replacer->replace (var_name); + if (var_value.empty ()) { + return false; + } + + *replace = (unsigned char *)UCL_ALLOC (var_value.size ()); + memcpy (*replace, var_value.data (), var_value.size ()); + + *replace_len = var_value.size (); + *need_free = true; + + return true; + } + + template + static Ucl parse_with_strategy_function (C config_func, P parse_func, std::string &err) + { + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + config_func (parser); + + if (!parse_func (parser)) { + err.assign (ucl_parser_get_error (parser)); + ucl_parser_free (parser); + + return nullptr; + } + + auto obj = ucl_parser_get_object (parser); + ucl_parser_free (parser); + + // Obj will handle ownership + return Ucl (obj); + } + std::unique_ptr obj; public: @@ -117,9 +182,9 @@ public: const_iterator(const Ucl &obj) { it = std::shared_ptr(ucl_object_iterate_new (obj.obj.get()), - ucl_iter_deleter()); + ucl_iter_deleter()); cur.reset (new Ucl(ucl_object_iterate_safe (it.get(), true))); - if (!*cur) { + if (cur->type() == UCL_NULL) { it.reset (); cur.reset (); } @@ -153,7 +218,7 @@ public: cur.reset (new Ucl(ucl_object_iterate_safe (it.get(), true))); } - if (!*cur) { + if (cur && cur->type() == UCL_NULL) { it.reset (); cur.reset (); } @@ -171,6 +236,17 @@ public: } }; + struct variable_replacer { + virtual ~variable_replacer() {} + + virtual bool is_variable (const std::string &str) const + { + return !str.empty (); + } + + virtual std::string replace (const std::string &var) const = 0; + }; + // We grab ownership if get non-const ucl_object_t Ucl(ucl_object_t *other) { obj.reset (other); @@ -211,20 +287,20 @@ public: obj.reset (ucl_object_fromstring_common (value.data (), value.size (), UCL_STRING_RAW)); } - Ucl(const char * value) { + Ucl(const char *value) { obj.reset (ucl_object_fromstring_common (value, 0, UCL_STRING_RAW)); } // Implicit constructor: anything with a to_json() function. template - Ucl(const T & t) : Ucl(t.to_ucl()) {} + Ucl(const T &t) : Ucl(t.to_ucl()) {} // Implicit constructor: map-like objects (std::map, std::unordered_map, etc) template ::value && std::is_constructible::value, int>::type = 0> - Ucl(const M & m) { + Ucl(const M &m) { obj.reset (ucl_object_typed_new (UCL_OBJECT)); auto cobj = obj.get (); @@ -238,7 +314,7 @@ public: template ::value, int>::type = 0> - Ucl(const V & v) { + Ucl(const V &v) { obj.reset (ucl_object_typed_new (UCL_ARRAY)); auto cobj = obj.get (); @@ -356,46 +432,138 @@ public: return out; } - static Ucl parse (const std::string & in, std::string & err) + static Ucl parse (const std::string &in, std::string &err) { - auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + return parse (in, std::map(), err); + } - if (!ucl_parser_add_chunk (parser, (const unsigned char *)in.data (), - in.size ())) { - err.assign (ucl_parser_get_error (parser)); - ucl_parser_free (parser); + static Ucl parse (const std::string &in, const std::map &vars, std::string &err) + { + auto config_func = [&vars] (ucl_parser *parser) { + for (const auto & item : vars) { + ucl_parser_register_variable (parser, item.first.c_str (), item.second.c_str ()); + } + }; + + auto parse_func = [&in] (ucl_parser *parser) { + return ucl_parser_add_chunk (parser, (unsigned char *)in.data (), in.size ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + static Ucl parse (const std::string &in, const variable_replacer &replacer, std::string &err) + { + auto config_func = [&replacer] (ucl_parser *parser) { + ucl_parser_set_variables_handler (parser, ucl_variable_replacer, + &const_cast(replacer)); + }; + + auto parse_func = [&in] (ucl_parser *parser) { + return ucl_parser_add_chunk (parser, (unsigned char *) in.data (), in.size ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static Ucl parse (const char *in, std::string &err) + { + return parse (in, std::map(), err); + } + + static Ucl parse (const char *in, const std::map &vars, std::string &err) + { + if (!in) { + err = "null input"; return nullptr; } + return parse (std::string (in), vars, err); + } - auto obj = ucl_parser_get_object (parser); + static Ucl parse (const char *in, const variable_replacer &replacer, std::string &err) + { + if (!in) { + err = "null input"; + return nullptr; + } + return parse (std::string(in), replacer, err); + } + + static Ucl parse_from_file (const std::string &filename, std::string &err) + { + return parse_from_file (filename, std::map(), err); + } + + static Ucl parse_from_file (const std::string &filename, const std::map &vars, std::string &err) + { + auto config_func = [&vars] (ucl_parser *parser) { + for (const auto & item : vars) { + ucl_parser_register_variable (parser, item.first.c_str (), item.second.c_str ()); + } + }; + + auto parse_func = [&filename] (ucl_parser *parser) { + return ucl_parser_add_file (parser, filename.c_str ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static Ucl parse_from_file (const std::string &filename, const variable_replacer &replacer, std::string &err) + { + auto config_func = [&replacer] (ucl_parser *parser) { + ucl_parser_set_variables_handler (parser, ucl_variable_replacer, + &const_cast(replacer)); + }; + + auto parse_func = [&filename] (ucl_parser *parser) { + return ucl_parser_add_file (parser, filename.c_str ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static std::vector find_variable (const std::string &in) + { + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + std::set vars; + ucl_parser_set_variables_handler (parser, ucl_variable_getter, &vars); + ucl_parser_add_chunk (parser, (const unsigned char *)in.data (), in.size ()); ucl_parser_free (parser); - // Obj will handle ownership - return Ucl (obj); + std::vector result; + std::move (vars.begin (), vars.end (), std::back_inserter (result)); + return result; } - static Ucl parse (const char * in, std::string & err) + static std::vector find_variable (const char *in) { - if (in) { - return parse (std::string(in), err); - } else { - err = "null input"; - return nullptr; + if (!in) { + return std::vector(); } + return find_variable (std::string (in)); } - static Ucl parse (std::istream &ifs, std::string &err) + static std::vector find_variable_from_file (const std::string &filename) { - return Ucl::parse (std::string(std::istreambuf_iterator(ifs), - std::istreambuf_iterator()), err); + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + std::set vars; + ucl_parser_set_variables_handler (parser, ucl_variable_getter, &vars); + ucl_parser_add_file (parser, filename.c_str ()); + ucl_parser_free (parser); + + std::vector result; + std::move (vars.begin (), vars.end (), std::back_inserter (result)); + return std::move (result); } - Ucl& operator= (Ucl rhs) - { - obj.swap (rhs.obj); - return *this; - } + Ucl& operator= (Ucl rhs) + { + obj.swap (rhs.obj); + return *this; + } bool operator== (const Ucl &rhs) const { Modified: head/contrib/libucl/include/ucl.h ============================================================================== --- head/contrib/libucl/include/ucl.h Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/include/ucl.h Sat Oct 1 00:14:01 2016 (r306544) @@ -1016,7 +1016,6 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file - * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1026,7 +1025,6 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file - * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1035,6 +1033,20 @@ UCL_EXTERN bool ucl_parser_add_file_prio const char *filename, unsigned priority); /** + * Load and add data from a file + * @param parser parser structure + * @param filename the name of file + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_file_full (struct ucl_parser *parser, const char *filename, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Load and add data from a file descriptor * @param parser parser structure * @param filename the name of file Copied: head/contrib/libucl/m4/gcov.m4 (from r306543, vendor/libucl/dist/m4/gcov.m4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libucl/m4/gcov.m4 Sat Oct 1 00:14:01 2016 (r306544, copy of r306543, vendor/libucl/dist/m4/gcov.m4) @@ -0,0 +1,89 @@ +# SYNOPSIS +# +# Add code coverage support with gcov/lcov. +# +# AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Provides a --enable-coverage option which checks for available +# gcov/lcov binaries and provides ENABLE_CODE_COVERAGE conditional. +# +# LAST MODIFICATION +# +# $Id: coverage.m4 40881 2013-08-20 17:54:39Z damon $ +# +# COPYLEFT +# +# Copyright (c) 2012 Roy H. Stogner +# Copyright (c) 2010 Karl W. Schulz +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_CODE_COVERAGE], +[ + +AC_ARG_ENABLE(coverage, AC_HELP_STRING([--enable-coverage],[configure code coverage analysis tools])) + +HAVE_GCOV_TOOLS=0 + +GCOV_FLAGS="" + +if test "x$enable_coverage" = "xyes"; then + + # ---------------------------- + # Check for gcov/lcov binaries + # ---------------------------- + + AC_ARG_VAR([GCOV], [Coverage testing command]) + if test "x$GCOV" = "x"; then + AC_PATH_PROG(GCOV, gcov, no) + else + AC_PATH_PROG(GCOV, $GCOV, no) + fi + + AC_PATH_PROG(LCOV, lcov, no) + AC_PATH_PROG(GENHTML, genhtml) + + # ---------------------------------- + # include coverage compiler options + # ---------------------------------- + AC_MSG_CHECKING([for clang]) + + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], [[ + #ifndef __clang__ + not clang + #endif + ]])], + [CLANG=yes], [CLANG=no]) + + AC_MSG_RESULT([$CLANG]) + HAVE_GCOV_TOOLS=1 + COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage" + COVERAGE_LDFLAGS="--coverage -fprofile-arcs -ftest-coverage" + COVERAGE_OPTFLAGS="-O0" + + # Test for C... + CFLAGS="${GCOV_FLAGS} ${CFLAGS}" + CXXFLAGS="${GCOV_FLAGS} ${CXXFLAGS}" + if test "x$GCC" = "xyes" -a "x$CLANG" = "xno"; then + COVERAGE_LIBS="-lgcov" + else + COVERAGE_LIBS="" + fi +fi + +AC_SUBST([GCOV]) +AC_SUBST([LCOV]) +AC_SUBST([GENHTML]) +AC_SUBST([GENHTML_OPTIONS]) +AC_SUBST([COVERAGE_CFLAGS]) +AC_SUBST([COVERAGE_OPTFLAGS]) +AC_SUBST([COVERAGE_LDFLAGS]) +AC_SUBST([COVERAGE_LIBS]) +AM_CONDITIONAL(CODE_COVERAGE_ENABLED,test x$HAVE_GCOV_TOOLS = x1) + +]) Modified: head/contrib/libucl/python/setup.py ============================================================================== --- head/contrib/libucl/python/setup.py Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/python/setup.py Sat Oct 1 00:14:01 2016 (r306544) @@ -1,37 +1,43 @@ -import distutils.ccompiler -import distutils.sysconfig -from distutils.core import setup, Extension +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup, Extension + import os +import sys +tests_require = [] -compiler = distutils.ccompiler.new_compiler() -search_paths=[os.path.expanduser('~/{}'), '/opt/local/{}', '/usr/local/{}', '/usr/{}'] -lib_paths = [ a.format("lib") for a in search_paths] -inc_paths = [ a.format("include") for a in search_paths] +if sys.version < '2.7': + tests_require.append('unittest2') -uclmodule = Extension('ucl', - include_dirs = inc_paths, - library_dirs = lib_paths, - libraries = ['ucl'], - sources = ['src/uclmodule.c'], - runtime_library_dirs = lib_paths, - language='c') +uclmodule = Extension( + 'ucl', + libraries = ['ucl'], + sources = ['src/uclmodule.c'], + language = 'c' +) -setup(name='ucl', - version='1.0', - description='ucl parser and emmitter', +setup( + name = 'ucl', + version = '0.8', + description = 'ucl parser and emmitter', ext_modules = [uclmodule], - author="Eitan Adler", - author_email="lists@eitanadler.com", - url="https://github.com/vstakhov/libucl/", - license="MIT", - classifiers=["Development Status :: 3 - Alpha", + test_suite = 'tests', + tests_require = tests_require, + author = "Eitan Adler, Denis Volpato Martins", + author_email = "lists@eitanadler.com", + url = "https://github.com/vstakhov/libucl/", + license = "MIT", + classifiers = [ + "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: DFSG approved", "License :: OSI Approved :: MIT License", "Programming Language :: C", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries", - ] - ) + ] +) Modified: head/contrib/libucl/python/src/uclmodule.c ============================================================================== --- head/contrib/libucl/python/src/uclmodule.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/python/src/uclmodule.c Sat Oct 1 00:14:01 2016 (r306544) @@ -2,6 +2,8 @@ #include #include +static PyObject *SchemaError; + static PyObject * _basic_ucl_type (ucl_object_t const *obj) { @@ -13,9 +15,11 @@ _basic_ucl_type (ucl_object_t const *obj case UCL_STRING: return Py_BuildValue ("s", ucl_object_tostring (obj)); case UCL_BOOLEAN: - return ucl_object_toboolean (obj) ? Py_True : Py_False; + return PyBool_FromLong (ucl_object_toboolean (obj)); case UCL_TIME: return Py_BuildValue ("d", ucl_object_todouble (obj)); + case UCL_NULL: + Py_RETURN_NONE; } return NULL; } @@ -124,26 +128,60 @@ _iterate_python (PyObject *obj) { if (obj == Py_None) { return ucl_object_new(); - } else if (PyBool_Check (obj)) { + } + else if (PyBool_Check (obj)) { return ucl_object_frombool (obj == Py_True); - } else if (PyInt_Check (obj)) { + } +#if PY_MAJOR_VERSION < 3 + else if (PyInt_Check (obj)) { return ucl_object_fromint (PyInt_AsLong (obj)); - } else if (PyFloat_Check (obj)) { + } +#endif + else if (PyLong_Check (obj)) { + return ucl_object_fromint (PyLong_AsLong (obj)); + } + else if (PyFloat_Check (obj)) { return ucl_object_fromdouble (PyFloat_AsDouble (obj)); - } else if (PyString_Check (obj)) { + } + else if (PyUnicode_Check (obj)) { + ucl_object_t *ucl_str; + PyObject *str = PyUnicode_AsASCIIString(obj); + ucl_str = ucl_object_fromstring (PyBytes_AsString (str)); + Py_DECREF(str); + return ucl_str; + } +#if PY_MAJOR_VERSION < 3 + else if (PyString_Check (obj)) { return ucl_object_fromstring (PyString_AsString (obj)); - // } else if (PyDateTime_Check (obj)) { } +#endif else if (PyDict_Check(obj)) { PyObject *key, *value; Py_ssize_t pos = 0; ucl_object_t *top, *elm; + char *keystr = NULL; top = ucl_object_typed_new (UCL_OBJECT); while (PyDict_Next(obj, &pos, &key, &value)) { elm = _iterate_python(value); - ucl_object_insert_key (top, elm, PyString_AsString(key), 0, true); + + if (PyUnicode_Check(key)) { + PyObject *keyascii = PyUnicode_AsASCIIString(key); + keystr = PyBytes_AsString(keyascii); + Py_DECREF(keyascii); + } +#if PY_MAJOR_VERSION < 3 + else if (PyString_Check(key)) { + keystr = PyString_AsString(key); + } +#endif + else { + PyErr_SetString(PyExc_TypeError, "Unknown key type"); + return NULL; + } + + ucl_object_insert_key (top, elm, keystr, 0, true); } return top; @@ -195,11 +233,6 @@ ucl_dump (PyObject *self, PyObject *args Py_RETURN_NONE; } - if (!PyDict_Check(obj)) { - PyErr_SetString(PyExc_TypeError, "Argument must be dict"); - return NULL; - } - root = _iterate_python(obj); if (root) { PyObject *ret; @@ -207,7 +240,11 @@ ucl_dump (PyObject *self, PyObject *args buf = (char *) ucl_object_emit (root, emitter); ucl_object_unref (root); +#if PY_MAJOR_VERSION < 3 ret = PyString_FromString (buf); +#else + ret = PyUnicode_FromString (buf); +#endif free(buf); return ret; @@ -219,17 +256,35 @@ ucl_dump (PyObject *self, PyObject *args static PyObject * ucl_validate (PyObject *self, PyObject *args) { - char *uclstr, *schema; + PyObject *dataobj, *schemaobj; + ucl_object_t *data, *schema; + bool r; + struct ucl_schema_error err; - if (PyArg_ParseTuple(args, "zz", &uclstr, &schema)) { - if (!uclstr || !schema) { - Py_RETURN_NONE; - } + if (!PyArg_ParseTuple (args, "OO", &schemaobj, &dataobj)) { + PyErr_SetString (PyExc_TypeError, "Unhandled object type"); + return NULL; + } - PyErr_SetString(PyExc_NotImplementedError, "schema validation is not yet supported"); + schema = _iterate_python(schemaobj); + if (!schema) + return NULL; + + data = _iterate_python(dataobj); + if (!data) + return NULL; + + // validation + r = ucl_object_validate (schema, data, &err); + ucl_object_unref (schema); + ucl_object_unref (data); + + if (!r) { + PyErr_SetString (SchemaError, err.msg); + return NULL; } - return NULL; + Py_RETURN_TRUE; } static PyMethodDef uclMethods[] = { @@ -247,6 +302,10 @@ init_macros(PyObject *mod) PyModule_AddIntMacro(mod, UCL_EMIT_CONFIG); PyModule_AddIntMacro(mod, UCL_EMIT_YAML); PyModule_AddIntMacro(mod, UCL_EMIT_MSGPACK); + + SchemaError = PyErr_NewException("ucl.SchemaError", NULL, NULL); + Py_INCREF(SchemaError); + PyModule_AddObject(mod, "SchemaError", SchemaError); } #if PY_MAJOR_VERSION >= 3 Modified: head/contrib/libucl/src/ucl_parser.c ============================================================================== --- head/contrib/libucl/src/ucl_parser.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/src/ucl_parser.c Sat Oct 1 00:14:01 2016 (r306544) @@ -342,6 +342,7 @@ ucl_check_variable_safe (struct ucl_pars /* Call generic handler */ if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free, parser->var_data)) { + *out_len += dstlen; *found = true; if (need_free) { free (dst); @@ -458,11 +459,18 @@ ucl_expand_single_variable (struct ucl_p } if (!found) { if (strict && parser->var_handler != NULL) { - if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free, + size_t var_len = 0; + while (var_len < remain && p[var_len] != '}') + var_len ++; + + if (parser->var_handler (p, var_len, &dst, &dstlen, &need_free, parser->var_data)) { memcpy (d, dst, dstlen); - ret += dstlen; - d += remain; + ret += var_len; + d += dstlen; + if (need_free) { + free (dst); + } found = true; } } Modified: head/contrib/libucl/src/ucl_schema.c ============================================================================== --- head/contrib/libucl/src/ucl_schema.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/src/ucl_schema.c Sat Oct 1 00:14:01 2016 (r306544) @@ -69,7 +69,7 @@ ucl_schema_create_error (struct ucl_sche * Check whether we have a pattern specified */ static const ucl_object_t * -ucl_schema_test_pattern (const ucl_object_t *obj, const char *pattern) +ucl_schema_test_pattern (const ucl_object_t *obj, const char *pattern, bool recursive) { const ucl_object_t *res = NULL; #ifdef HAVE_REGEX_H @@ -78,11 +78,16 @@ ucl_schema_test_pattern (const ucl_objec ucl_object_iter_t iter = NULL; if (regcomp (®, pattern, REG_EXTENDED | REG_NOSUB) == 0) { - while ((elt = ucl_object_iterate (obj, &iter, true)) != NULL) { - if (regexec (®, ucl_object_key (elt), 0, NULL, 0) == 0) { - res = elt; - break; + if (recursive) { + while ((elt = ucl_object_iterate (obj, &iter, true)) != NULL) { + if (regexec (®, ucl_object_key (elt), 0, NULL, 0) == 0) { + res = elt; + break; + } } + } else { + if (regexec (®, ucl_object_key (obj), 0, NULL, 0) == 0) + res = obj; } regfree (®); } @@ -205,12 +210,17 @@ ucl_schema_validate_object (const ucl_ob } } else if (strcmp (ucl_object_key (elt), "patternProperties") == 0) { + const ucl_object_t *vobj; + ucl_object_iter_t viter; piter = NULL; while (ret && (prop = ucl_object_iterate (elt, &piter, true)) != NULL) { - found = ucl_schema_test_pattern (obj, ucl_object_key (prop)); - if (found) { - ret = ucl_schema_validate (prop, found, true, err, root, - ext_ref); + viter = NULL; + while (ret && (vobj = ucl_object_iterate (obj, &viter, true)) != NULL) { + found = ucl_schema_test_pattern (vobj, ucl_object_key (prop), false); + if (found) { + ret = ucl_schema_validate (prop, found, true, err, root, + ext_ref); + } } } } @@ -234,7 +244,7 @@ ucl_schema_validate_object (const ucl_ob piter = NULL; pat = ucl_object_lookup (schema, "patternProperties"); while ((pelt = ucl_object_iterate (pat, &piter, true)) != NULL) { - found = ucl_schema_test_pattern (obj, ucl_object_key (pelt)); + found = ucl_schema_test_pattern (obj, ucl_object_key (pelt), true); if (found != NULL) { break; } Modified: head/contrib/libucl/src/ucl_util.c ============================================================================== --- head/contrib/libucl/src/ucl_util.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/src/ucl_util.c Sat Oct 1 00:14:01 2016 (r306544) @@ -1795,8 +1795,9 @@ ucl_parser_set_filevars (struct ucl_pars } bool -ucl_parser_add_file_priority (struct ucl_parser *parser, const char *filename, - unsigned priority) +ucl_parser_add_file_full (struct ucl_parser *parser, const char *filename, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type) { unsigned char *buf; size_t len; @@ -1819,7 +1820,8 @@ ucl_parser_add_file_priority (struct ucl } parser->cur_file = strdup (realbuf); ucl_parser_set_filevars (parser, realbuf, false); - ret = ucl_parser_add_chunk_priority (parser, buf, len, priority); + ret = ucl_parser_add_chunk_full (parser, buf, len, priority, strat, + parse_type); if (len > 0) { ucl_munmap (buf, len); @@ -1829,14 +1831,27 @@ ucl_parser_add_file_priority (struct ucl } bool +ucl_parser_add_file_priority (struct ucl_parser *parser, const char *filename, + unsigned priority) +{ + if (parser == NULL) { + return false; + } + + return ucl_parser_add_file_full(parser, filename, priority, + UCL_DUPLICATE_APPEND, UCL_PARSE_UCL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 1 00:18:59 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 69431C04D9D; Sat, 1 Oct 2016 00:18:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 30F1D1020; Sat, 1 Oct 2016 00:18:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c110-21-100-78.carlnfd1.nsw.optusnet.com.au [110.21.100.78]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 525D7D619A3; Sat, 1 Oct 2016 10:18:50 +1000 (AEST) Date: Sat, 1 Oct 2016 10:18:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Toomas Soome cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306538 - head/lib/libstand In-Reply-To: <201609302319.u8UNJ8oh087617@repo.freebsd.org> Message-ID: <20161001101040.Y3821@besplex.bde.org> References: <201609302319.u8UNJ8oh087617@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=uGjuzT6u7JdBDS7kH8taPg==:117 a=uGjuzT6u7JdBDS7kH8taPg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=nXofmzNChi7GuVKgM7EA:9 a=BSl6DtumEp4S0mM4:21 a=CWG8BAMRxDi_WXHg:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 01 Oct 2016 00:18:59 -0000 On Fri, 30 Sep 2016, Toomas Soome wrote: > Author: tsoome > Date: Fri Sep 30 23:19:08 2016 > New Revision: 306538 > URL: https://svnweb.freebsd.org/changeset/base/306538 > > Log: > cstyle fix of cd9660_open in libstand > > rS306534 did create bad cstyle by my mistake, correcting it. > > Modified: head/lib/libstand/cd9660.c > ============================================================================== > --- head/lib/libstand/cd9660.c Fri Sep 30 23:01:37 2016 (r306537) > +++ head/lib/libstand/cd9660.c Fri Sep 30 23:19:08 2016 (r306538) > @@ -356,11 +356,11 @@ cd9660_open(const char *path, struct ope > > /* if the new block is zero length, its padding */ > if (isonum_711(dp->length) == 0) { > - /* skip to next block, if any */ > - off = boff * ISO_DEFAULT_BLOCK_SIZE; > - continue; > + /* skip to next block, if any */ > + off = boff * ISO_DEFAULT_BLOCK_SIZE; > + continue; > } else { > - off += isonum_711(dp->length); > + off += isonum_711(dp->length); > } > } > if (off >= dsize) { Fixing the remaining style bugs gives: [Delete blank line here.] /* If the new block has zero length, it is padding. */ if (isonum_711(dp->length) == 0) { /* Skip to next block, if any. */ off = boff * ISO_DEFAULT_BLOCK_SIZE; continue; } off += isonum_711(dp->length); Bruce From owner-svn-src-all@freebsd.org Sat Oct 1 01:10: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 79C1CC0269A; Sat, 1 Oct 2016 01:10:52 +0000 (UTC) (envelope-from jhibbits@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 3AF3829F; Sat, 1 Oct 2016 01:10:52 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u911ApMh028065; Sat, 1 Oct 2016 01:10:51 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u911ApTJ028064; Sat, 1 Oct 2016 01:10:51 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201610010110.u911ApTJ028064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 1 Oct 2016 01:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306545 - head/sys/dev/fdt 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.23 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: Sat, 01 Oct 2016 01:10:52 -0000 Author: jhibbits Date: Sat Oct 1 01:10:51 2016 New Revision: 306545 URL: https://svnweb.freebsd.org/changeset/base/306545 Log: Revert r306473. Some objections were noted, and it was purely a cosmetic change anyway. Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Sat Oct 1 00:14:01 2016 (r306544) +++ head/sys/dev/fdt/simplebus.c Sat Oct 1 01:10:51 2016 (r306545) @@ -265,15 +265,6 @@ simplebus_add_device(device_t dev, phand if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) return (NULL); - - /* - * If the order is unspecified, use the cell-index field, if available. - * The cell-index property is not part of any standard, but is widely - * used in NXP/Freescale and Marvell device trees. - */ - if (order == -1) - OF_getencprop(node, "cell-index", &order, sizeof(order)); - cdev = device_add_child_ordered(dev, order, name, unit); if (cdev == NULL) { device_printf(dev, "<%s>: device_add_child failed\n", From owner-svn-src-all@freebsd.org Sat Oct 1 01:30: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 0AABBC02CE9; Sat, 1 Oct 2016 01:30:36 +0000 (UTC) (envelope-from markj@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 D14971052; Sat, 1 Oct 2016 01:30:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u911UZnr035643; Sat, 1 Oct 2016 01:30:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u911UZbn035642; Sat, 1 Oct 2016 01:30:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610010130.u911UZbn035642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 1 Oct 2016 01:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306548 - head/sys/netinet6 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.23 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: Sat, 01 Oct 2016 01:30:36 -0000 Author: markj Date: Sat Oct 1 01:30:34 2016 New Revision: 306548 URL: https://svnweb.freebsd.org/changeset/base/306548 Log: nd6_dad_timer(): don't assert that the address is tentative. It appears that this assertion can be tripped in some cases when multiple interfaces are on the same link. Until this is resolved, revert a part of r306305 and simply log a message if the DAD timer fires on a non-tentative address. Reported by: jhb X-MFC With: r306305 Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat Oct 1 01:24:24 2016 (r306547) +++ head/sys/netinet6/nd6_nbr.c Sat Oct 1 01:30:34 2016 (r306548) @@ -1316,8 +1316,6 @@ nd6_dad_timer(struct dadq *dp) char ip6buf[INET6_ADDRSTRLEN]; KASSERT(ia != NULL, ("DAD entry %p with no address", dp)); - KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0, - ("DAD entry %p for non-tentative address", dp)); if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) { /* Do not need DAD for ifdisabled interface. */ @@ -1332,6 +1330,13 @@ nd6_dad_timer(struct dadq *dp) ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); goto err; } + if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) { + log(LOG_ERR, "nd6_dad_timer: called with non-tentative address " + "%s(%s)\n", + ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr), + ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); + goto err; + } /* Stop DAD if the interface is down even after dad_maxtry attempts. */ if ((dp->dad_ns_tcount > V_dad_maxtry) && From owner-svn-src-all@freebsd.org Sat Oct 1 03:24: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 C6733C03DB8; Sat, 1 Oct 2016 03:24:54 +0000 (UTC) (envelope-from avos@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 971392F0; Sat, 1 Oct 2016 03:24:54 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u913OrPc081224; Sat, 1 Oct 2016 03:24:53 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u913OrbQ081223; Sat, 1 Oct 2016 03:24:53 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201610010324.u913OrbQ081223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 1 Oct 2016 03:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306549 - stable/11/sys/dev/usb/wlan X-SVN-Group: stable-11 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.23 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: Sat, 01 Oct 2016 03:24:54 -0000 Author: avos Date: Sat Oct 1 03:24:53 2016 New Revision: 306549 URL: https://svnweb.freebsd.org/changeset/base/306549 Log: MFC r306320: rsu: do not restart calibration task when going out of RUN state. Clear 'sc_calibrating' flag and stop calibration task when interface is not associated; this fixes possible panic after detach. Reported and tested by: hselasky Reviewed by: adrian Modified: stable/11/sys/dev/usb/wlan/if_rsu.c Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Sat Oct 1 01:30:34 2016 (r306548) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Sat Oct 1 03:24:53 2016 (r306549) @@ -1270,9 +1270,12 @@ rsu_newstate(struct ieee80211vap *vap, e default: break; } - sc->sc_calibrating = 1; - /* Start periodic calibration. */ - taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz); + if (startcal != 0) { + sc->sc_calibrating = 1; + /* Start periodic calibration. */ + taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, + hz); + } RSU_UNLOCK(sc); IEEE80211_LOCK(ic); return (uvp->newstate(vap, nstate, arg)); From owner-svn-src-all@freebsd.org Sat Oct 1 03:35: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 61E5FC03F88; Sat, 1 Oct 2016 03:35:04 +0000 (UTC) (envelope-from mmel@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 2EB76969; Sat, 1 Oct 2016 03:35:04 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u913Z3l6085019; Sat, 1 Oct 2016 03:35:03 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u913Z3iK085018; Sat, 1 Oct 2016 03:35:03 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610010335.u913Z3iK085018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 1 Oct 2016 03:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306550 - head/sys/arm/nvidia/tegra124 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.23 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: Sat, 01 Oct 2016 03:35:04 -0000 Author: mmel Date: Sat Oct 1 03:35:03 2016 New Revision: 306550 URL: https://svnweb.freebsd.org/changeset/base/306550 Log: TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA has been very near to old limit. Modified: head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Modified: head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Sat Oct 1 03:24:53 2016 (r306549) +++ head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Sat Oct 1 03:35:03 2016 (r306550) @@ -86,7 +86,7 @@ enum pll_type { #define PLLRE_IDDQ_BIT 16 #define PLLSS_IDDQ_BIT 19 -#define PLL_LOCK_TIMEOUT 1000 +#define PLL_LOCK_TIMEOUT 5000 /* Post divider <-> register value mapping. */ struct pdiv_table { From owner-svn-src-all@freebsd.org Sat Oct 1 07:46: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 A672DC05064; Sat, 1 Oct 2016 07:46:29 +0000 (UTC) (envelope-from tsoome@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 794CF1D94; Sat, 1 Oct 2016 07:46:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u917kSYF079759; Sat, 1 Oct 2016 07:46:28 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u917kSbB079758; Sat, 1 Oct 2016 07:46:28 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201610010746.u917kSbB079758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 1 Oct 2016 07:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306552 - head/lib/libstand 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.23 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: Sat, 01 Oct 2016 07:46:29 -0000 Author: tsoome Date: Sat Oct 1 07:46:28 2016 New Revision: 306552 URL: https://svnweb.freebsd.org/changeset/base/306552 Log: Fix remaining cstyle issues in libstand/cd9660.c Reported by: Bruce Evans Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8107 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Sat Oct 1 06:50:16 2016 (r306551) +++ head/lib/libstand/cd9660.c Sat Oct 1 07:46:28 2016 (r306552) @@ -353,15 +353,13 @@ cd9660_open(const char *path, struct ope dp = (struct iso_directory_record *) ((char *) dp + isonum_711(dp->length)); - /* if the new block is zero length, its padding */ if (isonum_711(dp->length) == 0) { /* skip to next block, if any */ off = boff * ISO_DEFAULT_BLOCK_SIZE; continue; - } else { - off += isonum_711(dp->length); } + off += isonum_711(dp->length); } if (off >= dsize) { rc = ENOENT; From owner-svn-src-all@freebsd.org Sat Oct 1 06:50: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 466D0C05ACC; Sat, 1 Oct 2016 06:50:18 +0000 (UTC) (envelope-from mmel@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 EE920616; Sat, 1 Oct 2016 06:50:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u916oHxe057553; Sat, 1 Oct 2016 06:50:17 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u916oHb9057551; Sat, 1 Oct 2016 06:50:17 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610010650.u916oHb9057551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 1 Oct 2016 06:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306551 - head/sys/arm/nvidia/tegra124 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.23 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: Sat, 01 Oct 2016 06:50:18 -0000 Author: mmel Date: Sat Oct 1 06:50:16 2016 New Revision: 306551 URL: https://svnweb.freebsd.org/changeset/base/306551 Log: TEGRA: Fix bindings for cpufreq and coretemp drivers, it was broken in r306477. Correct a description for coretemp driver. Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sat Oct 1 03:35:03 2016 (r306550) +++ head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sat Oct 1 06:50:16 2016 (r306551) @@ -179,9 +179,9 @@ static void tegra124_coretemp_identify(driver_t *driver, device_t parent) { - if (device_find_child(parent, "tegra124_coretemp", -1) != NULL) + if (device_find_child(parent, "coretemp", -1) != NULL) return; - if (BUS_ADD_CHILD(parent, 0, "tegra124_coretemp", -1) == NULL) + if (BUS_ADD_CHILD(parent, 0, "coretemp", -1) == NULL) device_printf(parent, "add child failed\n"); } @@ -189,7 +189,7 @@ static int tegra124_coretemp_probe(device_t dev) { - device_set_desc(dev, "CPU Frequency Control"); + device_set_desc(dev, "CPU Thermal Sensor"); return (0); } Modified: head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Sat Oct 1 03:35:03 2016 (r306550) +++ head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Sat Oct 1 06:50:16 2016 (r306551) @@ -476,6 +476,8 @@ static void tegra124_cpufreq_identify(driver_t *driver, device_t parent) { + if (device_get_unit(parent) != 0) + return; if (device_find_child(parent, "tegra124_cpufreq", -1) != NULL) return; if (BUS_ADD_CHILD(parent, 0, "tegra124_cpufreq", -1) == NULL) @@ -486,8 +488,6 @@ static int tegra124_cpufreq_probe(device_t dev) { - if (device_get_unit(dev) != 0) - return (ENXIO); device_set_desc(dev, "CPU Frequency Control"); return (0); @@ -588,7 +588,7 @@ static device_method_t tegra124_cpufreq_ }; static devclass_t tegra124_cpufreq_devclass; -static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, +static DEFINE_CLASS_0(tegra124_cpufreq, tegra124_cpufreq_driver, tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, tegra124_cpufreq_devclass, NULL, NULL); From owner-svn-src-all@freebsd.org Sat Oct 1 09:19:45 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 6DE3BC0461A; Sat, 1 Oct 2016 09:19:45 +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 0BD451013; Sat, 1 Oct 2016 09:19:44 +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 u919JiHF015047; Sat, 1 Oct 2016 09:19:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u919JhPA015039; Sat, 1 Oct 2016 09:19:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610010919.u919JhPA015039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Oct 2016 09:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306553 - in stable/11: lib/libprocstat sys/ufs/ffs sys/ufs/ufs X-SVN-Group: stable-11 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.23 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: Sat, 01 Oct 2016 09:19:45 -0000 Author: kib Date: Sat Oct 1 09:19:43 2016 New Revision: 306553 URL: https://svnweb.freebsd.org/changeset/base/306553 Log: MFC r305902: Reduce size of ufs inode. MFC r305903: Fix libprocstat build after r305902. Modified: stable/11/lib/libprocstat/common_kvm.c stable/11/sys/ufs/ffs/ffs_alloc.c stable/11/sys/ufs/ffs/ffs_balloc.c stable/11/sys/ufs/ffs/ffs_inode.c stable/11/sys/ufs/ffs/ffs_rawread.c stable/11/sys/ufs/ffs/ffs_snapshot.c stable/11/sys/ufs/ffs/ffs_softdep.c stable/11/sys/ufs/ffs/ffs_subr.c stable/11/sys/ufs/ffs/ffs_vfsops.c stable/11/sys/ufs/ffs/ffs_vnops.c stable/11/sys/ufs/ufs/extattr.h stable/11/sys/ufs/ufs/inode.h stable/11/sys/ufs/ufs/ufs_acl.c stable/11/sys/ufs/ufs/ufs_bmap.c stable/11/sys/ufs/ufs/ufs_gjournal.c stable/11/sys/ufs/ufs/ufs_inode.c stable/11/sys/ufs/ufs/ufs_quota.c stable/11/sys/ufs/ufs/ufs_vnops.c stable/11/sys/ufs/ufs/ufsmount.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libprocstat/common_kvm.c ============================================================================== --- stable/11/lib/libprocstat/common_kvm.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/lib/libprocstat/common_kvm.c Sat Oct 1 09:19:43 2016 (r306553) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #undef _KERNEL @@ -88,17 +90,22 @@ int ufs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) { struct inode inode; + struct ufsmount um; if (!kvm_read_all(kd, (unsigned long)VTOI(vp), &inode, sizeof(inode))) { warnx("can't read inode at %p", (void *)VTOI(vp)); return (1); } + if (!kvm_read_all(kd, (unsigned long)inode.i_ump, &um, sizeof(um))) { + warnx("can't read ufsmount at %p", (void *)inode.i_ump); + return (1); + } /* * The st_dev from stat(2) is a dev_t. These kernel structures * contain cdev pointers. We need to convert to dev_t to make * comparisons */ - vn->vn_fsid = dev2udev(kd, inode.i_dev); + vn->vn_fsid = dev2udev(kd, um.um_dev); vn->vn_fileid = inode.i_number; vn->vn_mode = (mode_t)inode.i_mode; vn->vn_size = inode.i_size; Modified: stable/11/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_alloc.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/sys/ufs/ffs/ffs_alloc.c Sat Oct 1 09:19:43 2016 (r306553) @@ -163,13 +163,13 @@ ffs_alloc(ip, lbn, bpref, size, flags, c #endif *bnp = 0; - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; mtx_assert(UFS_MTX(ump), MA_OWNED); #ifdef INVARIANTS if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0) { printf("dev = %s, bsize = %ld, size = %d, fs = %s\n", - devtoname(ip->i_dev), (long)fs->fs_bsize, size, + devtoname(ump->um_dev), (long)fs->fs_bsize, size, fs->fs_fsmnt); panic("ffs_alloc: bad size"); } @@ -260,9 +260,9 @@ ffs_realloccg(ip, lbprev, bprev, bpref, int64_t delta; vp = ITOV(ip); - fs = ip->i_fs; + ump = ITOUMP(ip); + fs = ump->um_fs; bp = NULL; - ump = ip->i_ump; gbflags = (flags & BA_UNMAPPED) != 0 ? GB_UNMAPPED : 0; mtx_assert(UFS_MTX(ump), MA_OWNED); @@ -273,7 +273,7 @@ ffs_realloccg(ip, lbprev, bprev, bpref, (u_int)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) { printf( "dev = %s, bsize = %ld, osize = %d, nsize = %d, fs = %s\n", - devtoname(ip->i_dev), (long)fs->fs_bsize, osize, + devtoname(ump->um_dev), (long)fs->fs_bsize, osize, nsize, fs->fs_fsmnt); panic("ffs_realloccg: bad size"); } @@ -288,7 +288,7 @@ retry: } if (bprev == 0) { printf("dev = %s, bsize = %ld, bprev = %jd, fs = %s\n", - devtoname(ip->i_dev), (long)fs->fs_bsize, (intmax_t)bprev, + devtoname(ump->um_dev), (long)fs->fs_bsize, (intmax_t)bprev, fs->fs_fsmnt); panic("ffs_realloccg: bad bprev"); } @@ -383,7 +383,7 @@ retry: break; default: printf("dev = %s, optim = %ld, fs = %s\n", - devtoname(ip->i_dev), (long)fs->fs_optim, fs->fs_fsmnt); + devtoname(ump->um_dev), (long)fs->fs_optim, fs->fs_fsmnt); panic("ffs_realloccg: bad optim"); /* NOTREACHED */ } @@ -391,7 +391,7 @@ retry: if (bno > 0) { bp->b_blkno = fsbtodb(fs, bno); if (!DOINGSOFTDEP(vp)) - ffs_blkfree(ump, fs, ip->i_devvp, bprev, (long)osize, + ffs_blkfree(ump, fs, ump->um_devvp, bprev, (long)osize, ip->i_number, vp->v_type, NULL); delta = btodb(nsize - osize); DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + delta); @@ -490,7 +490,7 @@ ffs_reallocblks(ap) * These devices are flash and therefore work less well with this * optimization. Also skip if reallocblks has been disabled globally. */ - ump = VTOI(ap->a_vp)->i_ump; + ump = ap->a_vp->v_mount->mnt_data; if (ump->um_candelete || doreallocblks == 0) return (ENOSPC); @@ -529,8 +529,8 @@ ffs_reallocblks_ufs1(ap) vp = ap->a_vp; ip = VTOI(vp); - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; /* * If we are not tracking block clusters or if we have less than 4% * free blocks left, then do not attempt to cluster. Running with @@ -727,7 +727,7 @@ ffs_reallocblks_ufs1(ap) #endif for (blkno = newblk, i = 0; i < len; i++, blkno += fs->fs_frag) { if (!DOINGSOFTDEP(vp)) - ffs_blkfree(ump, fs, ip->i_devvp, + ffs_blkfree(ump, fs, ump->um_devvp, dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize, ip->i_number, vp->v_type, NULL); buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno); @@ -778,8 +778,8 @@ ffs_reallocblks_ufs2(ap) vp = ap->a_vp; ip = VTOI(vp); - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; /* * If we are not tracking block clusters or if we have less than 4% * free blocks left, then do not attempt to cluster. Running with @@ -975,7 +975,7 @@ ffs_reallocblks_ufs2(ap) #endif for (blkno = newblk, i = 0; i < len; i++, blkno += fs->fs_frag) { if (!DOINGSOFTDEP(vp)) - ffs_blkfree(ump, fs, ip->i_devvp, + ffs_blkfree(ump, fs, ump->um_devvp, dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize, ip->i_number, vp->v_type, NULL); buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno); @@ -1040,8 +1040,8 @@ ffs_valloc(pvp, mode, cred, vpp) *vpp = NULL; pip = VTOI(pvp); - fs = pip->i_fs; - ump = pip->i_ump; + ump = ITOUMP(pip); + fs = ump->um_fs; UFS_LOCK(ump); reclaimed = 0; @@ -1114,10 +1114,12 @@ dup_alloc: ip->i_flag = 0; (*vpp)->v_vflag = 0; (*vpp)->v_type = VNON; - if (fs->fs_magic == FS_UFS2_MAGIC) + if (fs->fs_magic == FS_UFS2_MAGIC) { (*vpp)->v_op = &ffs_vnodeops2; - else + ip->i_flag |= IN_UFS2; + } else { (*vpp)->v_op = &ffs_vnodeops1; + } return (0); noinodes: if (reclaimed == 0) { @@ -1158,8 +1160,8 @@ ffs_dirpref(pip) u_int mincg, minndir; u_int maxcontigdirs; - mtx_assert(UFS_MTX(pip->i_ump), MA_OWNED); - fs = pip->i_fs; + mtx_assert(UFS_MTX(ITOUMP(pip)), MA_OWNED); + fs = ITOFS(pip); avgifree = fs->fs_cstotal.cs_nifree / fs->fs_ncg; avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg; @@ -1307,8 +1309,8 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap) ufs2_daddr_t pref; KASSERT(indx <= 0 || bap != NULL, ("need non-NULL bap")); - mtx_assert(UFS_MTX(ip->i_ump), MA_OWNED); - fs = ip->i_fs; + mtx_assert(UFS_MTX(ITOUMP(ip)), MA_OWNED); + fs = ITOFS(ip); /* * Allocation of indirect blocks is indicated by passing negative * values in indx: -1 for single indirect, -2 for double indirect, @@ -1412,8 +1414,8 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap) ufs2_daddr_t pref; KASSERT(indx <= 0 || bap != NULL, ("need non-NULL bap")); - mtx_assert(UFS_MTX(ip->i_ump), MA_OWNED); - fs = ip->i_fs; + mtx_assert(UFS_MTX(ITOUMP(ip)), MA_OWNED); + fs = ITOFS(ip); /* * Allocation of indirect blocks is indicated by passing negative * values in indx: -1 for single indirect, -2 for double indirect, @@ -1526,12 +1528,12 @@ ffs_hashalloc(ip, cg, pref, size, rsize, ufs2_daddr_t result; u_int i, icg = cg; - mtx_assert(UFS_MTX(ip->i_ump), MA_OWNED); + mtx_assert(UFS_MTX(ITOUMP(ip)), MA_OWNED); #ifdef INVARIANTS if (ITOV(ip)->v_mount->mnt_kern_flag & MNTK_SUSPENDED) panic("ffs_hashalloc: allocation on suspended filesystem"); #endif - fs = ip->i_fs; + fs = ITOFS(ip); /* * 1: preferred cylinder group */ @@ -1589,8 +1591,8 @@ ffs_fragextend(ip, cg, bprev, osize, nsi int i, error; u_int8_t *blksfree; - ump = ip->i_ump; - fs = ip->i_fs; + ump = ITOUMP(ip); + fs = ump->um_fs; if (fs->fs_cs(fs, cg).cs_nffree < numfrags(fs, nsize - osize)) return (0); frags = numfrags(fs, nsize); @@ -1600,8 +1602,8 @@ ffs_fragextend(ip, cg, bprev, osize, nsi return (0); } UFS_UNLOCK(ump); - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); + error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), + (int)fs->fs_cgsize, NOCRED, &bp); if (error) goto fail; cgp = (struct cg *)bp->b_data; @@ -1673,13 +1675,13 @@ ffs_alloccg(ip, cg, bpref, size, rsize) int i, allocsiz, error, frags; u_int8_t *blksfree; - ump = ip->i_ump; - fs = ip->i_fs; + ump = ITOUMP(ip); + fs = ump->um_fs; if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize) return (0); UFS_UNLOCK(ump); - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); + error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), + (int)fs->fs_cgsize, NOCRED, &bp); if (error) goto fail; cgp = (struct cg *)bp->b_data; @@ -1775,8 +1777,8 @@ ffs_alloccgblk(ip, bp, bpref, size) u_int8_t *blksfree; int i, cgbpref; - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; mtx_assert(UFS_MTX(ump), MA_OWNED); cgp = (struct cg *)bp->b_data; blksfree = cg_blksfree(cgp); @@ -1861,12 +1863,12 @@ ffs_clusteralloc(ip, cg, bpref, len) int32_t *lp; u_int8_t *blksfree; - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; if (fs->fs_maxcluster[cg] < len) return (0); UFS_UNLOCK(ump); - if (bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + if (bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NOCRED, &bp)) goto fail_lock; cgp = (struct cg *)bp->b_data; @@ -1965,8 +1967,8 @@ getinobuf(struct inode *ip, u_int cg, u_ { struct fs *fs; - fs = ip->i_fs; - return (getblk(ip->i_devvp, fsbtodb(fs, ino_to_fsba(fs, + fs = ITOFS(ip); + return (getblk(ITODEVVP(ip), fsbtodb(fs, ino_to_fsba(fs, cg * fs->fs_ipg + cginoblk)), (int)fs->fs_bsize, 0, 0, gbflags)); } @@ -1997,13 +1999,13 @@ ffs_nodealloccg(ip, cg, ipref, mode, unu int error, start, len, i; u_int32_t old_initediblk; - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; check_nifree: if (fs->fs_cs(fs, cg).cs_nifree == 0) return (0); UFS_UNLOCK(ump); - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), + error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NOCRED, &bp); if (error) { brelse(bp); @@ -2101,7 +2103,7 @@ gotit: * to it, then leave it unchanged as the other thread * has already set it correctly. */ - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), + error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NOCRED, &bp); UFS_LOCK(ump); ACTIVECLEAR(fs, cg); @@ -2166,7 +2168,8 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size cg = dtog(fs, bno); if (devvp->v_type == VREG) { /* devvp is a snapshot */ - dev = VTOI(devvp)->i_devvp->v_rdev; + MPASS(devvp->v_mount->mnt_data == ump); + dev = ump->um_devvp->v_rdev; cgblkno = fragstoblks(fs, cgtod(fs, cg)); } else { /* devvp is a normal disk device */ @@ -2396,7 +2399,7 @@ ffs_checkblk(ip, bno, size) int i, error, frags, free; u_int8_t *blksfree; - fs = ip->i_fs; + fs = ITOFS(ip); if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0) { printf("bsize = %ld, size = %ld, fs = %s\n", (long)fs->fs_bsize, size, fs->fs_fsmnt); @@ -2404,7 +2407,7 @@ ffs_checkblk(ip, bno, size) } if ((u_int)bno >= fs->fs_size) panic("ffs_checkblk: bad block %jd", (intmax_t)bno); - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, dtog(fs, bno))), + error = bread(ITODEVVP(ip), fsbtodb(fs, cgtod(fs, dtog(fs, bno))), (int)fs->fs_cgsize, NOCRED, &bp); if (error) panic("ffs_checkblk: cg bread failed"); @@ -2438,6 +2441,7 @@ ffs_vfree(pvp, ino, mode) ino_t ino; int mode; { + struct ufsmount *ump; struct inode *ip; if (DOINGSOFTDEP(pvp)) { @@ -2445,8 +2449,8 @@ ffs_vfree(pvp, ino, mode) return (0); } ip = VTOI(pvp); - return (ffs_freefile(ip->i_ump, ip->i_fs, ip->i_devvp, ino, mode, - NULL)); + ump = VFSTOUFS(pvp->v_mount); + return (ffs_freefile(ump, ump->um_fs, ump->um_devvp, ino, mode, NULL)); } /* @@ -2473,7 +2477,8 @@ ffs_freefile(ump, fs, devvp, ino, mode, cg = ino_to_cg(fs, ino); if (devvp->v_type == VREG) { /* devvp is a snapshot */ - dev = VTOI(devvp)->i_devvp->v_rdev; + MPASS(devvp->v_mount->mnt_data == ump); + dev = ump->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); } else { /* devvp is a normal disk device */ @@ -3056,7 +3061,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) break; AUDIT_ARG_VNODE1(vp); ip = VTOI(vp); - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) error = copyin((void *)(intptr_t)cmd.size, ip->i_din1, sizeof(struct ufs1_dinode)); else @@ -3076,7 +3081,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) error = EPERM; break; } - if (VTOI(vp)->i_ump != ump) { + if (ITOUMP(VTOI(vp)) != ump) { error = EINVAL; break; } @@ -3173,11 +3178,11 @@ buffered_write(fp, uio, active_cred, fla return (EINVAL); } ip = VTOI(vp); - if (ip->i_devvp != devvp) { + if (ITODEVVP(ip) != devvp) { vput(vp); return (EINVAL); } - fs = ip->i_fs; + fs = ITOFS(ip); vput(vp); foffset_lock_uio(fp, uio, flags); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); Modified: stable/11/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_balloc.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Sat Oct 1 09:19:43 2016 (r306553) @@ -111,8 +111,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t ip = VTOI(vp); dp = ip->i_din1; - fs = ip->i_fs; - ump = ip->i_ump; + fs = ITOFS(ip); + ump = ITOUMP(ip); lbn = lblkno(fs, startoffset); size = blkoff(fs, startoffset) + size; reclaimed = 0; @@ -548,7 +548,7 @@ fail: } lbns_remfree++; #endif - ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, + ffs_blkfree(ump, fs, ump->um_devvp, *blkp, fs->fs_bsize, ip->i_number, vp->v_type, NULL); } return (error); @@ -584,8 +584,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t ip = VTOI(vp); dp = ip->i_din2; - fs = ip->i_fs; - ump = ip->i_ump; + fs = ITOFS(ip); + ump = ITOUMP(ip); lbn = lblkno(fs, startoffset); size = blkoff(fs, startoffset) + size; reclaimed = 0; @@ -1143,7 +1143,7 @@ fail: } lbns_remfree++; #endif - ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, + ffs_blkfree(ump, fs, ump->um_devvp, *blkp, fs->fs_bsize, ip->i_number, vp->v_type, NULL); } return (error); Modified: stable/11/sys/ufs/ffs/ffs_inode.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_inode.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/sys/ufs/ffs/ffs_inode.c Sat Oct 1 09:19:43 2016 (r306553) @@ -92,8 +92,8 @@ ffs_update(vp, waitfor) if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor == 0) return (0); ip->i_flag &= ~(IN_LAZYACCESS | IN_LAZYMOD | IN_MODIFIED); - fs = ip->i_fs; - if (fs->fs_ronly && ip->i_ump->um_fsckpid == 0) + fs = ITOFS(ip); + if (fs->fs_ronly && ITOUMP(ip)->um_fsckpid == 0) return (0); /* * If we are updating a snapshot and another process is currently @@ -110,7 +110,7 @@ ffs_update(vp, waitfor) if (IS_SNAPSHOT(ip)) flags = GB_LOCK_NOWAIT; loop: - error = breadn_flags(ip->i_devvp, + error = breadn_flags(ITODEVVP(ip), fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), (int) fs->fs_bsize, 0, 0, 0, NOCRED, flags, &bp); if (error != 0) { @@ -143,7 +143,7 @@ loop: softdep_update_inodeblock(ip, bp, waitfor); else if (ip->i_effnlink != ip->i_nlink) panic("ffs_update: bad link cnt"); - if (ip->i_ump->um_fstype == UFS1) { + if (I_IS_UFS1(ip)) { *((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din1; /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ @@ -197,8 +197,8 @@ ffs_truncate(vp, length, flags, cred) off_t osize; ip = VTOI(vp); - fs = ip->i_fs; - ump = ip->i_ump; + ump = VFSTOUFS(vp->v_mount); + fs = ump->um_fs; bo = &vp->v_bufobj; ASSERT_VOP_LOCKED(vp, "ffs_truncate"); @@ -269,7 +269,7 @@ ffs_truncate(vp, length, flags, cred) for (i = 0; i < NXADDR; i++) { if (oldblks[i] == 0) continue; - ffs_blkfree(ump, fs, ip->i_devvp, oldblks[i], + ffs_blkfree(ump, fs, ITODEVVP(ip), oldblks[i], sblksize(fs, osize, i), ip->i_number, vp->v_type, NULL); } @@ -345,7 +345,7 @@ ffs_truncate(vp, length, flags, cred) if (error) return (error); indiroff = (lbn - NDADDR) % NINDIR(fs); - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) blkno = ((ufs1_daddr_t *)(bp->b_data))[indiroff]; else blkno = ((ufs2_daddr_t *)(bp->b_data))[indiroff]; @@ -517,7 +517,7 @@ ffs_truncate(vp, length, flags, cred) blocksreleased += count; if (lastiblock[level] < 0) { DIP_SET(ip, i_ib[level], 0); - ffs_blkfree(ump, fs, ip->i_devvp, bn, + ffs_blkfree(ump, fs, ump->um_devvp, bn, fs->fs_bsize, ip->i_number, vp->v_type, NULL); blocksreleased += nblocks; @@ -538,7 +538,7 @@ ffs_truncate(vp, length, flags, cred) continue; DIP_SET(ip, i_db[i], 0); bsize = blksize(fs, ip, i); - ffs_blkfree(ump, fs, ip->i_devvp, bn, bsize, ip->i_number, + ffs_blkfree(ump, fs, ump->um_devvp, bn, bsize, ip->i_number, vp->v_type, NULL); blocksreleased += btodb(bsize); } @@ -570,7 +570,7 @@ ffs_truncate(vp, length, flags, cred) * required for the storage we're keeping. */ bn += numfrags(fs, newspace); - ffs_blkfree(ump, fs, ip->i_devvp, bn, + ffs_blkfree(ump, fs, ump->um_devvp, bn, oldspace - newspace, ip->i_number, vp->v_type, NULL); blocksreleased += btodb(oldspace - newspace); } @@ -629,7 +629,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev ufs2_daddr_t *countp; { struct buf *bp; - struct fs *fs = ip->i_fs; + struct fs *fs; struct vnode *vp; caddr_t copy = NULL; int i, nblocks, error = 0, allerror = 0; @@ -637,7 +637,9 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev ufs2_daddr_t blkcount, factor, blocksreleased = 0; ufs1_daddr_t *bap1 = NULL; ufs2_daddr_t *bap2 = NULL; -# define BAP(ip, i) (((ip)->i_ump->um_fstype == UFS1) ? bap1[i] : bap2[i]) +#define BAP(ip, i) (I_IS_UFS1(ip) ? bap1[i] : bap2[i]) + + fs = ITOFS(ip); /* * Calculate index in current block of last @@ -685,7 +687,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev return (error); } - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) bap1 = (ufs1_daddr_t *)bp->b_data; else bap2 = (ufs2_daddr_t *)bp->b_data; @@ -693,7 +695,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev copy = malloc(fs->fs_bsize, M_TEMP, M_WAITOK); bcopy((caddr_t)bp->b_data, copy, (u_int)fs->fs_bsize); for (i = last + 1; i < NINDIR(fs); i++) - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) bap1[i] = 0; else bap2[i] = 0; @@ -704,7 +706,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev if (error) allerror = error; } - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) bap1 = (ufs1_daddr_t *)copy; else bap2 = (ufs2_daddr_t *)copy; @@ -724,7 +726,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, lev allerror = error; blocksreleased += blkcount; } - ffs_blkfree(ip->i_ump, fs, ip->i_devvp, nb, fs->fs_bsize, + ffs_blkfree(ITOUMP(ip), fs, ITODEVVP(ip), nb, fs->fs_bsize, ip->i_number, vp->v_type, NULL); blocksreleased += nblocks; } @@ -758,6 +760,6 @@ int ffs_rdonly(struct inode *ip) { - return (ip->i_ump->um_fs->fs_ronly != 0); + return (ITOFS(ip)->fs_ronly != 0); } Modified: stable/11/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_rawread.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/sys/ufs/ffs/ffs_rawread.c Sat Oct 1 09:19:43 2016 (r306553) @@ -204,7 +204,7 @@ ffs_rawread_readahead(struct vnode *vp, bsize = vp->v_mount->mnt_stat.f_iosize; ip = VTOI(vp); - dp = ip->i_devvp; + dp = ITODEVVP(ip); iolen = ((vm_offset_t) udata) & PAGE_MASK; bp->b_bcount = len; @@ -440,7 +440,7 @@ ffs_rawread(struct vnode *vp, /* Only handle sector aligned reads */ ip = VTOI(vp); - secsize = ip->i_devvp->v_bufobj.bo_bsize; + secsize = ITODEVVP(ip)->v_bufobj.bo_bsize; if ((uio->uio_offset & (secsize - 1)) == 0 && (uio->uio_resid & (secsize - 1)) == 0) { @@ -460,7 +460,7 @@ ffs_rawread(struct vnode *vp, } partialbytes = ((unsigned int) ip->i_size) % - ip->i_fs->fs_bsize; + ITOFS(ip)->fs_bsize; blockbytes = (int) filebytes - partialbytes; if (blockbytes > 0) { skipbytes = uio->uio_resid - Modified: stable/11/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_snapshot.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/sys/ufs/ffs/ffs_snapshot.c Sat Oct 1 09:19:43 2016 (r306553) @@ -302,7 +302,7 @@ restart: vp = nd.ni_vp; vp->v_vflag |= VV_SYSTEM; ip = VTOI(vp); - devvp = ip->i_devvp; + devvp = ITODEVVP(ip); /* * Allocate and copy the last block contents so as to be able * to set size to that of the filesystem. @@ -587,7 +587,7 @@ loop: } } snaplistsize += 1; - if (xp->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(xp)) error = expunge_ufs1(vp, xp, copy_fs, fullacct_ufs1, BLK_NOCOPY, 1); else @@ -620,7 +620,7 @@ loop: goto out1; } xp = VTOI(xvp); - if (xp->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(xp)) error = expunge_ufs1(vp, xp, copy_fs, fullacct_ufs1, BLK_NOCOPY, 0); else @@ -706,7 +706,7 @@ out1: TAILQ_FOREACH(xp, &sn->sn_head, i_nextsnap) { if (xp == ip) break; - if (xp->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(xp)) error = expunge_ufs1(vp, xp, fs, snapacct_ufs1, BLK_SNAP, 0); else @@ -735,7 +735,7 @@ out1: * blocks marked as used in the snapshot bitmaps. Also, collect * the list of allocated blocks in i_snapblklist. */ - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) error = expunge_ufs1(vp, ip, copy_fs, mapacct_ufs1, BLK_SNAP, 0); else @@ -887,9 +887,9 @@ cgaccount(cg, vp, nbp, passno) int error, len, loc, indiroff; ip = VTOI(vp); - fs = ip->i_fs; - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, KERNCRED, &bp); + fs = ITOFS(ip); + error = bread(ITODEVVP(ip), fsbtodb(fs, cgtod(fs, cg)), + (int)fs->fs_cgsize, KERNCRED, &bp); if (error) { brelse(bp); return (error); @@ -899,7 +899,7 @@ cgaccount(cg, vp, nbp, passno) brelse(bp); return (EIO); } - UFS_LOCK(ip->i_ump); + UFS_LOCK(ITOUMP(ip)); ACTIVESET(fs, cg); /* * Recomputation of summary information might not have been performed @@ -908,7 +908,7 @@ cgaccount(cg, vp, nbp, passno) * fsck is slightly more consistent. */ fs->fs_cs(fs, cg) = cgp->cg_cs; - UFS_UNLOCK(ip->i_ump); + UFS_UNLOCK(ITOUMP(ip)); bcopy(bp->b_data, nbp->b_data, fs->fs_cgsize); if (fs->fs_cgsize < fs->fs_bsize) bzero(&nbp->b_data[fs->fs_cgsize], @@ -952,7 +952,7 @@ cgaccount(cg, vp, nbp, passno) } indiroff = 0; } - if (ip->i_ump->um_fstype == UFS1) { + if (I_IS_UFS1(ip)) { if (ffs_isblock(fs, cg_blksfree(cgp), loc)) ((ufs1_daddr_t *)(ibp->b_data))[indiroff] = BLK_NOCOPY; @@ -1257,7 +1257,7 @@ mapacct_ufs1(vp, oldblkp, lastblkp, fs, *ip->i_snapblklist++ = lblkno; if (blkno == BLK_SNAP) blkno = blkstofrags(fs, lblkno); - ffs_blkfree(ip->i_ump, fs, vp, blkno, fs->fs_bsize, inum, + ffs_blkfree(ITOUMP(ip), fs, vp, blkno, fs->fs_bsize, inum, vp->v_type, NULL); } return (0); @@ -1541,7 +1541,7 @@ mapacct_ufs2(vp, oldblkp, lastblkp, fs, *ip->i_snapblklist++ = lblkno; if (blkno == BLK_SNAP) blkno = blkstofrags(fs, lblkno); - ffs_blkfree(ip->i_ump, fs, vp, blkno, fs->fs_bsize, inum, + ffs_blkfree(ITOUMP(ip), fs, vp, blkno, fs->fs_bsize, inum, vp->v_type, NULL); } return (0); @@ -1565,7 +1565,7 @@ ffs_snapgone(ip) * Find snapshot in incore list. */ xp = NULL; - sn = ip->i_devvp->v_rdev->si_snapdata; + sn = ITODEVVP(ip)->v_rdev->si_snapdata; if (sn != NULL) TAILQ_FOREACH(xp, &sn->sn_head, i_nextsnap) if (xp == ip) @@ -1578,8 +1578,8 @@ ffs_snapgone(ip) /* * Delete snapshot inode from superblock. Keep list dense. */ - fs = ip->i_fs; - ump = ip->i_ump; + ump = ITOUMP(ip); + fs = ump->um_fs; UFS_LOCK(ump); for (snaploc = 0; snaploc < FSMAXSNAP; snaploc++) if (fs->fs_snapinum[snaploc] == ip->i_number) @@ -1611,8 +1611,8 @@ ffs_snapremove(vp) struct snapdata *sn; ip = VTOI(vp); - fs = ip->i_fs; - devvp = ip->i_devvp; + fs = ITOFS(ip); + devvp = ITODEVVP(ip); /* * If active, delete from incore list (this snapshot may * already have been in the process of being deleted, so @@ -1646,7 +1646,7 @@ ffs_snapremove(vp) if (dblk == BLK_NOCOPY || dblk == BLK_SNAP) DIP_SET(ip, i_db[blkno], 0); else if ((dblk == blkstofrags(fs, blkno) && - ffs_snapblkfree(fs, ip->i_devvp, dblk, fs->fs_bsize, + ffs_snapblkfree(fs, ITODEVVP(ip), dblk, fs->fs_bsize, ip->i_number, vp->v_type, NULL))) { DIP_SET(ip, i_blocks, DIP(ip, i_blocks) - btodb(fs->fs_bsize)); @@ -1664,14 +1664,14 @@ ffs_snapremove(vp) else last = fs->fs_size - blkno; for (loc = 0; loc < last; loc++) { - if (ip->i_ump->um_fstype == UFS1) { + if (I_IS_UFS1(ip)) { dblk = ((ufs1_daddr_t *)(ibp->b_data))[loc]; if (dblk == 0) continue; if (dblk == BLK_NOCOPY || dblk == BLK_SNAP) ((ufs1_daddr_t *)(ibp->b_data))[loc]= 0; else if ((dblk == blkstofrags(fs, blkno) && - ffs_snapblkfree(fs, ip->i_devvp, dblk, + ffs_snapblkfree(fs, ITODEVVP(ip), dblk, fs->fs_bsize, ip->i_number, vp->v_type, NULL))) { ip->i_din1->di_blocks -= @@ -1686,7 +1686,7 @@ ffs_snapremove(vp) if (dblk == BLK_NOCOPY || dblk == BLK_SNAP) ((ufs2_daddr_t *)(ibp->b_data))[loc] = 0; else if ((dblk == blkstofrags(fs, blkno) && - ffs_snapblkfree(fs, ip->i_devvp, dblk, + ffs_snapblkfree(fs, ITODEVVP(ip), dblk, fs->fs_bsize, ip->i_number, vp->v_type, NULL))) { ip->i_din2->di_blocks -= btodb(fs->fs_bsize); ((ufs2_daddr_t *)(ibp->b_data))[loc] = 0; @@ -1781,7 +1781,7 @@ retry: if (error) break; indiroff = (lbn - NDADDR) % NINDIR(fs); - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) blkno=((ufs1_daddr_t *)(ibp->b_data))[indiroff]; else blkno=((ufs2_daddr_t *)(ibp->b_data))[indiroff]; @@ -1806,7 +1806,7 @@ retry: if (lbn < NDADDR) { DIP_SET(ip, i_db[lbn], BLK_NOCOPY); ip->i_flag |= IN_CHANGE | IN_UPDATE; - } else if (ip->i_ump->um_fstype == UFS1) { + } else if (I_IS_UFS1(ip)) { ((ufs1_daddr_t *)(ibp->b_data))[indiroff] = BLK_NOCOPY; bdwrite(ibp); @@ -1854,7 +1854,7 @@ retry: } if (lbn < NDADDR) { DIP_SET(ip, i_db[lbn], bno); - } else if (ip->i_ump->um_fstype == UFS1) { + } else if (I_IS_UFS1(ip)) { ((ufs1_daddr_t *)(ibp->b_data))[indiroff] = bno; bdwrite(ibp); } else { @@ -2136,7 +2136,7 @@ ffs_bp_snapblk(devvp, bp) sn = devvp->v_rdev->si_snapdata; if (sn == NULL || TAILQ_FIRST(&sn->sn_head) == NULL) return (0); - fs = TAILQ_FIRST(&sn->sn_head)->i_fs; + fs = ITOFS(TAILQ_FIRST(&sn->sn_head)); lbn = fragstoblks(fs, dbtofsb(fs, bp->b_blkno)); snapblklist = sn->sn_blklist; upper = sn->sn_listsize - 1; @@ -2263,7 +2263,7 @@ ffs_copyonwrite(devvp, bp) return (0); /* No snapshot */ } ip = TAILQ_FIRST(&sn->sn_head); - fs = ip->i_fs; + fs = ITOFS(ip); lbn = fragstoblks(fs, dbtofsb(fs, bp->b_blkno)); snapblklist = sn->sn_blklist; upper = sn->sn_listsize - 1; @@ -2337,7 +2337,7 @@ ffs_copyonwrite(devvp, bp) if (error) break; indiroff = (lbn - NDADDR) % NINDIR(fs); - if (ip->i_ump->um_fstype == UFS1) + if (I_IS_UFS1(ip)) blkno=((ufs1_daddr_t *)(ibp->b_data))[indiroff]; else blkno=((ufs2_daddr_t *)(ibp->b_data))[indiroff]; @@ -2493,15 +2493,19 @@ readblock(vp, bp, lbn) { struct inode *ip = VTOI(vp); struct bio *bip; + struct fs *fs; + + ip = VTOI(vp); + fs = ITOFS(ip); bip = g_alloc_bio(); bip->bio_cmd = BIO_READ; - bip->bio_offset = dbtob(fsbtodb(ip->i_fs, blkstofrags(ip->i_fs, lbn))); + bip->bio_offset = dbtob(fsbtodb(fs, blkstofrags(fs, lbn))); bip->bio_data = bp->b_data; bip->bio_length = bp->b_bcount; bip->bio_done = NULL; - g_io_request(bip, ip->i_devvp->v_bufobj.bo_private); + g_io_request(bip, ITODEVVP(ip)->v_bufobj.bo_private); bp->b_error = biowait(bip, "snaprdb"); g_destroy_bio(bip); return (bp->b_error); Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Sat Oct 1 07:46:28 2016 (r306552) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Sat Oct 1 09:19:43 2016 (r306553) @@ -3998,7 +3998,7 @@ newjmvref(dp, ino, oldoff, newoff) struct jmvref *jmvref; jmvref = malloc(sizeof(*jmvref), M_JMVREF, M_SOFTDEP_FLAGS); - workitem_alloc(&jmvref->jm_list, D_JMVREF, UFSTOVFS(dp->i_ump)); + workitem_alloc(&jmvref->jm_list, D_JMVREF, ITOVFS(dp)); jmvref->jm_list.wk_state = ATTACHED | DEPCOMPLETE; jmvref->jm_parent = dp->i_number; jmvref->jm_ino = ino; @@ -4025,7 +4025,7 @@ newjremref(struct dirrem *dirrem, struct struct jremref *jremref; jremref = malloc(sizeof(*jremref), M_JREMREF, M_SOFTDEP_FLAGS); - workitem_alloc(&jremref->jr_list, D_JREMREF, UFSTOVFS(dp->i_ump)); + workitem_alloc(&jremref->jr_list, D_JREMREF, ITOVFS(dp)); jremref->jr_state = ATTACHED; newinoref(&jremref->jr_ref, ip->i_number, dp->i_number, diroff, nlink, ip->i_mode); @@ -4061,7 +4061,7 @@ newjaddref(struct inode *dp, ino_t ino, struct jaddref *jaddref; jaddref = malloc(sizeof(*jaddref), M_JADDREF, M_SOFTDEP_FLAGS); - workitem_alloc(&jaddref->ja_list, D_JADDREF, UFSTOVFS(dp->i_ump)); + workitem_alloc(&jaddref->ja_list, D_JADDREF, ITOVFS(dp)); jaddref->ja_state = ATTACHED; jaddref->ja_mkdir = NULL; newinoref(&jaddref->ja_ref, ino, dp->i_number, diroff, nlink, mode); @@ -4649,7 +4649,7 @@ inodedep_lookup_ip(ip) KASSERT(ip->i_nlink >= ip->i_effnlink, ("inodedep_lookup_ip: bad delta")); - (void) inodedep_lookup(UFSTOVFS(ip->i_ump), ip->i_number, DEPALLOC, + (void) inodedep_lookup(ITOVFS(ip), ip->i_number, DEPALLOC, &inodedep); inodedep->id_nlinkdelta = ip->i_nlink - ip->i_effnlink; KASSERT((inodedep->id_state & UNLINKED) == 0, ("inode unlinked")); @@ -4672,12 +4672,12 @@ softdep_setup_create(dp, ip) struct jaddref *jaddref; struct vnode *dvp; - KASSERT(MOUNTEDSOFTDEP(UFSTOVFS(dp->i_ump)) != 0, + KASSERT(MOUNTEDSOFTDEP(ITOVFS(dp)) != 0, ("softdep_setup_create called on non-softdep filesystem")); KASSERT(ip->i_nlink == 1, ("softdep_setup_create: Invalid link count.")); dvp = ITOV(dp); - ACQUIRE_LOCK(dp->i_ump); + ACQUIRE_LOCK(ITOUMP(dp)); inodedep = inodedep_lookup_ip(ip); if (DOINGSUJ(dvp)) { jaddref = (struct jaddref *)TAILQ_LAST(&inodedep->id_inoreflst, @@ -4686,7 +4686,7 @@ softdep_setup_create(dp, ip) ("softdep_setup_create: No addref structure present.")); } softdep_prelink(dvp, NULL); - FREE_LOCK(dp->i_ump); + FREE_LOCK(ITOUMP(dp)); } /* @@ -4704,7 +4704,7 @@ softdep_setup_dotdot_link(dp, ip) struct jaddref *jaddref; struct vnode *dvp; - KASSERT(MOUNTEDSOFTDEP(UFSTOVFS(dp->i_ump)) != 0, + KASSERT(MOUNTEDSOFTDEP(ITOVFS(dp)) != 0, ("softdep_setup_dotdot_link called on non-softdep filesystem")); dvp = ITOV(dp); jaddref = NULL; @@ -4715,13 +4715,13 @@ softdep_setup_dotdot_link(dp, ip) if (DOINGSUJ(dvp)) jaddref = newjaddref(ip, dp->i_number, DOTDOT_OFFSET, dp->i_effnlink - 1, dp->i_mode); - ACQUIRE_LOCK(dp->i_ump); + ACQUIRE_LOCK(ITOUMP(dp)); inodedep = inodedep_lookup_ip(dp); if (jaddref) TAILQ_INSERT_TAIL(&inodedep->id_inoreflst, &jaddref->ja_ref, if_deps); softdep_prelink(dvp, ITOV(ip)); - FREE_LOCK(dp->i_ump); + FREE_LOCK(ITOUMP(dp)); } /* @@ -4739,20 +4739,20 @@ softdep_setup_link(dp, ip) struct jaddref *jaddref; struct vnode *dvp; - KASSERT(MOUNTEDSOFTDEP(UFSTOVFS(dp->i_ump)) != 0, + KASSERT(MOUNTEDSOFTDEP(ITOVFS(dp)) != 0, ("softdep_setup_link called on non-softdep filesystem")); dvp = ITOV(dp); jaddref = NULL; if (DOINGSUJ(dvp)) jaddref = newjaddref(dp, ip->i_number, 0, ip->i_effnlink - 1, ip->i_mode); - ACQUIRE_LOCK(dp->i_ump); + ACQUIRE_LOCK(ITOUMP(dp)); inodedep = inodedep_lookup_ip(ip); if (jaddref) TAILQ_INSERT_TAIL(&inodedep->id_inoreflst, &jaddref->ja_ref, if_deps); softdep_prelink(dvp, ITOV(ip)); - FREE_LOCK(dp->i_ump); + FREE_LOCK(ITOUMP(dp)); } /* @@ -4772,7 +4772,7 @@ softdep_setup_mkdir(dp, ip) struct jaddref *jaddref; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 1 11:43:38 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 76977C041AB; Sat, 1 Oct 2016 11:43:38 +0000 (UTC) (envelope-from bapt@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 47BD21D53; Sat, 1 Oct 2016 11:43:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Bhb4B072792; Sat, 1 Oct 2016 11:43:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91BhbNG072791; Sat, 1 Oct 2016 11:43:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610011143.u91BhbNG072791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Oct 2016 11:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306554 - head/usr.sbin/bhyve 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.23 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: Sat, 01 Oct 2016 11:43:38 -0000 Author: bapt Date: Sat Oct 1 11:43:37 2016 New Revision: 306554 URL: https://svnweb.freebsd.org/changeset/base/306554 Log: Use accept4 with O_NONBLOCK rather than accept + fcntl Modified: head/usr.sbin/bhyve/dbgport.c Modified: head/usr.sbin/bhyve/dbgport.c ============================================================================== --- head/usr.sbin/bhyve/dbgport.c Sat Oct 1 09:19:43 2016 (r306553) +++ head/usr.sbin/bhyve/dbgport.c Sat Oct 1 11:43:37 2016 (r306554) @@ -73,10 +73,8 @@ again: printf("Waiting for connection from gdb\r\n"); printonce = 1; } - conn_fd = accept(listen_fd, NULL, NULL); - if (conn_fd >= 0) - fcntl(conn_fd, F_SETFL, O_NONBLOCK); - else if (errno != EINTR) + conn_fd = accept4(listen_fd, NULL, NULL, O_NONBLOCK); + if (conn_fd < 0 && errno != EINTR) perror("accept"); } From owner-svn-src-all@freebsd.org Sat Oct 1 18:16: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 11948A94085; Sat, 1 Oct 2016 18:16:23 +0000 (UTC) (envelope-from gonzo@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 D46283E2; Sat, 1 Oct 2016 18:16:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91HmfKW034678; Sat, 1 Oct 2016 17:48:41 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91HmfV8034677; Sat, 1 Oct 2016 17:48:41 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610011748.u91HmfV8034677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 1 Oct 2016 17:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306556 - head/sys/sys 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.23 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: Sat, 01 Oct 2016 18:16:23 -0000 Author: gonzo Date: Sat Oct 1 17:48:41 2016 New Revision: 306556 URL: https://svnweb.freebsd.org/changeset/base/306556 Log: Bump _FreeBSD_version after adding fb_memattr field to fb_info in r306555 Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Oct 1 17:43:02 2016 (r306555) +++ head/sys/sys/param.h Sat Oct 1 17:48:41 2016 (r306556) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200010 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200011 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sat Oct 1 18:16:24 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 72DB2A9408F; Sat, 1 Oct 2016 18:16:24 +0000 (UTC) (envelope-from gonzo@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 29D033E6; Sat, 1 Oct 2016 18:16:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Hh2Ui034405; Sat, 1 Oct 2016 17:43:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91Hh2Kq034403; Sat, 1 Oct 2016 17:43:02 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610011743.u91Hh2Kq034403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 1 Oct 2016 17:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306555 - in head/sys: dev/fb sys 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.23 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: Sat, 01 Oct 2016 18:16:24 -0000 Author: gonzo Date: Sat Oct 1 17:43:02 2016 New Revision: 306555 URL: https://svnweb.freebsd.org/changeset/base/306555 Log: Provide way for framebuffer driver to request mmap(2) mapping type On ARM if memattr is not overriden mmap(2) maps framebuffer memory as WBWA which means part of changes to content in userland end up in cache and appear on screen gradually as cache lines are evicted. This change adds configurable memattr that hardware fb implementation can set to get the memory mapping type it requires: - Add new flag FB_FLAG_MEMATTR that indicates that framebuffer driver overrides default memattr - Add new field fb_memattr to struct fb_info to specify requested memattr Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D8064 Modified: head/sys/dev/fb/fbd.c head/sys/sys/fbio.h Modified: head/sys/dev/fb/fbd.c ============================================================================== --- head/sys/dev/fb/fbd.c Sat Oct 1 11:43:37 2016 (r306554) +++ head/sys/dev/fb/fbd.c Sat Oct 1 17:43:02 2016 (r306555) @@ -178,6 +178,8 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o *paddr = vtophys((uint8_t *)info->fb_vbase + offset); else *paddr = info->fb_pbase + offset; + if (info->fb_flags & FB_FLAG_MEMATTR) + *memattr = info->fb_memattr; return (0); } return (EINVAL); Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Sat Oct 1 11:43:37 2016 (r306554) +++ head/sys/sys/fbio.h Sat Oct 1 17:43:02 2016 (r306555) @@ -142,6 +142,8 @@ struct fb_info { uint32_t fb_flags; #define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ #define FB_FLAG_NOWRITE 2 /* disable writes for the time being */ +#define FB_FLAG_MEMATTR 4 /* override memattr for mmap */ + vm_memattr_t fb_memattr; int fb_stride; int fb_bpp; /* bits per pixel */ uint32_t fb_cmap[16]; From owner-svn-src-all@freebsd.org Sat Oct 1 18:16: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 715C8A94089; Sat, 1 Oct 2016 18:16:23 +0000 (UTC) (envelope-from gonzo@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 427763E3; Sat, 1 Oct 2016 18:16:23 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91HvWu0038395; Sat, 1 Oct 2016 17:57:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91HvWKj038394; Sat, 1 Oct 2016 17:57:32 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610011757.u91HvWKj038394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 1 Oct 2016 17:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306557 - head/sys/arm/broadcom/bcm2835 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.23 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: Sat, 01 Oct 2016 18:16:23 -0000 Author: gonzo Date: Sat Oct 1 17:57:32 2016 New Revision: 306557 URL: https://svnweb.freebsd.org/changeset/base/306557 Log: Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer memory that prevents pixel data from being stuck in cache until evicition happens Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Oct 1 17:48:41 2016 (r306556) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Oct 1 17:57:32 2016 (r306557) @@ -113,6 +113,8 @@ bcm_fb_setup_fbd(struct bcmsc_softc *sc) sc->info.fb_stride = fb.pitch; sc->info.fb_width = fb.xres; sc->info.fb_height = fb.yres; + sc->info.fb_flags = FB_FLAG_MEMATTR; + sc->info.fb_memattr = VM_MEMATTR_WRITE_COMBINING; if (sc->fbswap) { switch (sc->info.fb_bpp) { From owner-svn-src-all@freebsd.org Sat Oct 1 19:30: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 9740AA94231; Sat, 1 Oct 2016 19:30:29 +0000 (UTC) (envelope-from alc@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 6C2DDB87; Sat, 1 Oct 2016 19:30:29 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91JUSBl072655; Sat, 1 Oct 2016 19:30:28 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91JUSYF072651; Sat, 1 Oct 2016 19:30:28 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610011930.u91JUSYF072651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Oct 2016 19:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306558 - in stable/11/sys: amd64/amd64 arm/arm i386/i386 sparc64/sparc64 X-SVN-Group: stable-11 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.23 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: Sat, 01 Oct 2016 19:30:29 -0000 Author: alc Date: Sat Oct 1 19:30:28 2016 New Revision: 306558 URL: https://svnweb.freebsd.org/changeset/base/306558 Log: MFC r305213,305319,305398 As an optimization to the machine-independent layer, change the machine- dependent pmap_ts_referenced() so that it updates the page's dirty field if a modified bit is found while counting reference bits. This opportunistic update can be performed at low cost and can eliminate the need for some future calls to pmap_is_modified() by the machine- independent layer. Replace the number 4 in sparc64's pmap_ts_referenced() by PMAP_TS_REFERENCED_MAX, like we've done elsewhere, e.g., amd64. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/arm/arm/pmap-v6.c stable/11/sys/i386/i386/pmap.c stable/11/sys/sparc64/sparc64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Sat Oct 1 17:57:32 2016 (r306557) +++ stable/11/sys/amd64/amd64/pmap.c Sat Oct 1 19:30:28 2016 (r306558) @@ -5831,6 +5831,14 @@ safe_to_clear_referenced(pmap_t pmap, pt * should be tested and standardized at some point in the future for * optimal aging of shared pages. * + * As an optimization, update the page's dirty field if a modified bit is + * found while counting reference bits. This opportunistic update can be + * performed at low cost and can eliminate the need for some future calls + * to pmap_is_modified(). However, since this function stops after + * finding PMAP_TS_REFERENCED_MAX reference bits, it may not detect some + * dirty pages. Those dirty pages will only be detected by a future call + * to pmap_is_modified(). + * * A DI block is not needed within this function, because * invalidations are performed before the PV list lock is * released. @@ -5843,7 +5851,7 @@ pmap_ts_referenced(vm_page_t m) pmap_t pmap; struct rwlock *lock; pd_entry_t oldpde, *pde; - pt_entry_t *pte, PG_A; + pt_entry_t *pte, PG_A, PG_M, PG_RW; vm_offset_t va; vm_paddr_t pa; int cleared, md_gen, not_cleared, pvh_gen; @@ -5878,9 +5886,19 @@ retry: } } PG_A = pmap_accessed_bit(pmap); + PG_M = pmap_modified_bit(pmap); + PG_RW = pmap_rw_bit(pmap); va = pv->pv_va; pde = pmap_pde(pmap, pv->pv_va); oldpde = *pde; + if ((oldpde & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + /* + * Although "oldpde" is mapping a 2MB page, because + * this function is called at a 4KB page granularity, + * we only update the 4KB page under test. + */ + vm_page_dirty(m); + } if ((*pde & PG_A) != 0) { /* * Since this reference bit is shared by 512 4KB @@ -5974,11 +5992,15 @@ small_mappings: } } PG_A = pmap_accessed_bit(pmap); + PG_M = pmap_modified_bit(pmap); + PG_RW = pmap_rw_bit(pmap); pde = pmap_pde(pmap, pv->pv_va); KASSERT((*pde & PG_PS) == 0, ("pmap_ts_referenced: found a 2mpage in page %p's pv list", m)); pte = pmap_pde_to_pte(pde, pv->pv_va); + if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); if ((*pte & PG_A) != 0) { if (safe_to_clear_referenced(pmap, *pte)) { atomic_clear_long(pte, PG_A); Modified: stable/11/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/11/sys/arm/arm/pmap-v6.c Sat Oct 1 17:57:32 2016 (r306557) +++ stable/11/sys/arm/arm/pmap-v6.c Sat Oct 1 19:30:28 2016 (r306558) @@ -5178,6 +5178,14 @@ pmap_is_referenced(vm_page_t m) * XXX: The exact number of bits to check and clear is a matter that * should be tested and standardized at some point in the future for * optimal aging of shared pages. + * + * As an optimization, update the page's dirty field if a modified bit is + * found while counting reference bits. This opportunistic update can be + * performed at low cost and can eliminate the need for some future calls + * to pmap_is_modified(). However, since this function stops after + * finding PMAP_TS_REFERENCED_MAX reference bits, it may not detect some + * dirty pages. Those dirty pages will only be detected by a future call + * to pmap_is_modified(). */ int pmap_ts_referenced(vm_page_t m) @@ -5186,7 +5194,7 @@ pmap_ts_referenced(vm_page_t m) pv_entry_t pv, pvf; pmap_t pmap; pt1_entry_t *pte1p, opte1; - pt2_entry_t *pte2p; + pt2_entry_t *pte2p, opte2; vm_paddr_t pa; int rtval = 0; @@ -5205,6 +5213,14 @@ pmap_ts_referenced(vm_page_t m) PMAP_LOCK(pmap); pte1p = pmap_pte1(pmap, pv->pv_va); opte1 = pte1_load(pte1p); + if (pte1_is_dirty(opte1)) { + /* + * Although "opte1" is mapping a 1MB page, because + * this function is called at a 4KB page granularity, + * we only update the 4KB page under test. + */ + vm_page_dirty(m); + } if ((opte1 & PTE1_A) != 0) { /* * Since this reference bit is shared by 256 4KB pages, @@ -5253,7 +5269,10 @@ small_mappings: ("%s: not found a link in page %p's pv list", __func__, m)); pte2p = pmap_pte2_quick(pmap, pv->pv_va); - if ((pte2_load(pte2p) & PTE2_A) != 0) { + opte2 = pte2_load(pte2p); + if (pte2_is_dirty(opte2)) + vm_page_dirty(m); + if ((opte2 & PTE2_A) != 0) { pte2_clear_bit(pte2p, PTE2_A); pmap_tlb_flush(pmap, pv->pv_va); rtval++; Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Sat Oct 1 17:57:32 2016 (r306557) +++ stable/11/sys/i386/i386/pmap.c Sat Oct 1 19:30:28 2016 (r306558) @@ -4802,6 +4802,14 @@ retry: * XXX: The exact number of bits to check and clear is a matter that * should be tested and standardized at some point in the future for * optimal aging of shared pages. + * + * As an optimization, update the page's dirty field if a modified bit is + * found while counting reference bits. This opportunistic update can be + * performed at low cost and can eliminate the need for some future calls + * to pmap_is_modified(). However, since this function stops after + * finding PMAP_TS_REFERENCED_MAX reference bits, it may not detect some + * dirty pages. Those dirty pages will only be detected by a future call + * to pmap_is_modified(). */ int pmap_ts_referenced(vm_page_t m) @@ -4828,6 +4836,14 @@ pmap_ts_referenced(vm_page_t m) pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); + if ((*pde & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + /* + * Although "*pde" is mapping a 2/4MB page, because + * this function is called at a 4KB page granularity, + * we only update the 4KB page under test. + */ + vm_page_dirty(m); + } if ((*pde & PG_A) != 0) { /* * Since this reference bit is shared by either 1024 @@ -4876,6 +4892,8 @@ small_mappings: ("pmap_ts_referenced: found a 4mpage in page %p's pv list", m)); pte = pmap_pte_quick(pmap, pv->pv_va); + if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); if ((*pte & PG_A) != 0) { atomic_clear_int((u_int *)pte, PG_A); pmap_invalidate_page(pmap, pv->pv_va); Modified: stable/11/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/11/sys/sparc64/sparc64/pmap.c Sat Oct 1 17:57:32 2016 (r306557) +++ stable/11/sys/sparc64/sparc64/pmap.c Sat Oct 1 19:30:28 2016 (r306558) @@ -2106,6 +2106,8 @@ pmap_page_is_mapped(vm_page_t m) return (rv); } +#define PMAP_TS_REFERENCED_MAX 5 + /* * Return a count of reference bits for a page, clearing those bits. * It is not necessary for every reference bit to be cleared, but it @@ -2115,6 +2117,14 @@ pmap_page_is_mapped(vm_page_t m) * XXX: The exact number of bits to check and clear is a matter that * should be tested and standardized at some point in the future for * optimal aging of shared pages. + * + * As an optimization, update the page's dirty field if a modified bit is + * found while counting reference bits. This opportunistic update can be + * performed at low cost and can eliminate the need for some future calls + * to pmap_is_modified(). However, since this function stops after + * finding PMAP_TS_REFERENCED_MAX reference bits, it may not detect some + * dirty pages. Those dirty pages will only be detected by a future call + * to pmap_is_modified(). */ int pmap_ts_referenced(vm_page_t m) @@ -2138,7 +2148,10 @@ pmap_ts_referenced(vm_page_t m) if ((tp->tte_data & TD_PV) == 0) continue; data = atomic_clear_long(&tp->tte_data, TD_REF); - if ((data & TD_REF) != 0 && ++count > 4) + if ((data & TD_W) != 0) + vm_page_dirty(m); + if ((data & TD_REF) != 0 && ++count >= + PMAP_TS_REFERENCED_MAX) break; } while ((tp = tpn) != NULL && tp != tpf); } From owner-svn-src-all@freebsd.org Sat Oct 1 19:39: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 63775A9445A; Sat, 1 Oct 2016 19:39:10 +0000 (UTC) (envelope-from rmacklem@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 33E11F60; Sat, 1 Oct 2016 19:39:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Jd9AW076291; Sat, 1 Oct 2016 19:39:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91Jd9hb076290; Sat, 1 Oct 2016 19:39:09 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610011939.u91Jd9hb076290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 1 Oct 2016 19:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306559 - 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.23 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: Sat, 01 Oct 2016 19:39:10 -0000 Author: rmacklem Date: Sat Oct 1 19:39:09 2016 New Revision: 306559 URL: https://svnweb.freebsd.org/changeset/base/306559 Log: r297225 broke udp_output() for the case where the "addr" argument is NULL and the function jumps to the "release:" label. For this case, the "inp" was write locked, but the code attempted to read unlock it. This patch fixes the problem. This case could occur for NFS over UDP mounts, where the server was down for a few minutes under certain circumstances. Reported by: bde Tested by: bde Reviewed by: gnn MFC after: 2 weeks Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sat Oct 1 19:30:28 2016 (r306558) +++ head/sys/netinet/udp_usrreq.c Sat Oct 1 19:39:09 2016 (r306559) @@ -1567,12 +1567,18 @@ udp_output(struct inpcb *inp, struct mbu release: if (unlock_udbinfo == UH_WLOCKED) { + KASSERT(unlock_inp == UH_WLOCKED, + ("%s: excl udbinfo lock, shared inp lock", __func__)); INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); } else if (unlock_udbinfo == UH_RLOCKED) { + KASSERT(unlock_inp == UH_RLOCKED, + ("%s: shared udbinfo lock, excl inp lock", __func__)); INP_HASH_RUNLOCK(pcbinfo); INP_RUNLOCK(inp); - } else + } else if (unlock_inp == UH_WLOCKED) + INP_WUNLOCK(inp); + else INP_RUNLOCK(inp); m_freem(m); return (error); From owner-svn-src-all@freebsd.org Sat Oct 1 20:31: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 402C6A9419A; Sat, 1 Oct 2016 20:31: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 108C0CF6; Sat, 1 Oct 2016 20:31:00 +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 u91KV0gD098851; Sat, 1 Oct 2016 20:31:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91KV09v098850; Sat, 1 Oct 2016 20:31:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201610012031.u91KV09v098850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 1 Oct 2016 20:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306560 - head/usr.bin/patch 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.23 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: Sat, 01 Oct 2016 20:31:01 -0000 Author: pfg Date: Sat Oct 1 20:31:00 2016 New Revision: 306560 URL: https://svnweb.freebsd.org/changeset/base/306560 Log: patch(1): make some macros look boolean. Minor cleanup inspired by a new patch(1) variant in schily tools. For reference: https://sourceforge.net/p/schillix-on/ MFC after: 1 week Modified: head/usr.bin/patch/common.h Modified: head/usr.bin/patch/common.h ============================================================================== --- head/usr.bin/patch/common.h Sat Oct 1 19:39:09 2016 (r306559) +++ head/usr.bin/patch/common.h Sat Oct 1 20:31:00 2016 (r306560) @@ -48,9 +48,9 @@ /* handy definitions */ #define strNE(s1,s2) (strcmp(s1, s2)) -#define strEQ(s1,s2) (!strcmp(s1, s2)) +#define strEQ(s1,s2) (strcmp(s1, s2) == 0) #define strnNE(s1,s2,l) (strncmp(s1, s2, l)) -#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l)) +#define strnEQ(s1,s2,l) (strncmp(s1, s2, l) == 0) /* typedefs */ From owner-svn-src-all@freebsd.org Sat Oct 1 20:46: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 28215A94815; Sat, 1 Oct 2016 20:46:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1B98C0; Sat, 1 Oct 2016 20:46:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Kk2vg003863; Sat, 1 Oct 2016 20:46:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91Kk2q6003862; Sat, 1 Oct 2016 20:46:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201610012046.u91Kk2q6003862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 1 Oct 2016 20:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306561 - head/usr.bin/patch 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.23 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: Sat, 01 Oct 2016 20:46:03 -0000 Author: pfg Date: Sat Oct 1 20:46:01 2016 New Revision: 306561 URL: https://svnweb.freebsd.org/changeset/base/306561 Log: patch(1): make some macros look boolean. Similar to r306560, plus remove an unused macro. Suggested by: jmallett Modified: head/usr.bin/patch/common.h Modified: head/usr.bin/patch/common.h ============================================================================== --- head/usr.bin/patch/common.h Sat Oct 1 20:31:00 2016 (r306560) +++ head/usr.bin/patch/common.h Sat Oct 1 20:46:01 2016 (r306561) @@ -47,9 +47,8 @@ /* handy definitions */ -#define strNE(s1,s2) (strcmp(s1, s2)) #define strEQ(s1,s2) (strcmp(s1, s2) == 0) -#define strnNE(s1,s2,l) (strncmp(s1, s2, l)) +#define strnNE(s1,s2,l) (strncmp(s1, s2, l) != 0) #define strnEQ(s1,s2,l) (strncmp(s1, s2, l) == 0) /* typedefs */ From owner-svn-src-all@freebsd.org Sat Oct 1 22:01: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 48F76A94C04; Sat, 1 Oct 2016 22:01:42 +0000 (UTC) (envelope-from jhb@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 217B89A5; Sat, 1 Oct 2016 22:01:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91M1fmT033480; Sat, 1 Oct 2016 22:01:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91M1fBV033479; Sat, 1 Oct 2016 22:01:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012201.u91M1fBV033479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306562 - head/usr.bin/kdump 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.23 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: Sat, 01 Oct 2016 22:01:42 -0000 Author: jhb Date: Sat Oct 1 22:01:41 2016 New Revision: 306562 URL: https://svnweb.freebsd.org/changeset/base/306562 Log: Handle 64-bit system call arguments (off_t, id_t). In particular, 64-bit system call arguments use up two register_t arguments for 32-bit processes. They must also be aligned on a 64-bit boundary on 32-bit powerpc processes. This fixes the decoding of lseek(), procctl(), and wait6() arguments for 32-bit processes (both native and via freebsd32). Note that the ktrace system call return record only returns a single register, so the return value of lseek is always truncated to the low 32-bits for 32-bit processes. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 20:46:01 2016 (r306561) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:01:41 2016 (r306562) @@ -74,6 +74,7 @@ extern int errno; #include #include #include +#include #include #include #include @@ -132,6 +133,27 @@ static struct ktr_header ktr_header; #define TIME_FORMAT "%b %e %T %Y" #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) +#define print_number64(first,i,n,c) do { \ + uint64_t __v; \ + \ + if (quad_align && (((ptrdiff_t)((i) - (first))) & 1) == 1) { \ + (i)++; \ + (n)--; \ + } \ + if (quad_slots == 2) \ + __v = (uint64_t)(uint32_t)(i)[0] | \ + ((uint64_t)(uint32_t)(i)[1]) << 32; \ + else \ + __v = (uint64_t)*(i); \ + if (decimal) \ + printf("%c%jd", (c), (intmax_t)__v); \ + else \ + printf("%c%#jx", (c), (uintmax_t)__v); \ + (i) += quad_slots; \ + (n) -= quad_slots; \ + (c) = ','; \ +} while (0) + #define print_number(i,n,c) do { \ if (decimal) \ printf("%c%jd", c, (intmax_t)*i); \ @@ -705,16 +727,25 @@ void ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) { int narg = ktr->ktr_narg; - register_t *ip; + register_t *ip, *first; intmax_t arg; + int quad_align, quad_slots; syscallname(ktr->ktr_code, sv_flags); - ip = &ktr->ktr_args[0]; + ip = first = &ktr->ktr_args[0]; if (narg) { char c = '('; if (fancy && (sv_flags == 0 || (sv_flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) { + quad_align = 0; + if (sv_flags & SV_ILP32) { +#ifdef __powerpc__ + quad_align = 1; +#endif + quad_slots = 2; + } else + quad_slots = 1; switch (ktr->ktr_code) { case SYS_bindat: case SYS_connectat: @@ -796,7 +827,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in c = ','; ip++; narg--; - print_number(ip, narg, c); + print_number64(first, ip, narg, c); print_number(ip, narg, c); putchar(','); wait6optname(*ip); @@ -996,7 +1027,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); /* Hidden 'pad' argument, not in lseek(2) */ print_number(ip, narg, c); - print_number(ip, narg, c); + print_number64(first, ip, narg, c); putchar(','); whencename(*ip); ip++; @@ -1005,8 +1036,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in #endif case SYS_lseek: print_number(ip, narg, c); - /* Hidden 'pad' argument, not in lseek(2) */ - print_number(ip, narg, c); + print_number64(first, ip, narg, c); putchar(','); whencename(*ip); ip++; @@ -1285,7 +1315,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in c = ','; ip++; narg--; - print_number(ip, narg, c); + print_number64(first, ip, narg, c); putchar(','); procctlcmdname(*ip); ip++; From owner-svn-src-all@freebsd.org Sat Oct 1 22:03: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 A3AACA94CF4; Sat, 1 Oct 2016 22:03:42 +0000 (UTC) (envelope-from jhb@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 7106CCFE; Sat, 1 Oct 2016 22:03:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91M3fbO033589; Sat, 1 Oct 2016 22:03:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91M3f2K033588; Sat, 1 Oct 2016 22:03:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012203.u91M3f2K033588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306563 - head/usr.bin/kdump 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.23 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: Sat, 01 Oct 2016 22:03:42 -0000 Author: jhb Date: Sat Oct 1 22:03:41 2016 New Revision: 306563 URL: https://svnweb.freebsd.org/changeset/base/306563 Log: Decode arguments to truncate and ftruncate. In particular, decode the off_t argument as a 64-bit argument to fix decoding for 32-bit processes. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:01:41 2016 (r306562) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:03:41 2016 (r306563) @@ -1341,6 +1341,12 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } ip++; narg--; + break; + case SYS_ftruncate: + case SYS_truncate: + print_number(ip, narg, c); + print_number64(first, ip, narg, c); + break; } } while (narg > 0) { From owner-svn-src-all@freebsd.org Sat Oct 1 22:08: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 6E6EDA94D83; Sat, 1 Oct 2016 22:08:09 +0000 (UTC) (envelope-from jhb@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 24FF6E8C; Sat, 1 Oct 2016 22:08:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91M88VA033784; Sat, 1 Oct 2016 22:08:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91M88U2033782; Sat, 1 Oct 2016 22:08:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012208.u91M88U2033782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306564 - in head: sys/sys usr.bin/kdump 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.23 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: Sat, 01 Oct 2016 22:08:09 -0000 Author: jhb Date: Sat Oct 1 22:08:07 2016 New Revision: 306564 URL: https://svnweb.freebsd.org/changeset/base/306564 Log: Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined. The kernel uses a few negative errno values for internal conditions such as requesting a system call restart. Normally these errno values are not exposed to userland. However, kdump needs access to these values as some of then can be present in a ktrace system call return record. Previously kdump was defining _KERNEL to gain access to ehse values, but was then having to manually declare 'errno' (and doing it incorrectly). Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL and uses the system-provided declaration of errno. Modified: head/sys/sys/errno.h head/usr.bin/kdump/kdump.c Modified: head/sys/sys/errno.h ============================================================================== --- head/sys/sys/errno.h Sat Oct 1 22:03:41 2016 (r306563) +++ head/sys/sys/errno.h Sat Oct 1 22:08:07 2016 (r306564) @@ -184,7 +184,7 @@ __END_DECLS #define ELAST 96 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) /* pseudo-errors returned inside kernel to modify return to process */ #define ERESTART (-1) /* restart syscall */ #define EJUSTRETURN (-2) /* don't modify regs, just return */ Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:03:41 2016 (r306563) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:08:07 2016 (r306564) @@ -41,10 +41,7 @@ static char sccsid[] = "@(#)kdump.c 8.1 #include __FBSDID("$FreeBSD$"); -#define _KERNEL -extern int errno; -#include -#undef _KERNEL +#define _WANT_KERNEL_ERRNO #include #include #include From owner-svn-src-all@freebsd.org Sat Oct 1 22:12: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 409BCA94F47; Sat, 1 Oct 2016 22:12:35 +0000 (UTC) (envelope-from jhb@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 E30FB286; Sat, 1 Oct 2016 22:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MCY6l037284; Sat, 1 Oct 2016 22:12:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MCYDc037283; Sat, 1 Oct 2016 22:12:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012212.u91MCYDc037283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306565 - head/usr.bin/kdump 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.23 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: Sat, 01 Oct 2016 22:12:35 -0000 Author: jhb Date: Sat Oct 1 22:12:33 2016 New Revision: 306565 URL: https://svnweb.freebsd.org/changeset/base/306565 Log: Use timercmp() and timersub() in kdump. Previously, kdump used the kernel-only timervalsub() macro which required defining _KERNEL when including . Now, kdump uses the existing userland API. The timercmp() usage to check for a backwards timestamp is also clearer and simpler than the previous code which checked the result of the subtraction for a negative value. While here, take advantage of the 3-arg timersub() to store the subtraction results in a tempory timeval instead of overwriting the timestamp in the ktrace record and then having to restore it. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:08:07 2016 (r306564) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:12:33 2016 (r306565) @@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _KERNEL #include -#undef _KERNEL #include #include #include @@ -637,27 +635,23 @@ dumpheader(struct ktr_header *kth) if (timestamp & TIMESTAMP_ELAPSED) { if (prevtime_e.tv_sec == 0) prevtime_e = kth->ktr_time; - timevalsub(&kth->ktr_time, &prevtime_e); - printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, - kth->ktr_time.tv_usec); - timevaladd(&kth->ktr_time, &prevtime_e); + timersub(&kth->ktr_time, &prevtime_e, &temp); + printf("%jd.%06ld ", (intmax_t)temp.tv_sec, + temp.tv_usec); } if (timestamp & TIMESTAMP_RELATIVE) { if (prevtime.tv_sec == 0) prevtime = kth->ktr_time; - temp = kth->ktr_time; - timevalsub(&kth->ktr_time, &prevtime); - if ((intmax_t)kth->ktr_time.tv_sec < 0) { - kth->ktr_time = prevtime; - prevtime = temp; - timevalsub(&kth->ktr_time, &prevtime); + if (timercmp(&kth->ktr_time, &prevtime, <)) { + timersub(&prevtime, &kth->ktr_time, &temp); sign = "-"; } else { - prevtime = temp; + timersub(&kth->ktr_time, &prevtime, &temp); sign = ""; } - printf("%s%jd.%06ld ", sign, (intmax_t)kth->ktr_time.tv_sec, - kth->ktr_time.tv_usec); + prevtime = kth->ktr_time; + printf("%s%jd.%06ld ", sign, (intmax_t)temp.tv_sec, + temp.tv_usec); } } printf("%s ", type); From owner-svn-src-all@freebsd.org Sat Oct 1 22:17: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 14284A94FCC; Sat, 1 Oct 2016 22:17:42 +0000 (UTC) (envelope-from jhb@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 D08BA667; Sat, 1 Oct 2016 22:17:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MHflI037518; Sat, 1 Oct 2016 22:17:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MHfvf037517; Sat, 1 Oct 2016 22:17:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012217.u91MHfvf037517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306566 - head/usr.bin/kdump 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.23 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: Sat, 01 Oct 2016 22:17:42 -0000 Author: jhb Date: Sat Oct 1 22:17:40 2016 New Revision: 306566 URL: https://svnweb.freebsd.org/changeset/base/306566 Log: Don't declare the 'temp' timeval as static. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:12:33 2016 (r306565) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:17:40 2016 (r306566) @@ -562,7 +562,8 @@ void dumpheader(struct ktr_header *kth) { static char unknown[64]; - static struct timeval prevtime, prevtime_e, temp; + static struct timeval prevtime, prevtime_e; + struct timeval temp; const char *type; const char *sign; From owner-svn-src-all@freebsd.org Sat Oct 1 22:21:11 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 355F5A940C2; Sat, 1 Oct 2016 22:21:11 +0000 (UTC) (envelope-from vangyzen@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 05B5C99F; Sat, 1 Oct 2016 22:21:10 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MLA0S040373; Sat, 1 Oct 2016 22:21:10 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MLAvZ040372; Sat, 1 Oct 2016 22:21:10 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610012221.u91MLAvZ040372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 1 Oct 2016 22:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306567 - head/sys/dev/lmc 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.23 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: Sat, 01 Oct 2016 22:21:11 -0000 Author: vangyzen Date: Sat Oct 1 22:21:10 2016 New Revision: 306567 URL: https://svnweb.freebsd.org/changeset/base/306567 Log: lmc(4): fix the build without the bpf device "make buildkernel" now works with and without "device bpf". Reported by: Dave Mischler MFC after: 3 days Sponsored by: Dell EMC Modified: head/sys/dev/lmc/if_lmc.c Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Sat Oct 1 22:17:40 2016 (r306566) +++ head/sys/dev/lmc/if_lmc.c Sat Oct 1 22:21:10 2016 (r306567) @@ -91,7 +91,11 @@ # define P2P 0 /* not in FreeBSD */ # define NSPPP 1 /* No count devices in FreeBSD 5 */ # include "opt_bpf.h" /* DEV_BPF */ -# define NBPFILTER DEV_BPF +# ifdef DEV_BPF +# define NBPFILTER 1 +# else +# define NBPFILTER 0 +# endif # define GEN_HDLC 0 /* not in FreeBSD */ # # include From owner-svn-src-all@freebsd.org Sat Oct 1 22:34: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 3B1ADA9449D; Sat, 1 Oct 2016 22:34:40 +0000 (UTC) (envelope-from vangyzen@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 00A25F7C; Sat, 1 Oct 2016 22:34:39 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MYdtE044970; Sat, 1 Oct 2016 22:34:39 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MYdSO044969; Sat, 1 Oct 2016 22:34:39 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610012234.u91MYdSO044969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 1 Oct 2016 22:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306568 - head/include 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.23 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: Sat, 01 Oct 2016 22:34:40 -0000 Author: vangyzen Date: Sat Oct 1 22:34:38 2016 New Revision: 306568 URL: https://svnweb.freebsd.org/changeset/base/306568 Log: Add the __printflike attribute to the declaration of dprintf(3) MFC after: 3 days Sponsored by: Dell EMC Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sat Oct 1 22:21:10 2016 (r306567) +++ head/include/stdio.h Sat Oct 1 22:34:38 2016 (r306568) @@ -359,7 +359,7 @@ int renameat(int, const char *, int, co int vdprintf(int, const char * __restrict, __va_list); /* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); -int dprintf(int, const char * __restrict, ...); +int dprintf(int, const char * __restrict, ...) __printflike(2, 3); #endif /* __POSIX_VISIBLE >= 200809 */ /* From owner-svn-src-all@freebsd.org Sat Oct 1 23:08:27 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 4CE7DA94C15; Sat, 1 Oct 2016 23:08:27 +0000 (UTC) (envelope-from vangyzen@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 1FBCBCDD; Sat, 1 Oct 2016 23:08:27 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91N8QVf056259; Sat, 1 Oct 2016 23:08:26 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91N8Qh9056258; Sat, 1 Oct 2016 23:08:26 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610012308.u91N8Qh9056258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 1 Oct 2016 23:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306569 - head/include 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.23 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: Sat, 01 Oct 2016 23:08:27 -0000 Author: vangyzen Date: Sat Oct 1 23:08:26 2016 New Revision: 306569 URL: https://svnweb.freebsd.org/changeset/base/306569 Log: Add the __printflike attribute to the declaration of vdprintf(3) I intended to add this in r306568. MFC after: 3 days Sponsored by: Dell EMC Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sat Oct 1 22:34:38 2016 (r306568) +++ head/include/stdio.h Sat Oct 1 23:08:26 2016 (r306569) @@ -356,7 +356,7 @@ ssize_t getdelim(char ** __restrict, si FILE * __restrict); FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); -int vdprintf(int, const char * __restrict, __va_list); +int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); /* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); int dprintf(int, const char * __restrict, ...) __printflike(2, 3);